@ddrinnova/agentsgt-widget 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/widget.es.js +2208 -2194
- package/dist/widget.umd.js +33 -33
- package/package.json +1 -1
package/dist/widget.umd.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Ah;function P0(){if(Ah)return xa;Ah=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var h in o)h!=="key"&&(s[h]=o[h])}else s=o;return o=s.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:s}}return xa.Fragment=n,xa.jsx=i,xa.jsxs=i,xa}var Oh;function K0(){return Oh||(Oh=1,Bo.exports=P0()),Bo.exports}var
|
|
9
|
+
*/var Ah;function P0(){if(Ah)return xa;Ah=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(l,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var h in o)h!=="key"&&(s[h]=o[h])}else s=o;return o=s.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:s}}return xa.Fragment=n,xa.jsx=i,xa.jsxs=i,xa}var Oh;function K0(){return Oh||(Oh=1,Bo.exports=P0()),Bo.exports}var K=K0(),Ho={exports:{}},Ea={},qo={exports:{}},$o={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* scheduler.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ch;function W0(){return Ch||(Ch=1,function(e){function n(
|
|
17
|
+
*/var Ch;function W0(){return Ch||(Ch=1,function(e){function n(L,J){var ue=L.length;L.push(J);e:for(;0<ue;){var he=ue-1>>>1,z=L[he];if(0<o(z,J))L[he]=J,L[ue]=z,ue=he;else break e}}function i(L){return L.length===0?null:L[0]}function l(L){if(L.length===0)return null;var J=L[0],ue=L.pop();if(ue!==J){L[0]=ue;e:for(var he=0,z=L.length,A=z>>>1;he<A;){var H=2*(he+1)-1,x=L[H],te=H+1,ve=L[te];if(0>o(x,ue))te<z&&0>o(ve,x)?(L[he]=ve,L[te]=ue,he=te):(L[he]=x,L[H]=ue,he=H);else if(te<z&&0>o(ve,ue))L[he]=ve,L[te]=ue,he=te;else break e}}return J}function o(L,J){var ue=L.sortIndex-J.sortIndex;return ue!==0?ue:L.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,h=c.now();e.unstable_now=function(){return c.now()-h}}var m=[],d=[],y=1,g=null,_=3,b=!1,E=!1,k=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function P(L){for(var J=i(d);J!==null;){if(J.callback===null)l(d);else if(J.startTime<=L)l(d),J.sortIndex=J.expirationTime,n(m,J);else break;J=i(d)}}function F(L){if(k=!1,P(L),!E)if(i(m)!==null)E=!0,D||(D=!0,ne());else{var J=i(d);J!==null&&fe(F,J.startTime-L)}}var D=!1,X=-1,se=5,be=-1;function Z(){return R?!0:!(e.unstable_now()-be<se)}function ie(){if(R=!1,D){var L=e.unstable_now();be=L;var J=!0;try{e:{E=!1,k&&(k=!1,B(X),X=-1),b=!0;var ue=_;try{t:{for(P(L),g=i(m);g!==null&&!(g.expirationTime>L&&Z());){var he=g.callback;if(typeof he=="function"){g.callback=null,_=g.priorityLevel;var z=he(g.expirationTime<=L);if(L=e.unstable_now(),typeof z=="function"){g.callback=z,P(L),J=!0;break t}g===i(m)&&l(m),P(L)}else l(m);g=i(m)}if(g!==null)J=!0;else{var A=i(d);A!==null&&fe(F,A.startTime-L),J=!1}}break e}finally{g=null,_=ue,b=!1}J=void 0}}finally{J?ne():D=!1}}}var ne;if(typeof w=="function")ne=function(){w(ie)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,re=ae.port2;ae.port1.onmessage=ie,ne=function(){re.postMessage(null)}}else ne=function(){C(ie,0)};function fe(L,J){X=C(function(){L(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(L){switch(_){case 1:case 2:case 3:var J=3;break;default:J=_}var ue=_;_=J;try{return L()}finally{_=ue}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(L,J){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ue=_;_=L;try{return J()}finally{_=ue}},e.unstable_scheduleCallback=function(L,J,ue){var he=e.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?he+ue:he):ue=he,L){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=ue+z,L={id:y++,callback:J,priorityLevel:L,startTime:ue,expirationTime:z,sortIndex:-1},ue>he?(L.sortIndex=ue,n(d,L),i(m)===null&&L===i(d)&&(k?(B(X),X=-1):k=!0,fe(F,ue-he))):(L.sortIndex=z,n(m,L),E||b||(E=!0,D||(D=!0,ne()))),L},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(L){var J=_;return function(){var ue=_;_=J;try{return L.apply(this,arguments)}finally{_=ue}}}}($o)),$o}var Nh;function e1(){return Nh||(Nh=1,qo.exports=W0()),qo.exports}var Vo={exports:{}},Se={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Dh;function t1(){if(Dh)return Se;Dh=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),_=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=_&&A[_]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},
|
|
25
|
+
*/var Dh;function t1(){if(Dh)return Se;Dh=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),_=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=_&&A[_]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,R={};function C(A,H,x){this.props=A,this.context=H,this.refs=R,this.updater=x||E}C.prototype.isReactComponent={},C.prototype.setState=function(A,H){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,H,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function B(){}B.prototype=C.prototype;function w(A,H,x){this.props=A,this.context=H,this.refs=R,this.updater=x||E}var P=w.prototype=new B;P.constructor=w,k(P,C.prototype),P.isPureReactComponent=!0;var F=Array.isArray;function D(){}var X={H:null,A:null,T:null,S:null},se=Object.prototype.hasOwnProperty;function be(A,H,x){var te=x.ref;return{$$typeof:e,type:A,key:H,ref:te!==void 0?te:null,props:x}}function Z(A,H){return be(A.type,H,A.props)}function ie(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function ne(A){var H={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(x){return H[x]})}var ae=/\/+/g;function re(A,H){return typeof A=="object"&&A!==null&&A.key!=null?ne(""+A.key):H.toString(36)}function fe(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(D,D):(A.status="pending",A.then(function(H){A.status==="pending"&&(A.status="fulfilled",A.value=H)},function(H){A.status==="pending"&&(A.status="rejected",A.reason=H)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function L(A,H,x,te,ve){var pe=typeof A;(pe==="undefined"||pe==="boolean")&&(A=null);var Ne=!1;if(A===null)Ne=!0;else switch(pe){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(A.$$typeof){case e:case n:Ne=!0;break;case y:return Ne=A._init,L(Ne(A._payload),H,x,te,ve)}}if(Ne)return ve=ve(A),Ne=te===""?"."+re(A,0):te,F(ve)?(x="",Ne!=null&&(x=Ne.replace(ae,"$&/")+"/"),L(ve,H,x,"",function(hn){return hn})):ve!=null&&(ie(ve)&&(ve=Z(ve,x+(ve.key==null||A&&A.key===ve.key?"":(""+ve.key).replace(ae,"$&/")+"/")+Ne)),H.push(ve)),1;Ne=0;var ot=te===""?".":te+":";if(F(A))for(var Ye=0;Ye<A.length;Ye++)te=A[Ye],pe=ot+re(te,Ye),Ne+=L(te,H,x,pe,ve);else if(Ye=b(A),typeof Ye=="function")for(A=Ye.call(A),Ye=0;!(te=A.next()).done;)te=te.value,pe=ot+re(te,Ye++),Ne+=L(te,H,x,pe,ve);else if(pe==="object"){if(typeof A.then=="function")return L(fe(A),H,x,te,ve);throw H=String(A),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function J(A,H,x){if(A==null)return A;var te=[],ve=0;return L(A,te,"","",function(pe){return H.call(x,pe,ve++)}),te}function ue(A){if(A._status===-1){var H=A._result;H=H(),H.then(function(x){(A._status===0||A._status===-1)&&(A._status=1,A._result=x)},function(x){(A._status===0||A._status===-1)&&(A._status=2,A._result=x)}),A._status===-1&&(A._status=0,A._result=H)}if(A._status===1)return A._result.default;throw A._result}var he=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},z={map:J,forEach:function(A,H,x){J(A,function(){H.apply(this,arguments)},x)},count:function(A){var H=0;return J(A,function(){H++}),H},toArray:function(A){return J(A,function(H){return H})||[]},only:function(A){if(!ie(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Se.Activity=g,Se.Children=z,Se.Component=C,Se.Fragment=i,Se.Profiler=o,Se.PureComponent=w,Se.StrictMode=l,Se.Suspense=m,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,Se.__COMPILER_RUNTIME={__proto__:null,c:function(A){return X.H.useMemoCache(A)}},Se.cache=function(A){return function(){return A.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(A,H,x){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var te=k({},A.props),ve=A.key;if(H!=null)for(pe in H.key!==void 0&&(ve=""+H.key),H)!se.call(H,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&H.ref===void 0||(te[pe]=H[pe]);var pe=arguments.length-2;if(pe===1)te.children=x;else if(1<pe){for(var Ne=Array(pe),ot=0;ot<pe;ot++)Ne[ot]=arguments[ot+2];te.children=Ne}return be(A.type,ve,te)},Se.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:s,_context:A},A},Se.createElement=function(A,H,x){var te,ve={},pe=null;if(H!=null)for(te in H.key!==void 0&&(pe=""+H.key),H)se.call(H,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ve[te]=H[te]);var Ne=arguments.length-2;if(Ne===1)ve.children=x;else if(1<Ne){for(var ot=Array(Ne),Ye=0;Ye<Ne;Ye++)ot[Ye]=arguments[Ye+2];ve.children=ot}if(A&&A.defaultProps)for(te in Ne=A.defaultProps,Ne)ve[te]===void 0&&(ve[te]=Ne[te]);return be(A,pe,ve)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(A){return{$$typeof:h,render:A}},Se.isValidElement=ie,Se.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:ue}},Se.memo=function(A,H){return{$$typeof:d,type:A,compare:H===void 0?null:H}},Se.startTransition=function(A){var H=X.T,x={};X.T=x;try{var te=A(),ve=X.S;ve!==null&&ve(x,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(D,he)}catch(pe){he(pe)}finally{H!==null&&x.types!==null&&(H.types=x.types),X.T=H}},Se.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},Se.use=function(A){return X.H.use(A)},Se.useActionState=function(A,H,x){return X.H.useActionState(A,H,x)},Se.useCallback=function(A,H){return X.H.useCallback(A,H)},Se.useContext=function(A){return X.H.useContext(A)},Se.useDebugValue=function(){},Se.useDeferredValue=function(A,H){return X.H.useDeferredValue(A,H)},Se.useEffect=function(A,H){return X.H.useEffect(A,H)},Se.useEffectEvent=function(A){return X.H.useEffectEvent(A)},Se.useId=function(){return X.H.useId()},Se.useImperativeHandle=function(A,H,x){return X.H.useImperativeHandle(A,H,x)},Se.useInsertionEffect=function(A,H){return X.H.useInsertionEffect(A,H)},Se.useLayoutEffect=function(A,H){return X.H.useLayoutEffect(A,H)},Se.useMemo=function(A,H){return X.H.useMemo(A,H)},Se.useOptimistic=function(A,H){return X.H.useOptimistic(A,H)},Se.useReducer=function(A,H,x){return X.H.useReducer(A,H,x)},Se.useRef=function(A){return X.H.useRef(A)},Se.useState=function(A){return X.H.useState(A)},Se.useSyncExternalStore=function(A,H,x){return X.H.useSyncExternalStore(A,H,x)},Se.useTransition=function(){return X.H.useTransition()},Se.version="19.2.4",Se}var Mh;function Yo(){return Mh||(Mh=1,Vo.exports=t1()),Vo.exports}var Go={exports:{}},Ot={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -38,67 +38,67 @@
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Uh;function i1(){if(Uh)return Ea;Uh=1;var e=e1(),n=Yo(),i=r1();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,r.flags&4098&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function h(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function m(t){if(s(t)!==t)throw Error(l(188))}function d(t){var r=t.alternate;if(!r){if(r=s(t),r===null)throw Error(l(188));return r!==t?null:t}for(var a=t,u=r;;){var f=a.return;if(f===null)break;var p=f.alternate;if(p===null){if(u=f.return,u!==null){a=u;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===a)return m(f),t;if(p===u)return m(f),r;p=p.sibling}throw Error(l(188))}if(a.return!==u.return)a=f,u=p;else{for(var v=!1,S=f.child;S;){if(S===a){v=!0,a=f,u=p;break}if(S===u){v=!0,u=f,a=p;break}S=S.sibling}if(!v){for(S=p.child;S;){if(S===a){v=!0,a=p,u=f;break}if(S===u){v=!0,u=p,a=f;break}S=S.sibling}if(!v)throw Error(l(189))}}if(a.alternate!==u)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var g=Object.assign,_=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),
|
|
41
|
+
*/var Uh;function i1(){if(Uh)return Ea;Uh=1;var e=e1(),n=Yo(),i=r1();function l(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,r.flags&4098&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function h(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function m(t){if(s(t)!==t)throw Error(l(188))}function d(t){var r=t.alternate;if(!r){if(r=s(t),r===null)throw Error(l(188));return r!==t?null:t}for(var a=t,u=r;;){var f=a.return;if(f===null)break;var p=f.alternate;if(p===null){if(u=f.return,u!==null){a=u;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===a)return m(f),t;if(p===u)return m(f),r;p=p.sibling}throw Error(l(188))}if(a.return!==u.return)a=f,u=p;else{for(var v=!1,S=f.child;S;){if(S===a){v=!0,a=f,u=p;break}if(S===u){v=!0,u=f,a=p;break}S=S.sibling}if(!v){for(S=p.child;S;){if(S===a){v=!0,a=p,u=f;break}if(S===u){v=!0,u=p,a=f;break}S=S.sibling}if(!v)throw Error(l(189))}}if(a.alternate!==u)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:r}function y(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=y(t),r!==null)return r;t=t.sibling}return null}var g=Object.assign,_=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),w=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),be=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function ne(t){return t===null||typeof t!="object"?null:(t=ie&&t[ie]||t["@@iterator"],typeof t=="function"?t:null)}var ae=Symbol.for("react.client.reference");function re(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ae?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case F:return"Suspense";case D:return"SuspenseList";case be:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case w:return t.displayName||"Context";case B:return(t._context.displayName||"Context")+".Consumer";case P:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case X:return r=t.displayName||null,r!==null?r:re(t.type)||"Memo";case se:r=t._payload,t=t._init;try{return re(t(r))}catch{}}return null}var fe=Array.isArray,L=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},he=[],z=-1;function A(t){return{current:t}}function H(t){0>z||(t.current=he[z],he[z]=null,z--)}function x(t,r){z++,he[z]=t.current,t.current=r}var te=A(null),ve=A(null),pe=A(null),Ne=A(null);function ot(t,r){switch(x(pe,r),x(ve,t),x(te,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?b0(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=b0(r),t=_0(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}H(te),x(te,t)}function Ye(){H(te),H(ve),H(pe)}function hn(t){t.memoizedState!==null&&x(Ne,t);var r=te.current,a=_0(r,t.type);r!==a&&(x(ve,t),x(te,a))}function Hn(t){ve.current===t&&(H(te),H(ve)),Ne.current===t&&(H(Ne),Zl._currentValue=ue)}var Fa,_u;function qn(t){if(Fa===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Fa=r&&r[1]||"",_u=-1<a.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Fa+t+_u}var Ri=!1;function ji(t,r){if(!t||Ri)return"";Ri=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(I){var U=I}Reflect.construct(t,[],G)}else{try{G.call()}catch(I){U=I}t.call(G.prototype)}}else{try{throw Error()}catch(I){U=I}(G=t())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(I){if(I&&U&&typeof I.stack=="string")return[I.stack,U.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=u.DetermineComponentFrameRoot(),v=p[0],S=p[1];if(v&&S){var
|
|
43
|
+
`+Fa+t+_u}var Ri=!1;function ji(t,r){if(!t||Ri)return"";Ri=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(I){var U=I}Reflect.construct(t,[],G)}else{try{G.call()}catch(I){U=I}t.call(G.prototype)}}else{try{throw Error()}catch(I){U=I}(G=t())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(I){if(I&&U&&typeof I.stack=="string")return[I.stack,U.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=u.DetermineComponentFrameRoot(),v=p[0],S=p[1];if(v&&S){var T=v.split(`
|
|
44
44
|
`),j=S.split(`
|
|
45
|
-
`);for(f=u=0;u<
|
|
46
|
-
`+
|
|
45
|
+
`);for(f=u=0;u<T.length&&!T[u].includes("DetermineComponentFrameRoot");)u++;for(;f<j.length&&!j[f].includes("DetermineComponentFrameRoot");)f++;if(u===T.length||f===j.length)for(u=T.length-1,f=j.length-1;1<=u&&0<=f&&T[u]!==j[f];)f--;for(;1<=u&&0<=f;u--,f--)if(T[u]!==j[f]){if(u!==1||f!==1)do if(u--,f--,0>f||T[u]!==j[f]){var q=`
|
|
46
|
+
`+T[u].replace(" at new "," at ");return t.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",t.displayName)),q}while(1<=u&&0<=f);break}}}finally{Ri=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?qn(a):""}function Su(t,r){switch(t.tag){case 26:case 27:case 5:return qn(t.type);case 16:return qn("Lazy");case 13:return t.child!==r&&r!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return ji(t.type,!1);case 11:return ji(t.type.render,!1);case 1:return ji(t.type,!0);case 31:return qn("Activity");default:return""}}function xu(t){try{var r="",a=null;do r+=Su(t,a),a=t,t=t.return;while(t);return r}catch(u){return`
|
|
47
47
|
Error generating stack: `+u.message+`
|
|
48
|
-
`+u.stack}}var Ui=Object.prototype.hasOwnProperty,Zi=e.unstable_scheduleCallback,Ja=e.unstable_cancelCallback,fc=e.unstable_shouldYield,hc=e.unstable_requestPaint,Zt=e.unstable_now,pc=e.unstable_getCurrentPriorityLevel,V=e.unstable_ImmediatePriority,W=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Ae=e.unstable_LowPriority,He=e.unstable_IdlePriority,en=e.log,$n=e.unstable_setDisableYieldValue,Lt=null,_t=null;function $t(t){if(typeof en=="function"&&$n(t),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Lt,t)}catch{}}var Pe=Math.clz32?Math.clz32:s4,yr=Math.log,kn=Math.LN2;function s4(t){return t>>>=0,t===0?32:31-(yr(t)/kn|0)|0}var Eu=256,zu=262144,wu=4194304;function Qr(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ku(t,r,a){var u=t.pendingLanes;if(u===0)return 0;var f=0,p=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var S=u&134217727;return S!==0?(u=S&~p,u!==0?f=Qr(u):(v&=S,v!==0?f=Qr(v):a||(a=S&~t,a!==0&&(f=Qr(a))))):(S=u&~p,S!==0?f=Qr(S):v!==0?f=Qr(v):a||(a=u&~t,a!==0&&(f=Qr(a)))),f===0?0:r!==0&&r!==f&&!(r&p)&&(p=f&-f,a=r&-r,p>=a||p===32&&(a&4194048)!==0)?r:f}function Qa(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function c4(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ey(){var t=wu;return wu<<=1,!(wu&62914560)&&(wu=4194304),t}function dc(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Pa(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function f4(t,r,a,u,f,p){var v=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var S=t.entanglements,w=t.expirationTimes,j=t.hiddenUpdates;for(a=v&~a;0<a;){var q=31-Pe(a),G=1<<q;S[q]=0,w[q]=-1;var U=j[q];if(U!==null)for(j[q]=null,q=0;q<U.length;q++){var I=U[q];I!==null&&(I.lane&=-536870913)}a&=~G}u!==0&&ty(t,u,0),p!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=p&~(v&~r))}function ty(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-Pe(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|a&261930}function ny(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var u=31-Pe(a),f=1<<u;f&r|t[u]&r&&(t[u]|=r),a&=~f}}function ry(t,r){var a=r&-r;return a=a&42?1:mc(a),a&(t.suspendedLanes|r)?0:a}function mc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function gc(t){return t&=-t,2<t?8<t?t&134217727?32:268435456:8:2}function iy(){var t=F.p;return t!==0?t:(t=window.event,t===void 0?32:$0(t.type))}function ay(t,r){var a=F.p;try{return F.p=t,r()}finally{F.p=a}}var vr=Math.random().toString(36).slice(2),zt="__reactFiber$"+vr,Vt="__reactProps$"+vr,Li="__reactContainer$"+vr,yc="__reactEvents$"+vr,h4="__reactListeners$"+vr,p4="__reactHandles$"+vr,ly="__reactResources$"+vr,Ka="__reactMarker$"+vr;function vc(t){delete t[zt],delete t[Vt],delete t[yc],delete t[h4],delete t[p4]}function Ii(t){var r=t[zt];if(r)return r;for(var a=t.parentNode;a;){if(r=a[Li]||a[zt]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=T0(t);t!==null;){if(a=t[zt])return a;t=T0(t)}return r}t=a,a=t.parentNode}return null}function Bi(t){if(t=t[zt]||t[Li]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Wa(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function Hi(t){var r=t[ly];return r||(r=t[ly]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function xt(t){t[Ka]=!0}var uy=new Set,oy={};function Pr(t,r){qi(t,r),qi(t+"Capture",r)}function qi(t,r){for(oy[t]=r,t=0;t<r.length;t++)uy.add(r[t])}var d4=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]*$"),sy={},cy={};function m4(t){return Ui.call(cy,t)?!0:Ui.call(sy,t)?!1:d4.test(t)?cy[t]=!0:(sy[t]=!0,!1)}function Tu(t,r,a){if(m4(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function Au(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Vn(t,r,a,u){if(u===null)t.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+u)}}function pn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function fy(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function g4(t,r,a){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,p=u.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,p.call(this,v)}}),Object.defineProperty(t,r,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function bc(t){if(!t._valueTracker){var r=fy(t)?"checked":"value";t._valueTracker=g4(t,r,""+t[r])}}function hy(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),u="";return t&&(u=fy(t)?t.checked?"true":"false":t.value),t=u,t!==a?(r.setValue(t),!0):!1}function Ou(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var y4=/[\n"\\]/g;function dn(t){return t.replace(y4,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function _c(t,r,a,u,f,p,v,S){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),r!=null?v==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+pn(r)):t.value!==""+pn(r)&&(t.value=""+pn(r)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),r!=null?Sc(t,v,pn(r)):a!=null?Sc(t,v,pn(a)):u!=null&&t.removeAttribute("value"),f==null&&p!=null&&(t.defaultChecked=!!p),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+pn(S):t.removeAttribute("name")}function py(t,r,a,u,f,p,v,S){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),r!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||r!=null)){bc(t);return}a=a!=null?""+pn(a):"",r=r!=null?""+pn(r):a,S||r===t.value||(t.value=r),t.defaultValue=r}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=S?t.checked:!!u,t.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),bc(t)}function Sc(t,r,a){r==="number"&&Ou(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function $i(t,r,a,u){if(t=t.options,r){r={};for(var f=0;f<a.length;f++)r["$"+a[f]]=!0;for(a=0;a<t.length;a++)f=r.hasOwnProperty("$"+t[a].value),t[a].selected!==f&&(t[a].selected=f),f&&u&&(t[a].defaultSelected=!0)}else{for(a=""+pn(a),r=null,f=0;f<t.length;f++){if(t[f].value===a){t[f].selected=!0,u&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function dy(t,r,a){if(r!=null&&(r=""+pn(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+pn(a):""}function my(t,r,a,u){if(r==null){if(u!=null){if(a!=null)throw Error(l(92));if(fe(u)){if(1<u.length)throw Error(l(93));u=u[0]}a=u}a==null&&(a=""),r=a}a=pn(r),t.defaultValue=a,u=t.textContent,u===a&&u!==""&&u!==null&&(t.value=u),bc(t)}function Vi(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var v4=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 gy(t,r,a){var u=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,a):typeof a!="number"||a===0||v4.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function yy(t,r,a){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var f in r)u=r[f],r.hasOwnProperty(f)&&a[f]!==u&&gy(t,f,u)}else for(var p in r)r.hasOwnProperty(p)&&gy(t,p,r[p])}function xc(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var b4=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"]]),_4=/^[\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 Cu(t){return _4.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Yn(){}var Ec=null;function zc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Yi=null,Gi=null;function vy(t){var r=Bi(t);if(r&&(t=r.stateNode)){var a=t[Vt]||null;e:switch(t=r.stateNode,r.type){case"input":if(_c(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+dn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var u=a[r];if(u!==t&&u.form===t.form){var f=u[Vt]||null;if(!f)throw Error(l(90));_c(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<a.length;r++)u=a[r],u.form===t.form&&hy(u)}break e;case"textarea":dy(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&$i(t,!!a.multiple,r,!1)}}}var wc=!1;function by(t,r,a){if(wc)return t(r,a);wc=!0;try{var u=t(r);return u}finally{if(wc=!1,(Yi!==null||Gi!==null)&&(vo(),Yi&&(r=Yi,t=Gi,Gi=Yi=null,vy(r),t)))for(r=0;r<t.length;r++)vy(t[r])}}function el(t,r){var a=t.stateNode;if(a===null)return null;var u=a[Vt]||null;if(u===null)return null;a=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,r,typeof a));return a}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kc=!1;if(Gn)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){kc=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{kc=!1}var br=null,Tc=null,Nu=null;function _y(){if(Nu)return Nu;var t,r=Tc,a=r.length,u,f="value"in br?br.value:br.textContent,p=f.length;for(t=0;t<a&&r[t]===f[t];t++);var v=a-t;for(u=1;u<=v&&r[a-u]===f[p-u];u++);return Nu=f.slice(t,1<u?1-u:void 0)}function Du(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Mu(){return!0}function Sy(){return!1}function Yt(t){function r(a,u,f,p,v){this._reactName=a,this._targetInst=f,this.type=u,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(a=t[S],this[S]=a?a(p):p[S]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Mu:Sy,this.isPropagationStopped=Sy,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Mu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Mu)},persist:function(){},isPersistent:Mu}),r}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ru=Yt(Kr),nl=g({},Kr,{view:0,detail:0}),S4=Yt(nl),Ac,Oc,rl,ju=g({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==rl&&(rl&&t.type==="mousemove"?(Ac=t.screenX-rl.screenX,Oc=t.screenY-rl.screenY):Oc=Ac=0,rl=t),Ac)},movementY:function(t){return"movementY"in t?t.movementY:Oc}}),xy=Yt(ju),x4=g({},ju,{dataTransfer:0}),E4=Yt(x4),z4=g({},nl,{relatedTarget:0}),Cc=Yt(z4),w4=g({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),k4=Yt(w4),T4=g({},Kr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),A4=Yt(T4),O4=g({},Kr,{data:0}),Ey=Yt(O4),C4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N4={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"},D4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M4(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=D4[t])?!!r[t]:!1}function Nc(){return M4}var R4=g({},nl,{key:function(t){if(t.key){var r=C4[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Du(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?N4[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nc,charCode:function(t){return t.type==="keypress"?Du(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Du(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),j4=Yt(R4),U4=g({},ju,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zy=Yt(U4),Z4=g({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nc}),L4=Yt(Z4),I4=g({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),B4=Yt(I4),H4=g({},ju,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),q4=Yt(H4),$4=g({},Kr,{newState:0,oldState:0}),V4=Yt($4),Y4=[9,13,27,32],Dc=Gn&&"CompositionEvent"in window,il=null;Gn&&"documentMode"in document&&(il=document.documentMode);var G4=Gn&&"TextEvent"in window&&!il,wy=Gn&&(!Dc||il&&8<il&&11>=il),ky=" ",Ty=!1;function Ay(t,r){switch(t){case"keyup":return Y4.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function X4(t,r){switch(t){case"compositionend":return Oy(r);case"keypress":return r.which!==32?null:(Ty=!0,ky);case"textInput":return t=r.data,t===ky&&Ty?null:t;default:return null}}function F4(t,r){if(Xi)return t==="compositionend"||!Dc&&Ay(t,r)?(t=_y(),Nu=Tc=br=null,Xi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return wy&&r.locale!=="ko"?null:r.data;default:return null}}var J4={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 Cy(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!J4[t.type]:r==="textarea"}function Ny(t,r,a,u){Yi?Gi?Gi.push(u):Gi=[u]:Yi=u,r=wo(r,"onChange"),0<r.length&&(a=new Ru("onChange","change",null,a,u),t.push({event:a,listeners:r}))}var al=null,ll=null;function Q4(t){p0(t,0)}function Uu(t){var r=Wa(t);if(hy(r))return t}function Dy(t,r){if(t==="change")return r}var My=!1;if(Gn){var Mc;if(Gn){var Rc="oninput"in document;if(!Rc){var Ry=document.createElement("div");Ry.setAttribute("oninput","return;"),Rc=typeof Ry.oninput=="function"}Mc=Rc}else Mc=!1;My=Mc&&(!document.documentMode||9<document.documentMode)}function jy(){al&&(al.detachEvent("onpropertychange",Uy),ll=al=null)}function Uy(t){if(t.propertyName==="value"&&Uu(ll)){var r=[];Ny(r,ll,t,zc(t)),by(Q4,r)}}function P4(t,r,a){t==="focusin"?(jy(),al=r,ll=a,al.attachEvent("onpropertychange",Uy)):t==="focusout"&&jy()}function K4(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Uu(ll)}function W4(t,r){if(t==="click")return Uu(r)}function eN(t,r){if(t==="input"||t==="change")return Uu(r)}function tN(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var tn=typeof Object.is=="function"?Object.is:tN;function ul(t,r){if(tn(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),u=Object.keys(r);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var f=a[u];if(!Ui.call(r,f)||!tn(t[f],r[f]))return!1}return!0}function Zy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ly(t,r){var a=Zy(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=r&&u>=r)return{node:a,offset:r-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zy(a)}}function Iy(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Iy(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function By(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Ou(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=Ou(t.document)}return r}function jc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var nN=Gn&&"documentMode"in document&&11>=document.documentMode,Fi=null,Uc=null,ol=null,Zc=!1;function Hy(t,r,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zc||Fi==null||Fi!==Ou(u)||(u=Fi,"selectionStart"in u&&jc(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ol&&ul(ol,u)||(ol=u,u=wo(Uc,"onSelect"),0<u.length&&(r=new Ru("onSelect","select",null,r,a),t.push({event:r,listeners:u}),r.target=Fi)))}function Wr(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Ji={animationend:Wr("Animation","AnimationEnd"),animationiteration:Wr("Animation","AnimationIteration"),animationstart:Wr("Animation","AnimationStart"),transitionrun:Wr("Transition","TransitionRun"),transitionstart:Wr("Transition","TransitionStart"),transitioncancel:Wr("Transition","TransitionCancel"),transitionend:Wr("Transition","TransitionEnd")},Lc={},qy={};Gn&&(qy=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function ei(t){if(Lc[t])return Lc[t];if(!Ji[t])return t;var r=Ji[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in qy)return Lc[t]=r[a];return t}var $y=ei("animationend"),Vy=ei("animationiteration"),Yy=ei("animationstart"),rN=ei("transitionrun"),iN=ei("transitionstart"),aN=ei("transitioncancel"),Gy=ei("transitionend"),Xy=new Map,Ic="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(" ");Ic.push("scrollEnd");function Tn(t,r){Xy.set(t,r),Pr(r,[t])}var Zu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},mn=[],Qi=0,Bc=0;function Lu(){for(var t=Qi,r=Bc=Qi=0;r<t;){var a=mn[r];mn[r++]=null;var u=mn[r];mn[r++]=null;var f=mn[r];mn[r++]=null;var p=mn[r];if(mn[r++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}p!==0&&Fy(a,f,p)}}function Iu(t,r,a,u){mn[Qi++]=t,mn[Qi++]=r,mn[Qi++]=a,mn[Qi++]=u,Bc|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Hc(t,r,a,u){return Iu(t,r,a,u),Bu(t)}function ti(t,r){return Iu(t,null,null,r),Bu(t)}function Fy(t,r,a){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a);for(var f=!1,p=t.return;p!==null;)p.childLanes|=a,u=p.alternate,u!==null&&(u.childLanes|=a),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(f=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,f&&r!==null&&(f=31-Pe(a),t=p.hiddenUpdates,u=t[f],u===null?t[f]=[r]:u.push(r),r.lane=a|536870912),p):null}function Bu(t){if(50<Cl)throw Cl=0,Pf=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Pi={};function lN(t,r,a,u){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(t,r,a,u){return new lN(t,r,a,u)}function qc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xn(t,r){var a=t.alternate;return a===null?(a=nn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Jy(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Hu(t,r,a,u,f,p){var v=0;if(u=t,typeof t=="function")qc(t)&&(v=1);else if(typeof t=="string")v=fD(t,a,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case pe:return t=nn(31,a,r,f),t.elementType=pe,t.lanes=p,t;case T:return ni(a.children,f,p,r);case M:v=8,f|=24;break;case O:return t=nn(12,a,r,f|2),t.elementType=O,t.lanes=p,t;case K:return t=nn(13,a,r,f),t.elementType=K,t.lanes=p,t;case D:return t=nn(19,a,r,f),t.elementType=D,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:v=10;break e;case B:v=9;break e;case J:v=11;break e;case X:v=14;break e;case ce:v=16,u=null;break e}v=29,a=Error(l(130,t===null?"null":typeof t,"")),u=null}return r=nn(v,a,r,f),r.elementType=t,r.type=u,r.lanes=p,r}function ni(t,r,a,u){return t=nn(7,t,u,r),t.lanes=a,t}function $c(t,r,a){return t=nn(6,t,null,r),t.lanes=a,t}function Qy(t){var r=nn(18,null,null,0);return r.stateNode=t,r}function Vc(t,r,a){return r=nn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Py=new WeakMap;function gn(t,r){if(typeof t=="object"&&t!==null){var a=Py.get(t);return a!==void 0?a:(r={value:t,source:r,stack:xu(r)},Py.set(t,r),r)}return{value:t,source:r,stack:xu(r)}}var Ki=[],Wi=0,qu=null,sl=0,yn=[],vn=0,_r=null,jn=1,Un="";function Fn(t,r){Ki[Wi++]=sl,Ki[Wi++]=qu,qu=t,sl=r}function Ky(t,r,a){yn[vn++]=jn,yn[vn++]=Un,yn[vn++]=_r,_r=t;var u=jn;t=Un;var f=32-Pe(u)-1;u&=~(1<<f),a+=1;var p=32-Pe(r)+f;if(30<p){var v=f-f%5;p=(u&(1<<v)-1).toString(32),u>>=v,f-=v,jn=1<<32-Pe(r)+f|a<<f|u,Un=p+t}else jn=1<<p|a<<f|u,Un=t}function Yc(t){t.return!==null&&(Fn(t,1),Ky(t,1,0))}function Gc(t){for(;t===qu;)qu=Ki[--Wi],Ki[Wi]=null,sl=Ki[--Wi],Ki[Wi]=null;for(;t===_r;)_r=yn[--vn],yn[vn]=null,Un=yn[--vn],yn[vn]=null,jn=yn[--vn],yn[vn]=null}function Wy(t,r){yn[vn++]=jn,yn[vn++]=Un,yn[vn++]=_r,jn=r.id,Un=r.overflow,_r=t}var wt=null,at=null,Ue=!1,Sr=null,bn=!1,Xc=Error(l(519));function xr(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(gn(r,t)),Xc}function ev(t){var r=t.stateNode,a=t.type,u=t.memoizedProps;switch(r[zt]=t,r[Vt]=u,a){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(a=0;a<Dl.length;a++)Ce(Dl[a],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":Ce("invalid",r),py(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ce("invalid",r);break;case"textarea":Ce("invalid",r),my(r,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||u.suppressHydrationWarning===!0||y0(r.textContent,a)?(u.popover!=null&&(Ce("beforetoggle",r),Ce("toggle",r)),u.onScroll!=null&&Ce("scroll",r),u.onScrollEnd!=null&&Ce("scrollend",r),u.onClick!=null&&(r.onclick=Yn),r=!0):r=!1,r||xr(t,!0)}function tv(t){for(wt=t.return;wt;)switch(wt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:wt=wt.return}}function ea(t){if(t!==wt)return!1;if(!Ue)return tv(t),Ue=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||hh(t.type,t.memoizedProps)),a=!a),a&&at&&xr(t),tv(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));at=k0(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));at=k0(t)}else r===27?(r=at,Ur(t.type)?(t=yh,yh=null,at=t):at=r):at=wt?Sn(t.stateNode.nextSibling):null;return!0}function ri(){at=wt=null,Ue=!1}function Fc(){var t=Sr;return t!==null&&(Jt===null?Jt=t:Jt.push.apply(Jt,t),Sr=null),t}function cl(t){Sr===null?Sr=[t]:Sr.push(t)}var Jc=A(null),ii=null,Jn=null;function Er(t,r,a){x(Jc,r._currentValue),r._currentValue=a}function Qn(t){t._currentValue=Jc.current,H(Jc)}function Qc(t,r,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===a)break;t=t.return}}function Pc(t,r,a,u){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var p=f.dependencies;if(p!==null){var v=f.child;p=p.firstContext;e:for(;p!==null;){var S=p;p=f;for(var w=0;w<r.length;w++)if(S.context===r[w]){p.lanes|=a,S=p.alternate,S!==null&&(S.lanes|=a),Qc(p.return,a,t),u||(v=null);break e}p=S.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(l(341));v.lanes|=a,p=v.alternate,p!==null&&(p.lanes|=a),Qc(v,a,t),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===t){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function ta(t,r,a,u){t=null;for(var f=r,p=!1;f!==null;){if(!p){if(f.flags&524288)p=!0;else if(f.flags&262144)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(l(387));if(v=v.memoizedProps,v!==null){var S=f.type;tn(f.pendingProps.value,v.value)||(t!==null?t.push(S):t=[S])}}else if(f===Ne.current){if(v=f.alternate,v===null)throw Error(l(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Zl):t=[Zl])}f=f.return}t!==null&&Pc(r,t,a,u),r.flags|=262144}function $u(t){for(t=t.firstContext;t!==null;){if(!tn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ai(t){ii=t,Jn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kt(t){return nv(ii,t)}function Vu(t,r){return ii===null&&ai(t),nv(t,r)}function nv(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Jn===null){if(t===null)throw Error(l(308));Jn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Jn=Jn.next=r;return a}var uN=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},oN=e.unstable_scheduleCallback,sN=e.unstable_NormalPriority,gt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kc(){return{controller:new uN,data:new Map,refCount:0}}function fl(t){t.refCount--,t.refCount===0&&oN(sN,function(){t.controller.abort()})}var hl=null,Wc=0,na=0,ra=null;function cN(t,r){if(hl===null){var a=hl=[];Wc=0,na=rh(),ra={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Wc++,r.then(rv,rv),r}function rv(){if(--Wc===0&&hl!==null){ra!==null&&(ra.status="fulfilled");var t=hl;hl=null,na=0,ra=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function fN(t,r){var a=[],u={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var f=0;f<a.length;f++)(0,a[f])(r)},function(f){for(u.status="rejected",u.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),u}var iv=Z.S;Z.S=function(t,r){Hb=Zt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&cN(t,r),iv!==null&&iv(t,r)};var li=A(null);function ef(){var t=li.current;return t!==null?t:Ke.pooledCache}function Yu(t,r){r===null?x(li,li.current):x(li,r.pool)}function av(){var t=ef();return t===null?null:{parent:gt._currentValue,pool:t}}var ia=Error(l(460)),tf=Error(l(474)),Gu=Error(l(542)),Xu={then:function(){}};function lv(t){return t=t.status,t==="fulfilled"||t==="rejected"}function uv(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Yn,Yn),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,sv(t),t;default:if(typeof r.status=="string")r.then(Yn,Yn);else{if(t=Ke,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=u}},function(u){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,sv(t),t}throw oi=r,ia}}function ui(t){try{var r=t._init;return r(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(oi=a,ia):a}}var oi=null;function ov(){if(oi===null)throw Error(l(459));var t=oi;return oi=null,t}function sv(t){if(t===ia||t===Gu)throw Error(l(483))}var aa=null,pl=0;function Fu(t){var r=pl;return pl+=1,aa===null&&(aa=[]),uv(aa,t,r)}function dl(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Ju(t,r){throw r.$$typeof===_?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function cv(t){function r(N,C){if(t){var R=N.deletions;R===null?(N.deletions=[C],N.flags|=16):R.push(C)}}function a(N,C){if(!t)return null;for(;C!==null;)r(N,C),C=C.sibling;return null}function u(N){for(var C=new Map;N!==null;)N.key!==null?C.set(N.key,N):C.set(N.index,N),N=N.sibling;return C}function f(N,C){return N=Xn(N,C),N.index=0,N.sibling=null,N}function p(N,C,R){return N.index=R,t?(R=N.alternate,R!==null?(R=R.index,R<C?(N.flags|=67108866,C):R):(N.flags|=67108866,C)):(N.flags|=1048576,C)}function v(N){return t&&N.alternate===null&&(N.flags|=67108866),N}function S(N,C,R,Y){return C===null||C.tag!==6?(C=$c(R,N.mode,Y),C.return=N,C):(C=f(C,R),C.return=N,C)}function w(N,C,R,Y){var me=R.type;return me===T?q(N,C,R.props.children,Y,R.key):C!==null&&(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ce&&ui(me)===C.type)?(C=f(C,R.props),dl(C,R),C.return=N,C):(C=Hu(R.type,R.key,R.props,null,N.mode,Y),dl(C,R),C.return=N,C)}function j(N,C,R,Y){return C===null||C.tag!==4||C.stateNode.containerInfo!==R.containerInfo||C.stateNode.implementation!==R.implementation?(C=Vc(R,N.mode,Y),C.return=N,C):(C=f(C,R.children||[]),C.return=N,C)}function q(N,C,R,Y,me){return C===null||C.tag!==7?(C=ni(R,N.mode,Y,me),C.return=N,C):(C=f(C,R),C.return=N,C)}function G(N,C,R){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=$c(""+C,N.mode,R),C.return=N,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case b:return R=Hu(C.type,C.key,C.props,null,N.mode,R),dl(R,C),R.return=N,R;case E:return C=Vc(C,N.mode,R),C.return=N,C;case ce:return C=ui(C),G(N,C,R)}if(fe(C)||re(C))return C=ni(C,N.mode,R,null),C.return=N,C;if(typeof C.then=="function")return G(N,Fu(C),R);if(C.$$typeof===k)return G(N,Vu(N,C),R);Ju(N,C)}return null}function U(N,C,R,Y){var me=C!==null?C.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return me!==null?null:S(N,C,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case b:return R.key===me?w(N,C,R,Y):null;case E:return R.key===me?j(N,C,R,Y):null;case ce:return R=ui(R),U(N,C,R,Y)}if(fe(R)||re(R))return me!==null?null:q(N,C,R,Y,null);if(typeof R.then=="function")return U(N,C,Fu(R),Y);if(R.$$typeof===k)return U(N,C,Vu(N,R),Y);Ju(N,R)}return null}function I(N,C,R,Y,me){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return N=N.get(R)||null,S(C,N,""+Y,me);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return N=N.get(Y.key===null?R:Y.key)||null,w(C,N,Y,me);case E:return N=N.get(Y.key===null?R:Y.key)||null,j(C,N,Y,me);case ce:return Y=ui(Y),I(N,C,R,Y,me)}if(fe(Y)||re(Y))return N=N.get(R)||null,q(C,N,Y,me,null);if(typeof Y.then=="function")return I(N,C,R,Fu(Y),me);if(Y.$$typeof===k)return I(N,C,R,Vu(C,Y),me);Ju(C,Y)}return null}function ue(N,C,R,Y){for(var me=null,Le=null,se=C,we=C=0,Me=null;se!==null&&we<R.length;we++){se.index>we?(Me=se,se=null):Me=se.sibling;var Ie=U(N,se,R[we],Y);if(Ie===null){se===null&&(se=Me);break}t&&se&&Ie.alternate===null&&r(N,se),C=p(Ie,C,we),Le===null?me=Ie:Le.sibling=Ie,Le=Ie,se=Me}if(we===R.length)return a(N,se),Ue&&Fn(N,we),me;if(se===null){for(;we<R.length;we++)se=G(N,R[we],Y),se!==null&&(C=p(se,C,we),Le===null?me=se:Le.sibling=se,Le=se);return Ue&&Fn(N,we),me}for(se=u(se);we<R.length;we++)Me=I(se,N,we,R[we],Y),Me!==null&&(t&&Me.alternate!==null&&se.delete(Me.key===null?we:Me.key),C=p(Me,C,we),Le===null?me=Me:Le.sibling=Me,Le=Me);return t&&se.forEach(function(Hr){return r(N,Hr)}),Ue&&Fn(N,we),me}function ve(N,C,R,Y){if(R==null)throw Error(l(151));for(var me=null,Le=null,se=C,we=C=0,Me=null,Ie=R.next();se!==null&&!Ie.done;we++,Ie=R.next()){se.index>we?(Me=se,se=null):Me=se.sibling;var Hr=U(N,se,Ie.value,Y);if(Hr===null){se===null&&(se=Me);break}t&&se&&Hr.alternate===null&&r(N,se),C=p(Hr,C,we),Le===null?me=Hr:Le.sibling=Hr,Le=Hr,se=Me}if(Ie.done)return a(N,se),Ue&&Fn(N,we),me;if(se===null){for(;!Ie.done;we++,Ie=R.next())Ie=G(N,Ie.value,Y),Ie!==null&&(C=p(Ie,C,we),Le===null?me=Ie:Le.sibling=Ie,Le=Ie);return Ue&&Fn(N,we),me}for(se=u(se);!Ie.done;we++,Ie=R.next())Ie=I(se,N,we,Ie.value,Y),Ie!==null&&(t&&Ie.alternate!==null&&se.delete(Ie.key===null?we:Ie.key),C=p(Ie,C,we),Le===null?me=Ie:Le.sibling=Ie,Le=Ie);return t&&se.forEach(function(xD){return r(N,xD)}),Ue&&Fn(N,we),me}function Fe(N,C,R,Y){if(typeof R=="object"&&R!==null&&R.type===T&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case b:e:{for(var me=R.key;C!==null;){if(C.key===me){if(me=R.type,me===T){if(C.tag===7){a(N,C.sibling),Y=f(C,R.props.children),Y.return=N,N=Y;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ce&&ui(me)===C.type){a(N,C.sibling),Y=f(C,R.props),dl(Y,R),Y.return=N,N=Y;break e}a(N,C);break}else r(N,C);C=C.sibling}R.type===T?(Y=ni(R.props.children,N.mode,Y,R.key),Y.return=N,N=Y):(Y=Hu(R.type,R.key,R.props,null,N.mode,Y),dl(Y,R),Y.return=N,N=Y)}return v(N);case E:e:{for(me=R.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===R.containerInfo&&C.stateNode.implementation===R.implementation){a(N,C.sibling),Y=f(C,R.children||[]),Y.return=N,N=Y;break e}else{a(N,C);break}else r(N,C);C=C.sibling}Y=Vc(R,N.mode,Y),Y.return=N,N=Y}return v(N);case ce:return R=ui(R),Fe(N,C,R,Y)}if(fe(R))return ue(N,C,R,Y);if(re(R)){if(me=re(R),typeof me!="function")throw Error(l(150));return R=me.call(R),ve(N,C,R,Y)}if(typeof R.then=="function")return Fe(N,C,Fu(R),Y);if(R.$$typeof===k)return Fe(N,C,Vu(N,R),Y);Ju(N,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,C!==null&&C.tag===6?(a(N,C.sibling),Y=f(C,R),Y.return=N,N=Y):(a(N,C),Y=$c(R,N.mode,Y),Y.return=N,N=Y),v(N)):a(N,C)}return function(N,C,R,Y){try{pl=0;var me=Fe(N,C,R,Y);return aa=null,me}catch(se){if(se===ia||se===Gu)throw se;var Le=nn(29,se,null,N.mode);return Le.lanes=Y,Le.return=N,Le}finally{}}}var si=cv(!0),fv=cv(!1),zr=!1;function nf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rf(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function wr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function kr(t,r,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,Be&2){var f=u.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),u.pending=r,r=Bu(t),Fy(t,null,a),r}return Iu(t,u,r,a),Bu(t)}function ml(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,ny(t,a)}}function af(t,r){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var f=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?f=p=v:p=p.next=v,a=a.next}while(a!==null);p===null?f=p=r:p=p.next=r}else f=p=r;a={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:u.shared,callbacks:u.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var lf=!1;function gl(){if(lf){var t=ra;if(t!==null)throw t}}function yl(t,r,a,u){lf=!1;var f=t.updateQueue;zr=!1;var p=f.firstBaseUpdate,v=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var w=S,j=w.next;w.next=null,v===null?p=j:v.next=j,v=w;var q=t.alternate;q!==null&&(q=q.updateQueue,S=q.lastBaseUpdate,S!==v&&(S===null?q.firstBaseUpdate=j:S.next=j,q.lastBaseUpdate=w))}if(p!==null){var G=f.baseState;v=0,q=j=w=null,S=p;do{var U=S.lane&-536870913,I=U!==S.lane;if(I?(De&U)===U:(u&U)===U){U!==0&&U===na&&(lf=!0),q!==null&&(q=q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ue=t,ve=S;U=r;var Fe=a;switch(ve.tag){case 1:if(ue=ve.payload,typeof ue=="function"){G=ue.call(Fe,G,U);break e}G=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ve.payload,U=typeof ue=="function"?ue.call(Fe,G,U):ue,U==null)break e;G=g({},G,U);break e;case 2:zr=!0}}U=S.callback,U!==null&&(t.flags|=64,I&&(t.flags|=8192),I=f.callbacks,I===null?f.callbacks=[U]:I.push(U))}else I={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},q===null?(j=q=I,w=G):q=q.next=I,v|=U;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;I=S,S=I.next,I.next=null,f.lastBaseUpdate=I,f.shared.pending=null}}while(!0);q===null&&(w=G),f.baseState=w,f.firstBaseUpdate=j,f.lastBaseUpdate=q,p===null&&(f.shared.lanes=0),Nr|=v,t.lanes=v,t.memoizedState=G}}function hv(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function pv(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)hv(a[t],r)}var la=A(null),Qu=A(0);function dv(t,r){t=ar,x(Qu,t),x(la,r),ar=t|r.baseLanes}function uf(){x(Qu,ar),x(la,la.current)}function of(){ar=Qu.current,H(la),H(Qu)}var rn=A(null),_n=null;function Tr(t){var r=t.alternate;x(pt,pt.current&1),x(rn,t),_n===null&&(r===null||la.current!==null||r.memoizedState!==null)&&(_n=t)}function sf(t){x(pt,pt.current),x(rn,t),_n===null&&(_n=t)}function mv(t){t.tag===22?(x(pt,pt.current),x(rn,t),_n===null&&(_n=t)):Ar()}function Ar(){x(pt,pt.current),x(rn,rn.current)}function an(t){H(rn),_n===t&&(_n=null),H(pt)}var pt=A(0);function Pu(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mh(a)||gh(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Pn=0,Ee=null,Ge=null,yt=null,Ku=!1,ua=!1,ci=!1,Wu=0,vl=0,oa=null,hN=0;function ft(){throw Error(l(321))}function cf(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!tn(t[a],r[a]))return!1;return!0}function ff(t,r,a,u,f,p){return Pn=p,Ee=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Z.H=t===null||t.memoizedState===null?Kv:kf,ci=!1,p=a(u,f),ci=!1,ua&&(p=yv(r,a,u,f)),gv(t),p}function gv(t){Z.H=Sl;var r=Ge!==null&&Ge.next!==null;if(Pn=0,yt=Ge=Ee=null,Ku=!1,vl=0,oa=null,r)throw Error(l(300));t===null||vt||(t=t.dependencies,t!==null&&$u(t)&&(vt=!0))}function yv(t,r,a,u){Ee=t;var f=0;do{if(ua&&(oa=null),vl=0,ua=!1,25<=f)throw Error(l(301));if(f+=1,yt=Ge=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}Z.H=Wv,p=r(a,u)}while(ua);return p}function pN(){var t=Z.H,r=t.useState()[0];return r=typeof r.then=="function"?bl(r):r,t=t.useState()[0],(Ge!==null?Ge.memoizedState:null)!==t&&(Ee.flags|=1024),r}function hf(){var t=Wu!==0;return Wu=0,t}function pf(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function df(t){if(Ku){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ku=!1}Pn=0,yt=Ge=Ee=null,ua=!1,vl=Wu=0,oa=null}function It(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ee.memoizedState=yt=t:yt=yt.next=t,yt}function dt(){if(Ge===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Ge.next;var r=yt===null?Ee.memoizedState:yt.next;if(r!==null)yt=r,Ge=t;else{if(t===null)throw Ee.alternate===null?Error(l(467)):Error(l(310));Ge=t,t={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},yt===null?Ee.memoizedState=yt=t:yt=yt.next=t}return yt}function eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(t){var r=vl;return vl+=1,oa===null&&(oa=[]),t=uv(oa,t,r),r=Ee,(yt===null?r.memoizedState:yt.next)===null&&(r=r.alternate,Z.H=r===null||r.memoizedState===null?Kv:kf),t}function to(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return bl(t);if(t.$$typeof===k)return kt(t)}throw Error(l(438,String(t)))}function mf(t){var r=null,a=Ee.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var u=Ee.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=eo(),Ee.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),u=0;u<t;u++)a[u]=L;return r.index++,a}function Kn(t,r){return typeof r=="function"?r(t):r}function no(t){var r=dt();return gf(r,Ge,t)}function gf(t,r,a){var u=t.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=a;var f=t.baseQueue,p=u.pending;if(p!==null){if(f!==null){var v=f.next;f.next=p.next,p.next=v}r.baseQueue=f=p,u.pending=null}if(p=t.baseState,f===null)t.memoizedState=p;else{r=f.next;var S=v=null,w=null,j=r,q=!1;do{var G=j.lane&-536870913;if(G!==j.lane?(De&G)===G:(Pn&G)===G){var U=j.revertLane;if(U===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),G===na&&(q=!0);else if((Pn&U)===U){j=j.next,U===na&&(q=!0);continue}else G={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},w===null?(S=w=G,v=p):w=w.next=G,Ee.lanes|=U,Nr|=U;G=j.action,ci&&a(p,G),p=j.hasEagerState?j.eagerState:a(p,G)}else U={lane:G,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},w===null?(S=w=U,v=p):w=w.next=U,Ee.lanes|=G,Nr|=G;j=j.next}while(j!==null&&j!==r);if(w===null?v=p:w.next=S,!tn(p,t.memoizedState)&&(vt=!0,q&&(a=ra,a!==null)))throw a;t.memoizedState=p,t.baseState=v,t.baseQueue=w,u.lastRenderedState=p}return f===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function yf(t){var r=dt(),a=r.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var u=a.dispatch,f=a.pending,p=r.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do p=t(p,v.action),v=v.next;while(v!==f);tn(p,r.memoizedState)||(vt=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),a.lastRenderedState=p}return[p,u]}function vv(t,r,a){var u=Ee,f=dt(),p=Ue;if(p){if(a===void 0)throw Error(l(407));a=a()}else a=r();var v=!tn((Ge||f).memoizedState,a);if(v&&(f.memoizedState=a,vt=!0),f=f.queue,_f(Sv.bind(null,u,f,t),[t]),f.getSnapshot!==r||v||yt!==null&&yt.memoizedState.tag&1){if(u.flags|=2048,sa(9,{destroy:void 0},_v.bind(null,u,f,a,r),null),Ke===null)throw Error(l(349));p||Pn&127||bv(u,r,a)}return a}function bv(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=Ee.updateQueue,r===null?(r=eo(),Ee.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function _v(t,r,a,u){r.value=a,r.getSnapshot=u,xv(r)&&Ev(t)}function Sv(t,r,a){return a(function(){xv(r)&&Ev(t)})}function xv(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!tn(t,a)}catch{return!0}}function Ev(t){var r=ti(t,2);r!==null&&Qt(r,t,2)}function vf(t){var r=It();if(typeof t=="function"){var a=t;if(t=a(),ci){$t(!0);try{a()}finally{$t(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:t},r}function zv(t,r,a,u){return t.baseState=a,gf(t,Ge,typeof u=="function"?u:Kn)}function dN(t,r,a,u,f){if(ao(t))throw Error(l(485));if(t=r.action,t!==null){var p={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};Z.T!==null?a(!0):p.isTransition=!1,u(p),a=r.pending,a===null?(p.next=r.pending=p,wv(r,p)):(p.next=a.next,r.pending=a.next=p)}}function wv(t,r){var a=r.action,u=r.payload,f=t.state;if(r.isTransition){var p=Z.T,v={};Z.T=v;try{var S=a(f,u),w=Z.S;w!==null&&w(v,S),kv(t,r,S)}catch(j){bf(t,r,j)}finally{p!==null&&v.types!==null&&(p.types=v.types),Z.T=p}}else try{p=a(f,u),kv(t,r,p)}catch(j){bf(t,r,j)}}function kv(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Tv(t,r,u)},function(u){return bf(t,r,u)}):Tv(t,r,a)}function Tv(t,r,a){r.status="fulfilled",r.value=a,Av(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,wv(t,a)))}function bf(t,r,a){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=a,Av(r),r=r.next;while(r!==u)}t.action=null}function Av(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Ov(t,r){return r}function Cv(t,r){if(Ue){var a=Ke.formState;if(a!==null){e:{var u=Ee;if(Ue){if(at){t:{for(var f=at,p=bn;f.nodeType!==8;){if(!p){f=null;break t}if(f=Sn(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){at=Sn(f.nextSibling),u=f.data==="F!";break e}}xr(u)}u=!1}u&&(r=a[0])}}return a=It(),a.memoizedState=a.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ov,lastRenderedState:r},a.queue=u,a=Jv.bind(null,Ee,u),u.dispatch=a,u=vf(!1),p=wf.bind(null,Ee,!1,u.queue),u=It(),f={state:r,dispatch:null,action:t,pending:null},u.queue=f,a=dN.bind(null,Ee,f,p,a),f.dispatch=a,u.memoizedState=t,[r,a,!1]}function Nv(t){var r=dt();return Dv(r,Ge,t)}function Dv(t,r,a){if(r=gf(t,r,Ov)[0],t=no(Kn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=bl(r)}catch(v){throw v===ia?Gu:v}else u=r;r=dt();var f=r.queue,p=f.dispatch;return a!==r.memoizedState&&(Ee.flags|=2048,sa(9,{destroy:void 0},mN.bind(null,f,a),null)),[u,p,t]}function mN(t,r){t.action=r}function Mv(t){var r=dt(),a=Ge;if(a!==null)return Dv(r,a,t);dt(),r=r.memoizedState,a=dt();var u=a.queue.dispatch;return a.memoizedState=t,[r,u,!1]}function sa(t,r,a,u){return t={tag:t,create:a,deps:u,inst:r,next:null},r=Ee.updateQueue,r===null&&(r=eo(),Ee.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,r.lastEffect=t),t}function Rv(){return dt().memoizedState}function ro(t,r,a,u){var f=It();Ee.flags|=t,f.memoizedState=sa(1|r,{destroy:void 0},a,u===void 0?null:u)}function io(t,r,a,u){var f=dt();u=u===void 0?null:u;var p=f.memoizedState.inst;Ge!==null&&u!==null&&cf(u,Ge.memoizedState.deps)?f.memoizedState=sa(r,p,a,u):(Ee.flags|=t,f.memoizedState=sa(1|r,p,a,u))}function jv(t,r){ro(8390656,8,t,r)}function _f(t,r){io(2048,8,t,r)}function gN(t){Ee.flags|=4;var r=Ee.updateQueue;if(r===null)r=eo(),Ee.updateQueue=r,r.events=[t];else{var a=r.events;a===null?r.events=[t]:a.push(t)}}function Uv(t){var r=dt().memoizedState;return gN({ref:r,nextImpl:t}),function(){if(Be&2)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function Zv(t,r){return io(4,2,t,r)}function Lv(t,r){return io(4,4,t,r)}function Iv(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Bv(t,r,a){a=a!=null?a.concat([t]):null,io(4,4,Iv.bind(null,r,t),a)}function Sf(){}function Hv(t,r){var a=dt();r=r===void 0?null:r;var u=a.memoizedState;return r!==null&&cf(r,u[1])?u[0]:(a.memoizedState=[t,r],t)}function qv(t,r){var a=dt();r=r===void 0?null:r;var u=a.memoizedState;if(r!==null&&cf(r,u[1]))return u[0];if(u=t(),ci){$t(!0);try{t()}finally{$t(!1)}}return a.memoizedState=[u,r],u}function xf(t,r,a){return a===void 0||Pn&1073741824&&!(De&261930)?t.memoizedState=r:(t.memoizedState=a,t=$b(),Ee.lanes|=t,Nr|=t,a)}function $v(t,r,a,u){return tn(a,r)?a:la.current!==null?(t=xf(t,a,u),tn(t,r)||(vt=!0),t):!(Pn&42)||Pn&1073741824&&!(De&261930)?(vt=!0,t.memoizedState=a):(t=$b(),Ee.lanes|=t,Nr|=t,r)}function Vv(t,r,a,u,f){var p=F.p;F.p=p!==0&&8>p?p:8;var v=Z.T,S={};Z.T=S,wf(t,!1,r,a);try{var w=f(),j=Z.S;if(j!==null&&j(S,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var q=fN(w,u);_l(t,r,q,on(t))}else _l(t,r,u,on(t))}catch(G){_l(t,r,{then:function(){},status:"rejected",reason:G},on())}finally{F.p=p,v!==null&&S.types!==null&&(v.types=S.types),Z.T=v}}function yN(){}function Ef(t,r,a,u){if(t.tag!==5)throw Error(l(476));var f=Yv(t).queue;Vv(t,f,r,te,a===null?yN:function(){return Gv(t),a(u)})}function Yv(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:te},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Gv(t){var r=Yv(t);r.next===null&&(r=t.alternate.memoizedState),_l(t,r.next.queue,{},on())}function zf(){return kt(Zl)}function Xv(){return dt().memoizedState}function Fv(){return dt().memoizedState}function vN(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=on();t=wr(a);var u=kr(r,t,a);u!==null&&(Qt(u,r,a),ml(u,r,a)),r={cache:Kc()},t.payload=r;return}r=r.return}}function bN(t,r,a){var u=on();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ao(t)?Qv(r,a):(a=Hc(t,r,a,u),a!==null&&(Qt(a,t,u),Pv(a,r,u)))}function Jv(t,r,a){var u=on();_l(t,r,a,u)}function _l(t,r,a,u){var f={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ao(t))Qv(r,f);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var v=r.lastRenderedState,S=p(v,a);if(f.hasEagerState=!0,f.eagerState=S,tn(S,v))return Iu(t,r,f,0),Ke===null&&Lu(),!1}catch{}finally{}if(a=Hc(t,r,f,u),a!==null)return Qt(a,t,u),Pv(a,r,u),!0}return!1}function wf(t,r,a,u){if(u={lane:2,revertLane:rh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ao(t)){if(r)throw Error(l(479))}else r=Hc(t,a,u,2),r!==null&&Qt(r,t,2)}function ao(t){var r=t.alternate;return t===Ee||r!==null&&r===Ee}function Qv(t,r){ua=Ku=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Pv(t,r,a){if(a&4194048){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,ny(t,a)}}var Sl={readContext:kt,use:to,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Sl.useEffectEvent=ft;var Kv={readContext:kt,use:to,useCallback:function(t,r){return It().memoizedState=[t,r===void 0?null:r],t},useContext:kt,useEffect:jv,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,ro(4194308,4,Iv.bind(null,r,t),a)},useLayoutEffect:function(t,r){return ro(4194308,4,t,r)},useInsertionEffect:function(t,r){ro(4,2,t,r)},useMemo:function(t,r){var a=It();r=r===void 0?null:r;var u=t();if(ci){$t(!0);try{t()}finally{$t(!1)}}return a.memoizedState=[u,r],u},useReducer:function(t,r,a){var u=It();if(a!==void 0){var f=a(r);if(ci){$t(!0);try{a(r)}finally{$t(!1)}}}else f=r;return u.memoizedState=u.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},u.queue=t,t=t.dispatch=bN.bind(null,Ee,t),[u.memoizedState,t]},useRef:function(t){var r=It();return t={current:t},r.memoizedState=t},useState:function(t){t=vf(t);var r=t.queue,a=Jv.bind(null,Ee,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Sf,useDeferredValue:function(t,r){var a=It();return xf(a,t,r)},useTransition:function(){var t=vf(!1);return t=Vv.bind(null,Ee,t.queue,!0,!1),It().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var u=Ee,f=It();if(Ue){if(a===void 0)throw Error(l(407));a=a()}else{if(a=r(),Ke===null)throw Error(l(349));De&127||bv(u,r,a)}f.memoizedState=a;var p={value:a,getSnapshot:r};return f.queue=p,jv(Sv.bind(null,u,p,t),[t]),u.flags|=2048,sa(9,{destroy:void 0},_v.bind(null,u,p,a,r),null),a},useId:function(){var t=It(),r=Ke.identifierPrefix;if(Ue){var a=Un,u=jn;a=(u&~(1<<32-Pe(u)-1)).toString(32)+a,r="_"+r+"R_"+a,a=Wu++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=hN++,r="_"+r+"r_"+a.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:zf,useFormState:Cv,useActionState:Cv,useOptimistic:function(t){var r=It();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=wf.bind(null,Ee,!0,a),a.dispatch=r,[t,r]},useMemoCache:mf,useCacheRefresh:function(){return It().memoizedState=vN.bind(null,Ee)},useEffectEvent:function(t){var r=It(),a={impl:t};return r.memoizedState=a,function(){if(Be&2)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},kf={readContext:kt,use:to,useCallback:Hv,useContext:kt,useEffect:_f,useImperativeHandle:Bv,useInsertionEffect:Zv,useLayoutEffect:Lv,useMemo:qv,useReducer:no,useRef:Rv,useState:function(){return no(Kn)},useDebugValue:Sf,useDeferredValue:function(t,r){var a=dt();return $v(a,Ge.memoizedState,t,r)},useTransition:function(){var t=no(Kn)[0],r=dt().memoizedState;return[typeof t=="boolean"?t:bl(t),r]},useSyncExternalStore:vv,useId:Xv,useHostTransitionStatus:zf,useFormState:Nv,useActionState:Nv,useOptimistic:function(t,r){var a=dt();return zv(a,Ge,t,r)},useMemoCache:mf,useCacheRefresh:Fv};kf.useEffectEvent=Uv;var Wv={readContext:kt,use:to,useCallback:Hv,useContext:kt,useEffect:_f,useImperativeHandle:Bv,useInsertionEffect:Zv,useLayoutEffect:Lv,useMemo:qv,useReducer:yf,useRef:Rv,useState:function(){return yf(Kn)},useDebugValue:Sf,useDeferredValue:function(t,r){var a=dt();return Ge===null?xf(a,t,r):$v(a,Ge.memoizedState,t,r)},useTransition:function(){var t=yf(Kn)[0],r=dt().memoizedState;return[typeof t=="boolean"?t:bl(t),r]},useSyncExternalStore:vv,useId:Xv,useHostTransitionStatus:zf,useFormState:Mv,useActionState:Mv,useOptimistic:function(t,r){var a=dt();return Ge!==null?zv(a,Ge,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:mf,useCacheRefresh:Fv};Wv.useEffectEvent=Uv;function Tf(t,r,a,u){r=t.memoizedState,a=a(u,r),a=a==null?r:g({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Af={enqueueSetState:function(t,r,a){t=t._reactInternals;var u=on(),f=wr(u);f.payload=r,a!=null&&(f.callback=a),r=kr(t,f,u),r!==null&&(Qt(r,t,u),ml(r,t,u))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var u=on(),f=wr(u);f.tag=1,f.payload=r,a!=null&&(f.callback=a),r=kr(t,f,u),r!==null&&(Qt(r,t,u),ml(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=on(),u=wr(a);u.tag=2,r!=null&&(u.callback=r),r=kr(t,u,a),r!==null&&(Qt(r,t,a),ml(r,t,a))}};function eb(t,r,a,u,f,p,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,p,v):r.prototype&&r.prototype.isPureReactComponent?!ul(a,u)||!ul(f,p):!0}function tb(t,r,a,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,u),r.state!==t&&Af.enqueueReplaceState(r,r.state,null)}function fi(t,r){var a=r;if("ref"in r){a={};for(var u in r)u!=="ref"&&(a[u]=r[u])}if(t=t.defaultProps){a===r&&(a=g({},a));for(var f in t)a[f]===void 0&&(a[f]=t[f])}return a}function nb(t){Zu(t)}function rb(t){console.error(t)}function ib(t){Zu(t)}function lo(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function ab(t,r,a){try{var u=t.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Of(t,r,a){return a=wr(a),a.tag=3,a.payload={element:null},a.callback=function(){lo(t,r)},a}function lb(t){return t=wr(t),t.tag=3,t}function ub(t,r,a,u){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var p=u.value;t.payload=function(){return f(p)},t.callback=function(){ab(r,a,u)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){ab(r,a,u),typeof f!="function"&&(Dr===null?Dr=new Set([this]):Dr.add(this));var S=u.stack;this.componentDidCatch(u.value,{componentStack:S!==null?S:""})})}function _N(t,r,a,u,f){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=a.alternate,r!==null&&ta(r,a,f,!0),a=rn.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?bo():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=f,u===Xu?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([u]):r.add(u),eh(t,u,f)),!1;case 22:return a.flags|=65536,u===Xu?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([u]):a.add(u)),eh(t,u,f)),!1}throw Error(l(435,a.tag))}return eh(t,u,f),bo(),!1}if(Ue)return r=rn.current,r!==null?(!(r.flags&65536)&&(r.flags|=256),r.flags|=65536,r.lanes=f,u!==Xc&&(t=Error(l(422),{cause:u}),cl(gn(t,a)))):(u!==Xc&&(r=Error(l(423),{cause:u}),cl(gn(r,a))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,u=gn(u,a),f=Of(t.stateNode,u,f),af(t,f),ht!==4&&(ht=2)),!1;var p=Error(l(520),{cause:u});if(p=gn(p,a),Ol===null?Ol=[p]:Ol.push(p),ht!==4&&(ht=2),r===null)return!0;u=gn(u,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=f&-f,a.lanes|=t,t=Of(a.stateNode,u,t),af(a,t),!1;case 1:if(r=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Dr===null||!Dr.has(p))))return a.flags|=65536,f&=-f,a.lanes|=f,f=lb(f),ub(f,t,a,u),af(a,f),!1}a=a.return}while(a!==null);return!1}var Cf=Error(l(461)),vt=!1;function Tt(t,r,a,u){r.child=t===null?fv(r,null,a,u):si(r,t.child,a,u)}function ob(t,r,a,u,f){a=a.render;var p=r.ref;if("ref"in u){var v={};for(var S in u)S!=="ref"&&(v[S]=u[S])}else v=u;return ai(r),u=ff(t,r,a,v,p,f),S=hf(),t!==null&&!vt?(pf(t,r,f),Wn(t,r,f)):(Ue&&S&&Yc(r),r.flags|=1,Tt(t,r,u,f),r.child)}function sb(t,r,a,u,f){if(t===null){var p=a.type;return typeof p=="function"&&!qc(p)&&p.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=p,cb(t,r,p,u,f)):(t=Hu(a.type,null,u,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(p=t.child,!Lf(t,f)){var v=p.memoizedProps;if(a=a.compare,a=a!==null?a:ul,a(v,u)&&t.ref===r.ref)return Wn(t,r,f)}return r.flags|=1,t=Xn(p,u),t.ref=r.ref,t.return=r,r.child=t}function cb(t,r,a,u,f){if(t!==null){var p=t.memoizedProps;if(ul(p,u)&&t.ref===r.ref)if(vt=!1,r.pendingProps=u=p,Lf(t,f))t.flags&131072&&(vt=!0);else return r.lanes=t.lanes,Wn(t,r,f)}return Nf(t,r,a,u,f)}function fb(t,r,a,u){var f=u.children,p=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if(r.flags&128){if(p=p!==null?p.baseLanes|a:a,t!==null){for(u=r.child=t.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~p}else u=0,r.child=null;return hb(t,r,p,a,u)}if(a&536870912)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Yu(r,p!==null?p.cachePool:null),p!==null?dv(r,p):uf(),mv(r);else return u=r.lanes=536870912,hb(t,r,p!==null?p.baseLanes|a:a,a,u)}else p!==null?(Yu(r,p.cachePool),dv(r,p),Ar(),r.memoizedState=null):(t!==null&&Yu(r,null),uf(),Ar());return Tt(t,r,f,a),r.child}function xl(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function hb(t,r,a,u,f){var p=ef();return p=p===null?null:{parent:gt._currentValue,pool:p},r.memoizedState={baseLanes:a,cachePool:p},t!==null&&Yu(r,null),uf(),mv(r),t!==null&&ta(t,r,u,!0),r.childLanes=f,null}function uo(t,r){return r=so({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function pb(t,r,a){return si(r,t.child,null,a),t=uo(r,r.pendingProps),t.flags|=2,an(r),r.memoizedState=null,t}function SN(t,r,a){var u=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ue){if(u.mode==="hidden")return t=uo(r,u),r.lanes=536870912,xl(null,t);if(sf(r),(t=at)?(t=w0(t,bn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:_r!==null?{id:jn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=Qy(t),a.return=r,r.child=a,wt=r,at=null)):t=null,t===null)throw xr(r);return r.lanes=536870912,null}return uo(r,u)}var p=t.memoizedState;if(p!==null){var v=p.dehydrated;if(sf(r),f)if(r.flags&256)r.flags&=-257,r=pb(t,r,a);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(vt||ta(t,r,a,!1),f=(a&t.childLanes)!==0,vt||f){if(u=Ke,u!==null&&(v=ry(u,a),v!==0&&v!==p.retryLane))throw p.retryLane=v,ti(t,v),Qt(u,t,v),Cf;bo(),r=pb(t,r,a)}else t=p.treeContext,at=Sn(v.nextSibling),wt=r,Ue=!0,Sr=null,bn=!1,t!==null&&Wy(r,t),r=uo(r,u),r.flags|=4096;return r}return t=Xn(t.child,{mode:u.mode,children:u.children}),t.ref=r.ref,r.child=t,t.return=r,t}function oo(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Nf(t,r,a,u,f){return ai(r),a=ff(t,r,a,u,void 0,f),u=hf(),t!==null&&!vt?(pf(t,r,f),Wn(t,r,f)):(Ue&&u&&Yc(r),r.flags|=1,Tt(t,r,a,f),r.child)}function db(t,r,a,u,f,p){return ai(r),r.updateQueue=null,a=yv(r,u,a,f),gv(t),u=hf(),t!==null&&!vt?(pf(t,r,p),Wn(t,r,p)):(Ue&&u&&Yc(r),r.flags|=1,Tt(t,r,a,p),r.child)}function mb(t,r,a,u,f){if(ai(r),r.stateNode===null){var p=Pi,v=a.contextType;typeof v=="object"&&v!==null&&(p=kt(v)),p=new a(u,p),r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Af,r.stateNode=p,p._reactInternals=r,p=r.stateNode,p.props=u,p.state=r.memoizedState,p.refs={},nf(r),v=a.contextType,p.context=typeof v=="object"&&v!==null?kt(v):Pi,p.state=r.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Tf(r,a,v,u),p.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&Af.enqueueReplaceState(p,p.state,null),yl(r,u,p,f),gl(),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){p=r.stateNode;var S=r.memoizedProps,w=fi(a,S);p.props=w;var j=p.context,q=a.contextType;v=Pi,typeof q=="object"&&q!==null&&(v=kt(q));var G=a.getDerivedStateFromProps;q=typeof G=="function"||typeof p.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,q||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S||j!==v)&&tb(r,p,u,v),zr=!1;var U=r.memoizedState;p.state=U,yl(r,u,p,f),gl(),j=r.memoizedState,S||U!==j||zr?(typeof G=="function"&&(Tf(r,a,G,u),j=r.memoizedState),(w=zr||eb(r,a,w,u,U,j,v))?(q||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(r.flags|=4194308)):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=j),p.props=u,p.state=j,p.context=v,u=w):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{p=r.stateNode,rf(t,r),v=r.memoizedProps,q=fi(a,v),p.props=q,G=r.pendingProps,U=p.context,j=a.contextType,w=Pi,typeof j=="object"&&j!==null&&(w=kt(j)),S=a.getDerivedStateFromProps,(j=typeof S=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==G||U!==w)&&tb(r,p,u,w),zr=!1,U=r.memoizedState,p.state=U,yl(r,u,p,f),gl();var I=r.memoizedState;v!==G||U!==I||zr||t!==null&&t.dependencies!==null&&$u(t.dependencies)?(typeof S=="function"&&(Tf(r,a,S,u),I=r.memoizedState),(q=zr||eb(r,a,q,u,U,I,w)||t!==null&&t.dependencies!==null&&$u(t.dependencies))?(j||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(u,I,w),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(u,I,w)),typeof p.componentDidUpdate=="function"&&(r.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=I),p.props=u,p.state=I,p.context=w,u=q):(typeof p.componentDidUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),u=!1)}return p=u,oo(t,r),u=(r.flags&128)!==0,p||u?(p=r.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:p.render(),r.flags|=1,t!==null&&u?(r.child=si(r,t.child,null,f),r.child=si(r,null,a,f)):Tt(t,r,a,f),r.memoizedState=p.state,t=r.child):t=Wn(t,r,f),t}function gb(t,r,a,u){return ri(),r.flags|=256,Tt(t,r,a,u),r.child}var Df={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mf(t){return{baseLanes:t,cachePool:av()}}function Rf(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=un),t}function yb(t,r,a){var u=r.pendingProps,f=!1,p=(r.flags&128)!==0,v;if((v=p)||(v=t!==null&&t.memoizedState===null?!1:(pt.current&2)!==0),v&&(f=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ue){if(f?Tr(r):Ar(),(t=at)?(t=w0(t,bn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:_r!==null?{id:jn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=Qy(t),a.return=r,r.child=a,wt=r,at=null)):t=null,t===null)throw xr(r);return gh(t)?r.lanes=32:r.lanes=536870912,null}var S=u.children;return u=u.fallback,f?(Ar(),f=r.mode,S=so({mode:"hidden",children:S},f),u=ni(u,f,a,null),S.return=r,u.return=r,S.sibling=u,r.child=S,u=r.child,u.memoizedState=Mf(a),u.childLanes=Rf(t,v,a),r.memoizedState=Df,xl(null,u)):(Tr(r),jf(r,S))}var w=t.memoizedState;if(w!==null&&(S=w.dehydrated,S!==null)){if(p)r.flags&256?(Tr(r),r.flags&=-257,r=Uf(t,r,a)):r.memoizedState!==null?(Ar(),r.child=t.child,r.flags|=128,r=null):(Ar(),S=u.fallback,f=r.mode,u=so({mode:"visible",children:u.children},f),S=ni(S,f,a,null),S.flags|=2,u.return=r,S.return=r,u.sibling=S,r.child=u,si(r,t.child,null,a),u=r.child,u.memoizedState=Mf(a),u.childLanes=Rf(t,v,a),r.memoizedState=Df,r=xl(null,u));else if(Tr(r),gh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var j=v.dgst;v=j,u=Error(l(419)),u.stack="",u.digest=v,cl({value:u,source:null,stack:null}),r=Uf(t,r,a)}else if(vt||ta(t,r,a,!1),v=(a&t.childLanes)!==0,vt||v){if(v=Ke,v!==null&&(u=ry(v,a),u!==0&&u!==w.retryLane))throw w.retryLane=u,ti(t,u),Qt(v,t,u),Cf;mh(S)||bo(),r=Uf(t,r,a)}else mh(S)?(r.flags|=192,r.child=t.child,r=null):(t=w.treeContext,at=Sn(S.nextSibling),wt=r,Ue=!0,Sr=null,bn=!1,t!==null&&Wy(r,t),r=jf(r,u.children),r.flags|=4096);return r}return f?(Ar(),S=u.fallback,f=r.mode,w=t.child,j=w.sibling,u=Xn(w,{mode:"hidden",children:u.children}),u.subtreeFlags=w.subtreeFlags&65011712,j!==null?S=Xn(j,S):(S=ni(S,f,a,null),S.flags|=2),S.return=r,u.return=r,u.sibling=S,r.child=u,xl(null,u),u=r.child,S=t.child.memoizedState,S===null?S=Mf(a):(f=S.cachePool,f!==null?(w=gt._currentValue,f=f.parent!==w?{parent:w,pool:w}:f):f=av(),S={baseLanes:S.baseLanes|a,cachePool:f}),u.memoizedState=S,u.childLanes=Rf(t,v,a),r.memoizedState=Df,xl(t.child,u)):(Tr(r),a=t.child,t=a.sibling,a=Xn(a,{mode:"visible",children:u.children}),a.return=r,a.sibling=null,t!==null&&(v=r.deletions,v===null?(r.deletions=[t],r.flags|=16):v.push(t)),r.child=a,r.memoizedState=null,a)}function jf(t,r){return r=so({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function so(t,r){return t=nn(22,t,null,r),t.lanes=0,t}function Uf(t,r,a){return si(r,t.child,null,a),t=jf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function vb(t,r,a){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),Qc(t.return,r,a)}function Zf(t,r,a,u,f,p){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:f,treeForkCount:p}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=u,v.tail=a,v.tailMode=f,v.treeForkCount=p)}function bb(t,r,a){var u=r.pendingProps,f=u.revealOrder,p=u.tail;u=u.children;var v=pt.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,x(pt,v),Tt(t,r,u,a),u=Ue?sl:0,!S&&t!==null&&t.flags&128)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&vb(t,a,r);else if(t.tag===19)vb(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(a=r.child,f=null;a!==null;)t=a.alternate,t!==null&&Pu(t)===null&&(f=a),a=a.sibling;a=f,a===null?(f=r.child,r.child=null):(f=a.sibling,a.sibling=null),Zf(r,!1,f,a,p,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&Pu(t)===null){r.child=f;break}t=f.sibling,f.sibling=a,a=f,f=t}Zf(r,!0,a,null,p,u);break;case"together":Zf(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Wn(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Nr|=r.lanes,!(a&r.childLanes))if(t!==null){if(ta(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,a=Xn(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Xn(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Lf(t,r){return t.lanes&r?!0:(t=t.dependencies,!!(t!==null&&$u(t)))}function xN(t,r,a){switch(r.tag){case 3:ot(r,r.stateNode.containerInfo),Er(r,gt,t.memoizedState.cache),ri();break;case 27:case 5:hn(r);break;case 4:ot(r,r.stateNode.containerInfo);break;case 10:Er(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,sf(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Tr(r),r.flags|=128,null):a&r.child.childLanes?yb(t,r,a):(Tr(r),t=Wn(t,r,a),t!==null?t.sibling:null);Tr(r);break;case 19:var f=(t.flags&128)!==0;if(u=(a&r.childLanes)!==0,u||(ta(t,r,a,!1),u=(a&r.childLanes)!==0),f){if(u)return bb(t,r,a);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),x(pt,pt.current),u)break;return null;case 22:return r.lanes=0,fb(t,r,a,r.pendingProps);case 24:Er(r,gt,t.memoizedState.cache)}return Wn(t,r,a)}function _b(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)vt=!0;else{if(!Lf(t,a)&&!(r.flags&128))return vt=!1,xN(t,r,a);vt=!!(t.flags&131072)}else vt=!1,Ue&&r.flags&1048576&&Ky(r,sl,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(t=ui(r.elementType),r.type=t,typeof t=="function")qc(t)?(u=fi(t,u),r.tag=1,r=mb(null,r,t,u,a)):(r.tag=0,r=Nf(null,r,t,u,a));else{if(t!=null){var f=t.$$typeof;if(f===J){r.tag=11,r=ob(null,r,t,u,a);break e}else if(f===X){r.tag=14,r=sb(null,r,t,u,a);break e}}throw r=ae(t)||t,Error(l(306,r,""))}}return r;case 0:return Nf(t,r,r.type,r.pendingProps,a);case 1:return u=r.type,f=fi(u,r.pendingProps),mb(t,r,u,f,a);case 3:e:{if(ot(r,r.stateNode.containerInfo),t===null)throw Error(l(387));u=r.pendingProps;var p=r.memoizedState;f=p.element,rf(t,r),yl(r,u,null,a);var v=r.memoizedState;if(u=v.cache,Er(r,gt,u),u!==p.cache&&Pc(r,[gt],a,!0),gl(),u=v.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){r=gb(t,r,u,a);break e}else if(u!==f){f=gn(Error(l(424)),r),cl(f),r=gb(t,r,u,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(at=Sn(t.firstChild),wt=r,Ue=!0,Sr=null,bn=!0,a=fv(r,null,u,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ri(),u===f){r=Wn(t,r,a);break e}Tt(t,r,u,a)}r=r.child}return r;case 26:return oo(t,r),t===null?(a=N0(r.type,null,r.pendingProps,null))?r.memoizedState=a:Ue||(a=r.type,t=r.pendingProps,u=ko(de.current).createElement(a),u[zt]=r,u[Vt]=t,At(u,a,t),xt(u),r.stateNode=u):r.memoizedState=N0(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return hn(r),t===null&&Ue&&(u=r.stateNode=A0(r.type,r.pendingProps,de.current),wt=r,bn=!0,f=at,Ur(r.type)?(yh=f,at=Sn(u.firstChild)):at=f),Tt(t,r,r.pendingProps.children,a),oo(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ue&&((f=u=at)&&(u=KN(u,r.type,r.pendingProps,bn),u!==null?(r.stateNode=u,wt=r,at=Sn(u.firstChild),bn=!1,f=!0):f=!1),f||xr(r)),hn(r),f=r.type,p=r.pendingProps,v=t!==null?t.memoizedProps:null,u=p.children,hh(f,p)?u=null:v!==null&&hh(f,v)&&(r.flags|=32),r.memoizedState!==null&&(f=ff(t,r,pN,null,null,a),Zl._currentValue=f),oo(t,r),Tt(t,r,u,a),r.child;case 6:return t===null&&Ue&&((t=a=at)&&(a=WN(a,r.pendingProps,bn),a!==null?(r.stateNode=a,wt=r,at=null,t=!0):t=!1),t||xr(r)),null;case 13:return yb(t,r,a);case 4:return ot(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=si(r,null,u,a):Tt(t,r,u,a),r.child;case 11:return ob(t,r,r.type,r.pendingProps,a);case 7:return Tt(t,r,r.pendingProps,a),r.child;case 8:return Tt(t,r,r.pendingProps.children,a),r.child;case 12:return Tt(t,r,r.pendingProps.children,a),r.child;case 10:return u=r.pendingProps,Er(r,r.type,u.value),Tt(t,r,u.children,a),r.child;case 9:return f=r.type._context,u=r.pendingProps.children,ai(r),f=kt(f),u=u(f),r.flags|=1,Tt(t,r,u,a),r.child;case 14:return sb(t,r,r.type,r.pendingProps,a);case 15:return cb(t,r,r.type,r.pendingProps,a);case 19:return bb(t,r,a);case 31:return SN(t,r,a);case 22:return fb(t,r,a,r.pendingProps);case 24:return ai(r),u=kt(gt),t===null?(f=ef(),f===null&&(f=Ke,p=Kc(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=a),f=p),r.memoizedState={parent:u,cache:f},nf(r),Er(r,gt,f)):(t.lanes&a&&(rf(t,r),yl(r,null,null,a),gl()),f=t.memoizedState,p=r.memoizedState,f.parent!==u?(f={parent:u,cache:u},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Er(r,gt,u)):(u=p.cache,Er(r,gt,u),u!==f.cache&&Pc(r,[gt],a,!0))),Tt(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function er(t){t.flags|=4}function If(t,r,a,u,f){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(Xb())t.flags|=8192;else throw oi=Xu,tf}else t.flags&=-16777217}function Sb(t,r){if(r.type!=="stylesheet"||r.state.loading&4)t.flags&=-16777217;else if(t.flags|=16777216,!U0(r))if(Xb())t.flags|=8192;else throw oi=Xu,tf}function co(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?ey():536870912,t.lanes|=r,pa|=r)}function El(t,r){if(!Ue)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function lt(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(r)for(var f=t.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=u,t.childLanes=a,r}function EN(t,r,a){var u=r.pendingProps;switch(Gc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(r),null;case 1:return lt(r),null;case 3:return a=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Qn(gt),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(ea(r)?er(r):t===null||t.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,Fc())),lt(r),null;case 26:var f=r.type,p=r.memoizedState;return t===null?(er(r),p!==null?(lt(r),Sb(r,p)):(lt(r),If(r,f,null,u,a))):p?p!==t.memoizedState?(er(r),lt(r),Sb(r,p)):(lt(r),r.flags&=-16777217):(t=t.memoizedProps,t!==u&&er(r),lt(r),If(r,f,t,u,a)),null;case 27:if(Hn(r),a=de.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&er(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return lt(r),null}t=ne.current,ea(r)?ev(r):(t=A0(f,u,a),r.stateNode=t,er(r))}return lt(r),null;case 5:if(Hn(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&er(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return lt(r),null}if(p=ne.current,ea(r))ev(r);else{var v=ko(de.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof u.is=="string"?v.createElement("select",{is:u.is}):v.createElement("select"),u.multiple?p.multiple=!0:u.size&&(p.size=u.size);break;default:p=typeof u.is=="string"?v.createElement(f,{is:u.is}):v.createElement(f)}}p[zt]=r,p[Vt]=u;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=p;e:switch(At(p,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&er(r)}}return lt(r),If(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,a),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&er(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(l(166));if(t=de.current,ea(r)){if(t=r.stateNode,a=r.memoizedProps,u=null,f=wt,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}t[zt]=r,t=!!(t.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||y0(t.nodeValue,a)),t||xr(r,!0)}else t=ko(t).createTextNode(u),t[zt]=r,r.stateNode=t}return lt(r),null;case 31:if(a=r.memoizedState,t===null||t.memoizedState!==null){if(u=ea(r),a!==null){if(t===null){if(!u)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[zt]=r}else ri(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;lt(r),t=!1}else a=Fc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return r.flags&256?(an(r),r):(an(r),null);if(r.flags&128)throw Error(l(558))}return lt(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=ea(r),u!==null&&u.dehydrated!==null){if(t===null){if(!f)throw Error(l(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[zt]=r}else ri(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;lt(r),f=!1}else f=Fc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(an(r),r):(an(r),null)}return an(r),r.flags&128?(r.lanes=a,r):(a=u!==null,t=t!==null&&t.memoizedState!==null,a&&(u=r.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),p=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),p!==f&&(u.flags|=2048)),a!==t&&a&&(r.child.flags|=8192),co(r,r.updateQueue),lt(r),null);case 4:return Ye(),t===null&&uh(r.stateNode.containerInfo),lt(r),null;case 10:return Qn(r.type),lt(r),null;case 19:if(H(pt),u=r.memoizedState,u===null)return lt(r),null;if(f=(r.flags&128)!==0,p=u.rendering,p===null)if(f)El(u,!1);else{if(ht!==0||t!==null&&t.flags&128)for(t=r.child;t!==null;){if(p=Pu(t),p!==null){for(r.flags|=128,El(u,!1),t=p.updateQueue,r.updateQueue=t,co(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)Jy(a,t),a=a.sibling;return x(pt,pt.current&1|2),Ue&&Fn(r,u.treeForkCount),r.child}t=t.sibling}u.tail!==null&&Zt()>go&&(r.flags|=128,f=!0,El(u,!1),r.lanes=4194304)}else{if(!f)if(t=Pu(p),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,co(r,t),El(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Ue)return lt(r),null}else 2*Zt()-u.renderingStartTime>go&&a!==536870912&&(r.flags|=128,f=!0,El(u,!1),r.lanes=4194304);u.isBackwards?(p.sibling=r.child,r.child=p):(t=u.last,t!==null?t.sibling=p:r.child=p,u.last=p)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Zt(),t.sibling=null,a=pt.current,x(pt,f?a&1|2:a&1),Ue&&Fn(r,u.treeForkCount),t):(lt(r),null);case 22:case 23:return an(r),of(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?a&536870912&&!(r.flags&128)&&(lt(r),r.subtreeFlags&6&&(r.flags|=8192)):lt(r),a=r.updateQueue,a!==null&&co(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==a&&(r.flags|=2048),t!==null&&H(li),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Qn(gt),lt(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function zN(t,r){switch(Gc(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Qn(gt),Ye(),t=r.flags,t&65536&&!(t&128)?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Hn(r),null;case 31:if(r.memoizedState!==null){if(an(r),r.alternate===null)throw Error(l(340));ri()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(an(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));ri()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return H(pt),null;case 4:return Ye(),null;case 10:return Qn(r.type),null;case 22:case 23:return an(r),of(),t!==null&&H(li),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Qn(gt),null;case 25:return null;default:return null}}function xb(t,r){switch(Gc(r),r.tag){case 3:Qn(gt),Ye();break;case 26:case 27:case 5:Hn(r);break;case 4:Ye();break;case 31:r.memoizedState!==null&&an(r);break;case 13:an(r);break;case 19:H(pt);break;case 10:Qn(r.type);break;case 22:case 23:an(r),of(),t!==null&&H(li);break;case 24:Qn(gt)}}function zl(t,r){try{var a=r.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&t)===t){u=void 0;var p=a.create,v=a.inst;u=p(),v.destroy=u}a=a.next}while(a!==f)}}catch(S){Ve(r,r.return,S)}}function Or(t,r,a){try{var u=r.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var p=f.next;u=p;do{if((u.tag&t)===t){var v=u.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,f=r;var w=a,j=S;try{j()}catch(q){Ve(f,w,q)}}}u=u.next}while(u!==p)}}catch(q){Ve(r,r.return,q)}}function Eb(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{pv(r,a)}catch(u){Ve(t,t.return,u)}}}function zb(t,r,a){a.props=fi(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(u){Ve(t,r,u)}}function wl(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof a=="function"?t.refCleanup=a(u):a.current=u}}catch(f){Ve(t,r,f)}}function Zn(t,r){var a=t.ref,u=t.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(f){Ve(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Ve(t,r,f)}else a.current=null}function wb(t){var r=t.type,a=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(f){Ve(t,t.return,f)}}function Bf(t,r,a){try{var u=t.stateNode;GN(u,t.type,a,r),u[Vt]=r}catch(f){Ve(t,t.return,f)}}function kb(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ur(t.type)||t.tag===4}function Hf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||kb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ur(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function qf(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Yn));else if(u!==4&&(u===27&&Ur(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(qf(t,r,a),t=t.sibling;t!==null;)qf(t,r,a),t=t.sibling}function fo(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(u!==4&&(u===27&&Ur(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(fo(t,r,a),t=t.sibling;t!==null;)fo(t,r,a),t=t.sibling}function Tb(t){var r=t.stateNode,a=t.memoizedProps;try{for(var u=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);At(r,u,a),r[zt]=t,r[Vt]=a}catch(p){Ve(t,t.return,p)}}var tr=!1,bt=!1,$f=!1,Ab=typeof WeakSet=="function"?WeakSet:Set,Et=null;function wN(t,r){if(t=t.containerInfo,ch=Mo,t=By(t),jc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var f=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var v=0,S=-1,w=-1,j=0,q=0,G=t,U=null;t:for(;;){for(var I;G!==a||f!==0&&G.nodeType!==3||(S=v+f),G!==p||u!==0&&G.nodeType!==3||(w=v+u),G.nodeType===3&&(v+=G.nodeValue.length),(I=G.firstChild)!==null;)U=G,G=I;for(;;){if(G===t)break t;if(U===a&&++j===f&&(S=v),U===p&&++q===u&&(w=v),(I=G.nextSibling)!==null)break;G=U,U=G.parentNode}G=I}a=S===-1||w===-1?null:{start:S,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(fh={focusedElem:t,selectionRange:a},Mo=!1,Et=r;Et!==null;)if(r=Et,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,Et=t;else for(;Et!==null;){switch(r=Et,p=r.alternate,t=r.flags,r.tag){case 0:if(t&4&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)f=t[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if(t&1024&&p!==null){t=void 0,a=r,f=p.memoizedProps,p=p.memoizedState,u=a.stateNode;try{var ue=fi(a.type,f);t=u.getSnapshotBeforeUpdate(ue,p),u.__reactInternalSnapshotBeforeUpdate=t}catch(ve){Ve(a,a.return,ve)}}break;case 3:if(t&1024){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)dh(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":dh(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(t&1024)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,Et=t;break}Et=r.return}}function Ob(t,r,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:rr(t,a),u&4&&zl(5,a);break;case 1:if(rr(t,a),u&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(v){Ve(a,a.return,v)}else{var f=fi(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(v){Ve(a,a.return,v)}}u&64&&Eb(a),u&512&&wl(a,a.return);break;case 3:if(rr(t,a),u&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{pv(t,r)}catch(v){Ve(a,a.return,v)}}break;case 27:r===null&&u&4&&Tb(a);case 26:case 5:rr(t,a),r===null&&u&4&&wb(a),u&512&&wl(a,a.return);break;case 12:rr(t,a);break;case 31:rr(t,a),u&4&&Db(t,a);break;case 13:rr(t,a),u&4&&Mb(t,a),u&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=RN.bind(null,a),eD(t,a))));break;case 22:if(u=a.memoizedState!==null||tr,!u){r=r!==null&&r.memoizedState!==null||bt,f=tr;var p=bt;tr=u,(bt=r)&&!p?ir(t,a,(a.subtreeFlags&8772)!==0):rr(t,a),tr=f,bt=p}break;case 30:break;default:rr(t,a)}}function Cb(t){var r=t.alternate;r!==null&&(t.alternate=null,Cb(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&vc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var st=null,Gt=!1;function nr(t,r,a){for(a=a.child;a!==null;)Nb(t,r,a),a=a.sibling}function Nb(t,r,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:bt||Zn(a,r),nr(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||Zn(a,r);var u=st,f=Gt;Ur(a.type)&&(st=a.stateNode,Gt=!1),nr(t,r,a),Rl(a.stateNode),st=u,Gt=f;break;case 5:bt||Zn(a,r);case 6:if(u=st,f=Gt,st=null,nr(t,r,a),st=u,Gt=f,st!==null)if(Gt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(p){Ve(a,r,p)}else try{st.removeChild(a.stateNode)}catch(p){Ve(a,r,p)}break;case 18:st!==null&&(Gt?(t=st,E0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Sa(t)):E0(st,a.stateNode));break;case 4:u=st,f=Gt,st=a.stateNode.containerInfo,Gt=!0,nr(t,r,a),st=u,Gt=f;break;case 0:case 11:case 14:case 15:Or(2,a,r),bt||Or(4,a,r),nr(t,r,a);break;case 1:bt||(Zn(a,r),u=a.stateNode,typeof u.componentWillUnmount=="function"&&zb(a,r,u)),nr(t,r,a);break;case 21:nr(t,r,a);break;case 22:bt=(u=bt)||a.memoizedState!==null,nr(t,r,a),bt=u;break;default:nr(t,r,a)}}function Db(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Sa(t)}catch(a){Ve(r,r.return,a)}}}function Mb(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Sa(t)}catch(a){Ve(r,r.return,a)}}function kN(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Ab),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Ab),r;default:throw Error(l(435,t.tag))}}function ho(t,r){var a=kN(t);r.forEach(function(u){if(!a.has(u)){a.add(u);var f=jN.bind(null,t,u);u.then(f,f)}})}function Xt(t,r){var a=r.deletions;if(a!==null)for(var u=0;u<a.length;u++){var f=a[u],p=t,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Ur(S.type)){st=S.stateNode,Gt=!1;break e}break;case 5:st=S.stateNode,Gt=!1;break e;case 3:case 4:st=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(st===null)throw Error(l(160));Nb(p,v,f),st=null,Gt=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Rb(r,t),r=r.sibling}var An=null;function Rb(t,r){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Xt(r,t),Ft(t),u&4&&(Or(3,t,t.return),zl(3,t),Or(5,t,t.return));break;case 1:Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),u&64&&tr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var f=An;if(Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),u&4){var p=a!==null?a.memoizedState:null;if(u=t.memoizedState,a===null)if(u===null)if(t.stateNode===null){e:{u=t.type,a=t.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":p=f.getElementsByTagName("title")[0],(!p||p[Ka]||p[zt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(u),f.head.insertBefore(p,f.querySelector("head > title"))),At(p,u,a),p[zt]=t,xt(p),u=p;break e;case"link":var v=R0("link","href",f).get(u+(a.href||""));if(v){for(var S=0;S<v.length;S++)if(p=v[S],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(S,1);break t}}p=f.createElement(u),At(p,u,a),f.head.appendChild(p);break;case"meta":if(v=R0("meta","content",f).get(u+(a.content||""))){for(S=0;S<v.length;S++)if(p=v[S],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(S,1);break t}}p=f.createElement(u),At(p,u,a),f.head.appendChild(p);break;default:throw Error(l(468,u))}p[zt]=t,xt(p),u=p}t.stateNode=u}else j0(f,t.type,t.stateNode);else t.stateNode=M0(f,u,t.memoizedProps);else p!==u?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,u===null?j0(f,t.type,t.stateNode):M0(f,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Bf(t,t.memoizedProps,a.memoizedProps)}break;case 27:Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),a!==null&&u&4&&Bf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),t.flags&32){f=t.stateNode;try{Vi(f,"")}catch(ue){Ve(t,t.return,ue)}}u&4&&t.stateNode!=null&&(f=t.memoizedProps,Bf(t,f,a!==null?a.memoizedProps:f)),u&1024&&($f=!0);break;case 6:if(Xt(r,t),Ft(t),u&4){if(t.stateNode===null)throw Error(l(162));u=t.memoizedProps,a=t.stateNode;try{a.nodeValue=u}catch(ue){Ve(t,t.return,ue)}}break;case 3:if(Oo=null,f=An,An=To(r.containerInfo),Xt(r,t),An=f,Ft(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Sa(r.containerInfo)}catch(ue){Ve(t,t.return,ue)}$f&&($f=!1,jb(t));break;case 4:u=An,An=To(t.stateNode.containerInfo),Xt(r,t),Ft(t),An=u;break;case 12:Xt(r,t),Ft(t);break;case 31:Xt(r,t),Ft(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,ho(t,u)));break;case 13:Xt(r,t),Ft(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(mo=Zt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,ho(t,u)));break;case 22:f=t.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,j=tr,q=bt;if(tr=j||f,bt=q||w,Xt(r,t),bt=q,tr=j,Ft(t),u&8192)e:for(r=t.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(a===null||w||tr||bt||hi(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){w=a=r;try{if(p=w.stateNode,f)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=w.stateNode;var G=w.memoizedProps.style,U=G!=null&&G.hasOwnProperty("display")?G.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ue){Ve(w,w.return,ue)}}}else if(r.tag===6){if(a===null){w=r;try{w.stateNode.nodeValue=f?"":w.memoizedProps}catch(ue){Ve(w,w.return,ue)}}}else if(r.tag===18){if(a===null){w=r;try{var I=w.stateNode;f?z0(I,!0):z0(w.stateNode,!1)}catch(ue){Ve(w,w.return,ue)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,ho(t,a))));break;case 19:Xt(r,t),Ft(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,ho(t,u)));break;case 30:break;case 21:break;default:Xt(r,t),Ft(t)}}function Ft(t){var r=t.flags;if(r&2){try{for(var a,u=t.return;u!==null;){if(kb(u)){a=u;break}u=u.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var f=a.stateNode,p=Hf(t);fo(t,p,f);break;case 5:var v=a.stateNode;a.flags&32&&(Vi(v,""),a.flags&=-33);var S=Hf(t);fo(t,S,v);break;case 3:case 4:var w=a.stateNode.containerInfo,j=Hf(t);qf(t,j,w);break;default:throw Error(l(161))}}catch(q){Ve(t,t.return,q)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function jb(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;jb(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function rr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Ob(t,r.alternate,r),r=r.sibling}function hi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Or(4,r,r.return),hi(r);break;case 1:Zn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&zb(r,r.return,a),hi(r);break;case 27:Rl(r.stateNode);case 26:case 5:Zn(r,r.return),hi(r);break;case 22:r.memoizedState===null&&hi(r);break;case 30:hi(r);break;default:hi(r)}t=t.sibling}}function ir(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,f=t,p=r,v=p.flags;switch(p.tag){case 0:case 11:case 15:ir(f,p,a),zl(4,p);break;case 1:if(ir(f,p,a),u=p,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(j){Ve(u,u.return,j)}if(u=p,f=u.updateQueue,f!==null){var S=u.stateNode;try{var w=f.shared.hiddenCallbacks;if(w!==null)for(f.shared.hiddenCallbacks=null,f=0;f<w.length;f++)hv(w[f],S)}catch(j){Ve(u,u.return,j)}}a&&v&64&&Eb(p),wl(p,p.return);break;case 27:Tb(p);case 26:case 5:ir(f,p,a),a&&u===null&&v&4&&wb(p),wl(p,p.return);break;case 12:ir(f,p,a);break;case 31:ir(f,p,a),a&&v&4&&Db(f,p);break;case 13:ir(f,p,a),a&&v&4&&Mb(f,p);break;case 22:p.memoizedState===null&&ir(f,p,a),wl(p,p.return);break;case 30:break;default:ir(f,p,a)}r=r.sibling}}function Vf(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&fl(a))}function Yf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&fl(t))}function On(t,r,a,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ub(t,r,a,u),r=r.sibling}function Ub(t,r,a,u){var f=r.flags;switch(r.tag){case 0:case 11:case 15:On(t,r,a,u),f&2048&&zl(9,r);break;case 1:On(t,r,a,u);break;case 3:On(t,r,a,u),f&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&fl(t)));break;case 12:if(f&2048){On(t,r,a,u),t=r.stateNode;try{var p=r.memoizedProps,v=p.id,S=p.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(w){Ve(r,r.return,w)}}else On(t,r,a,u);break;case 31:On(t,r,a,u);break;case 13:On(t,r,a,u);break;case 23:break;case 22:p=r.stateNode,v=r.alternate,r.memoizedState!==null?p._visibility&2?On(t,r,a,u):kl(t,r):p._visibility&2?On(t,r,a,u):(p._visibility|=2,ca(t,r,a,u,(r.subtreeFlags&10256)!==0||!1)),f&2048&&Vf(v,r);break;case 24:On(t,r,a,u),f&2048&&Yf(r.alternate,r);break;default:On(t,r,a,u)}}function ca(t,r,a,u,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var p=t,v=r,S=a,w=u,j=v.flags;switch(v.tag){case 0:case 11:case 15:ca(p,v,S,w,f),zl(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?ca(p,v,S,w,f):kl(p,v):(q._visibility|=2,ca(p,v,S,w,f)),f&&j&2048&&Vf(v.alternate,v);break;case 24:ca(p,v,S,w,f),f&&j&2048&&Yf(v.alternate,v);break;default:ca(p,v,S,w,f)}r=r.sibling}}function kl(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,u=r,f=u.flags;switch(u.tag){case 22:kl(a,u),f&2048&&Vf(u.alternate,u);break;case 24:kl(a,u),f&2048&&Yf(u.alternate,u);break;default:kl(a,u)}r=r.sibling}}var Tl=8192;function fa(t,r,a){if(t.subtreeFlags&Tl)for(t=t.child;t!==null;)Zb(t,r,a),t=t.sibling}function Zb(t,r,a){switch(t.tag){case 26:fa(t,r,a),t.flags&Tl&&t.memoizedState!==null&&hD(a,An,t.memoizedState,t.memoizedProps);break;case 5:fa(t,r,a);break;case 3:case 4:var u=An;An=To(t.stateNode.containerInfo),fa(t,r,a),An=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Tl,Tl=16777216,fa(t,r,a),Tl=u):fa(t,r,a));break;default:fa(t,r,a)}}function Lb(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Al(t){var r=t.deletions;if(t.flags&16){if(r!==null)for(var a=0;a<r.length;a++){var u=r[a];Et=u,Bb(u,t)}Lb(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ib(t),t=t.sibling}function Ib(t){switch(t.tag){case 0:case 11:case 15:Al(t),t.flags&2048&&Or(9,t,t.return);break;case 3:Al(t);break;case 12:Al(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,po(t)):Al(t);break;default:Al(t)}}function po(t){var r=t.deletions;if(t.flags&16){if(r!==null)for(var a=0;a<r.length;a++){var u=r[a];Et=u,Bb(u,t)}Lb(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Or(8,r,r.return),po(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,po(r));break;default:po(r)}t=t.sibling}}function Bb(t,r){for(;Et!==null;){var a=Et;switch(a.tag){case 0:case 11:case 15:Or(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:fl(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Et=u;else e:for(a=t;Et!==null;){u=Et;var f=u.sibling,p=u.return;if(Cb(u),u===a){Et=null;break e}if(f!==null){f.return=p,Et=f;break e}Et=p}}}var TN={getCacheForType:function(t){var r=kt(gt),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a},cacheSignal:function(){return kt(gt).controller.signal}},AN=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ke=null,Oe=null,De=0,$e=0,ln=null,Cr=!1,ha=!1,Gf=!1,ar=0,ht=0,Nr=0,pi=0,Xf=0,un=0,pa=0,Ol=null,Jt=null,Ff=!1,mo=0,Hb=0,go=1/0,yo=null,Dr=null,St=0,Mr=null,da=null,lr=0,Jf=0,Qf=null,qb=null,Cl=0,Pf=null;function on(){return Be&2&&De!==0?De&-De:Z.T!==null?rh():iy()}function $b(){if(un===0)if(!(De&536870912)||Ue){var t=zu;zu<<=1,!(zu&3932160)&&(zu=262144),un=t}else un=536870912;return t=rn.current,t!==null&&(t.flags|=32),un}function Qt(t,r,a){(t===Ke&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(ma(t,0),Rr(t,De,un,!1)),Pa(t,a),(!(Be&2)||t!==Ke)&&(t===Ke&&(!(Be&2)&&(pi|=a),ht===4&&Rr(t,De,un,!1)),Ln(t))}function Vb(t,r,a){if(Be&6)throw Error(l(327));var u=!a&&(r&127)===0&&(r&t.expiredLanes)===0||Qa(t,r),f=u?NN(t,r):Wf(t,r,!0),p=u;do{if(f===0){ha&&!u&&Rr(t,r,0,!1);break}else{if(a=t.current.alternate,p&&!ON(a)){f=Wf(t,r,!1),p=!1;continue}if(f===2){if(p=r,t.errorRecoveryDisabledLanes&p)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=t;f=Ol;var w=S.current.memoizedState.isDehydrated;if(w&&(ma(S,v).flags|=256),v=Wf(S,v,!1),v!==2){if(Gf&&!w){S.errorRecoveryDisabledLanes|=p,pi|=p,f=4;break e}p=Jt,Jt=f,p!==null&&(Jt===null?Jt=p:Jt.push.apply(Jt,p))}f=v}if(p=!1,f!==2)continue}}if(f===1){ma(t,0),Rr(t,r,0,!0);break}e:{switch(u=t,p=f,p){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Rr(u,r,un,!Cr);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(f=mo+300-Zt(),10<f)){if(Rr(u,r,un,!Cr),ku(u,0,!0)!==0)break e;lr=r,u.timeoutHandle=S0(Yb.bind(null,u,a,Jt,yo,Ff,r,un,pi,pa,Cr,p,"Throttled",-0,0),f);break e}Yb(u,a,Jt,yo,Ff,r,un,pi,pa,Cr,p,null,-0,0)}}break}while(!0);Ln(t)}function Yb(t,r,a,u,f,p,v,S,w,j,q,G,U,I){if(t.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Zb(r,p,G);var ue=(p&62914560)===p?mo-Zt():(p&4194048)===p?Hb-Zt():0;if(ue=pD(G,ue),ue!==null){lr=p,t.cancelPendingCommit=ue(Wb.bind(null,t,r,p,a,u,f,v,S,w,q,G,null,U,I)),Rr(t,p,v,!j);return}}Wb(t,r,p,a,u,f,v,S,w)}function ON(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var f=a[u],p=f.getSnapshot;f=f.value;try{if(!tn(p(),f))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Rr(t,r,a,u){r&=~Xf,r&=~pi,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var f=r;0<f;){var p=31-Pe(f),v=1<<p;u[p]=-1,f&=~v}a!==0&&ty(t,a,r)}function vo(){return Be&6?!0:(Nl(0),!1)}function Kf(){if(Oe!==null){if($e===0)var t=Oe.return;else t=Oe,Jn=ii=null,df(t),aa=null,pl=0,t=Oe;for(;t!==null;)xb(t.alternate,t),t=t.return;Oe=null}}function ma(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,JN(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),lr=0,Kf(),Ke=t,Oe=a=Xn(t.current,null),De=r,$e=0,ln=null,Cr=!1,ha=Qa(t,r),Gf=!1,pa=un=Xf=pi=Nr=ht=0,Jt=Ol=null,Ff=!1,r&8&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var f=31-Pe(u),p=1<<f;r|=t[f],u&=~p}return ar=r,Lu(),a}function Gb(t,r){Ee=null,Z.H=Sl,r===ia||r===Gu?(r=ov(),$e=3):r===tf?(r=ov(),$e=4):$e=r===Cf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ln=r,Oe===null&&(ht=1,lo(t,gn(r,t.current)))}function Xb(){var t=rn.current;return t===null?!0:(De&4194048)===De?_n===null:(De&62914560)===De||De&536870912?t===_n:!1}function Fb(){var t=Z.H;return Z.H=Sl,t===null?Sl:t}function Jb(){var t=Z.A;return Z.A=TN,t}function bo(){ht=4,Cr||(De&4194048)!==De&&rn.current!==null||(ha=!0),!(Nr&134217727)&&!(pi&134217727)||Ke===null||Rr(Ke,De,un,!1)}function Wf(t,r,a){var u=Be;Be|=2;var f=Fb(),p=Jb();(Ke!==t||De!==r)&&(yo=null,ma(t,r)),r=!1;var v=ht;e:do try{if($e!==0&&Oe!==null){var S=Oe,w=ln;switch($e){case 8:Kf(),v=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(r=!0);var j=$e;if($e=0,ln=null,ga(t,S,w,j),a&&ha){v=0;break e}break;default:j=$e,$e=0,ln=null,ga(t,S,w,j)}}CN(),v=ht;break}catch(q){Gb(t,q)}while(!0);return r&&t.shellSuspendCounter++,Jn=ii=null,Be=u,Z.H=f,Z.A=p,Oe===null&&(Ke=null,De=0,Lu()),v}function CN(){for(;Oe!==null;)Qb(Oe)}function NN(t,r){var a=Be;Be|=2;var u=Fb(),f=Jb();Ke!==t||De!==r?(yo=null,go=Zt()+500,ma(t,r)):ha=Qa(t,r);e:do try{if($e!==0&&Oe!==null){r=Oe;var p=ln;t:switch($e){case 1:$e=0,ln=null,ga(t,r,p,1);break;case 2:case 9:if(lv(p)){$e=0,ln=null,Pb(r);break}r=function(){$e!==2&&$e!==9||Ke!==t||($e=7),Ln(t)},p.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:lv(p)?($e=0,ln=null,Pb(r)):($e=0,ln=null,ga(t,r,p,7));break;case 5:var v=null;switch(Oe.tag){case 26:v=Oe.memoizedState;case 5:case 27:var S=Oe;if(v?U0(v):S.stateNode.complete){$e=0,ln=null;var w=S.sibling;if(w!==null)Oe=w;else{var j=S.return;j!==null?(Oe=j,_o(j)):Oe=null}break t}}$e=0,ln=null,ga(t,r,p,5);break;case 6:$e=0,ln=null,ga(t,r,p,6);break;case 8:Kf(),ht=6;break e;default:throw Error(l(462))}}DN();break}catch(q){Gb(t,q)}while(!0);return Jn=ii=null,Z.H=u,Z.A=f,Be=a,Oe!==null?0:(Ke=null,De=0,Lu(),ht)}function DN(){for(;Oe!==null&&!fc();)Qb(Oe)}function Qb(t){var r=_b(t.alternate,t,ar);t.memoizedProps=t.pendingProps,r===null?_o(t):Oe=r}function Pb(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=db(a,r,r.pendingProps,r.type,void 0,De);break;case 11:r=db(a,r,r.pendingProps,r.type.render,r.ref,De);break;case 5:df(r);default:xb(a,r),r=Oe=Jy(r,ar),r=_b(a,r,ar)}t.memoizedProps=t.pendingProps,r===null?_o(t):Oe=r}function ga(t,r,a,u){Jn=ii=null,df(r),aa=null,pl=0;var f=r.return;try{if(_N(t,f,r,a,De)){ht=1,lo(t,gn(a,t.current)),Oe=null;return}}catch(p){if(f!==null)throw Oe=f,p;ht=1,lo(t,gn(a,t.current)),Oe=null;return}r.flags&32768?(Ue||u===1?t=!0:ha||De&536870912?t=!1:(Cr=t=!0,(u===2||u===9||u===3||u===6)&&(u=rn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Kb(r,t)):_o(r)}function _o(t){var r=t;do{if(r.flags&32768){Kb(r,Cr);return}t=r.return;var a=EN(r.alternate,r,ar);if(a!==null){Oe=a;return}if(r=r.sibling,r!==null){Oe=r;return}Oe=r=t}while(r!==null);ht===0&&(ht=5)}function Kb(t,r){do{var a=zN(t.alternate,t);if(a!==null){a.flags&=32767,Oe=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){Oe=t;return}Oe=t=a}while(t!==null);ht=6,Oe=null}function Wb(t,r,a,u,f,p,v,S,w){t.cancelPendingCommit=null;do So();while(St!==0);if(Be&6)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(p=r.lanes|r.childLanes,p|=Bc,f4(t,a,p,v,S,w),t===Ke&&(Oe=Ke=null,De=0),da=r,Mr=t,lr=a,Jf=p,Qf=f,qb=u,r.subtreeFlags&10256||r.flags&10256?(t.callbackNode=null,t.callbackPriority=0,UN(_e,function(){return i0(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,r.subtreeFlags&13878||u){u=Z.T,Z.T=null,f=F.p,F.p=2,v=Be,Be|=4;try{wN(t,r,a)}finally{Be=v,F.p=f,Z.T=u}}St=1,e0(),t0(),n0()}}function e0(){if(St===1){St=0;var t=Mr,r=da,a=(r.flags&13878)!==0;if(r.subtreeFlags&13878||a){a=Z.T,Z.T=null;var u=F.p;F.p=2;var f=Be;Be|=4;try{Rb(r,t);var p=fh,v=By(t.containerInfo),S=p.focusedElem,w=p.selectionRange;if(v!==S&&S&&S.ownerDocument&&Iy(S.ownerDocument.documentElement,S)){if(w!==null&&jc(S)){var j=w.start,q=w.end;if(q===void 0&&(q=j),"selectionStart"in S)S.selectionStart=j,S.selectionEnd=Math.min(q,S.value.length);else{var G=S.ownerDocument||document,U=G&&G.defaultView||window;if(U.getSelection){var I=U.getSelection(),ue=S.textContent.length,ve=Math.min(w.start,ue),Fe=w.end===void 0?ve:Math.min(w.end,ue);!I.extend&&ve>Fe&&(v=Fe,Fe=ve,ve=v);var N=Ly(S,ve),C=Ly(S,Fe);if(N&&C&&(I.rangeCount!==1||I.anchorNode!==N.node||I.anchorOffset!==N.offset||I.focusNode!==C.node||I.focusOffset!==C.offset)){var R=G.createRange();R.setStart(N.node,N.offset),I.removeAllRanges(),ve>Fe?(I.addRange(R),I.extend(C.node,C.offset)):(R.setEnd(C.node,C.offset),I.addRange(R))}}}}for(G=[],I=S;I=I.parentNode;)I.nodeType===1&&G.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<G.length;S++){var Y=G[S];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Mo=!!ch,fh=ch=null}finally{Be=f,F.p=u,Z.T=a}}t.current=r,St=2}}function t0(){if(St===2){St=0;var t=Mr,r=da,a=(r.flags&8772)!==0;if(r.subtreeFlags&8772||a){a=Z.T,Z.T=null;var u=F.p;F.p=2;var f=Be;Be|=4;try{Ob(t,r.alternate,r)}finally{Be=f,F.p=u,Z.T=a}}St=3}}function n0(){if(St===4||St===3){St=0,hc();var t=Mr,r=da,a=lr,u=qb;r.subtreeFlags&10256||r.flags&10256?St=5:(St=0,da=Mr=null,r0(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Dr=null),gc(a),r=r.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Lt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=Z.T,f=F.p,F.p=2,Z.T=null;try{for(var p=t.onRecoverableError,v=0;v<u.length;v++){var S=u[v];p(S.value,{componentStack:S.stack})}}finally{Z.T=r,F.p=f}}lr&3&&So(),Ln(t),f=t.pendingLanes,a&261930&&f&42?t===Pf?Cl++:(Cl=0,Pf=t):Cl=0,Nl(0)}}function r0(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,fl(r)))}function So(){return e0(),t0(),n0(),i0()}function i0(){if(St!==5)return!1;var t=Mr,r=Jf;Jf=0;var a=gc(lr),u=Z.T,f=F.p;try{F.p=32>a?32:a,Z.T=null,a=Qf,Qf=null;var p=Mr,v=lr;if(St=0,da=Mr=null,lr=0,Be&6)throw Error(l(331));var S=Be;if(Be|=4,Ib(p.current),Ub(p,p.current,v,a),Be=S,Nl(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Lt,p)}catch{}return!0}finally{F.p=f,Z.T=u,r0(t,r)}}function a0(t,r,a){r=gn(a,r),r=Of(t.stateNode,r,2),t=kr(t,r,2),t!==null&&(Pa(t,2),Ln(t))}function Ve(t,r,a){if(t.tag===3)a0(t,t,a);else for(;r!==null;){if(r.tag===3){a0(r,t,a);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Dr===null||!Dr.has(u))){t=gn(a,t),a=lb(2),u=kr(r,a,2),u!==null&&(ub(a,u,r,t),Pa(u,2),Ln(u));break}}r=r.return}}function eh(t,r,a){var u=t.pingCache;if(u===null){u=t.pingCache=new AN;var f=new Set;u.set(r,f)}else f=u.get(r),f===void 0&&(f=new Set,u.set(r,f));f.has(a)||(Gf=!0,f.add(a),t=MN.bind(null,t,r,a),r.then(t,t))}function MN(t,r,a){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Ke===t&&(De&a)===a&&(ht===4||ht===3&&(De&62914560)===De&&300>Zt()-mo?!(Be&2)&&ma(t,0):Xf|=a,pa===De&&(pa=0)),Ln(t)}function l0(t,r){r===0&&(r=ey()),t=ti(t,r),t!==null&&(Pa(t,r),Ln(t))}function RN(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),l0(t,a)}function jN(t,r){var a=0;switch(t.tag){case 31:case 13:var u=t.stateNode,f=t.memoizedState;f!==null&&(a=f.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(l(314))}u!==null&&u.delete(r),l0(t,a)}function UN(t,r){return Zi(t,r)}var xo=null,ya=null,th=!1,Eo=!1,nh=!1,jr=0;function Ln(t){t!==ya&&t.next===null&&(ya===null?xo=ya=t:ya=ya.next=t),Eo=!0,th||(th=!0,LN())}function Nl(t,r){if(!nh&&Eo){nh=!0;do for(var a=!1,u=xo;u!==null;){if(t!==0){var f=u.pendingLanes;if(f===0)var p=0;else{var v=u.suspendedLanes,S=u.pingedLanes;p=(1<<31-Pe(42|t)+1)-1,p&=f&~(v&~S),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,c0(u,p))}else p=De,p=ku(u,u===Ke?p:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(p&3)||Qa(u,p)||(a=!0,c0(u,p));u=u.next}while(a);nh=!1}}function ZN(){u0()}function u0(){Eo=th=!1;var t=0;jr!==0&&FN()&&(t=jr);for(var r=Zt(),a=null,u=xo;u!==null;){var f=u.next,p=o0(u,r);p===0?(u.next=null,a===null?xo=f:a.next=f,f===null&&(ya=a)):(a=u,(t!==0||p&3)&&(Eo=!0)),u=f}St!==0&&St!==5||Nl(t),jr!==0&&(jr=0)}function o0(t,r){for(var a=t.suspendedLanes,u=t.pingedLanes,f=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var v=31-Pe(p),S=1<<v,w=f[v];w===-1?(!(S&a)||S&u)&&(f[v]=c4(S,r)):w<=r&&(t.expiredLanes|=S),p&=~S}if(r=Ke,a=De,a=ku(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,a===0||t===r&&($e===2||$e===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&Ja(u),t.callbackNode=null,t.callbackPriority=0;if(!(a&3)||Qa(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(u!==null&&Ja(u),gc(a)){case 2:case 8:a=W;break;case 32:a=_e;break;case 268435456:a=He;break;default:a=_e}return u=s0.bind(null,t),a=Zi(a,u),t.callbackPriority=r,t.callbackNode=a,r}return u!==null&&u!==null&&Ja(u),t.callbackPriority=2,t.callbackNode=null,2}function s0(t,r){if(St!==0&&St!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(So()&&t.callbackNode!==a)return null;var u=De;return u=ku(t,t===Ke?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(Vb(t,u,r),o0(t,Zt()),t.callbackNode!=null&&t.callbackNode===a?s0.bind(null,t):null)}function c0(t,r){if(So())return null;Vb(t,r,!0)}function LN(){QN(function(){Be&6?Zi(V,ZN):u0()})}function rh(){if(jr===0){var t=na;t===0&&(t=Eu,Eu<<=1,!(Eu&261888)&&(Eu=256)),jr=t}return jr}function f0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Cu(""+t)}function h0(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function IN(t,r,a,u,f){if(r==="submit"&&a&&a.stateNode===f){var p=f0((f[Vt]||null).action),v=u.submitter;v&&(r=(r=v[Vt]||null)?f0(r.formAction):v.getAttribute("formAction"),r!==null&&(p=r,v=null));var S=new Ru("action","action",null,u,f);t.push({event:S,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(jr!==0){var w=v?h0(f,v):new FormData(f);Ef(a,{pending:!0,data:w,method:f.method,action:p},null,w)}}else typeof p=="function"&&(S.preventDefault(),w=v?h0(f,v):new FormData(f),Ef(a,{pending:!0,data:w,method:f.method,action:p},p,w))},currentTarget:f}]})}}for(var ih=0;ih<Ic.length;ih++){var ah=Ic[ih],BN=ah.toLowerCase(),HN=ah[0].toUpperCase()+ah.slice(1);Tn(BN,"on"+HN)}Tn($y,"onAnimationEnd"),Tn(Vy,"onAnimationIteration"),Tn(Yy,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(rN,"onTransitionRun"),Tn(iN,"onTransitionStart"),Tn(aN,"onTransitionCancel"),Tn(Gy,"onTransitionEnd"),qi("onMouseEnter",["mouseout","mouseover"]),qi("onMouseLeave",["mouseout","mouseover"]),qi("onPointerEnter",["pointerout","pointerover"]),qi("onPointerLeave",["pointerout","pointerover"]),Pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),qN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function p0(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var u=t[a],f=u.event;u=u.listeners;e:{var p=void 0;if(r)for(var v=u.length-1;0<=v;v--){var S=u[v],w=S.instance,j=S.currentTarget;if(S=S.listener,w!==p&&f.isPropagationStopped())break e;p=S,f.currentTarget=j;try{p(f)}catch(q){Zu(q)}f.currentTarget=null,p=w}else for(v=0;v<u.length;v++){if(S=u[v],w=S.instance,j=S.currentTarget,S=S.listener,w!==p&&f.isPropagationStopped())break e;p=S,f.currentTarget=j;try{p(f)}catch(q){Zu(q)}f.currentTarget=null,p=w}}}}function Ce(t,r){var a=r[yc];a===void 0&&(a=r[yc]=new Set);var u=t+"__bubble";a.has(u)||(d0(r,t,2,!1),a.add(u))}function lh(t,r,a){var u=0;r&&(u|=4),d0(a,t,u,r)}var zo="_reactListening"+Math.random().toString(36).slice(2);function uh(t){if(!t[zo]){t[zo]=!0,uy.forEach(function(a){a!=="selectionchange"&&(qN.has(a)||lh(a,!1,t),lh(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[zo]||(r[zo]=!0,lh("selectionchange",!1,r))}}function d0(t,r,a,u){switch($0(r)){case 2:var f=gD;break;case 8:f=yD;break;default:f=xh}a=f.bind(null,r,a,t),f=void 0,!kc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),u?f!==void 0?t.addEventListener(r,a,{capture:!0,passive:f}):t.addEventListener(r,a,!0):f!==void 0?t.addEventListener(r,a,{passive:f}):t.addEventListener(r,a,!1)}function oh(t,r,a,u,f){var p=u;if(!(r&1)&&!(r&2)&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var S=u.stateNode.containerInfo;if(S===f)break;if(v===4)for(v=u.return;v!==null;){var w=v.tag;if((w===3||w===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;S!==null;){if(v=Ii(S),v===null)return;if(w=v.tag,w===5||w===6||w===26||w===27){u=p=v;continue e}S=S.parentNode}}u=u.return}by(function(){var j=p,q=zc(a),G=[];e:{var U=Xy.get(t);if(U!==void 0){var I=Ru,ue=t;switch(t){case"keypress":if(Du(a)===0)break e;case"keydown":case"keyup":I=j4;break;case"focusin":ue="focus",I=Cc;break;case"focusout":ue="blur",I=Cc;break;case"beforeblur":case"afterblur":I=Cc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=xy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=E4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=L4;break;case $y:case Vy:case Yy:I=k4;break;case Gy:I=B4;break;case"scroll":case"scrollend":I=S4;break;case"wheel":I=q4;break;case"copy":case"cut":case"paste":I=A4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=zy;break;case"toggle":case"beforetoggle":I=V4}var ve=(r&4)!==0,Fe=!ve&&(t==="scroll"||t==="scrollend"),N=ve?U!==null?U+"Capture":null:U;ve=[];for(var C=j,R;C!==null;){var Y=C;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||N===null||(Y=el(C,N),Y!=null&&ve.push(Ml(C,Y,R))),Fe)break;C=C.return}0<ve.length&&(U=new I(U,ue,null,a,q),G.push({event:U,listeners:ve}))}}if(!(r&7)){e:{if(U=t==="mouseover"||t==="pointerover",I=t==="mouseout"||t==="pointerout",U&&a!==Ec&&(ue=a.relatedTarget||a.fromElement)&&(Ii(ue)||ue[Li]))break e;if((I||U)&&(U=q.window===q?q:(U=q.ownerDocument)?U.defaultView||U.parentWindow:window,I?(ue=a.relatedTarget||a.toElement,I=j,ue=ue?Ii(ue):null,ue!==null&&(Fe=s(ue),ve=ue.tag,ue!==Fe||ve!==5&&ve!==27&&ve!==6)&&(ue=null)):(I=null,ue=j),I!==ue)){if(ve=xy,Y="onMouseLeave",N="onMouseEnter",C="mouse",(t==="pointerout"||t==="pointerover")&&(ve=zy,Y="onPointerLeave",N="onPointerEnter",C="pointer"),Fe=I==null?U:Wa(I),R=ue==null?U:Wa(ue),U=new ve(Y,C+"leave",I,a,q),U.target=Fe,U.relatedTarget=R,Y=null,Ii(q)===j&&(ve=new ve(N,C+"enter",ue,a,q),ve.target=R,ve.relatedTarget=Fe,Y=ve),Fe=Y,I&&ue)t:{for(ve=$N,N=I,C=ue,R=0,Y=N;Y;Y=ve(Y))R++;Y=0;for(var me=C;me;me=ve(me))Y++;for(;0<R-Y;)N=ve(N),R--;for(;0<Y-R;)C=ve(C),Y--;for(;R--;){if(N===C||C!==null&&N===C.alternate){ve=N;break t}N=ve(N),C=ve(C)}ve=null}else ve=null;I!==null&&m0(G,U,I,ve,!1),ue!==null&&Fe!==null&&m0(G,Fe,ue,ve,!0)}}e:{if(U=j?Wa(j):window,I=U.nodeName&&U.nodeName.toLowerCase(),I==="select"||I==="input"&&U.type==="file")var Le=Dy;else if(Cy(U))if(My)Le=eN;else{Le=K4;var se=P4}else I=U.nodeName,!I||I.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?j&&xc(j.elementType)&&(Le=Dy):Le=W4;if(Le&&(Le=Le(t,j))){Ny(G,Le,a,q);break e}se&&se(t,U,j),t==="focusout"&&j&&U.type==="number"&&j.memoizedProps.value!=null&&Sc(U,"number",U.value)}switch(se=j?Wa(j):window,t){case"focusin":(Cy(se)||se.contentEditable==="true")&&(Fi=se,Uc=j,ol=null);break;case"focusout":ol=Uc=Fi=null;break;case"mousedown":Zc=!0;break;case"contextmenu":case"mouseup":case"dragend":Zc=!1,Hy(G,a,q);break;case"selectionchange":if(nN)break;case"keydown":case"keyup":Hy(G,a,q)}var we;if(Dc)e:{switch(t){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Xi?Ay(t,a)&&(Me="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Me="onCompositionStart");Me&&(wy&&a.locale!=="ko"&&(Xi||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Xi&&(we=_y()):(br=q,Tc="value"in br?br.value:br.textContent,Xi=!0)),se=wo(j,Me),0<se.length&&(Me=new Ey(Me,t,null,a,q),G.push({event:Me,listeners:se}),we?Me.data=we:(we=Oy(a),we!==null&&(Me.data=we)))),(we=G4?X4(t,a):F4(t,a))&&(Me=wo(j,"onBeforeInput"),0<Me.length&&(se=new Ey("onBeforeInput","beforeinput",null,a,q),G.push({event:se,listeners:Me}),se.data=we)),IN(G,t,j,a,q)}p0(G,r)})}function Ml(t,r,a){return{instance:t,listener:r,currentTarget:a}}function wo(t,r){for(var a=r+"Capture",u=[];t!==null;){var f=t,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=el(t,a),f!=null&&u.unshift(Ml(t,f,p)),f=el(t,r),f!=null&&u.push(Ml(t,f,p))),t.tag===3)return u;t=t.return}return[]}function $N(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function m0(t,r,a,u,f){for(var p=r._reactName,v=[];a!==null&&a!==u;){var S=a,w=S.alternate,j=S.stateNode;if(S=S.tag,w!==null&&w===u)break;S!==5&&S!==26&&S!==27||j===null||(w=j,f?(j=el(a,p),j!=null&&v.unshift(Ml(a,j,w))):f||(j=el(a,p),j!=null&&v.push(Ml(a,j,w)))),a=a.return}v.length!==0&&t.push({event:r,listeners:v})}var VN=/\r\n?/g,YN=/\u0000|\uFFFD/g;function g0(t){return(typeof t=="string"?t:""+t).replace(VN,`
|
|
49
|
-
`).replace(YN,"")}function y0(t,r){return r=g0(r),g0(t)===r}function Xe(t,r,a,u,f,p){switch(a){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Vi(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Vi(t,""+u);break;case"className":Au(t,"class",u);break;case"tabIndex":Au(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Au(t,a,u);break;case"style":yy(t,u,p);break;case"data":if(r!=="object"){Au(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=Cu(""+u),t.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(a,"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 p=="function"&&(a==="formAction"?(r!=="input"&&Xe(t,r,"name",f.name,f,null),Xe(t,r,"formEncType",f.formEncType,f,null),Xe(t,r,"formMethod",f.formMethod,f,null),Xe(t,r,"formTarget",f.formTarget,f,null)):(Xe(t,r,"encType",f.encType,f,null),Xe(t,r,"method",f.method,f,null),Xe(t,r,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=Cu(""+u),t.setAttribute(a,u);break;case"onClick":u!=null&&(t.onclick=Yn);break;case"onScroll":u!=null&&Ce("scroll",t);break;case"onScrollEnd":u!=null&&Ce("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}a=Cu(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""+u):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":u===!0?t.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,u):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(a,u):t.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(a):t.setAttribute(a,u);break;case"popover":Ce("beforetoggle",t),Ce("toggle",t),Tu(t,"popover",u);break;case"xlinkActuate":Vn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Vn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Vn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Vn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Vn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Vn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Vn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Vn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Vn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Tu(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=b4.get(a)||a,Tu(t,a,u))}}function sh(t,r,a,u,f,p){switch(a){case"style":yy(t,u,p);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof u=="string"?Vi(t,u):(typeof u=="number"||typeof u=="bigint")&&Vi(t,""+u);break;case"onScroll":u!=null&&Ce("scroll",t);break;case"onScrollEnd":u!=null&&Ce("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!oy.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),r=a.slice(2,f?a.length-7:void 0),p=t[Vt]||null,p=p!=null?p[a]:null,typeof p=="function"&&t.removeEventListener(r,p,f),typeof u=="function")){typeof p!="function"&&p!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,u,f);break e}a in t?t[a]=u:u===!0?t.setAttribute(a,""):Tu(t,a,u)}}}function At(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",t),Ce("load",t);var u=!1,f=!1,p;for(p in a)if(a.hasOwnProperty(p)){var v=a[p];if(v!=null)switch(p){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Xe(t,r,p,v,a,null)}}f&&Xe(t,r,"srcSet",a.srcSet,a,null),u&&Xe(t,r,"src",a.src,a,null);return;case"input":Ce("invalid",t);var S=p=v=f=null,w=null,j=null;for(u in a)if(a.hasOwnProperty(u)){var q=a[u];if(q!=null)switch(u){case"name":f=q;break;case"type":v=q;break;case"checked":w=q;break;case"defaultChecked":j=q;break;case"value":p=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(l(137,r));break;default:Xe(t,r,u,q,a,null)}}py(t,p,S,w,j,v,f,!1);return;case"select":Ce("invalid",t),u=v=p=null;for(f in a)if(a.hasOwnProperty(f)&&(S=a[f],S!=null))switch(f){case"value":p=S;break;case"defaultValue":v=S;break;case"multiple":u=S;default:Xe(t,r,f,S,a,null)}r=p,a=v,t.multiple=!!u,r!=null?$i(t,!!u,r,!1):a!=null&&$i(t,!!u,a,!0);return;case"textarea":Ce("invalid",t),p=f=u=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":u=S;break;case"defaultValue":f=S;break;case"children":p=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:Xe(t,r,v,S,a,null)}my(t,u,f,p);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(u=a[w],u!=null))switch(w){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Xe(t,r,w,u,a,null)}return;case"dialog":Ce("beforetoggle",t),Ce("toggle",t),Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":Ce("load",t);break;case"video":case"audio":for(u=0;u<Dl.length;u++)Ce(Dl[u],t);break;case"image":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"embed":case"source":case"link":Ce("error",t),Ce("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in a)if(a.hasOwnProperty(j)&&(u=a[j],u!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Xe(t,r,j,u,a,null)}return;default:if(xc(r)){for(q in a)a.hasOwnProperty(q)&&(u=a[q],u!==void 0&&sh(t,r,q,u,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(u=a[S],u!=null&&Xe(t,r,S,u,a,null))}function GN(t,r,a,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,v=null,S=null,w=null,j=null,q=null;for(I in a){var G=a[I];if(a.hasOwnProperty(I)&&G!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":w=G;default:u.hasOwnProperty(I)||Xe(t,r,I,null,u,G)}}for(var U in u){var I=u[U];if(G=a[U],u.hasOwnProperty(U)&&(I!=null||G!=null))switch(U){case"type":p=I;break;case"name":f=I;break;case"checked":j=I;break;case"defaultChecked":q=I;break;case"value":v=I;break;case"defaultValue":S=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(l(137,r));break;default:I!==G&&Xe(t,r,U,I,u,G)}}_c(t,v,S,w,j,q,p,f);return;case"select":I=v=S=U=null;for(p in a)if(w=a[p],a.hasOwnProperty(p)&&w!=null)switch(p){case"value":break;case"multiple":I=w;default:u.hasOwnProperty(p)||Xe(t,r,p,null,u,w)}for(f in u)if(p=u[f],w=a[f],u.hasOwnProperty(f)&&(p!=null||w!=null))switch(f){case"value":U=p;break;case"defaultValue":S=p;break;case"multiple":v=p;default:p!==w&&Xe(t,r,f,p,u,w)}r=S,a=v,u=I,U!=null?$i(t,!!a,U,!1):!!u!=!!a&&(r!=null?$i(t,!!a,r,!0):$i(t,!!a,a?[]:"",!1));return;case"textarea":I=U=null;for(S in a)if(f=a[S],a.hasOwnProperty(S)&&f!=null&&!u.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Xe(t,r,S,null,u,f)}for(v in u)if(f=u[v],p=a[v],u.hasOwnProperty(v)&&(f!=null||p!=null))switch(v){case"value":U=f;break;case"defaultValue":I=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==p&&Xe(t,r,v,f,u,p)}dy(t,U,I);return;case"option":for(var ue in a)if(U=a[ue],a.hasOwnProperty(ue)&&U!=null&&!u.hasOwnProperty(ue))switch(ue){case"selected":t.selected=!1;break;default:Xe(t,r,ue,null,u,U)}for(w in u)if(U=u[w],I=a[w],u.hasOwnProperty(w)&&U!==I&&(U!=null||I!=null))switch(w){case"selected":t.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Xe(t,r,w,U,u,I)}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 ve in a)U=a[ve],a.hasOwnProperty(ve)&&U!=null&&!u.hasOwnProperty(ve)&&Xe(t,r,ve,null,u,U);for(j in u)if(U=u[j],I=a[j],u.hasOwnProperty(j)&&U!==I&&(U!=null||I!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,r));break;default:Xe(t,r,j,U,u,I)}return;default:if(xc(r)){for(var Fe in a)U=a[Fe],a.hasOwnProperty(Fe)&&U!==void 0&&!u.hasOwnProperty(Fe)&&sh(t,r,Fe,void 0,u,U);for(q in u)U=u[q],I=a[q],!u.hasOwnProperty(q)||U===I||U===void 0&&I===void 0||sh(t,r,q,U,u,I);return}}for(var N in a)U=a[N],a.hasOwnProperty(N)&&U!=null&&!u.hasOwnProperty(N)&&Xe(t,r,N,null,u,U);for(G in u)U=u[G],I=a[G],!u.hasOwnProperty(G)||U===I||U==null&&I==null||Xe(t,r,G,U,u,I)}function v0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function XN(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var f=a[u],p=f.transferSize,v=f.initiatorType,S=f.duration;if(p&&S&&v0(v)){for(v=0,S=f.responseEnd,u+=1;u<a.length;u++){var w=a[u],j=w.startTime;if(j>S)break;var q=w.transferSize,G=w.initiatorType;q&&v0(G)&&(w=w.responseEnd,v+=q*(w<S?1:(S-j)/(w-j)))}if(--u,r+=8*(p+v)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var ch=null,fh=null;function ko(t){return t.nodeType===9?t:t.ownerDocument}function b0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _0(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function hh(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var ph=null;function FN(){var t=window.event;return t&&t.type==="popstate"?t===ph?!1:(ph=t,!0):(ph=null,!1)}var S0=typeof setTimeout=="function"?setTimeout:void 0,JN=typeof clearTimeout=="function"?clearTimeout:void 0,x0=typeof Promise=="function"?Promise:void 0,QN=typeof queueMicrotask=="function"?queueMicrotask:typeof x0<"u"?function(t){return x0.resolve(null).then(t).catch(PN)}:S0;function PN(t){setTimeout(function(){throw t})}function Ur(t){return t==="head"}function E0(t,r){var a=r,u=0;do{var f=a.nextSibling;if(t.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(u===0){t.removeChild(f),Sa(r);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")Rl(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Rl(a);for(var p=a.firstChild;p;){var v=p.nextSibling,S=p.nodeName;p[Ka]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=v}}else a==="body"&&Rl(t.ownerDocument.body);a=f}while(a);Sa(r)}function z0(t,r){var a=t;t=0;do{var u=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=u}while(a)}function dh(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":dh(a),vc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function KN(t,r,a,u){for(;t.nodeType===1;){var f=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Ka])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=Sn(t.nextSibling),t===null)break}return null}function WN(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Sn(t.nextSibling),t===null))return null;return t}function w0(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Sn(t.nextSibling),t===null))return null;return t}function mh(t){return t.data==="$?"||t.data==="$~"}function gh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function eD(t,r){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||a.readyState!=="loading")r();else{var u=function(){r(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function Sn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var yh=null;function k0(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(r===0)return Sn(t.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}t=t.nextSibling}return null}function T0(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return t;r--}else a!=="/$"&&a!=="/&"||r++}t=t.previousSibling}return null}function A0(t,r,a){switch(r=ko(a),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Rl(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);vc(t)}var xn=new Map,O0=new Set;function To(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ur=F.d;F.d={f:tD,r:nD,D:rD,C:iD,L:aD,m:lD,X:oD,S:uD,M:sD};function tD(){var t=ur.f(),r=vo();return t||r}function nD(t){var r=Bi(t);r!==null&&r.tag===5&&r.type==="form"?Gv(r):ur.r(t)}var va=typeof document>"u"?null:document;function C0(t,r,a){var u=va;if(u&&typeof r=="string"&&r){var f=dn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),O0.has(f)||(O0.add(f),t={rel:t,crossOrigin:a,href:r},u.querySelector(f)===null&&(r=u.createElement("link"),At(r,"link",t),xt(r),u.head.appendChild(r)))}}function rD(t){ur.D(t),C0("dns-prefetch",t,null)}function iD(t,r){ur.C(t,r),C0("preconnect",t,r)}function aD(t,r,a){ur.L(t,r,a);var u=va;if(u&&t&&r){var f='link[rel="preload"][as="'+dn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+dn(a.imageSizes)+'"]')):f+='[href="'+dn(t)+'"]';var p=f;switch(r){case"style":p=ba(t);break;case"script":p=_a(t)}xn.has(p)||(t=g({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),xn.set(p,t),u.querySelector(f)!==null||r==="style"&&u.querySelector(jl(p))||r==="script"&&u.querySelector(Ul(p))||(r=u.createElement("link"),At(r,"link",t),xt(r),u.head.appendChild(r)))}}function lD(t,r){ur.m(t,r);var a=va;if(a&&t){var u=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+dn(u)+'"][href="'+dn(t)+'"]',p=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=_a(t)}if(!xn.has(p)&&(t=g({rel:"modulepreload",href:t},r),xn.set(p,t),a.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ul(p)))return}u=a.createElement("link"),At(u,"link",t),xt(u),a.head.appendChild(u)}}}function uD(t,r,a){ur.S(t,r,a);var u=va;if(u&&t){var f=Hi(u).hoistableStyles,p=ba(t);r=r||"default";var v=f.get(p);if(!v){var S={loading:0,preload:null};if(v=u.querySelector(jl(p)))S.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":r},a),(a=xn.get(p))&&vh(t,a);var w=v=u.createElement("link");xt(w),At(w,"link",t),w._p=new Promise(function(j,q){w.onload=j,w.onerror=q}),w.addEventListener("load",function(){S.loading|=1}),w.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Ao(v,r,u)}v={type:"stylesheet",instance:v,count:1,state:S},f.set(p,v)}}}function oD(t,r){ur.X(t,r);var a=va;if(a&&t){var u=Hi(a).hoistableScripts,f=_a(t),p=u.get(f);p||(p=a.querySelector(Ul(f)),p||(t=g({src:t,async:!0},r),(r=xn.get(f))&&bh(t,r),p=a.createElement("script"),xt(p),At(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(f,p))}}function sD(t,r){ur.M(t,r);var a=va;if(a&&t){var u=Hi(a).hoistableScripts,f=_a(t),p=u.get(f);p||(p=a.querySelector(Ul(f)),p||(t=g({src:t,async:!0,type:"module"},r),(r=xn.get(f))&&bh(t,r),p=a.createElement("script"),xt(p),At(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(f,p))}}function N0(t,r,a,u){var f=(f=de.current)?To(f):null;if(!f)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=ba(a.href),a=Hi(f).hoistableStyles,u=a.get(r),u||(u={type:"style",instance:null,count:0,state:null},a.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=ba(a.href);var p=Hi(f).hoistableStyles,v=p.get(t);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,v),(p=f.querySelector(jl(t)))&&!p._p&&(v.instance=p,v.state.loading=5),xn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xn.set(t,a),p||cD(f,t,a,v.state))),r&&u===null)throw Error(l(528,""));return v}if(r&&u!==null)throw Error(l(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=_a(a),a=Hi(f).hoistableScripts,u=a.get(r),u||(u={type:"script",instance:null,count:0,state:null},a.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function ba(t){return'href="'+dn(t)+'"'}function jl(t){return'link[rel="stylesheet"]['+t+"]"}function D0(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function cD(t,r,a,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),At(r,"link",a),xt(r),t.head.appendChild(r))}function _a(t){return'[src="'+dn(t)+'"]'}function Ul(t){return"script[async]"+t}function M0(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+dn(a.href)+'"]');if(u)return r.instance=u,xt(u),u;var f=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),xt(u),At(u,"style",f),Ao(u,a.precedence,t),r.instance=u;case"stylesheet":f=ba(a.href);var p=t.querySelector(jl(f));if(p)return r.state.loading|=4,r.instance=p,xt(p),p;u=D0(a),(f=xn.get(f))&&vh(u,f),p=(t.ownerDocument||t).createElement("link"),xt(p);var v=p;return v._p=new Promise(function(S,w){v.onload=S,v.onerror=w}),At(p,"link",u),r.state.loading|=4,Ao(p,a.precedence,t),r.instance=p;case"script":return p=_a(a.src),(f=t.querySelector(Ul(p)))?(r.instance=f,xt(f),f):(u=a,(f=xn.get(p))&&(u=g({},a),bh(u,f)),t=t.ownerDocument||t,f=t.createElement("script"),xt(f),At(f,"link",u),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&!(r.state.loading&4)&&(u=r.instance,r.state.loading|=4,Ao(u,a.precedence,t));return r.instance}function Ao(t,r,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,p=f,v=0;v<u.length;v++){var S=u[v];if(S.dataset.precedence===r)p=S;else if(p!==f)break}p?p.parentNode.insertBefore(t,p.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function vh(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function bh(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Oo=null;function R0(t,r,a){if(Oo===null){var u=new Map,f=Oo=new Map;f.set(a,u)}else f=Oo,u=f.get(a),u||(u=new Map,f.set(a,u));if(u.has(t))return u;for(u.set(t,null),a=a.getElementsByTagName(t),f=0;f<a.length;f++){var p=a[f];if(!(p[Ka]||p[zt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(r)||"";v=t+v;var S=u.get(v);S?S.push(p):u.set(v,[p])}}return u}function j0(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function fD(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function U0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function hD(t,r,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(a.state.loading&4)){if(a.instance===null){var f=ba(u.href),p=r.querySelector(jl(f));if(p){r=p._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Co.bind(t),r.then(t,t)),a.state.loading|=4,a.instance=p,xt(p);return}p=r.ownerDocument||r,u=D0(u),(f=xn.get(f))&&vh(u,f),p=p.createElement("link"),xt(p);var v=p;v._p=new Promise(function(S,w){v.onload=S,v.onerror=w}),At(p,"link",u),a.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,r),(r=a.state.preload)&&!(a.state.loading&3)&&(t.count++,a=Co.bind(t),r.addEventListener("load",a),r.addEventListener("error",a))}}var _h=0;function pD(t,r){return t.stylesheets&&t.count===0&&Do(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var u=setTimeout(function(){if(t.stylesheets&&Do(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+r);0<t.imgBytes&&_h===0&&(_h=62500*XN());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Do(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>_h?50:800)+r);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function Co(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Do(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var No=null;function Do(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,No=new Map,r.forEach(dD,t),No=null,Co.call(t))}function dD(t,r){if(!(r.state.loading&4)){var a=No.get(t);if(a)var u=a.get(null);else{a=new Map,No.set(t,a);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var v=f[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),u=v)}u&&a.set(null,u)}f=r.instance,v=f.getAttribute("data-precedence"),p=a.get(v)||u,p===u&&a.set(null,f),a.set(v,f),this.count++,u=Co.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),p?p.parentNode.insertBefore(f,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var Zl={$$typeof:k,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function mD(t,r,a,u,f,p,v,S,w){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.hiddenUpdates=dc(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Z0(t,r,a,u,f,p,v,S,w,j,q,G){return t=new mD(t,r,a,v,w,j,q,G,S),r=1,p===!0&&(r|=24),p=nn(3,null,null,r),t.current=p,p.stateNode=t,r=Kc(),r.refCount++,t.pooledCache=r,r.refCount++,p.memoizedState={element:u,isDehydrated:a,cache:r},nf(p),t}function L0(t){return t?(t=Pi,t):Pi}function I0(t,r,a,u,f,p){f=L0(f),u.context===null?u.context=f:u.pendingContext=f,u=wr(r),u.payload={element:a},p=p===void 0?null:p,p!==null&&(u.callback=p),a=kr(t,u,r),a!==null&&(Qt(a,t,r),ml(a,t,r))}function B0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Sh(t,r){B0(t,r),(t=t.alternate)&&B0(t,r)}function H0(t){if(t.tag===13||t.tag===31){var r=ti(t,67108864);r!==null&&Qt(r,t,67108864),Sh(t,67108864)}}function q0(t){if(t.tag===13||t.tag===31){var r=on();r=mc(r);var a=ti(t,r);a!==null&&Qt(a,t,r),Sh(t,r)}}var Mo=!0;function gD(t,r,a,u){var f=Z.T;Z.T=null;var p=F.p;try{F.p=2,xh(t,r,a,u)}finally{F.p=p,Z.T=f}}function yD(t,r,a,u){var f=Z.T;Z.T=null;var p=F.p;try{F.p=8,xh(t,r,a,u)}finally{F.p=p,Z.T=f}}function xh(t,r,a,u){if(Mo){var f=Eh(u);if(f===null)oh(t,r,u,Ro,a),V0(t,u);else if(bD(f,t,r,a,u))u.stopPropagation();else if(V0(t,u),r&4&&-1<vD.indexOf(t)){for(;f!==null;){var p=Bi(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=Qr(p.pendingLanes);if(v!==0){var S=p;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var w=1<<31-Pe(v);S.entanglements[1]|=w,v&=~w}Ln(p),!(Be&6)&&(go=Zt()+500,Nl(0))}}break;case 31:case 13:S=ti(p,2),S!==null&&Qt(S,p,2),vo(),Sh(p,2)}if(p=Eh(u),p===null&&oh(t,r,u,Ro,a),p===f)break;f=p}f!==null&&u.stopPropagation()}else oh(t,r,u,null,a)}}function Eh(t){return t=zc(t),zh(t)}var Ro=null;function zh(t){if(Ro=null,t=Ii(t),t!==null){var r=s(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=c(r),t!==null)return t;t=null}else if(a===31){if(t=h(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return Ro=t,null}function $0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pc()){case V:return 2;case W:return 8;case _e:case Ae:return 32;case He:return 268435456;default:return 32}default:return 32}}var wh=!1,Zr=null,Lr=null,Ir=null,Ll=new Map,Il=new Map,Br=[],vD="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 V0(t,r){switch(t){case"focusin":case"focusout":Zr=null;break;case"dragenter":case"dragleave":Lr=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":Ll.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(r.pointerId)}}function Bl(t,r,a,u,f,p){return t===null||t.nativeEvent!==p?(t={blockedOn:r,domEventName:a,eventSystemFlags:u,nativeEvent:p,targetContainers:[f]},r!==null&&(r=Bi(r),r!==null&&H0(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function bD(t,r,a,u,f){switch(r){case"focusin":return Zr=Bl(Zr,t,r,a,u,f),!0;case"dragenter":return Lr=Bl(Lr,t,r,a,u,f),!0;case"mouseover":return Ir=Bl(Ir,t,r,a,u,f),!0;case"pointerover":var p=f.pointerId;return Ll.set(p,Bl(Ll.get(p)||null,t,r,a,u,f)),!0;case"gotpointercapture":return p=f.pointerId,Il.set(p,Bl(Il.get(p)||null,t,r,a,u,f)),!0}return!1}function Y0(t){var r=Ii(t.target);if(r!==null){var a=s(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){t.blockedOn=r,ay(t.priority,function(){q0(a)});return}}else if(r===31){if(r=h(a),r!==null){t.blockedOn=r,ay(t.priority,function(){q0(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function jo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Eh(t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a);Ec=u,a.target.dispatchEvent(u),Ec=null}else return r=Bi(a),r!==null&&H0(r),t.blockedOn=a,!1;r.shift()}return!0}function G0(t,r,a){jo(t)&&a.delete(r)}function _D(){wh=!1,Zr!==null&&jo(Zr)&&(Zr=null),Lr!==null&&jo(Lr)&&(Lr=null),Ir!==null&&jo(Ir)&&(Ir=null),Ll.forEach(G0),Il.forEach(G0)}function Uo(t,r){t.blockedOn===r&&(t.blockedOn=null,wh||(wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_D)))}var Zo=null;function X0(t){Zo!==t&&(Zo=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zo===t&&(Zo=null);for(var r=0;r<t.length;r+=3){var a=t[r],u=t[r+1],f=t[r+2];if(typeof u!="function"){if(zh(u||a)===null)continue;break}var p=Bi(a);p!==null&&(t.splice(r,3),r-=3,Ef(p,{pending:!0,data:f,method:a.method,action:u},u,f))}}))}function Sa(t){function r(w){return Uo(w,t)}Zr!==null&&Uo(Zr,t),Lr!==null&&Uo(Lr,t),Ir!==null&&Uo(Ir,t),Ll.forEach(r),Il.forEach(r);for(var a=0;a<Br.length;a++){var u=Br[a];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Br.length&&(a=Br[0],a.blockedOn===null);)Y0(a),a.blockedOn===null&&Br.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var f=a[u],p=a[u+1],v=f[Vt]||null;if(typeof p=="function")v||X0(a);else if(v){var S=null;if(p&&p.hasAttribute("formAction")){if(f=p,v=p[Vt]||null)S=v.formAction;else if(zh(f)!==null)continue}else S=v.action;typeof S=="function"?a[u+1]=S:(a.splice(u,3),u-=3),X0(a)}}}function F0(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function kh(t){this._internalRoot=t}Lo.prototype.render=kh.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var a=r.current,u=on();I0(a,u,t,r,null,null)},Lo.prototype.unmount=kh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;I0(t.current,2,null,t,null,null),vo(),r[Li]=null}};function Lo(t){this._internalRoot=t}Lo.prototype.unstable_scheduleHydration=function(t){if(t){var r=iy();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Br.length&&r!==0&&r<Br[a].priority;a++);Br.splice(a,0,t),a===0&&Y0(t)}};var J0=n.version;if(J0!=="19.2.4")throw Error(l(527,J0,"19.2.4"));F.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=d(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var SD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Io=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Io.isDisabled&&Io.supportsFiber)try{Lt=Io.inject(SD),_t=Io}catch{}}return Ea.createRoot=function(t,r){if(!o(t))throw Error(l(299));var a=!1,u="",f=nb,p=rb,v=ib;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(p=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Z0(t,1,!1,null,null,a,u,null,f,p,v,F0),t[Li]=r.current,uh(t),new kh(r)},Ea.hydrateRoot=function(t,r,a){if(!o(t))throw Error(l(299));var u=!1,f="",p=nb,v=rb,S=ib,w=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),r=Z0(t,1,!0,r,a??null,u,f,w,p,v,S,F0),r.context=L0(null),a=r.current,u=on(),u=mc(u),f=wr(u),f.callback=null,kr(a,f,u),a=u,r.current.lanes=a,Pa(r,a),Ln(r),t[Li]=r.current,uh(t),new Lo(r)},Ea.version="19.2.4",Ea}var Zh;function a1(){if(Zh)return Ho.exports;Zh=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Ho.exports=i1(),Ho.exports}var Lh=a1(),ke=Yo(),Ih="vercel.ai.error",l1=Symbol.for(Ih),Bh,Hh,Cn=class Q0 extends(Hh=Error,Bh=l1,Hh){constructor({name:n,message:i,cause:l}){super(i),this[Bh]=!0,this.name=n,this.cause=l}static isInstance(n){return Q0.hasMarker(n,Ih)}static hasMarker(n,i){const l=Symbol.for(i);return n!=null&&typeof n=="object"&&l in n&&typeof n[l]=="boolean"&&n[l]===!0}};function qh(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var $h="AI_InvalidArgumentError",Vh=`vercel.ai.error.${$h}`,u1=Symbol.for(Vh),Yh,Gh,o1=class extends(Gh=Cn,Yh=u1,Gh){constructor({message:e,cause:n,argument:i}){super({name:$h,message:e,cause:n}),this[Yh]=!0,this.argument=i}static isInstance(e){return Cn.hasMarker(e,Vh)}},Xh="AI_JSONParseError",Fh=`vercel.ai.error.${Xh}`,s1=Symbol.for(Fh),Jh,Qh,Ph=class extends(Qh=Cn,Jh=s1,Qh){constructor({text:e,cause:n}){super({name:Xh,message:`JSON parsing failed: Text: ${e}.
|
|
48
|
+
`+u.stack}}var Ui=Object.prototype.hasOwnProperty,Zi=e.unstable_scheduleCallback,Ja=e.unstable_cancelCallback,fc=e.unstable_shouldYield,hc=e.unstable_requestPaint,Zt=e.unstable_now,pc=e.unstable_getCurrentPriorityLevel,V=e.unstable_ImmediatePriority,W=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Ae=e.unstable_LowPriority,He=e.unstable_IdlePriority,en=e.log,$n=e.unstable_setDisableYieldValue,Lt=null,_t=null;function $t(t){if(typeof en=="function"&&$n(t),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Lt,t)}catch{}}var Pe=Math.clz32?Math.clz32:s4,yr=Math.log,kn=Math.LN2;function s4(t){return t>>>=0,t===0?32:31-(yr(t)/kn|0)|0}var Eu=256,zu=262144,wu=4194304;function Qr(t){var r=t&42;if(r!==0)return r;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ku(t,r,a){var u=t.pendingLanes;if(u===0)return 0;var f=0,p=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var S=u&134217727;return S!==0?(u=S&~p,u!==0?f=Qr(u):(v&=S,v!==0?f=Qr(v):a||(a=S&~t,a!==0&&(f=Qr(a))))):(S=u&~p,S!==0?f=Qr(S):v!==0?f=Qr(v):a||(a=u&~t,a!==0&&(f=Qr(a)))),f===0?0:r!==0&&r!==f&&!(r&p)&&(p=f&-f,a=r&-r,p>=a||p===32&&(a&4194048)!==0)?r:f}function Qa(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function c4(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ey(){var t=wu;return wu<<=1,!(wu&62914560)&&(wu=4194304),t}function dc(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Pa(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function f4(t,r,a,u,f,p){var v=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var S=t.entanglements,T=t.expirationTimes,j=t.hiddenUpdates;for(a=v&~a;0<a;){var q=31-Pe(a),G=1<<q;S[q]=0,T[q]=-1;var U=j[q];if(U!==null)for(j[q]=null,q=0;q<U.length;q++){var I=U[q];I!==null&&(I.lane&=-536870913)}a&=~G}u!==0&&ty(t,u,0),p!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=p&~(v&~r))}function ty(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var u=31-Pe(r);t.entangledLanes|=r,t.entanglements[u]=t.entanglements[u]|1073741824|a&261930}function ny(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var u=31-Pe(a),f=1<<u;f&r|t[u]&r&&(t[u]|=r),a&=~f}}function ry(t,r){var a=r&-r;return a=a&42?1:mc(a),a&(t.suspendedLanes|r)?0:a}function mc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function gc(t){return t&=-t,2<t?8<t?t&134217727?32:268435456:8:2}function iy(){var t=J.p;return t!==0?t:(t=window.event,t===void 0?32:$0(t.type))}function ay(t,r){var a=J.p;try{return J.p=t,r()}finally{J.p=a}}var vr=Math.random().toString(36).slice(2),zt="__reactFiber$"+vr,Vt="__reactProps$"+vr,Li="__reactContainer$"+vr,yc="__reactEvents$"+vr,h4="__reactListeners$"+vr,p4="__reactHandles$"+vr,ly="__reactResources$"+vr,Ka="__reactMarker$"+vr;function vc(t){delete t[zt],delete t[Vt],delete t[yc],delete t[h4],delete t[p4]}function Ii(t){var r=t[zt];if(r)return r;for(var a=t.parentNode;a;){if(r=a[Li]||a[zt]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=T0(t);t!==null;){if(a=t[zt])return a;t=T0(t)}return r}t=a,a=t.parentNode}return null}function Bi(t){if(t=t[zt]||t[Li]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function Wa(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(l(33))}function Hi(t){var r=t[ly];return r||(r=t[ly]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function xt(t){t[Ka]=!0}var uy=new Set,oy={};function Pr(t,r){qi(t,r),qi(t+"Capture",r)}function qi(t,r){for(oy[t]=r,t=0;t<r.length;t++)uy.add(r[t])}var d4=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]*$"),sy={},cy={};function m4(t){return Ui.call(cy,t)?!0:Ui.call(sy,t)?!1:d4.test(t)?cy[t]=!0:(sy[t]=!0,!1)}function Tu(t,r,a){if(m4(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function Au(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Vn(t,r,a,u){if(u===null)t.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+u)}}function pn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function fy(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function g4(t,r,a){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,p=u.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return f.call(this)},set:function(v){a=""+v,p.call(this,v)}}),Object.defineProperty(t,r,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(v){a=""+v},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function bc(t){if(!t._valueTracker){var r=fy(t)?"checked":"value";t._valueTracker=g4(t,r,""+t[r])}}function hy(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),u="";return t&&(u=fy(t)?t.checked?"true":"false":t.value),t=u,t!==a?(r.setValue(t),!0):!1}function Ou(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var y4=/[\n"\\]/g;function dn(t){return t.replace(y4,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function _c(t,r,a,u,f,p,v,S){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),r!=null?v==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+pn(r)):t.value!==""+pn(r)&&(t.value=""+pn(r)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),r!=null?Sc(t,v,pn(r)):a!=null?Sc(t,v,pn(a)):u!=null&&t.removeAttribute("value"),f==null&&p!=null&&(t.defaultChecked=!!p),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+pn(S):t.removeAttribute("name")}function py(t,r,a,u,f,p,v,S){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),r!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||r!=null)){bc(t);return}a=a!=null?""+pn(a):"",r=r!=null?""+pn(r):a,S||r===t.value||(t.value=r),t.defaultValue=r}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=S?t.checked:!!u,t.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),bc(t)}function Sc(t,r,a){r==="number"&&Ou(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function $i(t,r,a,u){if(t=t.options,r){r={};for(var f=0;f<a.length;f++)r["$"+a[f]]=!0;for(a=0;a<t.length;a++)f=r.hasOwnProperty("$"+t[a].value),t[a].selected!==f&&(t[a].selected=f),f&&u&&(t[a].defaultSelected=!0)}else{for(a=""+pn(a),r=null,f=0;f<t.length;f++){if(t[f].value===a){t[f].selected=!0,u&&(t[f].defaultSelected=!0);return}r!==null||t[f].disabled||(r=t[f])}r!==null&&(r.selected=!0)}}function dy(t,r,a){if(r!=null&&(r=""+pn(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+pn(a):""}function my(t,r,a,u){if(r==null){if(u!=null){if(a!=null)throw Error(l(92));if(fe(u)){if(1<u.length)throw Error(l(93));u=u[0]}a=u}a==null&&(a=""),r=a}a=pn(r),t.defaultValue=a,u=t.textContent,u===a&&u!==""&&u!==null&&(t.value=u),bc(t)}function Vi(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var v4=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 gy(t,r,a){var u=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":u?t.setProperty(r,a):typeof a!="number"||a===0||v4.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function yy(t,r,a){if(r!=null&&typeof r!="object")throw Error(l(62));if(t=t.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var f in r)u=r[f],r.hasOwnProperty(f)&&a[f]!==u&&gy(t,f,u)}else for(var p in r)r.hasOwnProperty(p)&&gy(t,p,r[p])}function xc(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var b4=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"]]),_4=/^[\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 Cu(t){return _4.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Yn(){}var Ec=null;function zc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Yi=null,Gi=null;function vy(t){var r=Bi(t);if(r&&(t=r.stateNode)){var a=t[Vt]||null;e:switch(t=r.stateNode,r.type){case"input":if(_c(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+dn(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var u=a[r];if(u!==t&&u.form===t.form){var f=u[Vt]||null;if(!f)throw Error(l(90));_c(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(r=0;r<a.length;r++)u=a[r],u.form===t.form&&hy(u)}break e;case"textarea":dy(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&$i(t,!!a.multiple,r,!1)}}}var wc=!1;function by(t,r,a){if(wc)return t(r,a);wc=!0;try{var u=t(r);return u}finally{if(wc=!1,(Yi!==null||Gi!==null)&&(vo(),Yi&&(r=Yi,t=Gi,Gi=Yi=null,vy(r),t)))for(r=0;r<t.length;r++)vy(t[r])}}function el(t,r){var a=t.stateNode;if(a===null)return null;var u=a[Vt]||null;if(u===null)return null;a=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,r,typeof a));return a}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kc=!1;if(Gn)try{var tl={};Object.defineProperty(tl,"passive",{get:function(){kc=!0}}),window.addEventListener("test",tl,tl),window.removeEventListener("test",tl,tl)}catch{kc=!1}var br=null,Tc=null,Nu=null;function _y(){if(Nu)return Nu;var t,r=Tc,a=r.length,u,f="value"in br?br.value:br.textContent,p=f.length;for(t=0;t<a&&r[t]===f[t];t++);var v=a-t;for(u=1;u<=v&&r[a-u]===f[p-u];u++);return Nu=f.slice(t,1<u?1-u:void 0)}function Du(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Mu(){return!0}function Sy(){return!1}function Yt(t){function r(a,u,f,p,v){this._reactName=a,this._targetInst=f,this.type=u,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(a=t[S],this[S]=a?a(p):p[S]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Mu:Sy,this.isPropagationStopped=Sy,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Mu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Mu)},persist:function(){},isPersistent:Mu}),r}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ru=Yt(Kr),nl=g({},Kr,{view:0,detail:0}),S4=Yt(nl),Ac,Oc,rl,ju=g({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==rl&&(rl&&t.type==="mousemove"?(Ac=t.screenX-rl.screenX,Oc=t.screenY-rl.screenY):Oc=Ac=0,rl=t),Ac)},movementY:function(t){return"movementY"in t?t.movementY:Oc}}),xy=Yt(ju),x4=g({},ju,{dataTransfer:0}),E4=Yt(x4),z4=g({},nl,{relatedTarget:0}),Cc=Yt(z4),w4=g({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),k4=Yt(w4),T4=g({},Kr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),A4=Yt(T4),O4=g({},Kr,{data:0}),Ey=Yt(O4),C4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N4={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"},D4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M4(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=D4[t])?!!r[t]:!1}function Nc(){return M4}var R4=g({},nl,{key:function(t){if(t.key){var r=C4[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Du(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?N4[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nc,charCode:function(t){return t.type==="keypress"?Du(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Du(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),j4=Yt(R4),U4=g({},ju,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zy=Yt(U4),Z4=g({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nc}),L4=Yt(Z4),I4=g({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),B4=Yt(I4),H4=g({},ju,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),q4=Yt(H4),$4=g({},Kr,{newState:0,oldState:0}),V4=Yt($4),Y4=[9,13,27,32],Dc=Gn&&"CompositionEvent"in window,il=null;Gn&&"documentMode"in document&&(il=document.documentMode);var G4=Gn&&"TextEvent"in window&&!il,wy=Gn&&(!Dc||il&&8<il&&11>=il),ky=" ",Ty=!1;function Ay(t,r){switch(t){case"keyup":return Y4.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xi=!1;function X4(t,r){switch(t){case"compositionend":return Oy(r);case"keypress":return r.which!==32?null:(Ty=!0,ky);case"textInput":return t=r.data,t===ky&&Ty?null:t;default:return null}}function F4(t,r){if(Xi)return t==="compositionend"||!Dc&&Ay(t,r)?(t=_y(),Nu=Tc=br=null,Xi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return wy&&r.locale!=="ko"?null:r.data;default:return null}}var J4={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 Cy(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!J4[t.type]:r==="textarea"}function Ny(t,r,a,u){Yi?Gi?Gi.push(u):Gi=[u]:Yi=u,r=wo(r,"onChange"),0<r.length&&(a=new Ru("onChange","change",null,a,u),t.push({event:a,listeners:r}))}var al=null,ll=null;function Q4(t){p0(t,0)}function Uu(t){var r=Wa(t);if(hy(r))return t}function Dy(t,r){if(t==="change")return r}var My=!1;if(Gn){var Mc;if(Gn){var Rc="oninput"in document;if(!Rc){var Ry=document.createElement("div");Ry.setAttribute("oninput","return;"),Rc=typeof Ry.oninput=="function"}Mc=Rc}else Mc=!1;My=Mc&&(!document.documentMode||9<document.documentMode)}function jy(){al&&(al.detachEvent("onpropertychange",Uy),ll=al=null)}function Uy(t){if(t.propertyName==="value"&&Uu(ll)){var r=[];Ny(r,ll,t,zc(t)),by(Q4,r)}}function P4(t,r,a){t==="focusin"?(jy(),al=r,ll=a,al.attachEvent("onpropertychange",Uy)):t==="focusout"&&jy()}function K4(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Uu(ll)}function W4(t,r){if(t==="click")return Uu(r)}function eN(t,r){if(t==="input"||t==="change")return Uu(r)}function tN(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var tn=typeof Object.is=="function"?Object.is:tN;function ul(t,r){if(tn(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),u=Object.keys(r);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var f=a[u];if(!Ui.call(r,f)||!tn(t[f],r[f]))return!1}return!0}function Zy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ly(t,r){var a=Zy(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=r&&u>=r)return{node:a,offset:r-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zy(a)}}function Iy(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Iy(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function By(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=Ou(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=Ou(t.document)}return r}function jc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var nN=Gn&&"documentMode"in document&&11>=document.documentMode,Fi=null,Uc=null,ol=null,Zc=!1;function Hy(t,r,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zc||Fi==null||Fi!==Ou(u)||(u=Fi,"selectionStart"in u&&jc(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),ol&&ul(ol,u)||(ol=u,u=wo(Uc,"onSelect"),0<u.length&&(r=new Ru("onSelect","select",null,r,a),t.push({event:r,listeners:u}),r.target=Fi)))}function Wr(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Ji={animationend:Wr("Animation","AnimationEnd"),animationiteration:Wr("Animation","AnimationIteration"),animationstart:Wr("Animation","AnimationStart"),transitionrun:Wr("Transition","TransitionRun"),transitionstart:Wr("Transition","TransitionStart"),transitioncancel:Wr("Transition","TransitionCancel"),transitionend:Wr("Transition","TransitionEnd")},Lc={},qy={};Gn&&(qy=document.createElement("div").style,"AnimationEvent"in window||(delete Ji.animationend.animation,delete Ji.animationiteration.animation,delete Ji.animationstart.animation),"TransitionEvent"in window||delete Ji.transitionend.transition);function ei(t){if(Lc[t])return Lc[t];if(!Ji[t])return t;var r=Ji[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in qy)return Lc[t]=r[a];return t}var $y=ei("animationend"),Vy=ei("animationiteration"),Yy=ei("animationstart"),rN=ei("transitionrun"),iN=ei("transitionstart"),aN=ei("transitioncancel"),Gy=ei("transitionend"),Xy=new Map,Ic="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(" ");Ic.push("scrollEnd");function Tn(t,r){Xy.set(t,r),Pr(r,[t])}var Zu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},mn=[],Qi=0,Bc=0;function Lu(){for(var t=Qi,r=Bc=Qi=0;r<t;){var a=mn[r];mn[r++]=null;var u=mn[r];mn[r++]=null;var f=mn[r];mn[r++]=null;var p=mn[r];if(mn[r++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}p!==0&&Fy(a,f,p)}}function Iu(t,r,a,u){mn[Qi++]=t,mn[Qi++]=r,mn[Qi++]=a,mn[Qi++]=u,Bc|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Hc(t,r,a,u){return Iu(t,r,a,u),Bu(t)}function ti(t,r){return Iu(t,null,null,r),Bu(t)}function Fy(t,r,a){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a);for(var f=!1,p=t.return;p!==null;)p.childLanes|=a,u=p.alternate,u!==null&&(u.childLanes|=a),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(f=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,f&&r!==null&&(f=31-Pe(a),t=p.hiddenUpdates,u=t[f],u===null?t[f]=[r]:u.push(r),r.lane=a|536870912),p):null}function Bu(t){if(50<Cl)throw Cl=0,Pf=null,Error(l(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var Pi={};function lN(t,r,a,u){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(t,r,a,u){return new lN(t,r,a,u)}function qc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xn(t,r){var a=t.alternate;return a===null?(a=nn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Jy(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function Hu(t,r,a,u,f,p){var v=0;if(u=t,typeof t=="function")qc(t)&&(v=1);else if(typeof t=="string")v=fD(t,a,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case be:return t=nn(31,a,r,f),t.elementType=be,t.lanes=p,t;case k:return ni(a.children,f,p,r);case R:v=8,f|=24;break;case C:return t=nn(12,a,r,f|2),t.elementType=C,t.lanes=p,t;case F:return t=nn(13,a,r,f),t.elementType=F,t.lanes=p,t;case D:return t=nn(19,a,r,f),t.elementType=D,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case w:v=10;break e;case B:v=9;break e;case P:v=11;break e;case X:v=14;break e;case se:v=16,u=null;break e}v=29,a=Error(l(130,t===null?"null":typeof t,"")),u=null}return r=nn(v,a,r,f),r.elementType=t,r.type=u,r.lanes=p,r}function ni(t,r,a,u){return t=nn(7,t,u,r),t.lanes=a,t}function $c(t,r,a){return t=nn(6,t,null,r),t.lanes=a,t}function Qy(t){var r=nn(18,null,null,0);return r.stateNode=t,r}function Vc(t,r,a){return r=nn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Py=new WeakMap;function gn(t,r){if(typeof t=="object"&&t!==null){var a=Py.get(t);return a!==void 0?a:(r={value:t,source:r,stack:xu(r)},Py.set(t,r),r)}return{value:t,source:r,stack:xu(r)}}var Ki=[],Wi=0,qu=null,sl=0,yn=[],vn=0,_r=null,jn=1,Un="";function Fn(t,r){Ki[Wi++]=sl,Ki[Wi++]=qu,qu=t,sl=r}function Ky(t,r,a){yn[vn++]=jn,yn[vn++]=Un,yn[vn++]=_r,_r=t;var u=jn;t=Un;var f=32-Pe(u)-1;u&=~(1<<f),a+=1;var p=32-Pe(r)+f;if(30<p){var v=f-f%5;p=(u&(1<<v)-1).toString(32),u>>=v,f-=v,jn=1<<32-Pe(r)+f|a<<f|u,Un=p+t}else jn=1<<p|a<<f|u,Un=t}function Yc(t){t.return!==null&&(Fn(t,1),Ky(t,1,0))}function Gc(t){for(;t===qu;)qu=Ki[--Wi],Ki[Wi]=null,sl=Ki[--Wi],Ki[Wi]=null;for(;t===_r;)_r=yn[--vn],yn[vn]=null,Un=yn[--vn],yn[vn]=null,jn=yn[--vn],yn[vn]=null}function Wy(t,r){yn[vn++]=jn,yn[vn++]=Un,yn[vn++]=_r,jn=r.id,Un=r.overflow,_r=t}var wt=null,at=null,Ue=!1,Sr=null,bn=!1,Xc=Error(l(519));function xr(t){var r=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cl(gn(r,t)),Xc}function ev(t){var r=t.stateNode,a=t.type,u=t.memoizedProps;switch(r[zt]=t,r[Vt]=u,a){case"dialog":Ce("cancel",r),Ce("close",r);break;case"iframe":case"object":case"embed":Ce("load",r);break;case"video":case"audio":for(a=0;a<Dl.length;a++)Ce(Dl[a],r);break;case"source":Ce("error",r);break;case"img":case"image":case"link":Ce("error",r),Ce("load",r);break;case"details":Ce("toggle",r);break;case"input":Ce("invalid",r),py(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ce("invalid",r);break;case"textarea":Ce("invalid",r),my(r,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||u.suppressHydrationWarning===!0||y0(r.textContent,a)?(u.popover!=null&&(Ce("beforetoggle",r),Ce("toggle",r)),u.onScroll!=null&&Ce("scroll",r),u.onScrollEnd!=null&&Ce("scrollend",r),u.onClick!=null&&(r.onclick=Yn),r=!0):r=!1,r||xr(t,!0)}function tv(t){for(wt=t.return;wt;)switch(wt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:wt=wt.return}}function ea(t){if(t!==wt)return!1;if(!Ue)return tv(t),Ue=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||hh(t.type,t.memoizedProps)),a=!a),a&&at&&xr(t),tv(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));at=k0(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));at=k0(t)}else r===27?(r=at,Ur(t.type)?(t=yh,yh=null,at=t):at=r):at=wt?Sn(t.stateNode.nextSibling):null;return!0}function ri(){at=wt=null,Ue=!1}function Fc(){var t=Sr;return t!==null&&(Jt===null?Jt=t:Jt.push.apply(Jt,t),Sr=null),t}function cl(t){Sr===null?Sr=[t]:Sr.push(t)}var Jc=A(null),ii=null,Jn=null;function Er(t,r,a){x(Jc,r._currentValue),r._currentValue=a}function Qn(t){t._currentValue=Jc.current,H(Jc)}function Qc(t,r,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),t===a)break;t=t.return}}function Pc(t,r,a,u){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var p=f.dependencies;if(p!==null){var v=f.child;p=p.firstContext;e:for(;p!==null;){var S=p;p=f;for(var T=0;T<r.length;T++)if(S.context===r[T]){p.lanes|=a,S=p.alternate,S!==null&&(S.lanes|=a),Qc(p.return,a,t),u||(v=null);break e}p=S.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(l(341));v.lanes|=a,p=v.alternate,p!==null&&(p.lanes|=a),Qc(v,a,t),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===t){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function ta(t,r,a,u){t=null;for(var f=r,p=!1;f!==null;){if(!p){if(f.flags&524288)p=!0;else if(f.flags&262144)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(l(387));if(v=v.memoizedProps,v!==null){var S=f.type;tn(f.pendingProps.value,v.value)||(t!==null?t.push(S):t=[S])}}else if(f===Ne.current){if(v=f.alternate,v===null)throw Error(l(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Zl):t=[Zl])}f=f.return}t!==null&&Pc(r,t,a,u),r.flags|=262144}function $u(t){for(t=t.firstContext;t!==null;){if(!tn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ai(t){ii=t,Jn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kt(t){return nv(ii,t)}function Vu(t,r){return ii===null&&ai(t),nv(t,r)}function nv(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Jn===null){if(t===null)throw Error(l(308));Jn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Jn=Jn.next=r;return a}var uN=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,u){t.push(u)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},oN=e.unstable_scheduleCallback,sN=e.unstable_NormalPriority,gt={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kc(){return{controller:new uN,data:new Map,refCount:0}}function fl(t){t.refCount--,t.refCount===0&&oN(sN,function(){t.controller.abort()})}var hl=null,Wc=0,na=0,ra=null;function cN(t,r){if(hl===null){var a=hl=[];Wc=0,na=rh(),ra={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Wc++,r.then(rv,rv),r}function rv(){if(--Wc===0&&hl!==null){ra!==null&&(ra.status="fulfilled");var t=hl;hl=null,na=0,ra=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function fN(t,r){var a=[],u={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return t.then(function(){u.status="fulfilled",u.value=r;for(var f=0;f<a.length;f++)(0,a[f])(r)},function(f){for(u.status="rejected",u.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),u}var iv=L.S;L.S=function(t,r){Hb=Zt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&cN(t,r),iv!==null&&iv(t,r)};var li=A(null);function ef(){var t=li.current;return t!==null?t:Ke.pooledCache}function Yu(t,r){r===null?x(li,li.current):x(li,r.pool)}function av(){var t=ef();return t===null?null:{parent:gt._currentValue,pool:t}}var ia=Error(l(460)),tf=Error(l(474)),Gu=Error(l(542)),Xu={then:function(){}};function lv(t){return t=t.status,t==="fulfilled"||t==="rejected"}function uv(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Yn,Yn),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,sv(t),t;default:if(typeof r.status=="string")r.then(Yn,Yn);else{if(t=Ke,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=r,t.status="pending",t.then(function(u){if(r.status==="pending"){var f=r;f.status="fulfilled",f.value=u}},function(u){if(r.status==="pending"){var f=r;f.status="rejected",f.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,sv(t),t}throw oi=r,ia}}function ui(t){try{var r=t._init;return r(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(oi=a,ia):a}}var oi=null;function ov(){if(oi===null)throw Error(l(459));var t=oi;return oi=null,t}function sv(t){if(t===ia||t===Gu)throw Error(l(483))}var aa=null,pl=0;function Fu(t){var r=pl;return pl+=1,aa===null&&(aa=[]),uv(aa,t,r)}function dl(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Ju(t,r){throw r.$$typeof===_?Error(l(525)):(t=Object.prototype.toString.call(r),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function cv(t){function r(N,O){if(t){var M=N.deletions;M===null?(N.deletions=[O],N.flags|=16):M.push(O)}}function a(N,O){if(!t)return null;for(;O!==null;)r(N,O),O=O.sibling;return null}function u(N){for(var O=new Map;N!==null;)N.key!==null?O.set(N.key,N):O.set(N.index,N),N=N.sibling;return O}function f(N,O){return N=Xn(N,O),N.index=0,N.sibling=null,N}function p(N,O,M){return N.index=M,t?(M=N.alternate,M!==null?(M=M.index,M<O?(N.flags|=67108866,O):M):(N.flags|=67108866,O)):(N.flags|=1048576,O)}function v(N){return t&&N.alternate===null&&(N.flags|=67108866),N}function S(N,O,M,Y){return O===null||O.tag!==6?(O=$c(M,N.mode,Y),O.return=N,O):(O=f(O,M),O.return=N,O)}function T(N,O,M,Y){var de=M.type;return de===k?q(N,O,M.props.children,Y,M.key):O!==null&&(O.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===se&&ui(de)===O.type)?(O=f(O,M.props),dl(O,M),O.return=N,O):(O=Hu(M.type,M.key,M.props,null,N.mode,Y),dl(O,M),O.return=N,O)}function j(N,O,M,Y){return O===null||O.tag!==4||O.stateNode.containerInfo!==M.containerInfo||O.stateNode.implementation!==M.implementation?(O=Vc(M,N.mode,Y),O.return=N,O):(O=f(O,M.children||[]),O.return=N,O)}function q(N,O,M,Y,de){return O===null||O.tag!==7?(O=ni(M,N.mode,Y,de),O.return=N,O):(O=f(O,M),O.return=N,O)}function G(N,O,M){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=$c(""+O,N.mode,M),O.return=N,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case b:return M=Hu(O.type,O.key,O.props,null,N.mode,M),dl(M,O),M.return=N,M;case E:return O=Vc(O,N.mode,M),O.return=N,O;case se:return O=ui(O),G(N,O,M)}if(fe(O)||ne(O))return O=ni(O,N.mode,M,null),O.return=N,O;if(typeof O.then=="function")return G(N,Fu(O),M);if(O.$$typeof===w)return G(N,Vu(N,O),M);Ju(N,O)}return null}function U(N,O,M,Y){var de=O!==null?O.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return de!==null?null:S(N,O,""+M,Y);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return M.key===de?T(N,O,M,Y):null;case E:return M.key===de?j(N,O,M,Y):null;case se:return M=ui(M),U(N,O,M,Y)}if(fe(M)||ne(M))return de!==null?null:q(N,O,M,Y,null);if(typeof M.then=="function")return U(N,O,Fu(M),Y);if(M.$$typeof===w)return U(N,O,Vu(N,M),Y);Ju(N,M)}return null}function I(N,O,M,Y,de){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return N=N.get(M)||null,S(O,N,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return N=N.get(Y.key===null?M:Y.key)||null,T(O,N,Y,de);case E:return N=N.get(Y.key===null?M:Y.key)||null,j(O,N,Y,de);case se:return Y=ui(Y),I(N,O,M,Y,de)}if(fe(Y)||ne(Y))return N=N.get(M)||null,q(O,N,Y,de,null);if(typeof Y.then=="function")return I(N,O,M,Fu(Y),de);if(Y.$$typeof===w)return I(N,O,M,Vu(O,Y),de);Ju(O,Y)}return null}function le(N,O,M,Y){for(var de=null,Le=null,ce=O,we=O=0,Me=null;ce!==null&&we<M.length;we++){ce.index>we?(Me=ce,ce=null):Me=ce.sibling;var Ie=U(N,ce,M[we],Y);if(Ie===null){ce===null&&(ce=Me);break}t&&ce&&Ie.alternate===null&&r(N,ce),O=p(Ie,O,we),Le===null?de=Ie:Le.sibling=Ie,Le=Ie,ce=Me}if(we===M.length)return a(N,ce),Ue&&Fn(N,we),de;if(ce===null){for(;we<M.length;we++)ce=G(N,M[we],Y),ce!==null&&(O=p(ce,O,we),Le===null?de=ce:Le.sibling=ce,Le=ce);return Ue&&Fn(N,we),de}for(ce=u(ce);we<M.length;we++)Me=I(ce,N,we,M[we],Y),Me!==null&&(t&&Me.alternate!==null&&ce.delete(Me.key===null?we:Me.key),O=p(Me,O,we),Le===null?de=Me:Le.sibling=Me,Le=Me);return t&&ce.forEach(function(Hr){return r(N,Hr)}),Ue&&Fn(N,we),de}function ye(N,O,M,Y){if(M==null)throw Error(l(151));for(var de=null,Le=null,ce=O,we=O=0,Me=null,Ie=M.next();ce!==null&&!Ie.done;we++,Ie=M.next()){ce.index>we?(Me=ce,ce=null):Me=ce.sibling;var Hr=U(N,ce,Ie.value,Y);if(Hr===null){ce===null&&(ce=Me);break}t&&ce&&Hr.alternate===null&&r(N,ce),O=p(Hr,O,we),Le===null?de=Hr:Le.sibling=Hr,Le=Hr,ce=Me}if(Ie.done)return a(N,ce),Ue&&Fn(N,we),de;if(ce===null){for(;!Ie.done;we++,Ie=M.next())Ie=G(N,Ie.value,Y),Ie!==null&&(O=p(Ie,O,we),Le===null?de=Ie:Le.sibling=Ie,Le=Ie);return Ue&&Fn(N,we),de}for(ce=u(ce);!Ie.done;we++,Ie=M.next())Ie=I(ce,N,we,Ie.value,Y),Ie!==null&&(t&&Ie.alternate!==null&&ce.delete(Ie.key===null?we:Ie.key),O=p(Ie,O,we),Le===null?de=Ie:Le.sibling=Ie,Le=Ie);return t&&ce.forEach(function(xD){return r(N,xD)}),Ue&&Fn(N,we),de}function Fe(N,O,M,Y){if(typeof M=="object"&&M!==null&&M.type===k&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case b:e:{for(var de=M.key;O!==null;){if(O.key===de){if(de=M.type,de===k){if(O.tag===7){a(N,O.sibling),Y=f(O,M.props.children),Y.return=N,N=Y;break e}}else if(O.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===se&&ui(de)===O.type){a(N,O.sibling),Y=f(O,M.props),dl(Y,M),Y.return=N,N=Y;break e}a(N,O);break}else r(N,O);O=O.sibling}M.type===k?(Y=ni(M.props.children,N.mode,Y,M.key),Y.return=N,N=Y):(Y=Hu(M.type,M.key,M.props,null,N.mode,Y),dl(Y,M),Y.return=N,N=Y)}return v(N);case E:e:{for(de=M.key;O!==null;){if(O.key===de)if(O.tag===4&&O.stateNode.containerInfo===M.containerInfo&&O.stateNode.implementation===M.implementation){a(N,O.sibling),Y=f(O,M.children||[]),Y.return=N,N=Y;break e}else{a(N,O);break}else r(N,O);O=O.sibling}Y=Vc(M,N.mode,Y),Y.return=N,N=Y}return v(N);case se:return M=ui(M),Fe(N,O,M,Y)}if(fe(M))return le(N,O,M,Y);if(ne(M)){if(de=ne(M),typeof de!="function")throw Error(l(150));return M=de.call(M),ye(N,O,M,Y)}if(typeof M.then=="function")return Fe(N,O,Fu(M),Y);if(M.$$typeof===w)return Fe(N,O,Vu(N,M),Y);Ju(N,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,O!==null&&O.tag===6?(a(N,O.sibling),Y=f(O,M),Y.return=N,N=Y):(a(N,O),Y=$c(M,N.mode,Y),Y.return=N,N=Y),v(N)):a(N,O)}return function(N,O,M,Y){try{pl=0;var de=Fe(N,O,M,Y);return aa=null,de}catch(ce){if(ce===ia||ce===Gu)throw ce;var Le=nn(29,ce,null,N.mode);return Le.lanes=Y,Le.return=N,Le}finally{}}}var si=cv(!0),fv=cv(!1),zr=!1;function nf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rf(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function wr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function kr(t,r,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,Be&2){var f=u.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),u.pending=r,r=Bu(t),Fy(t,null,a),r}return Iu(t,u,r,a),Bu(t)}function ml(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,ny(t,a)}}function af(t,r){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var f=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var v={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?f=p=v:p=p.next=v,a=a.next}while(a!==null);p===null?f=p=r:p=p.next=r}else f=p=r;a={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:u.shared,callbacks:u.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var lf=!1;function gl(){if(lf){var t=ra;if(t!==null)throw t}}function yl(t,r,a,u){lf=!1;var f=t.updateQueue;zr=!1;var p=f.firstBaseUpdate,v=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var T=S,j=T.next;T.next=null,v===null?p=j:v.next=j,v=T;var q=t.alternate;q!==null&&(q=q.updateQueue,S=q.lastBaseUpdate,S!==v&&(S===null?q.firstBaseUpdate=j:S.next=j,q.lastBaseUpdate=T))}if(p!==null){var G=f.baseState;v=0,q=j=T=null,S=p;do{var U=S.lane&-536870913,I=U!==S.lane;if(I?(De&U)===U:(u&U)===U){U!==0&&U===na&&(lf=!0),q!==null&&(q=q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var le=t,ye=S;U=r;var Fe=a;switch(ye.tag){case 1:if(le=ye.payload,typeof le=="function"){G=le.call(Fe,G,U);break e}G=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ye.payload,U=typeof le=="function"?le.call(Fe,G,U):le,U==null)break e;G=g({},G,U);break e;case 2:zr=!0}}U=S.callback,U!==null&&(t.flags|=64,I&&(t.flags|=8192),I=f.callbacks,I===null?f.callbacks=[U]:I.push(U))}else I={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},q===null?(j=q=I,T=G):q=q.next=I,v|=U;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;I=S,S=I.next,I.next=null,f.lastBaseUpdate=I,f.shared.pending=null}}while(!0);q===null&&(T=G),f.baseState=T,f.firstBaseUpdate=j,f.lastBaseUpdate=q,p===null&&(f.shared.lanes=0),Nr|=v,t.lanes=v,t.memoizedState=G}}function hv(t,r){if(typeof t!="function")throw Error(l(191,t));t.call(r)}function pv(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)hv(a[t],r)}var la=A(null),Qu=A(0);function dv(t,r){t=ar,x(Qu,t),x(la,r),ar=t|r.baseLanes}function uf(){x(Qu,ar),x(la,la.current)}function of(){ar=Qu.current,H(la),H(Qu)}var rn=A(null),_n=null;function Tr(t){var r=t.alternate;x(pt,pt.current&1),x(rn,t),_n===null&&(r===null||la.current!==null||r.memoizedState!==null)&&(_n=t)}function sf(t){x(pt,pt.current),x(rn,t),_n===null&&(_n=t)}function mv(t){t.tag===22?(x(pt,pt.current),x(rn,t),_n===null&&(_n=t)):Ar()}function Ar(){x(pt,pt.current),x(rn,rn.current)}function an(t){H(rn),_n===t&&(_n=null),H(pt)}var pt=A(0);function Pu(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mh(a)||gh(a)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Pn=0,Ee=null,Ge=null,yt=null,Ku=!1,ua=!1,ci=!1,Wu=0,vl=0,oa=null,hN=0;function ft(){throw Error(l(321))}function cf(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!tn(t[a],r[a]))return!1;return!0}function ff(t,r,a,u,f,p){return Pn=p,Ee=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,L.H=t===null||t.memoizedState===null?Kv:kf,ci=!1,p=a(u,f),ci=!1,ua&&(p=yv(r,a,u,f)),gv(t),p}function gv(t){L.H=Sl;var r=Ge!==null&&Ge.next!==null;if(Pn=0,yt=Ge=Ee=null,Ku=!1,vl=0,oa=null,r)throw Error(l(300));t===null||vt||(t=t.dependencies,t!==null&&$u(t)&&(vt=!0))}function yv(t,r,a,u){Ee=t;var f=0;do{if(ua&&(oa=null),vl=0,ua=!1,25<=f)throw Error(l(301));if(f+=1,yt=Ge=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}L.H=Wv,p=r(a,u)}while(ua);return p}function pN(){var t=L.H,r=t.useState()[0];return r=typeof r.then=="function"?bl(r):r,t=t.useState()[0],(Ge!==null?Ge.memoizedState:null)!==t&&(Ee.flags|=1024),r}function hf(){var t=Wu!==0;return Wu=0,t}function pf(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function df(t){if(Ku){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ku=!1}Pn=0,yt=Ge=Ee=null,ua=!1,vl=Wu=0,oa=null}function It(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ee.memoizedState=yt=t:yt=yt.next=t,yt}function dt(){if(Ge===null){var t=Ee.alternate;t=t!==null?t.memoizedState:null}else t=Ge.next;var r=yt===null?Ee.memoizedState:yt.next;if(r!==null)yt=r,Ge=t;else{if(t===null)throw Ee.alternate===null?Error(l(467)):Error(l(310));Ge=t,t={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},yt===null?Ee.memoizedState=yt=t:yt=yt.next=t}return yt}function eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bl(t){var r=vl;return vl+=1,oa===null&&(oa=[]),t=uv(oa,t,r),r=Ee,(yt===null?r.memoizedState:yt.next)===null&&(r=r.alternate,L.H=r===null||r.memoizedState===null?Kv:kf),t}function to(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return bl(t);if(t.$$typeof===w)return kt(t)}throw Error(l(438,String(t)))}function mf(t){var r=null,a=Ee.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var u=Ee.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(f){return f.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=eo(),Ee.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),u=0;u<t;u++)a[u]=Z;return r.index++,a}function Kn(t,r){return typeof r=="function"?r(t):r}function no(t){var r=dt();return gf(r,Ge,t)}function gf(t,r,a){var u=t.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=a;var f=t.baseQueue,p=u.pending;if(p!==null){if(f!==null){var v=f.next;f.next=p.next,p.next=v}r.baseQueue=f=p,u.pending=null}if(p=t.baseState,f===null)t.memoizedState=p;else{r=f.next;var S=v=null,T=null,j=r,q=!1;do{var G=j.lane&-536870913;if(G!==j.lane?(De&G)===G:(Pn&G)===G){var U=j.revertLane;if(U===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),G===na&&(q=!0);else if((Pn&U)===U){j=j.next,U===na&&(q=!0);continue}else G={lane:0,revertLane:j.revertLane,gesture:null,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},T===null?(S=T=G,v=p):T=T.next=G,Ee.lanes|=U,Nr|=U;G=j.action,ci&&a(p,G),p=j.hasEagerState?j.eagerState:a(p,G)}else U={lane:G,revertLane:j.revertLane,gesture:j.gesture,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null},T===null?(S=T=U,v=p):T=T.next=U,Ee.lanes|=G,Nr|=G;j=j.next}while(j!==null&&j!==r);if(T===null?v=p:T.next=S,!tn(p,t.memoizedState)&&(vt=!0,q&&(a=ra,a!==null)))throw a;t.memoizedState=p,t.baseState=v,t.baseQueue=T,u.lastRenderedState=p}return f===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function yf(t){var r=dt(),a=r.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var u=a.dispatch,f=a.pending,p=r.memoizedState;if(f!==null){a.pending=null;var v=f=f.next;do p=t(p,v.action),v=v.next;while(v!==f);tn(p,r.memoizedState)||(vt=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),a.lastRenderedState=p}return[p,u]}function vv(t,r,a){var u=Ee,f=dt(),p=Ue;if(p){if(a===void 0)throw Error(l(407));a=a()}else a=r();var v=!tn((Ge||f).memoizedState,a);if(v&&(f.memoizedState=a,vt=!0),f=f.queue,_f(Sv.bind(null,u,f,t),[t]),f.getSnapshot!==r||v||yt!==null&&yt.memoizedState.tag&1){if(u.flags|=2048,sa(9,{destroy:void 0},_v.bind(null,u,f,a,r),null),Ke===null)throw Error(l(349));p||Pn&127||bv(u,r,a)}return a}function bv(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=Ee.updateQueue,r===null?(r=eo(),Ee.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function _v(t,r,a,u){r.value=a,r.getSnapshot=u,xv(r)&&Ev(t)}function Sv(t,r,a){return a(function(){xv(r)&&Ev(t)})}function xv(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!tn(t,a)}catch{return!0}}function Ev(t){var r=ti(t,2);r!==null&&Qt(r,t,2)}function vf(t){var r=It();if(typeof t=="function"){var a=t;if(t=a(),ci){$t(!0);try{a()}finally{$t(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:t},r}function zv(t,r,a,u){return t.baseState=a,gf(t,Ge,typeof u=="function"?u:Kn)}function dN(t,r,a,u,f){if(ao(t))throw Error(l(485));if(t=r.action,t!==null){var p={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};L.T!==null?a(!0):p.isTransition=!1,u(p),a=r.pending,a===null?(p.next=r.pending=p,wv(r,p)):(p.next=a.next,r.pending=a.next=p)}}function wv(t,r){var a=r.action,u=r.payload,f=t.state;if(r.isTransition){var p=L.T,v={};L.T=v;try{var S=a(f,u),T=L.S;T!==null&&T(v,S),kv(t,r,S)}catch(j){bf(t,r,j)}finally{p!==null&&v.types!==null&&(p.types=v.types),L.T=p}}else try{p=a(f,u),kv(t,r,p)}catch(j){bf(t,r,j)}}function kv(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Tv(t,r,u)},function(u){return bf(t,r,u)}):Tv(t,r,a)}function Tv(t,r,a){r.status="fulfilled",r.value=a,Av(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,wv(t,a)))}function bf(t,r,a){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=a,Av(r),r=r.next;while(r!==u)}t.action=null}function Av(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Ov(t,r){return r}function Cv(t,r){if(Ue){var a=Ke.formState;if(a!==null){e:{var u=Ee;if(Ue){if(at){t:{for(var f=at,p=bn;f.nodeType!==8;){if(!p){f=null;break t}if(f=Sn(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){at=Sn(f.nextSibling),u=f.data==="F!";break e}}xr(u)}u=!1}u&&(r=a[0])}}return a=It(),a.memoizedState=a.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ov,lastRenderedState:r},a.queue=u,a=Jv.bind(null,Ee,u),u.dispatch=a,u=vf(!1),p=wf.bind(null,Ee,!1,u.queue),u=It(),f={state:r,dispatch:null,action:t,pending:null},u.queue=f,a=dN.bind(null,Ee,f,p,a),f.dispatch=a,u.memoizedState=t,[r,a,!1]}function Nv(t){var r=dt();return Dv(r,Ge,t)}function Dv(t,r,a){if(r=gf(t,r,Ov)[0],t=no(Kn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=bl(r)}catch(v){throw v===ia?Gu:v}else u=r;r=dt();var f=r.queue,p=f.dispatch;return a!==r.memoizedState&&(Ee.flags|=2048,sa(9,{destroy:void 0},mN.bind(null,f,a),null)),[u,p,t]}function mN(t,r){t.action=r}function Mv(t){var r=dt(),a=Ge;if(a!==null)return Dv(r,a,t);dt(),r=r.memoizedState,a=dt();var u=a.queue.dispatch;return a.memoizedState=t,[r,u,!1]}function sa(t,r,a,u){return t={tag:t,create:a,deps:u,inst:r,next:null},r=Ee.updateQueue,r===null&&(r=eo(),Ee.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,r.lastEffect=t),t}function Rv(){return dt().memoizedState}function ro(t,r,a,u){var f=It();Ee.flags|=t,f.memoizedState=sa(1|r,{destroy:void 0},a,u===void 0?null:u)}function io(t,r,a,u){var f=dt();u=u===void 0?null:u;var p=f.memoizedState.inst;Ge!==null&&u!==null&&cf(u,Ge.memoizedState.deps)?f.memoizedState=sa(r,p,a,u):(Ee.flags|=t,f.memoizedState=sa(1|r,p,a,u))}function jv(t,r){ro(8390656,8,t,r)}function _f(t,r){io(2048,8,t,r)}function gN(t){Ee.flags|=4;var r=Ee.updateQueue;if(r===null)r=eo(),Ee.updateQueue=r,r.events=[t];else{var a=r.events;a===null?r.events=[t]:a.push(t)}}function Uv(t){var r=dt().memoizedState;return gN({ref:r,nextImpl:t}),function(){if(Be&2)throw Error(l(440));return r.impl.apply(void 0,arguments)}}function Zv(t,r){return io(4,2,t,r)}function Lv(t,r){return io(4,4,t,r)}function Iv(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Bv(t,r,a){a=a!=null?a.concat([t]):null,io(4,4,Iv.bind(null,r,t),a)}function Sf(){}function Hv(t,r){var a=dt();r=r===void 0?null:r;var u=a.memoizedState;return r!==null&&cf(r,u[1])?u[0]:(a.memoizedState=[t,r],t)}function qv(t,r){var a=dt();r=r===void 0?null:r;var u=a.memoizedState;if(r!==null&&cf(r,u[1]))return u[0];if(u=t(),ci){$t(!0);try{t()}finally{$t(!1)}}return a.memoizedState=[u,r],u}function xf(t,r,a){return a===void 0||Pn&1073741824&&!(De&261930)?t.memoizedState=r:(t.memoizedState=a,t=$b(),Ee.lanes|=t,Nr|=t,a)}function $v(t,r,a,u){return tn(a,r)?a:la.current!==null?(t=xf(t,a,u),tn(t,r)||(vt=!0),t):!(Pn&42)||Pn&1073741824&&!(De&261930)?(vt=!0,t.memoizedState=a):(t=$b(),Ee.lanes|=t,Nr|=t,r)}function Vv(t,r,a,u,f){var p=J.p;J.p=p!==0&&8>p?p:8;var v=L.T,S={};L.T=S,wf(t,!1,r,a);try{var T=f(),j=L.S;if(j!==null&&j(S,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var q=fN(T,u);_l(t,r,q,on(t))}else _l(t,r,u,on(t))}catch(G){_l(t,r,{then:function(){},status:"rejected",reason:G},on())}finally{J.p=p,v!==null&&S.types!==null&&(v.types=S.types),L.T=v}}function yN(){}function Ef(t,r,a,u){if(t.tag!==5)throw Error(l(476));var f=Yv(t).queue;Vv(t,f,r,ue,a===null?yN:function(){return Gv(t),a(u)})}function Yv(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:ue},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function Gv(t){var r=Yv(t);r.next===null&&(r=t.alternate.memoizedState),_l(t,r.next.queue,{},on())}function zf(){return kt(Zl)}function Xv(){return dt().memoizedState}function Fv(){return dt().memoizedState}function vN(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=on();t=wr(a);var u=kr(r,t,a);u!==null&&(Qt(u,r,a),ml(u,r,a)),r={cache:Kc()},t.payload=r;return}r=r.return}}function bN(t,r,a){var u=on();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ao(t)?Qv(r,a):(a=Hc(t,r,a,u),a!==null&&(Qt(a,t,u),Pv(a,r,u)))}function Jv(t,r,a){var u=on();_l(t,r,a,u)}function _l(t,r,a,u){var f={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ao(t))Qv(r,f);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var v=r.lastRenderedState,S=p(v,a);if(f.hasEagerState=!0,f.eagerState=S,tn(S,v))return Iu(t,r,f,0),Ke===null&&Lu(),!1}catch{}finally{}if(a=Hc(t,r,f,u),a!==null)return Qt(a,t,u),Pv(a,r,u),!0}return!1}function wf(t,r,a,u){if(u={lane:2,revertLane:rh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ao(t)){if(r)throw Error(l(479))}else r=Hc(t,a,u,2),r!==null&&Qt(r,t,2)}function ao(t){var r=t.alternate;return t===Ee||r!==null&&r===Ee}function Qv(t,r){ua=Ku=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Pv(t,r,a){if(a&4194048){var u=r.lanes;u&=t.pendingLanes,a|=u,r.lanes=a,ny(t,a)}}var Sl={readContext:kt,use:to,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Sl.useEffectEvent=ft;var Kv={readContext:kt,use:to,useCallback:function(t,r){return It().memoizedState=[t,r===void 0?null:r],t},useContext:kt,useEffect:jv,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,ro(4194308,4,Iv.bind(null,r,t),a)},useLayoutEffect:function(t,r){return ro(4194308,4,t,r)},useInsertionEffect:function(t,r){ro(4,2,t,r)},useMemo:function(t,r){var a=It();r=r===void 0?null:r;var u=t();if(ci){$t(!0);try{t()}finally{$t(!1)}}return a.memoizedState=[u,r],u},useReducer:function(t,r,a){var u=It();if(a!==void 0){var f=a(r);if(ci){$t(!0);try{a(r)}finally{$t(!1)}}}else f=r;return u.memoizedState=u.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},u.queue=t,t=t.dispatch=bN.bind(null,Ee,t),[u.memoizedState,t]},useRef:function(t){var r=It();return t={current:t},r.memoizedState=t},useState:function(t){t=vf(t);var r=t.queue,a=Jv.bind(null,Ee,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Sf,useDeferredValue:function(t,r){var a=It();return xf(a,t,r)},useTransition:function(){var t=vf(!1);return t=Vv.bind(null,Ee,t.queue,!0,!1),It().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var u=Ee,f=It();if(Ue){if(a===void 0)throw Error(l(407));a=a()}else{if(a=r(),Ke===null)throw Error(l(349));De&127||bv(u,r,a)}f.memoizedState=a;var p={value:a,getSnapshot:r};return f.queue=p,jv(Sv.bind(null,u,p,t),[t]),u.flags|=2048,sa(9,{destroy:void 0},_v.bind(null,u,p,a,r),null),a},useId:function(){var t=It(),r=Ke.identifierPrefix;if(Ue){var a=Un,u=jn;a=(u&~(1<<32-Pe(u)-1)).toString(32)+a,r="_"+r+"R_"+a,a=Wu++,0<a&&(r+="H"+a.toString(32)),r+="_"}else a=hN++,r="_"+r+"r_"+a.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:zf,useFormState:Cv,useActionState:Cv,useOptimistic:function(t){var r=It();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=wf.bind(null,Ee,!0,a),a.dispatch=r,[t,r]},useMemoCache:mf,useCacheRefresh:function(){return It().memoizedState=vN.bind(null,Ee)},useEffectEvent:function(t){var r=It(),a={impl:t};return r.memoizedState=a,function(){if(Be&2)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},kf={readContext:kt,use:to,useCallback:Hv,useContext:kt,useEffect:_f,useImperativeHandle:Bv,useInsertionEffect:Zv,useLayoutEffect:Lv,useMemo:qv,useReducer:no,useRef:Rv,useState:function(){return no(Kn)},useDebugValue:Sf,useDeferredValue:function(t,r){var a=dt();return $v(a,Ge.memoizedState,t,r)},useTransition:function(){var t=no(Kn)[0],r=dt().memoizedState;return[typeof t=="boolean"?t:bl(t),r]},useSyncExternalStore:vv,useId:Xv,useHostTransitionStatus:zf,useFormState:Nv,useActionState:Nv,useOptimistic:function(t,r){var a=dt();return zv(a,Ge,t,r)},useMemoCache:mf,useCacheRefresh:Fv};kf.useEffectEvent=Uv;var Wv={readContext:kt,use:to,useCallback:Hv,useContext:kt,useEffect:_f,useImperativeHandle:Bv,useInsertionEffect:Zv,useLayoutEffect:Lv,useMemo:qv,useReducer:yf,useRef:Rv,useState:function(){return yf(Kn)},useDebugValue:Sf,useDeferredValue:function(t,r){var a=dt();return Ge===null?xf(a,t,r):$v(a,Ge.memoizedState,t,r)},useTransition:function(){var t=yf(Kn)[0],r=dt().memoizedState;return[typeof t=="boolean"?t:bl(t),r]},useSyncExternalStore:vv,useId:Xv,useHostTransitionStatus:zf,useFormState:Mv,useActionState:Mv,useOptimistic:function(t,r){var a=dt();return Ge!==null?zv(a,Ge,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:mf,useCacheRefresh:Fv};Wv.useEffectEvent=Uv;function Tf(t,r,a,u){r=t.memoizedState,a=a(u,r),a=a==null?r:g({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Af={enqueueSetState:function(t,r,a){t=t._reactInternals;var u=on(),f=wr(u);f.payload=r,a!=null&&(f.callback=a),r=kr(t,f,u),r!==null&&(Qt(r,t,u),ml(r,t,u))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var u=on(),f=wr(u);f.tag=1,f.payload=r,a!=null&&(f.callback=a),r=kr(t,f,u),r!==null&&(Qt(r,t,u),ml(r,t,u))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=on(),u=wr(a);u.tag=2,r!=null&&(u.callback=r),r=kr(t,u,a),r!==null&&(Qt(r,t,a),ml(r,t,a))}};function eb(t,r,a,u,f,p,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,p,v):r.prototype&&r.prototype.isPureReactComponent?!ul(a,u)||!ul(f,p):!0}function tb(t,r,a,u){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,u),r.state!==t&&Af.enqueueReplaceState(r,r.state,null)}function fi(t,r){var a=r;if("ref"in r){a={};for(var u in r)u!=="ref"&&(a[u]=r[u])}if(t=t.defaultProps){a===r&&(a=g({},a));for(var f in t)a[f]===void 0&&(a[f]=t[f])}return a}function nb(t){Zu(t)}function rb(t){console.error(t)}function ib(t){Zu(t)}function lo(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function ab(t,r,a){try{var u=t.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Of(t,r,a){return a=wr(a),a.tag=3,a.payload={element:null},a.callback=function(){lo(t,r)},a}function lb(t){return t=wr(t),t.tag=3,t}function ub(t,r,a,u){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var p=u.value;t.payload=function(){return f(p)},t.callback=function(){ab(r,a,u)}}var v=a.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){ab(r,a,u),typeof f!="function"&&(Dr===null?Dr=new Set([this]):Dr.add(this));var S=u.stack;this.componentDidCatch(u.value,{componentStack:S!==null?S:""})})}function _N(t,r,a,u,f){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=a.alternate,r!==null&&ta(r,a,f,!0),a=rn.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?bo():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=f,u===Xu?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([u]):r.add(u),eh(t,u,f)),!1;case 22:return a.flags|=65536,u===Xu?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([u]):a.add(u)),eh(t,u,f)),!1}throw Error(l(435,a.tag))}return eh(t,u,f),bo(),!1}if(Ue)return r=rn.current,r!==null?(!(r.flags&65536)&&(r.flags|=256),r.flags|=65536,r.lanes=f,u!==Xc&&(t=Error(l(422),{cause:u}),cl(gn(t,a)))):(u!==Xc&&(r=Error(l(423),{cause:u}),cl(gn(r,a))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,u=gn(u,a),f=Of(t.stateNode,u,f),af(t,f),ht!==4&&(ht=2)),!1;var p=Error(l(520),{cause:u});if(p=gn(p,a),Ol===null?Ol=[p]:Ol.push(p),ht!==4&&(ht=2),r===null)return!0;u=gn(u,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=f&-f,a.lanes|=t,t=Of(a.stateNode,u,t),af(a,t),!1;case 1:if(r=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Dr===null||!Dr.has(p))))return a.flags|=65536,f&=-f,a.lanes|=f,f=lb(f),ub(f,t,a,u),af(a,f),!1}a=a.return}while(a!==null);return!1}var Cf=Error(l(461)),vt=!1;function Tt(t,r,a,u){r.child=t===null?fv(r,null,a,u):si(r,t.child,a,u)}function ob(t,r,a,u,f){a=a.render;var p=r.ref;if("ref"in u){var v={};for(var S in u)S!=="ref"&&(v[S]=u[S])}else v=u;return ai(r),u=ff(t,r,a,v,p,f),S=hf(),t!==null&&!vt?(pf(t,r,f),Wn(t,r,f)):(Ue&&S&&Yc(r),r.flags|=1,Tt(t,r,u,f),r.child)}function sb(t,r,a,u,f){if(t===null){var p=a.type;return typeof p=="function"&&!qc(p)&&p.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=p,cb(t,r,p,u,f)):(t=Hu(a.type,null,u,r,r.mode,f),t.ref=r.ref,t.return=r,r.child=t)}if(p=t.child,!Lf(t,f)){var v=p.memoizedProps;if(a=a.compare,a=a!==null?a:ul,a(v,u)&&t.ref===r.ref)return Wn(t,r,f)}return r.flags|=1,t=Xn(p,u),t.ref=r.ref,t.return=r,r.child=t}function cb(t,r,a,u,f){if(t!==null){var p=t.memoizedProps;if(ul(p,u)&&t.ref===r.ref)if(vt=!1,r.pendingProps=u=p,Lf(t,f))t.flags&131072&&(vt=!0);else return r.lanes=t.lanes,Wn(t,r,f)}return Nf(t,r,a,u,f)}function fb(t,r,a,u){var f=u.children,p=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if(r.flags&128){if(p=p!==null?p.baseLanes|a:a,t!==null){for(u=r.child=t.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~p}else u=0,r.child=null;return hb(t,r,p,a,u)}if(a&536870912)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Yu(r,p!==null?p.cachePool:null),p!==null?dv(r,p):uf(),mv(r);else return u=r.lanes=536870912,hb(t,r,p!==null?p.baseLanes|a:a,a,u)}else p!==null?(Yu(r,p.cachePool),dv(r,p),Ar(),r.memoizedState=null):(t!==null&&Yu(r,null),uf(),Ar());return Tt(t,r,f,a),r.child}function xl(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function hb(t,r,a,u,f){var p=ef();return p=p===null?null:{parent:gt._currentValue,pool:p},r.memoizedState={baseLanes:a,cachePool:p},t!==null&&Yu(r,null),uf(),mv(r),t!==null&&ta(t,r,u,!0),r.childLanes=f,null}function uo(t,r){return r=so({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function pb(t,r,a){return si(r,t.child,null,a),t=uo(r,r.pendingProps),t.flags|=2,an(r),r.memoizedState=null,t}function SN(t,r,a){var u=r.pendingProps,f=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Ue){if(u.mode==="hidden")return t=uo(r,u),r.lanes=536870912,xl(null,t);if(sf(r),(t=at)?(t=w0(t,bn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:_r!==null?{id:jn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=Qy(t),a.return=r,r.child=a,wt=r,at=null)):t=null,t===null)throw xr(r);return r.lanes=536870912,null}return uo(r,u)}var p=t.memoizedState;if(p!==null){var v=p.dehydrated;if(sf(r),f)if(r.flags&256)r.flags&=-257,r=pb(t,r,a);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(l(558));else if(vt||ta(t,r,a,!1),f=(a&t.childLanes)!==0,vt||f){if(u=Ke,u!==null&&(v=ry(u,a),v!==0&&v!==p.retryLane))throw p.retryLane=v,ti(t,v),Qt(u,t,v),Cf;bo(),r=pb(t,r,a)}else t=p.treeContext,at=Sn(v.nextSibling),wt=r,Ue=!0,Sr=null,bn=!1,t!==null&&Wy(r,t),r=uo(r,u),r.flags|=4096;return r}return t=Xn(t.child,{mode:u.mode,children:u.children}),t.ref=r.ref,r.child=t,t.return=r,t}function oo(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function Nf(t,r,a,u,f){return ai(r),a=ff(t,r,a,u,void 0,f),u=hf(),t!==null&&!vt?(pf(t,r,f),Wn(t,r,f)):(Ue&&u&&Yc(r),r.flags|=1,Tt(t,r,a,f),r.child)}function db(t,r,a,u,f,p){return ai(r),r.updateQueue=null,a=yv(r,u,a,f),gv(t),u=hf(),t!==null&&!vt?(pf(t,r,p),Wn(t,r,p)):(Ue&&u&&Yc(r),r.flags|=1,Tt(t,r,a,p),r.child)}function mb(t,r,a,u,f){if(ai(r),r.stateNode===null){var p=Pi,v=a.contextType;typeof v=="object"&&v!==null&&(p=kt(v)),p=new a(u,p),r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Af,r.stateNode=p,p._reactInternals=r,p=r.stateNode,p.props=u,p.state=r.memoizedState,p.refs={},nf(r),v=a.contextType,p.context=typeof v=="object"&&v!==null?kt(v):Pi,p.state=r.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(Tf(r,a,v,u),p.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&Af.enqueueReplaceState(p,p.state,null),yl(r,u,p,f),gl(),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(t===null){p=r.stateNode;var S=r.memoizedProps,T=fi(a,S);p.props=T;var j=p.context,q=a.contextType;v=Pi,typeof q=="object"&&q!==null&&(v=kt(q));var G=a.getDerivedStateFromProps;q=typeof G=="function"||typeof p.getSnapshotBeforeUpdate=="function",S=r.pendingProps!==S,q||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S||j!==v)&&tb(r,p,u,v),zr=!1;var U=r.memoizedState;p.state=U,yl(r,u,p,f),gl(),j=r.memoizedState,S||U!==j||zr?(typeof G=="function"&&(Tf(r,a,G,u),j=r.memoizedState),(T=zr||eb(r,a,T,u,U,j,v))?(q||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(r.flags|=4194308)):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=j),p.props=u,p.state=j,p.context=v,u=T):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{p=r.stateNode,rf(t,r),v=r.memoizedProps,q=fi(a,v),p.props=q,G=r.pendingProps,U=p.context,j=a.contextType,T=Pi,typeof j=="object"&&j!==null&&(T=kt(j)),S=a.getDerivedStateFromProps,(j=typeof S=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==G||U!==T)&&tb(r,p,u,T),zr=!1,U=r.memoizedState,p.state=U,yl(r,u,p,f),gl();var I=r.memoizedState;v!==G||U!==I||zr||t!==null&&t.dependencies!==null&&$u(t.dependencies)?(typeof S=="function"&&(Tf(r,a,S,u),I=r.memoizedState),(q=zr||eb(r,a,q,u,U,I,T)||t!==null&&t.dependencies!==null&&$u(t.dependencies))?(j||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(u,I,T),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(u,I,T)),typeof p.componentDidUpdate=="function"&&(r.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=I),p.props=u,p.state=I,p.context=T,u=q):(typeof p.componentDidUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),u=!1)}return p=u,oo(t,r),u=(r.flags&128)!==0,p||u?(p=r.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:p.render(),r.flags|=1,t!==null&&u?(r.child=si(r,t.child,null,f),r.child=si(r,null,a,f)):Tt(t,r,a,f),r.memoizedState=p.state,t=r.child):t=Wn(t,r,f),t}function gb(t,r,a,u){return ri(),r.flags|=256,Tt(t,r,a,u),r.child}var Df={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mf(t){return{baseLanes:t,cachePool:av()}}function Rf(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=un),t}function yb(t,r,a){var u=r.pendingProps,f=!1,p=(r.flags&128)!==0,v;if((v=p)||(v=t!==null&&t.memoizedState===null?!1:(pt.current&2)!==0),v&&(f=!0,r.flags&=-129),v=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ue){if(f?Tr(r):Ar(),(t=at)?(t=w0(t,bn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:_r!==null?{id:jn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=Qy(t),a.return=r,r.child=a,wt=r,at=null)):t=null,t===null)throw xr(r);return gh(t)?r.lanes=32:r.lanes=536870912,null}var S=u.children;return u=u.fallback,f?(Ar(),f=r.mode,S=so({mode:"hidden",children:S},f),u=ni(u,f,a,null),S.return=r,u.return=r,S.sibling=u,r.child=S,u=r.child,u.memoizedState=Mf(a),u.childLanes=Rf(t,v,a),r.memoizedState=Df,xl(null,u)):(Tr(r),jf(r,S))}var T=t.memoizedState;if(T!==null&&(S=T.dehydrated,S!==null)){if(p)r.flags&256?(Tr(r),r.flags&=-257,r=Uf(t,r,a)):r.memoizedState!==null?(Ar(),r.child=t.child,r.flags|=128,r=null):(Ar(),S=u.fallback,f=r.mode,u=so({mode:"visible",children:u.children},f),S=ni(S,f,a,null),S.flags|=2,u.return=r,S.return=r,u.sibling=S,r.child=u,si(r,t.child,null,a),u=r.child,u.memoizedState=Mf(a),u.childLanes=Rf(t,v,a),r.memoizedState=Df,r=xl(null,u));else if(Tr(r),gh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var j=v.dgst;v=j,u=Error(l(419)),u.stack="",u.digest=v,cl({value:u,source:null,stack:null}),r=Uf(t,r,a)}else if(vt||ta(t,r,a,!1),v=(a&t.childLanes)!==0,vt||v){if(v=Ke,v!==null&&(u=ry(v,a),u!==0&&u!==T.retryLane))throw T.retryLane=u,ti(t,u),Qt(v,t,u),Cf;mh(S)||bo(),r=Uf(t,r,a)}else mh(S)?(r.flags|=192,r.child=t.child,r=null):(t=T.treeContext,at=Sn(S.nextSibling),wt=r,Ue=!0,Sr=null,bn=!1,t!==null&&Wy(r,t),r=jf(r,u.children),r.flags|=4096);return r}return f?(Ar(),S=u.fallback,f=r.mode,T=t.child,j=T.sibling,u=Xn(T,{mode:"hidden",children:u.children}),u.subtreeFlags=T.subtreeFlags&65011712,j!==null?S=Xn(j,S):(S=ni(S,f,a,null),S.flags|=2),S.return=r,u.return=r,u.sibling=S,r.child=u,xl(null,u),u=r.child,S=t.child.memoizedState,S===null?S=Mf(a):(f=S.cachePool,f!==null?(T=gt._currentValue,f=f.parent!==T?{parent:T,pool:T}:f):f=av(),S={baseLanes:S.baseLanes|a,cachePool:f}),u.memoizedState=S,u.childLanes=Rf(t,v,a),r.memoizedState=Df,xl(t.child,u)):(Tr(r),a=t.child,t=a.sibling,a=Xn(a,{mode:"visible",children:u.children}),a.return=r,a.sibling=null,t!==null&&(v=r.deletions,v===null?(r.deletions=[t],r.flags|=16):v.push(t)),r.child=a,r.memoizedState=null,a)}function jf(t,r){return r=so({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function so(t,r){return t=nn(22,t,null,r),t.lanes=0,t}function Uf(t,r,a){return si(r,t.child,null,a),t=jf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function vb(t,r,a){t.lanes|=r;var u=t.alternate;u!==null&&(u.lanes|=r),Qc(t.return,r,a)}function Zf(t,r,a,u,f,p){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:f,treeForkCount:p}:(v.isBackwards=r,v.rendering=null,v.renderingStartTime=0,v.last=u,v.tail=a,v.tailMode=f,v.treeForkCount=p)}function bb(t,r,a){var u=r.pendingProps,f=u.revealOrder,p=u.tail;u=u.children;var v=pt.current,S=(v&2)!==0;if(S?(v=v&1|2,r.flags|=128):v&=1,x(pt,v),Tt(t,r,u,a),u=Ue?sl:0,!S&&t!==null&&t.flags&128)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&vb(t,a,r);else if(t.tag===19)vb(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(a=r.child,f=null;a!==null;)t=a.alternate,t!==null&&Pu(t)===null&&(f=a),a=a.sibling;a=f,a===null?(f=r.child,r.child=null):(f=a.sibling,a.sibling=null),Zf(r,!1,f,a,p,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=r.child,r.child=null;f!==null;){if(t=f.alternate,t!==null&&Pu(t)===null){r.child=f;break}t=f.sibling,f.sibling=a,a=f,f=t}Zf(r,!0,a,null,p,u);break;case"together":Zf(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Wn(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Nr|=r.lanes,!(a&r.childLanes))if(t!==null){if(ta(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(l(153));if(r.child!==null){for(t=r.child,a=Xn(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Xn(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Lf(t,r){return t.lanes&r?!0:(t=t.dependencies,!!(t!==null&&$u(t)))}function xN(t,r,a){switch(r.tag){case 3:ot(r,r.stateNode.containerInfo),Er(r,gt,t.memoizedState.cache),ri();break;case 27:case 5:hn(r);break;case 4:ot(r,r.stateNode.containerInfo);break;case 10:Er(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,sf(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Tr(r),r.flags|=128,null):a&r.child.childLanes?yb(t,r,a):(Tr(r),t=Wn(t,r,a),t!==null?t.sibling:null);Tr(r);break;case 19:var f=(t.flags&128)!==0;if(u=(a&r.childLanes)!==0,u||(ta(t,r,a,!1),u=(a&r.childLanes)!==0),f){if(u)return bb(t,r,a);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),x(pt,pt.current),u)break;return null;case 22:return r.lanes=0,fb(t,r,a,r.pendingProps);case 24:Er(r,gt,t.memoizedState.cache)}return Wn(t,r,a)}function _b(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)vt=!0;else{if(!Lf(t,a)&&!(r.flags&128))return vt=!1,xN(t,r,a);vt=!!(t.flags&131072)}else vt=!1,Ue&&r.flags&1048576&&Ky(r,sl,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(t=ui(r.elementType),r.type=t,typeof t=="function")qc(t)?(u=fi(t,u),r.tag=1,r=mb(null,r,t,u,a)):(r.tag=0,r=Nf(null,r,t,u,a));else{if(t!=null){var f=t.$$typeof;if(f===P){r.tag=11,r=ob(null,r,t,u,a);break e}else if(f===X){r.tag=14,r=sb(null,r,t,u,a);break e}}throw r=re(t)||t,Error(l(306,r,""))}}return r;case 0:return Nf(t,r,r.type,r.pendingProps,a);case 1:return u=r.type,f=fi(u,r.pendingProps),mb(t,r,u,f,a);case 3:e:{if(ot(r,r.stateNode.containerInfo),t===null)throw Error(l(387));u=r.pendingProps;var p=r.memoizedState;f=p.element,rf(t,r),yl(r,u,null,a);var v=r.memoizedState;if(u=v.cache,Er(r,gt,u),u!==p.cache&&Pc(r,[gt],a,!0),gl(),u=v.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:v.cache},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){r=gb(t,r,u,a);break e}else if(u!==f){f=gn(Error(l(424)),r),cl(f),r=gb(t,r,u,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(at=Sn(t.firstChild),wt=r,Ue=!0,Sr=null,bn=!0,a=fv(r,null,u,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ri(),u===f){r=Wn(t,r,a);break e}Tt(t,r,u,a)}r=r.child}return r;case 26:return oo(t,r),t===null?(a=N0(r.type,null,r.pendingProps,null))?r.memoizedState=a:Ue||(a=r.type,t=r.pendingProps,u=ko(pe.current).createElement(a),u[zt]=r,u[Vt]=t,At(u,a,t),xt(u),r.stateNode=u):r.memoizedState=N0(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return hn(r),t===null&&Ue&&(u=r.stateNode=A0(r.type,r.pendingProps,pe.current),wt=r,bn=!0,f=at,Ur(r.type)?(yh=f,at=Sn(u.firstChild)):at=f),Tt(t,r,r.pendingProps.children,a),oo(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ue&&((f=u=at)&&(u=KN(u,r.type,r.pendingProps,bn),u!==null?(r.stateNode=u,wt=r,at=Sn(u.firstChild),bn=!1,f=!0):f=!1),f||xr(r)),hn(r),f=r.type,p=r.pendingProps,v=t!==null?t.memoizedProps:null,u=p.children,hh(f,p)?u=null:v!==null&&hh(f,v)&&(r.flags|=32),r.memoizedState!==null&&(f=ff(t,r,pN,null,null,a),Zl._currentValue=f),oo(t,r),Tt(t,r,u,a),r.child;case 6:return t===null&&Ue&&((t=a=at)&&(a=WN(a,r.pendingProps,bn),a!==null?(r.stateNode=a,wt=r,at=null,t=!0):t=!1),t||xr(r)),null;case 13:return yb(t,r,a);case 4:return ot(r,r.stateNode.containerInfo),u=r.pendingProps,t===null?r.child=si(r,null,u,a):Tt(t,r,u,a),r.child;case 11:return ob(t,r,r.type,r.pendingProps,a);case 7:return Tt(t,r,r.pendingProps,a),r.child;case 8:return Tt(t,r,r.pendingProps.children,a),r.child;case 12:return Tt(t,r,r.pendingProps.children,a),r.child;case 10:return u=r.pendingProps,Er(r,r.type,u.value),Tt(t,r,u.children,a),r.child;case 9:return f=r.type._context,u=r.pendingProps.children,ai(r),f=kt(f),u=u(f),r.flags|=1,Tt(t,r,u,a),r.child;case 14:return sb(t,r,r.type,r.pendingProps,a);case 15:return cb(t,r,r.type,r.pendingProps,a);case 19:return bb(t,r,a);case 31:return SN(t,r,a);case 22:return fb(t,r,a,r.pendingProps);case 24:return ai(r),u=kt(gt),t===null?(f=ef(),f===null&&(f=Ke,p=Kc(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=a),f=p),r.memoizedState={parent:u,cache:f},nf(r),Er(r,gt,f)):(t.lanes&a&&(rf(t,r),yl(r,null,null,a),gl()),f=t.memoizedState,p=r.memoizedState,f.parent!==u?(f={parent:u,cache:u},r.memoizedState=f,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=f),Er(r,gt,u)):(u=p.cache,Er(r,gt,u),u!==f.cache&&Pc(r,[gt],a,!0))),Tt(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(l(156,r.tag))}function er(t){t.flags|=4}function If(t,r,a,u,f){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(Xb())t.flags|=8192;else throw oi=Xu,tf}else t.flags&=-16777217}function Sb(t,r){if(r.type!=="stylesheet"||r.state.loading&4)t.flags&=-16777217;else if(t.flags|=16777216,!U0(r))if(Xb())t.flags|=8192;else throw oi=Xu,tf}function co(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?ey():536870912,t.lanes|=r,pa|=r)}function El(t,r){if(!Ue)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function lt(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(r)for(var f=t.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=u,t.childLanes=a,r}function EN(t,r,a){var u=r.pendingProps;switch(Gc(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(r),null;case 1:return lt(r),null;case 3:return a=r.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Qn(gt),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(ea(r)?er(r):t===null||t.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,Fc())),lt(r),null;case 26:var f=r.type,p=r.memoizedState;return t===null?(er(r),p!==null?(lt(r),Sb(r,p)):(lt(r),If(r,f,null,u,a))):p?p!==t.memoizedState?(er(r),lt(r),Sb(r,p)):(lt(r),r.flags&=-16777217):(t=t.memoizedProps,t!==u&&er(r),lt(r),If(r,f,t,u,a)),null;case 27:if(Hn(r),a=pe.current,f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&er(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return lt(r),null}t=te.current,ea(r)?ev(r):(t=A0(f,u,a),r.stateNode=t,er(r))}return lt(r),null;case 5:if(Hn(r),f=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==u&&er(r);else{if(!u){if(r.stateNode===null)throw Error(l(166));return lt(r),null}if(p=te.current,ea(r))ev(r);else{var v=ko(pe.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof u.is=="string"?v.createElement("select",{is:u.is}):v.createElement("select"),u.multiple?p.multiple=!0:u.size&&(p.size=u.size);break;default:p=typeof u.is=="string"?v.createElement(f,{is:u.is}):v.createElement(f)}}p[zt]=r,p[Vt]=u;e:for(v=r.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===r)break e;for(;v.sibling===null;){if(v.return===null||v.return===r)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}r.stateNode=p;e:switch(At(p,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&er(r)}}return lt(r),If(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,a),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==u&&er(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(l(166));if(t=pe.current,ea(r)){if(t=r.stateNode,a=r.memoizedProps,u=null,f=wt,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}t[zt]=r,t=!!(t.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||y0(t.nodeValue,a)),t||xr(r,!0)}else t=ko(t).createTextNode(u),t[zt]=r,r.stateNode=t}return lt(r),null;case 31:if(a=r.memoizedState,t===null||t.memoizedState!==null){if(u=ea(r),a!==null){if(t===null){if(!u)throw Error(l(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[zt]=r}else ri(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;lt(r),t=!1}else a=Fc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return r.flags&256?(an(r),r):(an(r),null);if(r.flags&128)throw Error(l(558))}return lt(r),null;case 13:if(u=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=ea(r),u!==null&&u.dehydrated!==null){if(t===null){if(!f)throw Error(l(318));if(f=r.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[zt]=r}else ri(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;lt(r),f=!1}else f=Fc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return r.flags&256?(an(r),r):(an(r),null)}return an(r),r.flags&128?(r.lanes=a,r):(a=u!==null,t=t!==null&&t.memoizedState!==null,a&&(u=r.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),p=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),p!==f&&(u.flags|=2048)),a!==t&&a&&(r.child.flags|=8192),co(r,r.updateQueue),lt(r),null);case 4:return Ye(),t===null&&uh(r.stateNode.containerInfo),lt(r),null;case 10:return Qn(r.type),lt(r),null;case 19:if(H(pt),u=r.memoizedState,u===null)return lt(r),null;if(f=(r.flags&128)!==0,p=u.rendering,p===null)if(f)El(u,!1);else{if(ht!==0||t!==null&&t.flags&128)for(t=r.child;t!==null;){if(p=Pu(t),p!==null){for(r.flags|=128,El(u,!1),t=p.updateQueue,r.updateQueue=t,co(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)Jy(a,t),a=a.sibling;return x(pt,pt.current&1|2),Ue&&Fn(r,u.treeForkCount),r.child}t=t.sibling}u.tail!==null&&Zt()>go&&(r.flags|=128,f=!0,El(u,!1),r.lanes=4194304)}else{if(!f)if(t=Pu(p),t!==null){if(r.flags|=128,f=!0,t=t.updateQueue,r.updateQueue=t,co(r,t),El(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Ue)return lt(r),null}else 2*Zt()-u.renderingStartTime>go&&a!==536870912&&(r.flags|=128,f=!0,El(u,!1),r.lanes=4194304);u.isBackwards?(p.sibling=r.child,r.child=p):(t=u.last,t!==null?t.sibling=p:r.child=p,u.last=p)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Zt(),t.sibling=null,a=pt.current,x(pt,f?a&1|2:a&1),Ue&&Fn(r,u.treeForkCount),t):(lt(r),null);case 22:case 23:return an(r),of(),u=r.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?a&536870912&&!(r.flags&128)&&(lt(r),r.subtreeFlags&6&&(r.flags|=8192)):lt(r),a=r.updateQueue,a!==null&&co(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==a&&(r.flags|=2048),t!==null&&H(li),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),Qn(gt),lt(r),null;case 25:return null;case 30:return null}throw Error(l(156,r.tag))}function zN(t,r){switch(Gc(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Qn(gt),Ye(),t=r.flags,t&65536&&!(t&128)?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Hn(r),null;case 31:if(r.memoizedState!==null){if(an(r),r.alternate===null)throw Error(l(340));ri()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(an(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(l(340));ri()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return H(pt),null;case 4:return Ye(),null;case 10:return Qn(r.type),null;case 22:case 23:return an(r),of(),t!==null&&H(li),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Qn(gt),null;case 25:return null;default:return null}}function xb(t,r){switch(Gc(r),r.tag){case 3:Qn(gt),Ye();break;case 26:case 27:case 5:Hn(r);break;case 4:Ye();break;case 31:r.memoizedState!==null&&an(r);break;case 13:an(r);break;case 19:H(pt);break;case 10:Qn(r.type);break;case 22:case 23:an(r),of(),t!==null&&H(li);break;case 24:Qn(gt)}}function zl(t,r){try{var a=r.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&t)===t){u=void 0;var p=a.create,v=a.inst;u=p(),v.destroy=u}a=a.next}while(a!==f)}}catch(S){Ve(r,r.return,S)}}function Or(t,r,a){try{var u=r.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var p=f.next;u=p;do{if((u.tag&t)===t){var v=u.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,f=r;var T=a,j=S;try{j()}catch(q){Ve(f,T,q)}}}u=u.next}while(u!==p)}}catch(q){Ve(r,r.return,q)}}function Eb(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{pv(r,a)}catch(u){Ve(t,t.return,u)}}}function zb(t,r,a){a.props=fi(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(u){Ve(t,r,u)}}function wl(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof a=="function"?t.refCleanup=a(u):a.current=u}}catch(f){Ve(t,r,f)}}function Zn(t,r){var a=t.ref,u=t.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(f){Ve(t,r,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Ve(t,r,f)}else a.current=null}function wb(t){var r=t.type,a=t.memoizedProps,u=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(f){Ve(t,t.return,f)}}function Bf(t,r,a){try{var u=t.stateNode;GN(u,t.type,a,r),u[Vt]=r}catch(f){Ve(t,t.return,f)}}function kb(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ur(t.type)||t.tag===4}function Hf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||kb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ur(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function qf(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Yn));else if(u!==4&&(u===27&&Ur(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(qf(t,r,a),t=t.sibling;t!==null;)qf(t,r,a),t=t.sibling}function fo(t,r,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(u!==4&&(u===27&&Ur(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(fo(t,r,a),t=t.sibling;t!==null;)fo(t,r,a),t=t.sibling}function Tb(t){var r=t.stateNode,a=t.memoizedProps;try{for(var u=t.type,f=r.attributes;f.length;)r.removeAttributeNode(f[0]);At(r,u,a),r[zt]=t,r[Vt]=a}catch(p){Ve(t,t.return,p)}}var tr=!1,bt=!1,$f=!1,Ab=typeof WeakSet=="function"?WeakSet:Set,Et=null;function wN(t,r){if(t=t.containerInfo,ch=Mo,t=By(t),jc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var f=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var v=0,S=-1,T=-1,j=0,q=0,G=t,U=null;t:for(;;){for(var I;G!==a||f!==0&&G.nodeType!==3||(S=v+f),G!==p||u!==0&&G.nodeType!==3||(T=v+u),G.nodeType===3&&(v+=G.nodeValue.length),(I=G.firstChild)!==null;)U=G,G=I;for(;;){if(G===t)break t;if(U===a&&++j===f&&(S=v),U===p&&++q===u&&(T=v),(I=G.nextSibling)!==null)break;G=U,U=G.parentNode}G=I}a=S===-1||T===-1?null:{start:S,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(fh={focusedElem:t,selectionRange:a},Mo=!1,Et=r;Et!==null;)if(r=Et,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,Et=t;else for(;Et!==null;){switch(r=Et,p=r.alternate,t=r.flags,r.tag){case 0:if(t&4&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)f=t[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if(t&1024&&p!==null){t=void 0,a=r,f=p.memoizedProps,p=p.memoizedState,u=a.stateNode;try{var le=fi(a.type,f);t=u.getSnapshotBeforeUpdate(le,p),u.__reactInternalSnapshotBeforeUpdate=t}catch(ye){Ve(a,a.return,ye)}}break;case 3:if(t&1024){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)dh(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":dh(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(t&1024)throw Error(l(163))}if(t=r.sibling,t!==null){t.return=r.return,Et=t;break}Et=r.return}}function Ob(t,r,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:rr(t,a),u&4&&zl(5,a);break;case 1:if(rr(t,a),u&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(v){Ve(a,a.return,v)}else{var f=fi(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(f,r,t.__reactInternalSnapshotBeforeUpdate)}catch(v){Ve(a,a.return,v)}}u&64&&Eb(a),u&512&&wl(a,a.return);break;case 3:if(rr(t,a),u&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{pv(t,r)}catch(v){Ve(a,a.return,v)}}break;case 27:r===null&&u&4&&Tb(a);case 26:case 5:rr(t,a),r===null&&u&4&&wb(a),u&512&&wl(a,a.return);break;case 12:rr(t,a);break;case 31:rr(t,a),u&4&&Db(t,a);break;case 13:rr(t,a),u&4&&Mb(t,a),u&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=RN.bind(null,a),eD(t,a))));break;case 22:if(u=a.memoizedState!==null||tr,!u){r=r!==null&&r.memoizedState!==null||bt,f=tr;var p=bt;tr=u,(bt=r)&&!p?ir(t,a,(a.subtreeFlags&8772)!==0):rr(t,a),tr=f,bt=p}break;case 30:break;default:rr(t,a)}}function Cb(t){var r=t.alternate;r!==null&&(t.alternate=null,Cb(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&vc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var st=null,Gt=!1;function nr(t,r,a){for(a=a.child;a!==null;)Nb(t,r,a),a=a.sibling}function Nb(t,r,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:bt||Zn(a,r),nr(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||Zn(a,r);var u=st,f=Gt;Ur(a.type)&&(st=a.stateNode,Gt=!1),nr(t,r,a),Rl(a.stateNode),st=u,Gt=f;break;case 5:bt||Zn(a,r);case 6:if(u=st,f=Gt,st=null,nr(t,r,a),st=u,Gt=f,st!==null)if(Gt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(p){Ve(a,r,p)}else try{st.removeChild(a.stateNode)}catch(p){Ve(a,r,p)}break;case 18:st!==null&&(Gt?(t=st,E0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Sa(t)):E0(st,a.stateNode));break;case 4:u=st,f=Gt,st=a.stateNode.containerInfo,Gt=!0,nr(t,r,a),st=u,Gt=f;break;case 0:case 11:case 14:case 15:Or(2,a,r),bt||Or(4,a,r),nr(t,r,a);break;case 1:bt||(Zn(a,r),u=a.stateNode,typeof u.componentWillUnmount=="function"&&zb(a,r,u)),nr(t,r,a);break;case 21:nr(t,r,a);break;case 22:bt=(u=bt)||a.memoizedState!==null,nr(t,r,a),bt=u;break;default:nr(t,r,a)}}function Db(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Sa(t)}catch(a){Ve(r,r.return,a)}}}function Mb(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Sa(t)}catch(a){Ve(r,r.return,a)}}function kN(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Ab),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Ab),r;default:throw Error(l(435,t.tag))}}function ho(t,r){var a=kN(t);r.forEach(function(u){if(!a.has(u)){a.add(u);var f=jN.bind(null,t,u);u.then(f,f)}})}function Xt(t,r){var a=r.deletions;if(a!==null)for(var u=0;u<a.length;u++){var f=a[u],p=t,v=r,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Ur(S.type)){st=S.stateNode,Gt=!1;break e}break;case 5:st=S.stateNode,Gt=!1;break e;case 3:case 4:st=S.stateNode.containerInfo,Gt=!0;break e}S=S.return}if(st===null)throw Error(l(160));Nb(p,v,f),st=null,Gt=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Rb(r,t),r=r.sibling}var An=null;function Rb(t,r){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Xt(r,t),Ft(t),u&4&&(Or(3,t,t.return),zl(3,t),Or(5,t,t.return));break;case 1:Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),u&64&&tr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var f=An;if(Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),u&4){var p=a!==null?a.memoizedState:null;if(u=t.memoizedState,a===null)if(u===null)if(t.stateNode===null){e:{u=t.type,a=t.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":p=f.getElementsByTagName("title")[0],(!p||p[Ka]||p[zt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(u),f.head.insertBefore(p,f.querySelector("head > title"))),At(p,u,a),p[zt]=t,xt(p),u=p;break e;case"link":var v=R0("link","href",f).get(u+(a.href||""));if(v){for(var S=0;S<v.length;S++)if(p=v[S],p.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&p.getAttribute("rel")===(a.rel==null?null:a.rel)&&p.getAttribute("title")===(a.title==null?null:a.title)&&p.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){v.splice(S,1);break t}}p=f.createElement(u),At(p,u,a),f.head.appendChild(p);break;case"meta":if(v=R0("meta","content",f).get(u+(a.content||""))){for(S=0;S<v.length;S++)if(p=v[S],p.getAttribute("content")===(a.content==null?null:""+a.content)&&p.getAttribute("name")===(a.name==null?null:a.name)&&p.getAttribute("property")===(a.property==null?null:a.property)&&p.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&p.getAttribute("charset")===(a.charSet==null?null:a.charSet)){v.splice(S,1);break t}}p=f.createElement(u),At(p,u,a),f.head.appendChild(p);break;default:throw Error(l(468,u))}p[zt]=t,xt(p),u=p}t.stateNode=u}else j0(f,t.type,t.stateNode);else t.stateNode=M0(f,u,t.memoizedProps);else p!==u?(p===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):p.count--,u===null?j0(f,t.type,t.stateNode):M0(f,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Bf(t,t.memoizedProps,a.memoizedProps)}break;case 27:Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),a!==null&&u&4&&Bf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Xt(r,t),Ft(t),u&512&&(bt||a===null||Zn(a,a.return)),t.flags&32){f=t.stateNode;try{Vi(f,"")}catch(le){Ve(t,t.return,le)}}u&4&&t.stateNode!=null&&(f=t.memoizedProps,Bf(t,f,a!==null?a.memoizedProps:f)),u&1024&&($f=!0);break;case 6:if(Xt(r,t),Ft(t),u&4){if(t.stateNode===null)throw Error(l(162));u=t.memoizedProps,a=t.stateNode;try{a.nodeValue=u}catch(le){Ve(t,t.return,le)}}break;case 3:if(Oo=null,f=An,An=To(r.containerInfo),Xt(r,t),An=f,Ft(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Sa(r.containerInfo)}catch(le){Ve(t,t.return,le)}$f&&($f=!1,jb(t));break;case 4:u=An,An=To(t.stateNode.containerInfo),Xt(r,t),Ft(t),An=u;break;case 12:Xt(r,t),Ft(t);break;case 31:Xt(r,t),Ft(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,ho(t,u)));break;case 13:Xt(r,t),Ft(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(mo=Zt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,ho(t,u)));break;case 22:f=t.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,j=tr,q=bt;if(tr=j||f,bt=q||T,Xt(r,t),bt=q,tr=j,Ft(t),u&8192)e:for(r=t.stateNode,r._visibility=f?r._visibility&-2:r._visibility|1,f&&(a===null||T||tr||bt||hi(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){T=a=r;try{if(p=T.stateNode,f)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=T.stateNode;var G=T.memoizedProps.style,U=G!=null&&G.hasOwnProperty("display")?G.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(le){Ve(T,T.return,le)}}}else if(r.tag===6){if(a===null){T=r;try{T.stateNode.nodeValue=f?"":T.memoizedProps}catch(le){Ve(T,T.return,le)}}}else if(r.tag===18){if(a===null){T=r;try{var I=T.stateNode;f?z0(I,!0):z0(T.stateNode,!1)}catch(le){Ve(T,T.return,le)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=t.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,ho(t,a))));break;case 19:Xt(r,t),Ft(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,ho(t,u)));break;case 30:break;case 21:break;default:Xt(r,t),Ft(t)}}function Ft(t){var r=t.flags;if(r&2){try{for(var a,u=t.return;u!==null;){if(kb(u)){a=u;break}u=u.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var f=a.stateNode,p=Hf(t);fo(t,p,f);break;case 5:var v=a.stateNode;a.flags&32&&(Vi(v,""),a.flags&=-33);var S=Hf(t);fo(t,S,v);break;case 3:case 4:var T=a.stateNode.containerInfo,j=Hf(t);qf(t,j,T);break;default:throw Error(l(161))}}catch(q){Ve(t,t.return,q)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function jb(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;jb(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function rr(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Ob(t,r.alternate,r),r=r.sibling}function hi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Or(4,r,r.return),hi(r);break;case 1:Zn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&zb(r,r.return,a),hi(r);break;case 27:Rl(r.stateNode);case 26:case 5:Zn(r,r.return),hi(r);break;case 22:r.memoizedState===null&&hi(r);break;case 30:hi(r);break;default:hi(r)}t=t.sibling}}function ir(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,f=t,p=r,v=p.flags;switch(p.tag){case 0:case 11:case 15:ir(f,p,a),zl(4,p);break;case 1:if(ir(f,p,a),u=p,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(j){Ve(u,u.return,j)}if(u=p,f=u.updateQueue,f!==null){var S=u.stateNode;try{var T=f.shared.hiddenCallbacks;if(T!==null)for(f.shared.hiddenCallbacks=null,f=0;f<T.length;f++)hv(T[f],S)}catch(j){Ve(u,u.return,j)}}a&&v&64&&Eb(p),wl(p,p.return);break;case 27:Tb(p);case 26:case 5:ir(f,p,a),a&&u===null&&v&4&&wb(p),wl(p,p.return);break;case 12:ir(f,p,a);break;case 31:ir(f,p,a),a&&v&4&&Db(f,p);break;case 13:ir(f,p,a),a&&v&4&&Mb(f,p);break;case 22:p.memoizedState===null&&ir(f,p,a),wl(p,p.return);break;case 30:break;default:ir(f,p,a)}r=r.sibling}}function Vf(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&fl(a))}function Yf(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&fl(t))}function On(t,r,a,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ub(t,r,a,u),r=r.sibling}function Ub(t,r,a,u){var f=r.flags;switch(r.tag){case 0:case 11:case 15:On(t,r,a,u),f&2048&&zl(9,r);break;case 1:On(t,r,a,u);break;case 3:On(t,r,a,u),f&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&fl(t)));break;case 12:if(f&2048){On(t,r,a,u),t=r.stateNode;try{var p=r.memoizedProps,v=p.id,S=p.onPostCommit;typeof S=="function"&&S(v,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){Ve(r,r.return,T)}}else On(t,r,a,u);break;case 31:On(t,r,a,u);break;case 13:On(t,r,a,u);break;case 23:break;case 22:p=r.stateNode,v=r.alternate,r.memoizedState!==null?p._visibility&2?On(t,r,a,u):kl(t,r):p._visibility&2?On(t,r,a,u):(p._visibility|=2,ca(t,r,a,u,(r.subtreeFlags&10256)!==0||!1)),f&2048&&Vf(v,r);break;case 24:On(t,r,a,u),f&2048&&Yf(r.alternate,r);break;default:On(t,r,a,u)}}function ca(t,r,a,u,f){for(f=f&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var p=t,v=r,S=a,T=u,j=v.flags;switch(v.tag){case 0:case 11:case 15:ca(p,v,S,T,f),zl(8,v);break;case 23:break;case 22:var q=v.stateNode;v.memoizedState!==null?q._visibility&2?ca(p,v,S,T,f):kl(p,v):(q._visibility|=2,ca(p,v,S,T,f)),f&&j&2048&&Vf(v.alternate,v);break;case 24:ca(p,v,S,T,f),f&&j&2048&&Yf(v.alternate,v);break;default:ca(p,v,S,T,f)}r=r.sibling}}function kl(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,u=r,f=u.flags;switch(u.tag){case 22:kl(a,u),f&2048&&Vf(u.alternate,u);break;case 24:kl(a,u),f&2048&&Yf(u.alternate,u);break;default:kl(a,u)}r=r.sibling}}var Tl=8192;function fa(t,r,a){if(t.subtreeFlags&Tl)for(t=t.child;t!==null;)Zb(t,r,a),t=t.sibling}function Zb(t,r,a){switch(t.tag){case 26:fa(t,r,a),t.flags&Tl&&t.memoizedState!==null&&hD(a,An,t.memoizedState,t.memoizedProps);break;case 5:fa(t,r,a);break;case 3:case 4:var u=An;An=To(t.stateNode.containerInfo),fa(t,r,a),An=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Tl,Tl=16777216,fa(t,r,a),Tl=u):fa(t,r,a));break;default:fa(t,r,a)}}function Lb(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function Al(t){var r=t.deletions;if(t.flags&16){if(r!==null)for(var a=0;a<r.length;a++){var u=r[a];Et=u,Bb(u,t)}Lb(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ib(t),t=t.sibling}function Ib(t){switch(t.tag){case 0:case 11:case 15:Al(t),t.flags&2048&&Or(9,t,t.return);break;case 3:Al(t);break;case 12:Al(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,po(t)):Al(t);break;default:Al(t)}}function po(t){var r=t.deletions;if(t.flags&16){if(r!==null)for(var a=0;a<r.length;a++){var u=r[a];Et=u,Bb(u,t)}Lb(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Or(8,r,r.return),po(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,po(r));break;default:po(r)}t=t.sibling}}function Bb(t,r){for(;Et!==null;){var a=Et;switch(a.tag){case 0:case 11:case 15:Or(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:fl(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Et=u;else e:for(a=t;Et!==null;){u=Et;var f=u.sibling,p=u.return;if(Cb(u),u===a){Et=null;break e}if(f!==null){f.return=p,Et=f;break e}Et=p}}}var TN={getCacheForType:function(t){var r=kt(gt),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a},cacheSignal:function(){return kt(gt).controller.signal}},AN=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ke=null,Oe=null,De=0,$e=0,ln=null,Cr=!1,ha=!1,Gf=!1,ar=0,ht=0,Nr=0,pi=0,Xf=0,un=0,pa=0,Ol=null,Jt=null,Ff=!1,mo=0,Hb=0,go=1/0,yo=null,Dr=null,St=0,Mr=null,da=null,lr=0,Jf=0,Qf=null,qb=null,Cl=0,Pf=null;function on(){return Be&2&&De!==0?De&-De:L.T!==null?rh():iy()}function $b(){if(un===0)if(!(De&536870912)||Ue){var t=zu;zu<<=1,!(zu&3932160)&&(zu=262144),un=t}else un=536870912;return t=rn.current,t!==null&&(t.flags|=32),un}function Qt(t,r,a){(t===Ke&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(ma(t,0),Rr(t,De,un,!1)),Pa(t,a),(!(Be&2)||t!==Ke)&&(t===Ke&&(!(Be&2)&&(pi|=a),ht===4&&Rr(t,De,un,!1)),Ln(t))}function Vb(t,r,a){if(Be&6)throw Error(l(327));var u=!a&&(r&127)===0&&(r&t.expiredLanes)===0||Qa(t,r),f=u?NN(t,r):Wf(t,r,!0),p=u;do{if(f===0){ha&&!u&&Rr(t,r,0,!1);break}else{if(a=t.current.alternate,p&&!ON(a)){f=Wf(t,r,!1),p=!1;continue}if(f===2){if(p=r,t.errorRecoveryDisabledLanes&p)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){r=v;e:{var S=t;f=Ol;var T=S.current.memoizedState.isDehydrated;if(T&&(ma(S,v).flags|=256),v=Wf(S,v,!1),v!==2){if(Gf&&!T){S.errorRecoveryDisabledLanes|=p,pi|=p,f=4;break e}p=Jt,Jt=f,p!==null&&(Jt===null?Jt=p:Jt.push.apply(Jt,p))}f=v}if(p=!1,f!==2)continue}}if(f===1){ma(t,0),Rr(t,r,0,!0);break}e:{switch(u=t,p=f,p){case 0:case 1:throw Error(l(345));case 4:if((r&4194048)!==r)break;case 6:Rr(u,r,un,!Cr);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((r&62914560)===r&&(f=mo+300-Zt(),10<f)){if(Rr(u,r,un,!Cr),ku(u,0,!0)!==0)break e;lr=r,u.timeoutHandle=S0(Yb.bind(null,u,a,Jt,yo,Ff,r,un,pi,pa,Cr,p,"Throttled",-0,0),f);break e}Yb(u,a,Jt,yo,Ff,r,un,pi,pa,Cr,p,null,-0,0)}}break}while(!0);Ln(t)}function Yb(t,r,a,u,f,p,v,S,T,j,q,G,U,I){if(t.timeoutHandle=-1,G=r.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Zb(r,p,G);var le=(p&62914560)===p?mo-Zt():(p&4194048)===p?Hb-Zt():0;if(le=pD(G,le),le!==null){lr=p,t.cancelPendingCommit=le(Wb.bind(null,t,r,p,a,u,f,v,S,T,q,G,null,U,I)),Rr(t,p,v,!j);return}}Wb(t,r,p,a,u,f,v,S,T)}function ON(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var f=a[u],p=f.getSnapshot;f=f.value;try{if(!tn(p(),f))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Rr(t,r,a,u){r&=~Xf,r&=~pi,t.suspendedLanes|=r,t.pingedLanes&=~r,u&&(t.warmLanes|=r),u=t.expirationTimes;for(var f=r;0<f;){var p=31-Pe(f),v=1<<p;u[p]=-1,f&=~v}a!==0&&ty(t,a,r)}function vo(){return Be&6?!0:(Nl(0),!1)}function Kf(){if(Oe!==null){if($e===0)var t=Oe.return;else t=Oe,Jn=ii=null,df(t),aa=null,pl=0,t=Oe;for(;t!==null;)xb(t.alternate,t),t=t.return;Oe=null}}function ma(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,JN(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),lr=0,Kf(),Ke=t,Oe=a=Xn(t.current,null),De=r,$e=0,ln=null,Cr=!1,ha=Qa(t,r),Gf=!1,pa=un=Xf=pi=Nr=ht=0,Jt=Ol=null,Ff=!1,r&8&&(r|=r&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=r;0<u;){var f=31-Pe(u),p=1<<f;r|=t[f],u&=~p}return ar=r,Lu(),a}function Gb(t,r){Ee=null,L.H=Sl,r===ia||r===Gu?(r=ov(),$e=3):r===tf?(r=ov(),$e=4):$e=r===Cf?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ln=r,Oe===null&&(ht=1,lo(t,gn(r,t.current)))}function Xb(){var t=rn.current;return t===null?!0:(De&4194048)===De?_n===null:(De&62914560)===De||De&536870912?t===_n:!1}function Fb(){var t=L.H;return L.H=Sl,t===null?Sl:t}function Jb(){var t=L.A;return L.A=TN,t}function bo(){ht=4,Cr||(De&4194048)!==De&&rn.current!==null||(ha=!0),!(Nr&134217727)&&!(pi&134217727)||Ke===null||Rr(Ke,De,un,!1)}function Wf(t,r,a){var u=Be;Be|=2;var f=Fb(),p=Jb();(Ke!==t||De!==r)&&(yo=null,ma(t,r)),r=!1;var v=ht;e:do try{if($e!==0&&Oe!==null){var S=Oe,T=ln;switch($e){case 8:Kf(),v=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(r=!0);var j=$e;if($e=0,ln=null,ga(t,S,T,j),a&&ha){v=0;break e}break;default:j=$e,$e=0,ln=null,ga(t,S,T,j)}}CN(),v=ht;break}catch(q){Gb(t,q)}while(!0);return r&&t.shellSuspendCounter++,Jn=ii=null,Be=u,L.H=f,L.A=p,Oe===null&&(Ke=null,De=0,Lu()),v}function CN(){for(;Oe!==null;)Qb(Oe)}function NN(t,r){var a=Be;Be|=2;var u=Fb(),f=Jb();Ke!==t||De!==r?(yo=null,go=Zt()+500,ma(t,r)):ha=Qa(t,r);e:do try{if($e!==0&&Oe!==null){r=Oe;var p=ln;t:switch($e){case 1:$e=0,ln=null,ga(t,r,p,1);break;case 2:case 9:if(lv(p)){$e=0,ln=null,Pb(r);break}r=function(){$e!==2&&$e!==9||Ke!==t||($e=7),Ln(t)},p.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:lv(p)?($e=0,ln=null,Pb(r)):($e=0,ln=null,ga(t,r,p,7));break;case 5:var v=null;switch(Oe.tag){case 26:v=Oe.memoizedState;case 5:case 27:var S=Oe;if(v?U0(v):S.stateNode.complete){$e=0,ln=null;var T=S.sibling;if(T!==null)Oe=T;else{var j=S.return;j!==null?(Oe=j,_o(j)):Oe=null}break t}}$e=0,ln=null,ga(t,r,p,5);break;case 6:$e=0,ln=null,ga(t,r,p,6);break;case 8:Kf(),ht=6;break e;default:throw Error(l(462))}}DN();break}catch(q){Gb(t,q)}while(!0);return Jn=ii=null,L.H=u,L.A=f,Be=a,Oe!==null?0:(Ke=null,De=0,Lu(),ht)}function DN(){for(;Oe!==null&&!fc();)Qb(Oe)}function Qb(t){var r=_b(t.alternate,t,ar);t.memoizedProps=t.pendingProps,r===null?_o(t):Oe=r}function Pb(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=db(a,r,r.pendingProps,r.type,void 0,De);break;case 11:r=db(a,r,r.pendingProps,r.type.render,r.ref,De);break;case 5:df(r);default:xb(a,r),r=Oe=Jy(r,ar),r=_b(a,r,ar)}t.memoizedProps=t.pendingProps,r===null?_o(t):Oe=r}function ga(t,r,a,u){Jn=ii=null,df(r),aa=null,pl=0;var f=r.return;try{if(_N(t,f,r,a,De)){ht=1,lo(t,gn(a,t.current)),Oe=null;return}}catch(p){if(f!==null)throw Oe=f,p;ht=1,lo(t,gn(a,t.current)),Oe=null;return}r.flags&32768?(Ue||u===1?t=!0:ha||De&536870912?t=!1:(Cr=t=!0,(u===2||u===9||u===3||u===6)&&(u=rn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Kb(r,t)):_o(r)}function _o(t){var r=t;do{if(r.flags&32768){Kb(r,Cr);return}t=r.return;var a=EN(r.alternate,r,ar);if(a!==null){Oe=a;return}if(r=r.sibling,r!==null){Oe=r;return}Oe=r=t}while(r!==null);ht===0&&(ht=5)}function Kb(t,r){do{var a=zN(t.alternate,t);if(a!==null){a.flags&=32767,Oe=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){Oe=t;return}Oe=t=a}while(t!==null);ht=6,Oe=null}function Wb(t,r,a,u,f,p,v,S,T){t.cancelPendingCommit=null;do So();while(St!==0);if(Be&6)throw Error(l(327));if(r!==null){if(r===t.current)throw Error(l(177));if(p=r.lanes|r.childLanes,p|=Bc,f4(t,a,p,v,S,T),t===Ke&&(Oe=Ke=null,De=0),da=r,Mr=t,lr=a,Jf=p,Qf=f,qb=u,r.subtreeFlags&10256||r.flags&10256?(t.callbackNode=null,t.callbackPriority=0,UN(_e,function(){return i0(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(r.flags&13878)!==0,r.subtreeFlags&13878||u){u=L.T,L.T=null,f=J.p,J.p=2,v=Be,Be|=4;try{wN(t,r,a)}finally{Be=v,J.p=f,L.T=u}}St=1,e0(),t0(),n0()}}function e0(){if(St===1){St=0;var t=Mr,r=da,a=(r.flags&13878)!==0;if(r.subtreeFlags&13878||a){a=L.T,L.T=null;var u=J.p;J.p=2;var f=Be;Be|=4;try{Rb(r,t);var p=fh,v=By(t.containerInfo),S=p.focusedElem,T=p.selectionRange;if(v!==S&&S&&S.ownerDocument&&Iy(S.ownerDocument.documentElement,S)){if(T!==null&&jc(S)){var j=T.start,q=T.end;if(q===void 0&&(q=j),"selectionStart"in S)S.selectionStart=j,S.selectionEnd=Math.min(q,S.value.length);else{var G=S.ownerDocument||document,U=G&&G.defaultView||window;if(U.getSelection){var I=U.getSelection(),le=S.textContent.length,ye=Math.min(T.start,le),Fe=T.end===void 0?ye:Math.min(T.end,le);!I.extend&&ye>Fe&&(v=Fe,Fe=ye,ye=v);var N=Ly(S,ye),O=Ly(S,Fe);if(N&&O&&(I.rangeCount!==1||I.anchorNode!==N.node||I.anchorOffset!==N.offset||I.focusNode!==O.node||I.focusOffset!==O.offset)){var M=G.createRange();M.setStart(N.node,N.offset),I.removeAllRanges(),ye>Fe?(I.addRange(M),I.extend(O.node,O.offset)):(M.setEnd(O.node,O.offset),I.addRange(M))}}}}for(G=[],I=S;I=I.parentNode;)I.nodeType===1&&G.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<G.length;S++){var Y=G[S];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Mo=!!ch,fh=ch=null}finally{Be=f,J.p=u,L.T=a}}t.current=r,St=2}}function t0(){if(St===2){St=0;var t=Mr,r=da,a=(r.flags&8772)!==0;if(r.subtreeFlags&8772||a){a=L.T,L.T=null;var u=J.p;J.p=2;var f=Be;Be|=4;try{Ob(t,r.alternate,r)}finally{Be=f,J.p=u,L.T=a}}St=3}}function n0(){if(St===4||St===3){St=0,hc();var t=Mr,r=da,a=lr,u=qb;r.subtreeFlags&10256||r.flags&10256?St=5:(St=0,da=Mr=null,r0(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Dr=null),gc(a),r=r.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Lt,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=L.T,f=J.p,J.p=2,L.T=null;try{for(var p=t.onRecoverableError,v=0;v<u.length;v++){var S=u[v];p(S.value,{componentStack:S.stack})}}finally{L.T=r,J.p=f}}lr&3&&So(),Ln(t),f=t.pendingLanes,a&261930&&f&42?t===Pf?Cl++:(Cl=0,Pf=t):Cl=0,Nl(0)}}function r0(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,fl(r)))}function So(){return e0(),t0(),n0(),i0()}function i0(){if(St!==5)return!1;var t=Mr,r=Jf;Jf=0;var a=gc(lr),u=L.T,f=J.p;try{J.p=32>a?32:a,L.T=null,a=Qf,Qf=null;var p=Mr,v=lr;if(St=0,da=Mr=null,lr=0,Be&6)throw Error(l(331));var S=Be;if(Be|=4,Ib(p.current),Ub(p,p.current,v,a),Be=S,Nl(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Lt,p)}catch{}return!0}finally{J.p=f,L.T=u,r0(t,r)}}function a0(t,r,a){r=gn(a,r),r=Of(t.stateNode,r,2),t=kr(t,r,2),t!==null&&(Pa(t,2),Ln(t))}function Ve(t,r,a){if(t.tag===3)a0(t,t,a);else for(;r!==null;){if(r.tag===3){a0(r,t,a);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Dr===null||!Dr.has(u))){t=gn(a,t),a=lb(2),u=kr(r,a,2),u!==null&&(ub(a,u,r,t),Pa(u,2),Ln(u));break}}r=r.return}}function eh(t,r,a){var u=t.pingCache;if(u===null){u=t.pingCache=new AN;var f=new Set;u.set(r,f)}else f=u.get(r),f===void 0&&(f=new Set,u.set(r,f));f.has(a)||(Gf=!0,f.add(a),t=MN.bind(null,t,r,a),r.then(t,t))}function MN(t,r,a){var u=t.pingCache;u!==null&&u.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Ke===t&&(De&a)===a&&(ht===4||ht===3&&(De&62914560)===De&&300>Zt()-mo?!(Be&2)&&ma(t,0):Xf|=a,pa===De&&(pa=0)),Ln(t)}function l0(t,r){r===0&&(r=ey()),t=ti(t,r),t!==null&&(Pa(t,r),Ln(t))}function RN(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),l0(t,a)}function jN(t,r){var a=0;switch(t.tag){case 31:case 13:var u=t.stateNode,f=t.memoizedState;f!==null&&(a=f.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(l(314))}u!==null&&u.delete(r),l0(t,a)}function UN(t,r){return Zi(t,r)}var xo=null,ya=null,th=!1,Eo=!1,nh=!1,jr=0;function Ln(t){t!==ya&&t.next===null&&(ya===null?xo=ya=t:ya=ya.next=t),Eo=!0,th||(th=!0,LN())}function Nl(t,r){if(!nh&&Eo){nh=!0;do for(var a=!1,u=xo;u!==null;){if(t!==0){var f=u.pendingLanes;if(f===0)var p=0;else{var v=u.suspendedLanes,S=u.pingedLanes;p=(1<<31-Pe(42|t)+1)-1,p&=f&~(v&~S),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,c0(u,p))}else p=De,p=ku(u,u===Ke?p:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),!(p&3)||Qa(u,p)||(a=!0,c0(u,p));u=u.next}while(a);nh=!1}}function ZN(){u0()}function u0(){Eo=th=!1;var t=0;jr!==0&&FN()&&(t=jr);for(var r=Zt(),a=null,u=xo;u!==null;){var f=u.next,p=o0(u,r);p===0?(u.next=null,a===null?xo=f:a.next=f,f===null&&(ya=a)):(a=u,(t!==0||p&3)&&(Eo=!0)),u=f}St!==0&&St!==5||Nl(t),jr!==0&&(jr=0)}function o0(t,r){for(var a=t.suspendedLanes,u=t.pingedLanes,f=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var v=31-Pe(p),S=1<<v,T=f[v];T===-1?(!(S&a)||S&u)&&(f[v]=c4(S,r)):T<=r&&(t.expiredLanes|=S),p&=~S}if(r=Ke,a=De,a=ku(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,a===0||t===r&&($e===2||$e===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&Ja(u),t.callbackNode=null,t.callbackPriority=0;if(!(a&3)||Qa(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(u!==null&&Ja(u),gc(a)){case 2:case 8:a=W;break;case 32:a=_e;break;case 268435456:a=He;break;default:a=_e}return u=s0.bind(null,t),a=Zi(a,u),t.callbackPriority=r,t.callbackNode=a,r}return u!==null&&u!==null&&Ja(u),t.callbackPriority=2,t.callbackNode=null,2}function s0(t,r){if(St!==0&&St!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(So()&&t.callbackNode!==a)return null;var u=De;return u=ku(t,t===Ke?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(Vb(t,u,r),o0(t,Zt()),t.callbackNode!=null&&t.callbackNode===a?s0.bind(null,t):null)}function c0(t,r){if(So())return null;Vb(t,r,!0)}function LN(){QN(function(){Be&6?Zi(V,ZN):u0()})}function rh(){if(jr===0){var t=na;t===0&&(t=Eu,Eu<<=1,!(Eu&261888)&&(Eu=256)),jr=t}return jr}function f0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Cu(""+t)}function h0(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function IN(t,r,a,u,f){if(r==="submit"&&a&&a.stateNode===f){var p=f0((f[Vt]||null).action),v=u.submitter;v&&(r=(r=v[Vt]||null)?f0(r.formAction):v.getAttribute("formAction"),r!==null&&(p=r,v=null));var S=new Ru("action","action",null,u,f);t.push({event:S,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(jr!==0){var T=v?h0(f,v):new FormData(f);Ef(a,{pending:!0,data:T,method:f.method,action:p},null,T)}}else typeof p=="function"&&(S.preventDefault(),T=v?h0(f,v):new FormData(f),Ef(a,{pending:!0,data:T,method:f.method,action:p},p,T))},currentTarget:f}]})}}for(var ih=0;ih<Ic.length;ih++){var ah=Ic[ih],BN=ah.toLowerCase(),HN=ah[0].toUpperCase()+ah.slice(1);Tn(BN,"on"+HN)}Tn($y,"onAnimationEnd"),Tn(Vy,"onAnimationIteration"),Tn(Yy,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(rN,"onTransitionRun"),Tn(iN,"onTransitionStart"),Tn(aN,"onTransitionCancel"),Tn(Gy,"onTransitionEnd"),qi("onMouseEnter",["mouseout","mouseover"]),qi("onMouseLeave",["mouseout","mouseover"]),qi("onPointerEnter",["pointerout","pointerover"]),qi("onPointerLeave",["pointerout","pointerover"]),Pr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),qN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function p0(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var u=t[a],f=u.event;u=u.listeners;e:{var p=void 0;if(r)for(var v=u.length-1;0<=v;v--){var S=u[v],T=S.instance,j=S.currentTarget;if(S=S.listener,T!==p&&f.isPropagationStopped())break e;p=S,f.currentTarget=j;try{p(f)}catch(q){Zu(q)}f.currentTarget=null,p=T}else for(v=0;v<u.length;v++){if(S=u[v],T=S.instance,j=S.currentTarget,S=S.listener,T!==p&&f.isPropagationStopped())break e;p=S,f.currentTarget=j;try{p(f)}catch(q){Zu(q)}f.currentTarget=null,p=T}}}}function Ce(t,r){var a=r[yc];a===void 0&&(a=r[yc]=new Set);var u=t+"__bubble";a.has(u)||(d0(r,t,2,!1),a.add(u))}function lh(t,r,a){var u=0;r&&(u|=4),d0(a,t,u,r)}var zo="_reactListening"+Math.random().toString(36).slice(2);function uh(t){if(!t[zo]){t[zo]=!0,uy.forEach(function(a){a!=="selectionchange"&&(qN.has(a)||lh(a,!1,t),lh(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[zo]||(r[zo]=!0,lh("selectionchange",!1,r))}}function d0(t,r,a,u){switch($0(r)){case 2:var f=gD;break;case 8:f=yD;break;default:f=xh}a=f.bind(null,r,a,t),f=void 0,!kc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),u?f!==void 0?t.addEventListener(r,a,{capture:!0,passive:f}):t.addEventListener(r,a,!0):f!==void 0?t.addEventListener(r,a,{passive:f}):t.addEventListener(r,a,!1)}function oh(t,r,a,u,f){var p=u;if(!(r&1)&&!(r&2)&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var S=u.stateNode.containerInfo;if(S===f)break;if(v===4)for(v=u.return;v!==null;){var T=v.tag;if((T===3||T===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;S!==null;){if(v=Ii(S),v===null)return;if(T=v.tag,T===5||T===6||T===26||T===27){u=p=v;continue e}S=S.parentNode}}u=u.return}by(function(){var j=p,q=zc(a),G=[];e:{var U=Xy.get(t);if(U!==void 0){var I=Ru,le=t;switch(t){case"keypress":if(Du(a)===0)break e;case"keydown":case"keyup":I=j4;break;case"focusin":le="focus",I=Cc;break;case"focusout":le="blur",I=Cc;break;case"beforeblur":case"afterblur":I=Cc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=xy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=E4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=L4;break;case $y:case Vy:case Yy:I=k4;break;case Gy:I=B4;break;case"scroll":case"scrollend":I=S4;break;case"wheel":I=q4;break;case"copy":case"cut":case"paste":I=A4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=zy;break;case"toggle":case"beforetoggle":I=V4}var ye=(r&4)!==0,Fe=!ye&&(t==="scroll"||t==="scrollend"),N=ye?U!==null?U+"Capture":null:U;ye=[];for(var O=j,M;O!==null;){var Y=O;if(M=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||M===null||N===null||(Y=el(O,N),Y!=null&&ye.push(Ml(O,Y,M))),Fe)break;O=O.return}0<ye.length&&(U=new I(U,le,null,a,q),G.push({event:U,listeners:ye}))}}if(!(r&7)){e:{if(U=t==="mouseover"||t==="pointerover",I=t==="mouseout"||t==="pointerout",U&&a!==Ec&&(le=a.relatedTarget||a.fromElement)&&(Ii(le)||le[Li]))break e;if((I||U)&&(U=q.window===q?q:(U=q.ownerDocument)?U.defaultView||U.parentWindow:window,I?(le=a.relatedTarget||a.toElement,I=j,le=le?Ii(le):null,le!==null&&(Fe=s(le),ye=le.tag,le!==Fe||ye!==5&&ye!==27&&ye!==6)&&(le=null)):(I=null,le=j),I!==le)){if(ye=xy,Y="onMouseLeave",N="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(ye=zy,Y="onPointerLeave",N="onPointerEnter",O="pointer"),Fe=I==null?U:Wa(I),M=le==null?U:Wa(le),U=new ye(Y,O+"leave",I,a,q),U.target=Fe,U.relatedTarget=M,Y=null,Ii(q)===j&&(ye=new ye(N,O+"enter",le,a,q),ye.target=M,ye.relatedTarget=Fe,Y=ye),Fe=Y,I&&le)t:{for(ye=$N,N=I,O=le,M=0,Y=N;Y;Y=ye(Y))M++;Y=0;for(var de=O;de;de=ye(de))Y++;for(;0<M-Y;)N=ye(N),M--;for(;0<Y-M;)O=ye(O),Y--;for(;M--;){if(N===O||O!==null&&N===O.alternate){ye=N;break t}N=ye(N),O=ye(O)}ye=null}else ye=null;I!==null&&m0(G,U,I,ye,!1),le!==null&&Fe!==null&&m0(G,Fe,le,ye,!0)}}e:{if(U=j?Wa(j):window,I=U.nodeName&&U.nodeName.toLowerCase(),I==="select"||I==="input"&&U.type==="file")var Le=Dy;else if(Cy(U))if(My)Le=eN;else{Le=K4;var ce=P4}else I=U.nodeName,!I||I.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?j&&xc(j.elementType)&&(Le=Dy):Le=W4;if(Le&&(Le=Le(t,j))){Ny(G,Le,a,q);break e}ce&&ce(t,U,j),t==="focusout"&&j&&U.type==="number"&&j.memoizedProps.value!=null&&Sc(U,"number",U.value)}switch(ce=j?Wa(j):window,t){case"focusin":(Cy(ce)||ce.contentEditable==="true")&&(Fi=ce,Uc=j,ol=null);break;case"focusout":ol=Uc=Fi=null;break;case"mousedown":Zc=!0;break;case"contextmenu":case"mouseup":case"dragend":Zc=!1,Hy(G,a,q);break;case"selectionchange":if(nN)break;case"keydown":case"keyup":Hy(G,a,q)}var we;if(Dc)e:{switch(t){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else Xi?Ay(t,a)&&(Me="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Me="onCompositionStart");Me&&(wy&&a.locale!=="ko"&&(Xi||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&Xi&&(we=_y()):(br=q,Tc="value"in br?br.value:br.textContent,Xi=!0)),ce=wo(j,Me),0<ce.length&&(Me=new Ey(Me,t,null,a,q),G.push({event:Me,listeners:ce}),we?Me.data=we:(we=Oy(a),we!==null&&(Me.data=we)))),(we=G4?X4(t,a):F4(t,a))&&(Me=wo(j,"onBeforeInput"),0<Me.length&&(ce=new Ey("onBeforeInput","beforeinput",null,a,q),G.push({event:ce,listeners:Me}),ce.data=we)),IN(G,t,j,a,q)}p0(G,r)})}function Ml(t,r,a){return{instance:t,listener:r,currentTarget:a}}function wo(t,r){for(var a=r+"Capture",u=[];t!==null;){var f=t,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=el(t,a),f!=null&&u.unshift(Ml(t,f,p)),f=el(t,r),f!=null&&u.push(Ml(t,f,p))),t.tag===3)return u;t=t.return}return[]}function $N(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function m0(t,r,a,u,f){for(var p=r._reactName,v=[];a!==null&&a!==u;){var S=a,T=S.alternate,j=S.stateNode;if(S=S.tag,T!==null&&T===u)break;S!==5&&S!==26&&S!==27||j===null||(T=j,f?(j=el(a,p),j!=null&&v.unshift(Ml(a,j,T))):f||(j=el(a,p),j!=null&&v.push(Ml(a,j,T)))),a=a.return}v.length!==0&&t.push({event:r,listeners:v})}var VN=/\r\n?/g,YN=/\u0000|\uFFFD/g;function g0(t){return(typeof t=="string"?t:""+t).replace(VN,`
|
|
49
|
+
`).replace(YN,"")}function y0(t,r){return r=g0(r),g0(t)===r}function Xe(t,r,a,u,f,p){switch(a){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Vi(t,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Vi(t,""+u);break;case"className":Au(t,"class",u);break;case"tabIndex":Au(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Au(t,a,u);break;case"style":yy(t,u,p);break;case"data":if(r!=="object"){Au(t,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=Cu(""+u),t.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(a,"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 p=="function"&&(a==="formAction"?(r!=="input"&&Xe(t,r,"name",f.name,f,null),Xe(t,r,"formEncType",f.formEncType,f,null),Xe(t,r,"formMethod",f.formMethod,f,null),Xe(t,r,"formTarget",f.formTarget,f,null)):(Xe(t,r,"encType",f.encType,f,null),Xe(t,r,"method",f.method,f,null),Xe(t,r,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=Cu(""+u),t.setAttribute(a,u);break;case"onClick":u!=null&&(t.onclick=Yn);break;case"onScroll":u!=null&&Ce("scroll",t);break;case"onScrollEnd":u!=null&&Ce("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}a=Cu(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""+u):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":u===!0?t.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,u):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(a,u):t.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(a):t.setAttribute(a,u);break;case"popover":Ce("beforetoggle",t),Ce("toggle",t),Tu(t,"popover",u);break;case"xlinkActuate":Vn(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Vn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Vn(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Vn(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Vn(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Vn(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Vn(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Vn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Vn(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Tu(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=b4.get(a)||a,Tu(t,a,u))}}function sh(t,r,a,u,f,p){switch(a){case"style":yy(t,u,p);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof u=="string"?Vi(t,u):(typeof u=="number"||typeof u=="bigint")&&Vi(t,""+u);break;case"onScroll":u!=null&&Ce("scroll",t);break;case"onScrollEnd":u!=null&&Ce("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!oy.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),r=a.slice(2,f?a.length-7:void 0),p=t[Vt]||null,p=p!=null?p[a]:null,typeof p=="function"&&t.removeEventListener(r,p,f),typeof u=="function")){typeof p!="function"&&p!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,u,f);break e}a in t?t[a]=u:u===!0?t.setAttribute(a,""):Tu(t,a,u)}}}function At(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",t),Ce("load",t);var u=!1,f=!1,p;for(p in a)if(a.hasOwnProperty(p)){var v=a[p];if(v!=null)switch(p){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Xe(t,r,p,v,a,null)}}f&&Xe(t,r,"srcSet",a.srcSet,a,null),u&&Xe(t,r,"src",a.src,a,null);return;case"input":Ce("invalid",t);var S=p=v=f=null,T=null,j=null;for(u in a)if(a.hasOwnProperty(u)){var q=a[u];if(q!=null)switch(u){case"name":f=q;break;case"type":v=q;break;case"checked":T=q;break;case"defaultChecked":j=q;break;case"value":p=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(l(137,r));break;default:Xe(t,r,u,q,a,null)}}py(t,p,S,T,j,v,f,!1);return;case"select":Ce("invalid",t),u=v=p=null;for(f in a)if(a.hasOwnProperty(f)&&(S=a[f],S!=null))switch(f){case"value":p=S;break;case"defaultValue":v=S;break;case"multiple":u=S;default:Xe(t,r,f,S,a,null)}r=p,a=v,t.multiple=!!u,r!=null?$i(t,!!u,r,!1):a!=null&&$i(t,!!u,a,!0);return;case"textarea":Ce("invalid",t),p=f=u=null;for(v in a)if(a.hasOwnProperty(v)&&(S=a[v],S!=null))switch(v){case"value":u=S;break;case"defaultValue":f=S;break;case"children":p=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:Xe(t,r,v,S,a,null)}my(t,u,f,p);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(u=a[T],u!=null))switch(T){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Xe(t,r,T,u,a,null)}return;case"dialog":Ce("beforetoggle",t),Ce("toggle",t),Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":Ce("load",t);break;case"video":case"audio":for(u=0;u<Dl.length;u++)Ce(Dl[u],t);break;case"image":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"embed":case"source":case"link":Ce("error",t),Ce("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in a)if(a.hasOwnProperty(j)&&(u=a[j],u!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,r));default:Xe(t,r,j,u,a,null)}return;default:if(xc(r)){for(q in a)a.hasOwnProperty(q)&&(u=a[q],u!==void 0&&sh(t,r,q,u,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(u=a[S],u!=null&&Xe(t,r,S,u,a,null))}function GN(t,r,a,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,v=null,S=null,T=null,j=null,q=null;for(I in a){var G=a[I];if(a.hasOwnProperty(I)&&G!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":T=G;default:u.hasOwnProperty(I)||Xe(t,r,I,null,u,G)}}for(var U in u){var I=u[U];if(G=a[U],u.hasOwnProperty(U)&&(I!=null||G!=null))switch(U){case"type":p=I;break;case"name":f=I;break;case"checked":j=I;break;case"defaultChecked":q=I;break;case"value":v=I;break;case"defaultValue":S=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(l(137,r));break;default:I!==G&&Xe(t,r,U,I,u,G)}}_c(t,v,S,T,j,q,p,f);return;case"select":I=v=S=U=null;for(p in a)if(T=a[p],a.hasOwnProperty(p)&&T!=null)switch(p){case"value":break;case"multiple":I=T;default:u.hasOwnProperty(p)||Xe(t,r,p,null,u,T)}for(f in u)if(p=u[f],T=a[f],u.hasOwnProperty(f)&&(p!=null||T!=null))switch(f){case"value":U=p;break;case"defaultValue":S=p;break;case"multiple":v=p;default:p!==T&&Xe(t,r,f,p,u,T)}r=S,a=v,u=I,U!=null?$i(t,!!a,U,!1):!!u!=!!a&&(r!=null?$i(t,!!a,r,!0):$i(t,!!a,a?[]:"",!1));return;case"textarea":I=U=null;for(S in a)if(f=a[S],a.hasOwnProperty(S)&&f!=null&&!u.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Xe(t,r,S,null,u,f)}for(v in u)if(f=u[v],p=a[v],u.hasOwnProperty(v)&&(f!=null||p!=null))switch(v){case"value":U=f;break;case"defaultValue":I=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==p&&Xe(t,r,v,f,u,p)}dy(t,U,I);return;case"option":for(var le in a)if(U=a[le],a.hasOwnProperty(le)&&U!=null&&!u.hasOwnProperty(le))switch(le){case"selected":t.selected=!1;break;default:Xe(t,r,le,null,u,U)}for(T in u)if(U=u[T],I=a[T],u.hasOwnProperty(T)&&U!==I&&(U!=null||I!=null))switch(T){case"selected":t.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Xe(t,r,T,U,u,I)}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 ye in a)U=a[ye],a.hasOwnProperty(ye)&&U!=null&&!u.hasOwnProperty(ye)&&Xe(t,r,ye,null,u,U);for(j in u)if(U=u[j],I=a[j],u.hasOwnProperty(j)&&U!==I&&(U!=null||I!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,r));break;default:Xe(t,r,j,U,u,I)}return;default:if(xc(r)){for(var Fe in a)U=a[Fe],a.hasOwnProperty(Fe)&&U!==void 0&&!u.hasOwnProperty(Fe)&&sh(t,r,Fe,void 0,u,U);for(q in u)U=u[q],I=a[q],!u.hasOwnProperty(q)||U===I||U===void 0&&I===void 0||sh(t,r,q,U,u,I);return}}for(var N in a)U=a[N],a.hasOwnProperty(N)&&U!=null&&!u.hasOwnProperty(N)&&Xe(t,r,N,null,u,U);for(G in u)U=u[G],I=a[G],!u.hasOwnProperty(G)||U===I||U==null&&I==null||Xe(t,r,G,U,u,I)}function v0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function XN(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var f=a[u],p=f.transferSize,v=f.initiatorType,S=f.duration;if(p&&S&&v0(v)){for(v=0,S=f.responseEnd,u+=1;u<a.length;u++){var T=a[u],j=T.startTime;if(j>S)break;var q=T.transferSize,G=T.initiatorType;q&&v0(G)&&(T=T.responseEnd,v+=q*(T<S?1:(S-j)/(T-j)))}if(--u,r+=8*(p+v)/(f.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var ch=null,fh=null;function ko(t){return t.nodeType===9?t:t.ownerDocument}function b0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _0(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function hh(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var ph=null;function FN(){var t=window.event;return t&&t.type==="popstate"?t===ph?!1:(ph=t,!0):(ph=null,!1)}var S0=typeof setTimeout=="function"?setTimeout:void 0,JN=typeof clearTimeout=="function"?clearTimeout:void 0,x0=typeof Promise=="function"?Promise:void 0,QN=typeof queueMicrotask=="function"?queueMicrotask:typeof x0<"u"?function(t){return x0.resolve(null).then(t).catch(PN)}:S0;function PN(t){setTimeout(function(){throw t})}function Ur(t){return t==="head"}function E0(t,r){var a=r,u=0;do{var f=a.nextSibling;if(t.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(u===0){t.removeChild(f),Sa(r);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")Rl(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Rl(a);for(var p=a.firstChild;p;){var v=p.nextSibling,S=p.nodeName;p[Ka]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=v}}else a==="body"&&Rl(t.ownerDocument.body);a=f}while(a);Sa(r)}function z0(t,r){var a=t;t=0;do{var u=a.nextSibling;if(a.nodeType===1?r?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(r?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=u}while(a)}function dh(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":dh(a),vc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function KN(t,r,a,u){for(;t.nodeType===1;){var f=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Ka])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=Sn(t.nextSibling),t===null)break}return null}function WN(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Sn(t.nextSibling),t===null))return null;return t}function w0(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=Sn(t.nextSibling),t===null))return null;return t}function mh(t){return t.data==="$?"||t.data==="$~"}function gh(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function eD(t,r){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||a.readyState!=="loading")r();else{var u=function(){r(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function Sn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var yh=null;function k0(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(r===0)return Sn(t.nextSibling);r--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||r++}t=t.nextSibling}return null}function T0(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(r===0)return t;r--}else a!=="/$"&&a!=="/&"||r++}t=t.previousSibling}return null}function A0(t,r,a){switch(r=ko(a),t){case"html":if(t=r.documentElement,!t)throw Error(l(452));return t;case"head":if(t=r.head,!t)throw Error(l(453));return t;case"body":if(t=r.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Rl(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);vc(t)}var xn=new Map,O0=new Set;function To(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ur=J.d;J.d={f:tD,r:nD,D:rD,C:iD,L:aD,m:lD,X:oD,S:uD,M:sD};function tD(){var t=ur.f(),r=vo();return t||r}function nD(t){var r=Bi(t);r!==null&&r.tag===5&&r.type==="form"?Gv(r):ur.r(t)}var va=typeof document>"u"?null:document;function C0(t,r,a){var u=va;if(u&&typeof r=="string"&&r){var f=dn(r);f='link[rel="'+t+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),O0.has(f)||(O0.add(f),t={rel:t,crossOrigin:a,href:r},u.querySelector(f)===null&&(r=u.createElement("link"),At(r,"link",t),xt(r),u.head.appendChild(r)))}}function rD(t){ur.D(t),C0("dns-prefetch",t,null)}function iD(t,r){ur.C(t,r),C0("preconnect",t,r)}function aD(t,r,a){ur.L(t,r,a);var u=va;if(u&&t&&r){var f='link[rel="preload"][as="'+dn(r)+'"]';r==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+dn(a.imageSizes)+'"]')):f+='[href="'+dn(t)+'"]';var p=f;switch(r){case"style":p=ba(t);break;case"script":p=_a(t)}xn.has(p)||(t=g({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),xn.set(p,t),u.querySelector(f)!==null||r==="style"&&u.querySelector(jl(p))||r==="script"&&u.querySelector(Ul(p))||(r=u.createElement("link"),At(r,"link",t),xt(r),u.head.appendChild(r)))}}function lD(t,r){ur.m(t,r);var a=va;if(a&&t){var u=r&&typeof r.as=="string"?r.as:"script",f='link[rel="modulepreload"][as="'+dn(u)+'"][href="'+dn(t)+'"]',p=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=_a(t)}if(!xn.has(p)&&(t=g({rel:"modulepreload",href:t},r),xn.set(p,t),a.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ul(p)))return}u=a.createElement("link"),At(u,"link",t),xt(u),a.head.appendChild(u)}}}function uD(t,r,a){ur.S(t,r,a);var u=va;if(u&&t){var f=Hi(u).hoistableStyles,p=ba(t);r=r||"default";var v=f.get(p);if(!v){var S={loading:0,preload:null};if(v=u.querySelector(jl(p)))S.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":r},a),(a=xn.get(p))&&vh(t,a);var T=v=u.createElement("link");xt(T),At(T,"link",t),T._p=new Promise(function(j,q){T.onload=j,T.onerror=q}),T.addEventListener("load",function(){S.loading|=1}),T.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Ao(v,r,u)}v={type:"stylesheet",instance:v,count:1,state:S},f.set(p,v)}}}function oD(t,r){ur.X(t,r);var a=va;if(a&&t){var u=Hi(a).hoistableScripts,f=_a(t),p=u.get(f);p||(p=a.querySelector(Ul(f)),p||(t=g({src:t,async:!0},r),(r=xn.get(f))&&bh(t,r),p=a.createElement("script"),xt(p),At(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(f,p))}}function sD(t,r){ur.M(t,r);var a=va;if(a&&t){var u=Hi(a).hoistableScripts,f=_a(t),p=u.get(f);p||(p=a.querySelector(Ul(f)),p||(t=g({src:t,async:!0,type:"module"},r),(r=xn.get(f))&&bh(t,r),p=a.createElement("script"),xt(p),At(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(f,p))}}function N0(t,r,a,u){var f=(f=pe.current)?To(f):null;if(!f)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=ba(a.href),a=Hi(f).hoistableStyles,u=a.get(r),u||(u={type:"style",instance:null,count:0,state:null},a.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=ba(a.href);var p=Hi(f).hoistableStyles,v=p.get(t);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,v),(p=f.querySelector(jl(t)))&&!p._p&&(v.instance=p,v.state.loading=5),xn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xn.set(t,a),p||cD(f,t,a,v.state))),r&&u===null)throw Error(l(528,""));return v}if(r&&u!==null)throw Error(l(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=_a(a),a=Hi(f).hoistableScripts,u=a.get(r),u||(u={type:"script",instance:null,count:0,state:null},a.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function ba(t){return'href="'+dn(t)+'"'}function jl(t){return'link[rel="stylesheet"]['+t+"]"}function D0(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function cD(t,r,a,u){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=t.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),At(r,"link",a),xt(r),t.head.appendChild(r))}function _a(t){return'[src="'+dn(t)+'"]'}function Ul(t){return"script[async]"+t}function M0(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var u=t.querySelector('style[data-href~="'+dn(a.href)+'"]');if(u)return r.instance=u,xt(u),u;var f=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),xt(u),At(u,"style",f),Ao(u,a.precedence,t),r.instance=u;case"stylesheet":f=ba(a.href);var p=t.querySelector(jl(f));if(p)return r.state.loading|=4,r.instance=p,xt(p),p;u=D0(a),(f=xn.get(f))&&vh(u,f),p=(t.ownerDocument||t).createElement("link"),xt(p);var v=p;return v._p=new Promise(function(S,T){v.onload=S,v.onerror=T}),At(p,"link",u),r.state.loading|=4,Ao(p,a.precedence,t),r.instance=p;case"script":return p=_a(a.src),(f=t.querySelector(Ul(p)))?(r.instance=f,xt(f),f):(u=a,(f=xn.get(p))&&(u=g({},a),bh(u,f)),t=t.ownerDocument||t,f=t.createElement("script"),xt(f),At(f,"link",u),t.head.appendChild(f),r.instance=f);case"void":return null;default:throw Error(l(443,r.type))}else r.type==="stylesheet"&&!(r.state.loading&4)&&(u=r.instance,r.state.loading|=4,Ao(u,a.precedence,t));return r.instance}function Ao(t,r,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,p=f,v=0;v<u.length;v++){var S=u[v];if(S.dataset.precedence===r)p=S;else if(p!==f)break}p?p.parentNode.insertBefore(t,p.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function vh(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function bh(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var Oo=null;function R0(t,r,a){if(Oo===null){var u=new Map,f=Oo=new Map;f.set(a,u)}else f=Oo,u=f.get(a),u||(u=new Map,f.set(a,u));if(u.has(t))return u;for(u.set(t,null),a=a.getElementsByTagName(t),f=0;f<a.length;f++){var p=a[f];if(!(p[Ka]||p[zt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(r)||"";v=t+v;var S=u.get(v);S?S.push(p):u.set(v,[p])}}return u}function j0(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function fD(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function U0(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function hD(t,r,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&!(a.state.loading&4)){if(a.instance===null){var f=ba(u.href),p=r.querySelector(jl(f));if(p){r=p._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=Co.bind(t),r.then(t,t)),a.state.loading|=4,a.instance=p,xt(p);return}p=r.ownerDocument||r,u=D0(u),(f=xn.get(f))&&vh(u,f),p=p.createElement("link"),xt(p);var v=p;v._p=new Promise(function(S,T){v.onload=S,v.onerror=T}),At(p,"link",u),a.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,r),(r=a.state.preload)&&!(a.state.loading&3)&&(t.count++,a=Co.bind(t),r.addEventListener("load",a),r.addEventListener("error",a))}}var _h=0;function pD(t,r){return t.stylesheets&&t.count===0&&Do(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var u=setTimeout(function(){if(t.stylesheets&&Do(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+r);0<t.imgBytes&&_h===0&&(_h=62500*XN());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Do(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>_h?50:800)+r);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function Co(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Do(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var No=null;function Do(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,No=new Map,r.forEach(dD,t),No=null,Co.call(t))}function dD(t,r){if(!(r.state.loading&4)){var a=No.get(t);if(a)var u=a.get(null);else{a=new Map,No.set(t,a);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var v=f[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(a.set(v.dataset.precedence,v),u=v)}u&&a.set(null,u)}f=r.instance,v=f.getAttribute("data-precedence"),p=a.get(v)||u,p===u&&a.set(null,f),a.set(v,f),this.count++,u=Co.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),p?p.parentNode.insertBefore(f,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),r.state.loading|=4}}var Zl={$$typeof:w,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function mD(t,r,a,u,f,p,v,S,T){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.hiddenUpdates=dc(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Z0(t,r,a,u,f,p,v,S,T,j,q,G){return t=new mD(t,r,a,v,T,j,q,G,S),r=1,p===!0&&(r|=24),p=nn(3,null,null,r),t.current=p,p.stateNode=t,r=Kc(),r.refCount++,t.pooledCache=r,r.refCount++,p.memoizedState={element:u,isDehydrated:a,cache:r},nf(p),t}function L0(t){return t?(t=Pi,t):Pi}function I0(t,r,a,u,f,p){f=L0(f),u.context===null?u.context=f:u.pendingContext=f,u=wr(r),u.payload={element:a},p=p===void 0?null:p,p!==null&&(u.callback=p),a=kr(t,u,r),a!==null&&(Qt(a,t,r),ml(a,t,r))}function B0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Sh(t,r){B0(t,r),(t=t.alternate)&&B0(t,r)}function H0(t){if(t.tag===13||t.tag===31){var r=ti(t,67108864);r!==null&&Qt(r,t,67108864),Sh(t,67108864)}}function q0(t){if(t.tag===13||t.tag===31){var r=on();r=mc(r);var a=ti(t,r);a!==null&&Qt(a,t,r),Sh(t,r)}}var Mo=!0;function gD(t,r,a,u){var f=L.T;L.T=null;var p=J.p;try{J.p=2,xh(t,r,a,u)}finally{J.p=p,L.T=f}}function yD(t,r,a,u){var f=L.T;L.T=null;var p=J.p;try{J.p=8,xh(t,r,a,u)}finally{J.p=p,L.T=f}}function xh(t,r,a,u){if(Mo){var f=Eh(u);if(f===null)oh(t,r,u,Ro,a),V0(t,u);else if(bD(f,t,r,a,u))u.stopPropagation();else if(V0(t,u),r&4&&-1<vD.indexOf(t)){for(;f!==null;){var p=Bi(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=Qr(p.pendingLanes);if(v!==0){var S=p;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var T=1<<31-Pe(v);S.entanglements[1]|=T,v&=~T}Ln(p),!(Be&6)&&(go=Zt()+500,Nl(0))}}break;case 31:case 13:S=ti(p,2),S!==null&&Qt(S,p,2),vo(),Sh(p,2)}if(p=Eh(u),p===null&&oh(t,r,u,Ro,a),p===f)break;f=p}f!==null&&u.stopPropagation()}else oh(t,r,u,null,a)}}function Eh(t){return t=zc(t),zh(t)}var Ro=null;function zh(t){if(Ro=null,t=Ii(t),t!==null){var r=s(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=c(r),t!==null)return t;t=null}else if(a===31){if(t=h(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return Ro=t,null}function $0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pc()){case V:return 2;case W:return 8;case _e:case Ae:return 32;case He:return 268435456;default:return 32}default:return 32}}var wh=!1,Zr=null,Lr=null,Ir=null,Ll=new Map,Il=new Map,Br=[],vD="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 V0(t,r){switch(t){case"focusin":case"focusout":Zr=null;break;case"dragenter":case"dragleave":Lr=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":Ll.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Il.delete(r.pointerId)}}function Bl(t,r,a,u,f,p){return t===null||t.nativeEvent!==p?(t={blockedOn:r,domEventName:a,eventSystemFlags:u,nativeEvent:p,targetContainers:[f]},r!==null&&(r=Bi(r),r!==null&&H0(r)),t):(t.eventSystemFlags|=u,r=t.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),t)}function bD(t,r,a,u,f){switch(r){case"focusin":return Zr=Bl(Zr,t,r,a,u,f),!0;case"dragenter":return Lr=Bl(Lr,t,r,a,u,f),!0;case"mouseover":return Ir=Bl(Ir,t,r,a,u,f),!0;case"pointerover":var p=f.pointerId;return Ll.set(p,Bl(Ll.get(p)||null,t,r,a,u,f)),!0;case"gotpointercapture":return p=f.pointerId,Il.set(p,Bl(Il.get(p)||null,t,r,a,u,f)),!0}return!1}function Y0(t){var r=Ii(t.target);if(r!==null){var a=s(r);if(a!==null){if(r=a.tag,r===13){if(r=c(a),r!==null){t.blockedOn=r,ay(t.priority,function(){q0(a)});return}}else if(r===31){if(r=h(a),r!==null){t.blockedOn=r,ay(t.priority,function(){q0(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function jo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Eh(t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a);Ec=u,a.target.dispatchEvent(u),Ec=null}else return r=Bi(a),r!==null&&H0(r),t.blockedOn=a,!1;r.shift()}return!0}function G0(t,r,a){jo(t)&&a.delete(r)}function _D(){wh=!1,Zr!==null&&jo(Zr)&&(Zr=null),Lr!==null&&jo(Lr)&&(Lr=null),Ir!==null&&jo(Ir)&&(Ir=null),Ll.forEach(G0),Il.forEach(G0)}function Uo(t,r){t.blockedOn===r&&(t.blockedOn=null,wh||(wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_D)))}var Zo=null;function X0(t){Zo!==t&&(Zo=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zo===t&&(Zo=null);for(var r=0;r<t.length;r+=3){var a=t[r],u=t[r+1],f=t[r+2];if(typeof u!="function"){if(zh(u||a)===null)continue;break}var p=Bi(a);p!==null&&(t.splice(r,3),r-=3,Ef(p,{pending:!0,data:f,method:a.method,action:u},u,f))}}))}function Sa(t){function r(T){return Uo(T,t)}Zr!==null&&Uo(Zr,t),Lr!==null&&Uo(Lr,t),Ir!==null&&Uo(Ir,t),Ll.forEach(r),Il.forEach(r);for(var a=0;a<Br.length;a++){var u=Br[a];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Br.length&&(a=Br[0],a.blockedOn===null);)Y0(a),a.blockedOn===null&&Br.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var f=a[u],p=a[u+1],v=f[Vt]||null;if(typeof p=="function")v||X0(a);else if(v){var S=null;if(p&&p.hasAttribute("formAction")){if(f=p,v=p[Vt]||null)S=v.formAction;else if(zh(f)!==null)continue}else S=v.action;typeof S=="function"?a[u+1]=S:(a.splice(u,3),u-=3),X0(a)}}}function F0(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function r(){f!==null&&(f(),f=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),f!==null&&(f(),f=null)}}}function kh(t){this._internalRoot=t}Lo.prototype.render=kh.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(l(409));var a=r.current,u=on();I0(a,u,t,r,null,null)},Lo.prototype.unmount=kh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;I0(t.current,2,null,t,null,null),vo(),r[Li]=null}};function Lo(t){this._internalRoot=t}Lo.prototype.unstable_scheduleHydration=function(t){if(t){var r=iy();t={blockedOn:null,target:t,priority:r};for(var a=0;a<Br.length&&r!==0&&r<Br[a].priority;a++);Br.splice(a,0,t),a===0&&Y0(t)}};var J0=n.version;if(J0!=="19.2.4")throw Error(l(527,J0,"19.2.4"));J.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=d(r),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var SD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Io=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Io.isDisabled&&Io.supportsFiber)try{Lt=Io.inject(SD),_t=Io}catch{}}return Ea.createRoot=function(t,r){if(!o(t))throw Error(l(299));var a=!1,u="",f=nb,p=rb,v=ib;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(f=r.onUncaughtError),r.onCaughtError!==void 0&&(p=r.onCaughtError),r.onRecoverableError!==void 0&&(v=r.onRecoverableError)),r=Z0(t,1,!1,null,null,a,u,null,f,p,v,F0),t[Li]=r.current,uh(t),new kh(r)},Ea.hydrateRoot=function(t,r,a){if(!o(t))throw Error(l(299));var u=!1,f="",p=nb,v=rb,S=ib,T=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(v=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(T=a.formState)),r=Z0(t,1,!0,r,a??null,u,f,T,p,v,S,F0),r.context=L0(null),a=r.current,u=on(),u=mc(u),f=wr(u),f.callback=null,kr(a,f,u),a=u,r.current.lanes=a,Pa(r,a),Ln(r),t[Li]=r.current,uh(t),new Lo(r)},Ea.version="19.2.4",Ea}var Zh;function a1(){if(Zh)return Ho.exports;Zh=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Ho.exports=i1(),Ho.exports}var Lh=a1(),ke=Yo(),Ih="vercel.ai.error",l1=Symbol.for(Ih),Bh,Hh,Cn=class Q0 extends(Hh=Error,Bh=l1,Hh){constructor({name:n,message:i,cause:l}){super(i),this[Bh]=!0,this.name=n,this.cause=l}static isInstance(n){return Q0.hasMarker(n,Ih)}static hasMarker(n,i){const l=Symbol.for(i);return n!=null&&typeof n=="object"&&l in n&&typeof n[l]=="boolean"&&n[l]===!0}};function qh(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var $h="AI_InvalidArgumentError",Vh=`vercel.ai.error.${$h}`,u1=Symbol.for(Vh),Yh,Gh,o1=class extends(Gh=Cn,Yh=u1,Gh){constructor({message:e,cause:n,argument:i}){super({name:$h,message:e,cause:n}),this[Yh]=!0,this.argument=i}static isInstance(e){return Cn.hasMarker(e,Vh)}},Xh="AI_JSONParseError",Fh=`vercel.ai.error.${Xh}`,s1=Symbol.for(Fh),Jh,Qh,Ph=class extends(Qh=Cn,Jh=s1,Qh){constructor({text:e,cause:n}){super({name:Xh,message:`JSON parsing failed: Text: ${e}.
|
|
50
50
|
Error message: ${qh(n)}`,cause:n}),this[Jh]=!0,this.text=e}static isInstance(e){return Cn.hasMarker(e,Fh)}},Kh="AI_TypeValidationError",Wh=`vercel.ai.error.${Kh}`,c1=Symbol.for(Wh),ep,tp,di=class Th extends(tp=Cn,ep=c1,tp){constructor({value:n,cause:i,context:l}){let o="Type validation failed";if(l!=null&&l.field&&(o+=` for ${l.field}`),l!=null&&l.entityName||l!=null&&l.entityId){o+=" (";const s=[];l.entityName&&s.push(l.entityName),l.entityId&&s.push(`id: "${l.entityId}"`),o+=s.join(", "),o+=")"}super({name:Kh,message:`${o}: Value: ${JSON.stringify(n)}.
|
|
51
51
|
Error message: ${qh(i)}`,cause:i}),this[ep]=!0,this.value=n,this.context=l}static isInstance(n){return Cn.hasMarker(n,Wh)}static wrap({value:n,cause:i,context:l}){var o,s,c;return Th.isInstance(i)&&i.value===n&&((o=i.context)==null?void 0:o.field)===(l==null?void 0:l.field)&&((s=i.context)==null?void 0:s.entityName)===(l==null?void 0:l.entityName)&&((c=i.context)==null?void 0:c.entityId)===(l==null?void 0:l.entityId)?i:new Th({value:n,cause:i,context:l})}};function $(e,n,i){function l(h,m){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:m,constr:c,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),n(h,m);const d=c.prototype,y=Object.keys(d);for(let g=0;g<y.length;g++){const _=y[g];_ in h||(h[_]=d[_].bind(h))}}const o=(i==null?void 0:i.Parent)??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function c(h){var m;const d=i!=null&&i.Parent?new s:this;l(d,h),(m=d._zod).deferred??(m.deferred=[]);for(const y of d._zod.deferred)y();return d}return Object.defineProperty(c,"init",{value:l}),Object.defineProperty(c,Symbol.hasInstance,{value:h=>{var m,d;return i!=null&&i.Parent&&h instanceof i.Parent?!0:(d=(m=h==null?void 0:h._zod)==null?void 0:m.traits)==null?void 0:d.has(e)}}),Object.defineProperty(c,"name",{value:e}),c}class mi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class np extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const rp={};function or(e){return rp}function ip(e){const n=Object.values(e).filter(l=>typeof l=="number");return Object.entries(e).filter(([l,o])=>n.indexOf(+l)===-1).map(([l,o])=>o)}function Xo(e,n){return typeof n=="bigint"?n.toString():n}function Hl(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Fo(e){return e==null}function Jo(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function f1(e,n){const i=(e.toString().split(".")[1]||"").length,l=n.toString();let o=(l.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(l)){const m=l.match(/\d?e-(\d?)/);m!=null&&m[1]&&(o=Number.parseInt(m[1]))}const s=i>o?i:o,c=Number.parseInt(e.toFixed(s).replace(".","")),h=Number.parseInt(n.toFixed(s).replace(".",""));return c%h/10**s}const ap=Symbol("evaluating");function Re(e,n,i){let l;Object.defineProperty(e,n,{get(){if(l!==ap)return l===void 0&&(l=ap,l=i()),l},set(o){Object.defineProperty(e,n,{value:o})},configurable:!0})}function $r(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function sr(...e){const n={};for(const i of e){const l=Object.getOwnPropertyDescriptors(i);Object.assign(n,l)}return Object.defineProperties({},n)}function lp(e){return JSON.stringify(e)}function h1(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const up="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function za(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const p1=Hl(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function gi(e){if(za(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(za(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function op(e){return gi(e)?{...e}:Array.isArray(e)?[...e]:e}const d1=new Set(["string","number","symbol"]);function yi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cr(e,n,i){const l=new e._zod.constr(n??e._zod.def);return(!n||i!=null&&i.parent)&&(l._zod.parent=e),l}function oe(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function m1(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const g1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function y1(e,n){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=sr(e._zod.def,{get shape(){const c={};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(c[h]=i.shape[h])}return $r(this,"shape",c),c},checks:[]});return cr(e,s)}function v1(e,n){const i=e._zod.def,l=i.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=sr(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&delete c[h]}return $r(this,"shape",c),c},checks:[]});return cr(e,s)}function b1(e,n){if(!gi(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const s=e._zod.def.shape;for(const c in n)if(Object.getOwnPropertyDescriptor(s,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=sr(e._zod.def,{get shape(){const s={...e._zod.def.shape,...n};return $r(this,"shape",s),s}});return cr(e,o)}function _1(e,n){if(!gi(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=sr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n};return $r(this,"shape",l),l}});return cr(e,i)}function S1(e,n){const i=sr(e._zod.def,{get shape(){const l={...e._zod.def.shape,...n._zod.def.shape};return $r(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return cr(e,i)}function x1(e,n,i){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=sr(n._zod.def,{get shape(){const h=n._zod.def.shape,m={...h};if(i)for(const d in i){if(!(d in h))throw new Error(`Unrecognized key: "${d}"`);i[d]&&(m[d]=e?new e({type:"optional",innerType:h[d]}):h[d])}else for(const d in h)m[d]=e?new e({type:"optional",innerType:h[d]}):h[d];return $r(this,"shape",m),m},checks:[]});return cr(n,c)}function E1(e,n,i){const l=sr(n._zod.def,{get shape(){const o=n._zod.def.shape,s={...o};if(i)for(const c in i){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);i[c]&&(s[c]=new e({type:"nonoptional",innerType:o[c]}))}else for(const c in o)s[c]=new e({type:"nonoptional",innerType:o[c]});return $r(this,"shape",s),s}});return cr(n,l)}function vi(e,n=0){var i;if(e.aborted===!0)return!0;for(let l=n;l<e.issues.length;l++)if(((i=e.issues[l])==null?void 0:i.continue)!==!0)return!0;return!1}function bi(e,n){return n.map(i=>{var l;return(l=i).path??(l.path=[]),i.path.unshift(e),i})}function ql(e){return typeof e=="string"?e:e==null?void 0:e.message}function fr(e,n,i){var o,s,c,h,m,d;const l={...e,path:e.path??[]};if(!e.message){const y=ql((c=(s=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:s.error)==null?void 0:c.call(s,e))??ql((h=n==null?void 0:n.error)==null?void 0:h.call(n,e))??ql((m=i.customError)==null?void 0:m.call(i,e))??ql((d=i.localeError)==null?void 0:d.call(i,e))??"Invalid input";l.message=y}return delete l.inst,delete l.continue,n!=null&&n.reportInput||delete l.input,l}function Qo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function wa(...e){const[n,i,l]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:l}:{...n}}const sp=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,Xo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cp=$("$ZodError",sp),fp=$("$ZodError",sp,{Parent:Error});function z1(e,n=i=>i.message){const i={},l=[];for(const o of e.issues)o.path.length>0?(i[o.path[0]]=i[o.path[0]]||[],i[o.path[0]].push(n(o))):l.push(n(o));return{formErrors:l,fieldErrors:i}}function w1(e,n=i=>i.message){const i={_errors:[]},l=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>l({issues:c}));else if(s.code==="invalid_key")l({issues:s.issues});else if(s.code==="invalid_element")l({issues:s.issues});else if(s.path.length===0)i._errors.push(n(s));else{let c=i,h=0;for(;h<s.path.length;){const m=s.path[h];h===s.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(n(s))):c[m]=c[m]||{_errors:[]},c=c[m],h++}}};return l(e),i}const Po=e=>(n,i,l,o)=>{const s=l?Object.assign(l,{async:!1}):{async:!1},c=n._zod.run({value:i,issues:[]},s);if(c instanceof Promise)throw new mi;if(c.issues.length){const h=new((o==null?void 0:o.Err)??e)(c.issues.map(m=>fr(m,s,or())));throw up(h,o==null?void 0:o.callee),h}return c.value},Ko=e=>async(n,i,l,o)=>{const s=l?Object.assign(l,{async:!0}):{async:!0};let c=n._zod.run({value:i,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){const h=new((o==null?void 0:o.Err)??e)(c.issues.map(m=>fr(m,s,or())));throw up(h,o==null?void 0:o.callee),h}return c.value},$l=e=>(n,i,l)=>{const o=l?{...l,async:!1}:{async:!1},s=n._zod.run({value:i,issues:[]},o);if(s instanceof Promise)throw new mi;return s.issues.length?{success:!1,error:new(e??cp)(s.issues.map(c=>fr(c,o,or())))}:{success:!0,data:s.value}},k1=$l(fp),Vl=e=>async(n,i,l)=>{const o=l?Object.assign(l,{async:!0}):{async:!0};let s=n._zod.run({value:i,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(c=>fr(c,o,or())))}:{success:!0,data:s.value}},T1=Vl(fp),A1=e=>(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Po(e)(n,i,o)},O1=e=>(n,i,l)=>Po(e)(n,i,l),C1=e=>async(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Ko(e)(n,i,o)},N1=e=>async(n,i,l)=>Ko(e)(n,i,l),D1=e=>(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return $l(e)(n,i,o)},M1=e=>(n,i,l)=>$l(e)(n,i,l),R1=e=>async(n,i,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Vl(e)(n,i,o)},j1=e=>async(n,i,l)=>Vl(e)(n,i,l),U1=/^[cC][^\s-]{8,}$/,Z1=/^[0-9a-z]+$/,L1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,I1=/^[0-9a-vA-V]{20}$/,B1=/^[A-Za-z0-9]{27}$/,H1=/^[a-zA-Z0-9_-]{21}$/,q1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,$1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,hp=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,V1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Y1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function G1(){return new RegExp(Y1,"u")}const X1=/^(?:(?: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])$/,F1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,J1=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Q1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,P1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pp=/^[A-Za-z0-9_-]*$/,K1=/^\+[1-9]\d{6,14}$/,dp="(?:(?:\\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])))",W1=new RegExp(`^${dp}$`);function mp(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function e_(e){return new RegExp(`^${mp(e)}$`)}function t_(e){const n=mp({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${i.join("|")})`;return new RegExp(`^${dp}T(?:${l})$`)}const n_=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},r_=/^-?\d+$/,gp=/^-?\d+(?:\.\d+)?$/,i_=/^(?:true|false)$/i,a_=/^null$/i,l_=/^[^A-Z]*$/,u_=/^[^a-z]*$/,Bt=$("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),yp={number:"number",bigint:"bigint",object:"date"},vp=$("$ZodCheckLessThan",(e,n)=>{Bt.init(e,n);const i=yp[typeof n.value];e._zod.onattach.push(l=>{const o=l._zod.bag,s=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<s&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),e._zod.check=l=>{(n.inclusive?l.value<=n.value:l.value<n.value)||l.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),bp=$("$ZodCheckGreaterThan",(e,n)=>{Bt.init(e,n);const i=yp[typeof n.value];e._zod.onattach.push(l=>{const o=l._zod.bag,s=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>s&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),e._zod.check=l=>{(n.inclusive?l.value>=n.value:l.value>n.value)||l.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),o_=$("$ZodCheckMultipleOf",(e,n)=>{Bt.init(e,n),e._zod.onattach.push(i=>{var l;(l=i._zod.bag).multipleOf??(l.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):f1(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),s_=$("$ZodCheckNumberFormat",(e,n)=>{var c;Bt.init(e,n),n.format=n.format||"float64";const i=(c=n.format)==null?void 0:c.includes("int"),l=i?"int":"number",[o,s]=g1[n.format];e._zod.onattach.push(h=>{const m=h._zod.bag;m.format=n.format,m.minimum=o,m.maximum=s,i&&(m.pattern=r_)}),e._zod.check=h=>{const m=h.value;if(i){if(!Number.isInteger(m)){h.issues.push({expected:l,format:n.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?h.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!n.abort}):h.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:l,inclusive:!0,continue:!n.abort});return}}m<o&&h.issues.push({origin:"number",input:m,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!n.abort}),m>s&&h.issues.push({origin:"number",input:m,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!n.abort})}}),c_=$("$ZodCheckMaxLength",(e,n)=>{var i;Bt.init(e,n),(i=e._zod.def).when??(i.when=l=>{const o=l.value;return!Fo(o)&&o.length!==void 0}),e._zod.onattach.push(l=>{const o=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(l._zod.bag.maximum=n.maximum)}),e._zod.check=l=>{const o=l.value;if(o.length<=n.maximum)return;const c=Qo(o);l.issues.push({origin:c,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),f_=$("$ZodCheckMinLength",(e,n)=>{var i;Bt.init(e,n),(i=e._zod.def).when??(i.when=l=>{const o=l.value;return!Fo(o)&&o.length!==void 0}),e._zod.onattach.push(l=>{const o=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(l._zod.bag.minimum=n.minimum)}),e._zod.check=l=>{const o=l.value;if(o.length>=n.minimum)return;const c=Qo(o);l.issues.push({origin:c,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),h_=$("$ZodCheckLengthEquals",(e,n)=>{var i;Bt.init(e,n),(i=e._zod.def).when??(i.when=l=>{const o=l.value;return!Fo(o)&&o.length!==void 0}),e._zod.onattach.push(l=>{const o=l._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),e._zod.check=l=>{const o=l.value,s=o.length;if(s===n.length)return;const c=Qo(o),h=s>n.length;l.issues.push({origin:c,...h?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:e,continue:!n.abort})}}),Yl=$("$ZodCheckStringFormat",(e,n)=>{var i,l;Bt.init(e,n),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=n.format,n.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(l=e._zod).check??(l.check=()=>{})}),p_=$("$ZodCheckRegex",(e,n)=>{Yl.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),d_=$("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=l_),Yl.init(e,n)}),m_=$("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=u_),Yl.init(e,n)}),g_=$("$ZodCheckIncludes",(e,n)=>{Bt.init(e,n);const i=yi(n.includes),l=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=l,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(l)}),e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),y_=$("$ZodCheckStartsWith",(e,n)=>{Bt.init(e,n);const i=new RegExp(`^${yi(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=l=>{l.value.startsWith(n.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:l.value,inst:e,continue:!n.abort})}}),v_=$("$ZodCheckEndsWith",(e,n)=>{Bt.init(e,n);const i=new RegExp(`.*${yi(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=l=>{l.value.endsWith(n.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:l.value,inst:e,continue:!n.abort})}}),b_=$("$ZodCheckOverwrite",(e,n)=>{Bt.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class __{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const l=n.split(`
|
|
52
52
|
`).filter(c=>c),o=Math.min(...l.map(c=>c.length-c.trimStart().length)),s=l.map(c=>c.slice(o)).map(c=>" ".repeat(this.indent*2)+c);for(const c of s)this.content.push(c)}compile(){const n=Function,i=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new n(...i,o.join(`
|
|
53
|
-
`))}}const S_={major:4,minor:3,patch:6},tt=$("$ZodType",(e,n)=>{var o;var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=S_;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const s of l)for(const c of s._zod.onattach)c(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const s=(h,m,d)=>{let y=vi(h),g;for(const _ of m){if(_._zod.def.when){if(!_._zod.def.when(h))continue}else if(y)continue;const b=h.issues.length,E=_._zod.check(h);if(E instanceof Promise&&(d==null?void 0:d.async)===!1)throw new mi;if(g||E instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await E,h.issues.length!==b&&(y||(y=vi(h,b)))});else{if(h.issues.length===b)continue;y||(y=vi(h,b))}}return g?g.then(()=>h):h},c=(h,m,d)=>{if(vi(h))return h.aborted=!0,h;const y=s(m,l,d);if(y instanceof Promise){if(d.async===!1)throw new mi;return y.then(g=>e._zod.parse(g,d))}return e._zod.parse(y,d)};e._zod.run=(h,m)=>{if(m.skipChecks)return e._zod.parse(h,m);if(m.direction==="backward"){const y=e._zod.parse({value:h.value,issues:[]},{...m,skipChecks:!0});return y instanceof Promise?y.then(g=>c(g,h,m)):c(y,h,m)}const d=e._zod.parse(h,m);if(d instanceof Promise){if(m.async===!1)throw new mi;return d.then(y=>s(y,l,m))}return s(d,l,m)}}Re(e,"~standard",()=>({validate:s=>{var c;try{const h=k1(e,s);return h.success?{value:h.data}:{issues:(c=h.error)==null?void 0:c.issues}}catch{return T1(e,s).then(m=>{var d;return m.success?{value:m.data}:{issues:(d=m.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),Wo=$("$ZodString",(e,n)=>{var i;tt.init(e,n),e._zod.pattern=[...((i=e==null?void 0:e._zod.bag)==null?void 0:i.patterns)??[]].pop()??n_(e._zod.bag),e._zod.parse=(l,o)=>{if(n.coerce)try{l.value=String(l.value)}catch{}return typeof l.value=="string"||l.issues.push({expected:"string",code:"invalid_type",input:l.value,inst:e}),l}}),ut=$("$ZodStringFormat",(e,n)=>{Yl.init(e,n),Wo.init(e,n)}),x_=$("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=$1),ut.init(e,n)}),E_=$("$ZodUUID",(e,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=hp(l))}else n.pattern??(n.pattern=hp());ut.init(e,n)}),z_=$("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=V1),ut.init(e,n)}),w_=$("$ZodURL",(e,n)=>{ut.init(e,n),e._zod.check=i=>{try{const l=i.value.trim(),o=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=o.href:i.value=l;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),k_=$("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=G1()),ut.init(e,n)}),T_=$("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=H1),ut.init(e,n)}),A_=$("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=U1),ut.init(e,n)}),O_=$("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Z1),ut.init(e,n)}),C_=$("$ZodULID",(e,n)=>{n.pattern??(n.pattern=L1),ut.init(e,n)}),N_=$("$ZodXID",(e,n)=>{n.pattern??(n.pattern=I1),ut.init(e,n)}),D_=$("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=B1),ut.init(e,n)}),M_=$("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=t_(n)),ut.init(e,n)}),R_=$("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=W1),ut.init(e,n)}),j_=$("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=e_(n)),ut.init(e,n)}),U_=$("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=q1),ut.init(e,n)}),Z_=$("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=X1),ut.init(e,n),e._zod.bag.format="ipv4"}),L_=$("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=F1),ut.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),I_=$("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=J1),ut.init(e,n)}),B_=$("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Q1),ut.init(e,n),e._zod.check=i=>{const l=i.value.split("/");try{if(l.length!==2)throw new Error;const[o,s]=l;if(!s)throw new Error;const c=Number(s);if(`${c}`!==s)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${o}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function _p(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const H_=$("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=P1),ut.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{_p(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function q_(e){if(!pp.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return _p(i)}const $_=$("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=pp),ut.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{q_(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),V_=$("$ZodE164",(e,n)=>{n.pattern??(n.pattern=K1),ut.init(e,n)});function Y_(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[l]=i;if(!l)return!1;const o=JSON.parse(atob(l));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const G_=$("$ZodJWT",(e,n)=>{ut.init(e,n),e._zod.check=i=>{Y_(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Sp=$("$ZodNumber",(e,n)=>{tt.init(e,n),e._zod.pattern=e._zod.bag.pattern??gp,e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),i}}),X_=$("$ZodNumberFormat",(e,n)=>{s_.init(e,n),Sp.init(e,n)}),F_=$("$ZodBoolean",(e,n)=>{tt.init(e,n),e._zod.pattern=i_,e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),i}}),J_=$("$ZodNull",(e,n)=>{tt.init(e,n),e._zod.pattern=a_,e._zod.values=new Set([null]),e._zod.parse=(i,l)=>{const o=i.value;return o===null||i.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),i}}),Q_=$("$ZodUnknown",(e,n)=>{tt.init(e,n),e._zod.parse=i=>i}),P_=$("$ZodNever",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function xp(e,n,i){e.issues.length&&n.issues.push(...bi(i,e.issues)),n.value[i]=e.value}const K_=$("$ZodArray",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=Array(o.length);const s=[];for(let c=0;c<o.length;c++){const h=o[c],m=n.element._zod.run({value:h,issues:[]},l);m instanceof Promise?s.push(m.then(d=>xp(d,i,c))):xp(m,i,c)}return s.length?Promise.all(s).then(()=>i):i}});function Gl(e,n,i,l,o){if(e.issues.length){if(o&&!(i in l))return;n.issues.push(...bi(i,e.issues))}e.value===void 0?i in l&&(n.value[i]=void 0):n.value[i]=e.value}function Ep(e){var l,o,s,c;const n=Object.keys(e.shape);for(const h of n)if(!((c=(s=(o=(l=e.shape)==null?void 0:l[h])==null?void 0:o._zod)==null?void 0:s.traits)!=null&&c.has("$ZodType")))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);const i=m1(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function zp(e,n,i,l,o,s){const c=[],h=o.keySet,m=o.catchall._zod,d=m.def.type,y=m.optout==="optional";for(const g in n){if(h.has(g))continue;if(d==="never"){c.push(g);continue}const _=m.run({value:n[g],issues:[]},l);_ instanceof Promise?e.push(_.then(b=>Gl(b,i,g,n,y))):Gl(_,i,g,n,y)}return c.length&&i.issues.push({code:"unrecognized_keys",keys:c,input:n,inst:s}),e.length?Promise.all(e).then(()=>i):i}const W_=$("$ZodObject",(e,n)=>{tt.init(e,n);const i=Object.getOwnPropertyDescriptor(n,"shape");if(!(i!=null&&i.get)){const h=n.shape;Object.defineProperty(n,"shape",{get:()=>{const m={...h};return Object.defineProperty(n,"shape",{value:m}),m}})}const l=Hl(()=>Ep(n));Re(e._zod,"propValues",()=>{const h=n.shape,m={};for(const d in h){const y=h[d]._zod;if(y.values){m[d]??(m[d]=new Set);for(const g of y.values)m[d].add(g)}}return m});const o=za,s=n.catchall;let c;e._zod.parse=(h,m)=>{c??(c=l.value);const d=h.value;if(!o(d))return h.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),h;h.value={};const y=[],g=c.shape;for(const _ of c.keys){const b=g[_],E=b._zod.optout==="optional",
|
|
54
|
-
if (${
|
|
53
|
+
`))}}const S_={major:4,minor:3,patch:6},tt=$("$ZodType",(e,n)=>{var o;var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=S_;const l=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&l.unshift(e);for(const s of l)for(const c of s._zod.onattach)c(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),(o=e._zod.deferred)==null||o.push(()=>{e._zod.run=e._zod.parse});else{const s=(h,m,d)=>{let y=vi(h),g;for(const _ of m){if(_._zod.def.when){if(!_._zod.def.when(h))continue}else if(y)continue;const b=h.issues.length,E=_._zod.check(h);if(E instanceof Promise&&(d==null?void 0:d.async)===!1)throw new mi;if(g||E instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await E,h.issues.length!==b&&(y||(y=vi(h,b)))});else{if(h.issues.length===b)continue;y||(y=vi(h,b))}}return g?g.then(()=>h):h},c=(h,m,d)=>{if(vi(h))return h.aborted=!0,h;const y=s(m,l,d);if(y instanceof Promise){if(d.async===!1)throw new mi;return y.then(g=>e._zod.parse(g,d))}return e._zod.parse(y,d)};e._zod.run=(h,m)=>{if(m.skipChecks)return e._zod.parse(h,m);if(m.direction==="backward"){const y=e._zod.parse({value:h.value,issues:[]},{...m,skipChecks:!0});return y instanceof Promise?y.then(g=>c(g,h,m)):c(y,h,m)}const d=e._zod.parse(h,m);if(d instanceof Promise){if(m.async===!1)throw new mi;return d.then(y=>s(y,l,m))}return s(d,l,m)}}Re(e,"~standard",()=>({validate:s=>{var c;try{const h=k1(e,s);return h.success?{value:h.data}:{issues:(c=h.error)==null?void 0:c.issues}}catch{return T1(e,s).then(m=>{var d;return m.success?{value:m.data}:{issues:(d=m.error)==null?void 0:d.issues}})}},vendor:"zod",version:1}))}),Wo=$("$ZodString",(e,n)=>{var i;tt.init(e,n),e._zod.pattern=[...((i=e==null?void 0:e._zod.bag)==null?void 0:i.patterns)??[]].pop()??n_(e._zod.bag),e._zod.parse=(l,o)=>{if(n.coerce)try{l.value=String(l.value)}catch{}return typeof l.value=="string"||l.issues.push({expected:"string",code:"invalid_type",input:l.value,inst:e}),l}}),ut=$("$ZodStringFormat",(e,n)=>{Yl.init(e,n),Wo.init(e,n)}),x_=$("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=$1),ut.init(e,n)}),E_=$("$ZodUUID",(e,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=hp(l))}else n.pattern??(n.pattern=hp());ut.init(e,n)}),z_=$("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=V1),ut.init(e,n)}),w_=$("$ZodURL",(e,n)=>{ut.init(e,n),e._zod.check=i=>{try{const l=i.value.trim(),o=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=o.href:i.value=l;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),k_=$("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=G1()),ut.init(e,n)}),T_=$("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=H1),ut.init(e,n)}),A_=$("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=U1),ut.init(e,n)}),O_=$("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Z1),ut.init(e,n)}),C_=$("$ZodULID",(e,n)=>{n.pattern??(n.pattern=L1),ut.init(e,n)}),N_=$("$ZodXID",(e,n)=>{n.pattern??(n.pattern=I1),ut.init(e,n)}),D_=$("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=B1),ut.init(e,n)}),M_=$("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=t_(n)),ut.init(e,n)}),R_=$("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=W1),ut.init(e,n)}),j_=$("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=e_(n)),ut.init(e,n)}),U_=$("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=q1),ut.init(e,n)}),Z_=$("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=X1),ut.init(e,n),e._zod.bag.format="ipv4"}),L_=$("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=F1),ut.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),I_=$("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=J1),ut.init(e,n)}),B_=$("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=Q1),ut.init(e,n),e._zod.check=i=>{const l=i.value.split("/");try{if(l.length!==2)throw new Error;const[o,s]=l;if(!s)throw new Error;const c=Number(s);if(`${c}`!==s)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${o}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function _p(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const H_=$("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=P1),ut.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{_p(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function q_(e){if(!pp.test(e))return!1;const n=e.replace(/[-_]/g,l=>l==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return _p(i)}const $_=$("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=pp),ut.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{q_(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),V_=$("$ZodE164",(e,n)=>{n.pattern??(n.pattern=K1),ut.init(e,n)});function Y_(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[l]=i;if(!l)return!1;const o=JSON.parse(atob(l));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const G_=$("$ZodJWT",(e,n)=>{ut.init(e,n),e._zod.check=i=>{Y_(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Sp=$("$ZodNumber",(e,n)=>{tt.init(e,n),e._zod.pattern=e._zod.bag.pattern??gp,e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),i}}),X_=$("$ZodNumberFormat",(e,n)=>{s_.init(e,n),Sp.init(e,n)}),F_=$("$ZodBoolean",(e,n)=>{tt.init(e,n),e._zod.pattern=i_,e._zod.parse=(i,l)=>{if(n.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),i}}),J_=$("$ZodNull",(e,n)=>{tt.init(e,n),e._zod.pattern=a_,e._zod.values=new Set([null]),e._zod.parse=(i,l)=>{const o=i.value;return o===null||i.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),i}}),Q_=$("$ZodUnknown",(e,n)=>{tt.init(e,n),e._zod.parse=i=>i}),P_=$("$ZodNever",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function xp(e,n,i){e.issues.length&&n.issues.push(...bi(i,e.issues)),n.value[i]=e.value}const K_=$("$ZodArray",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=Array(o.length);const s=[];for(let c=0;c<o.length;c++){const h=o[c],m=n.element._zod.run({value:h,issues:[]},l);m instanceof Promise?s.push(m.then(d=>xp(d,i,c))):xp(m,i,c)}return s.length?Promise.all(s).then(()=>i):i}});function Gl(e,n,i,l,o){if(e.issues.length){if(o&&!(i in l))return;n.issues.push(...bi(i,e.issues))}e.value===void 0?i in l&&(n.value[i]=void 0):n.value[i]=e.value}function Ep(e){var l,o,s,c;const n=Object.keys(e.shape);for(const h of n)if(!((c=(s=(o=(l=e.shape)==null?void 0:l[h])==null?void 0:o._zod)==null?void 0:s.traits)!=null&&c.has("$ZodType")))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);const i=m1(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function zp(e,n,i,l,o,s){const c=[],h=o.keySet,m=o.catchall._zod,d=m.def.type,y=m.optout==="optional";for(const g in n){if(h.has(g))continue;if(d==="never"){c.push(g);continue}const _=m.run({value:n[g],issues:[]},l);_ instanceof Promise?e.push(_.then(b=>Gl(b,i,g,n,y))):Gl(_,i,g,n,y)}return c.length&&i.issues.push({code:"unrecognized_keys",keys:c,input:n,inst:s}),e.length?Promise.all(e).then(()=>i):i}const W_=$("$ZodObject",(e,n)=>{tt.init(e,n);const i=Object.getOwnPropertyDescriptor(n,"shape");if(!(i!=null&&i.get)){const h=n.shape;Object.defineProperty(n,"shape",{get:()=>{const m={...h};return Object.defineProperty(n,"shape",{value:m}),m}})}const l=Hl(()=>Ep(n));Re(e._zod,"propValues",()=>{const h=n.shape,m={};for(const d in h){const y=h[d]._zod;if(y.values){m[d]??(m[d]=new Set);for(const g of y.values)m[d].add(g)}}return m});const o=za,s=n.catchall;let c;e._zod.parse=(h,m)=>{c??(c=l.value);const d=h.value;if(!o(d))return h.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),h;h.value={};const y=[],g=c.shape;for(const _ of c.keys){const b=g[_],E=b._zod.optout==="optional",k=b._zod.run({value:d[_],issues:[]},m);k instanceof Promise?y.push(k.then(R=>Gl(R,h,_,d,E))):Gl(k,h,_,d,E)}return s?zp(y,d,h,m,l.value,e):y.length?Promise.all(y).then(()=>h):h}}),eS=$("$ZodObjectJIT",(e,n)=>{W_.init(e,n);const i=e._zod.parse,l=Hl(()=>Ep(n)),o=_=>{var w;const b=new __(["shape","payload","ctx"]),E=l.value,k=P=>{const F=lp(P);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};b.write("const input = payload.value;");const R=Object.create(null);let C=0;for(const P of E.keys)R[P]=`key_${C++}`;b.write("const newResult = {};");for(const P of E.keys){const F=R[P],D=lp(P),X=_[P],se=((w=X==null?void 0:X._zod)==null?void 0:w.optout)==="optional";b.write(`const ${F} = ${k(P)};`),se?b.write(`
|
|
54
|
+
if (${F}.issues.length) {
|
|
55
55
|
if (${D} in input) {
|
|
56
|
-
payload.issues = payload.issues.concat(${
|
|
56
|
+
payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
|
|
57
57
|
...iss,
|
|
58
58
|
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
59
59
|
})));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
if (${
|
|
63
|
+
if (${F}.value === undefined) {
|
|
64
64
|
if (${D} in input) {
|
|
65
65
|
newResult[${D}] = undefined;
|
|
66
66
|
}
|
|
67
67
|
} else {
|
|
68
|
-
newResult[${D}] = ${
|
|
68
|
+
newResult[${D}] = ${F}.value;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
`):b.write(`
|
|
72
|
-
if (${
|
|
73
|
-
payload.issues = payload.issues.concat(${
|
|
72
|
+
if (${F}.issues.length) {
|
|
73
|
+
payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
|
|
74
74
|
...iss,
|
|
75
75
|
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
76
76
|
})));
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
if (${
|
|
79
|
+
if (${F}.value === undefined) {
|
|
80
80
|
if (${D} in input) {
|
|
81
81
|
newResult[${D}] = undefined;
|
|
82
82
|
}
|
|
83
83
|
} else {
|
|
84
|
-
newResult[${D}] = ${
|
|
84
|
+
newResult[${D}] = ${F}.value;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
`)}b.write("payload.value = newResult;"),b.write("return payload;");const B=b.compile();return(J,K)=>B(_,J,K)};let s;const c=za,h=!rp.jitless,d=h&&p1.value,y=n.catchall;let g;e._zod.parse=(_,b)=>{g??(g=l.value);const E=_.value;return c(E)?h&&d&&(b==null?void 0:b.async)===!1&&b.jitless!==!0?(s||(s=o(n.shape)),_=s(_,b),y?zp([],E,_,b,g,e):_):i(_,b):(_.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),_)}});function wp(e,n,i,l){for(const s of e)if(s.issues.length===0)return n.value=s.value,n;const o=e.filter(s=>!vi(s));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(s=>s.issues.map(c=>fr(c,l,or())))}),n)}const kp=$("$ZodUnion",(e,n)=>{tt.init(e,n),Re(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Re(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Re(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Re(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Jo(s.source)).join("|")})$`)}});const i=n.options.length===1,l=n.options[0]._zod.run;e._zod.parse=(o,s)=>{if(i)return l(o,s);let c=!1;const h=[];for(const m of n.options){const d=m._zod.run({value:o.value,issues:[]},s);if(d instanceof Promise)h.push(d),c=!0;else{if(d.issues.length===0)return d;h.push(d)}}return c?Promise.all(h).then(m=>wp(m,o,e,s)):wp(h,o,e,s)}}),tS=$("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,kp.init(e,n);const i=e._zod.parse;Re(e._zod,"propValues",()=>{const o={};for(const s of n.options){const c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);for(const[h,m]of Object.entries(c)){o[h]||(o[h]=new Set);for(const d of m)o[h].add(d)}}return o});const l=Hl(()=>{var c;const o=n.options,s=new Map;for(const h of o){const m=(c=h._zod.propValues)==null?void 0:c[n.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(h)}"`);for(const d of m){if(s.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);s.set(d,h)}}return s});e._zod.parse=(o,s)=>{const c=o.value;if(!za(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),o;const h=l.value.get(c==null?void 0:c[n.discriminator]);return h?h._zod.run(o,s):n.unionFallback?i(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:c,path:[n.discriminator],inst:e}),o)}}),nS=$("$ZodIntersection",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value,s=n.left._zod.run({value:o,issues:[]},l),c=n.right._zod.run({value:o,issues:[]},l);return s instanceof Promise||c instanceof Promise?Promise.all([s,c]).then(([m,d])=>Tp(i,m,d)):Tp(i,s,c)}});function es(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(gi(e)&&gi(n)){const i=Object.keys(n),l=Object.keys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...n};for(const s of l){const c=es(e[s],n[s]);if(!c.valid)return{valid:!1,mergeErrorPath:[s,...c.mergeErrorPath]};o[s]=c.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let l=0;l<e.length;l++){const o=e[l],s=n[l],c=es(o,s);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};i.push(c.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Tp(e,n,i){const l=new Map;let o;for(const h of n.issues)if(h.code==="unrecognized_keys"){o??(o=h);for(const m of h.keys)l.has(m)||l.set(m,{}),l.get(m).l=!0}else e.issues.push(h);for(const h of i.issues)if(h.code==="unrecognized_keys")for(const m of h.keys)l.has(m)||l.set(m,{}),l.get(m).r=!0;else e.issues.push(h);const s=[...l].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(s.length&&o&&e.issues.push({...o,keys:s}),vi(e))return e;const c=es(n.value,i.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const rS=$("$ZodRecord",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value;if(!gi(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;const s=[],c=n.keyType._zod.values;if(c){i.value={};const h=new Set;for(const d of c)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){h.add(typeof d=="number"?d.toString():d);const y=n.valueType._zod.run({value:o[d],issues:[]},l);y instanceof Promise?s.push(y.then(g=>{g.issues.length&&i.issues.push(...bi(d,g.issues)),i.value[d]=g.value})):(y.issues.length&&i.issues.push(...bi(d,y.issues)),i.value[d]=y.value)}let m;for(const d in o)h.has(d)||(m=m??[],m.push(d));m&&m.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:m})}else{i.value={};for(const h of Reflect.ownKeys(o)){if(h==="__proto__")continue;let m=n.keyType._zod.run({value:h,issues:[]},l);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof h=="string"&&gp.test(h)&&m.issues.length){const g=n.keyType._zod.run({value:Number(h),issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(m=g)}if(m.issues.length){n.mode==="loose"?i.value[h]=o[h]:i.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(g=>fr(g,l,or())),input:h,path:[h],inst:e});continue}const y=n.valueType._zod.run({value:o[h],issues:[]},l);y instanceof Promise?s.push(y.then(g=>{g.issues.length&&i.issues.push(...bi(h,g.issues)),i.value[m.value]=g.value})):(y.issues.length&&i.issues.push(...bi(h,y.issues)),i.value[m.value]=y.value)}}return s.length?Promise.all(s).then(()=>i):i}}),iS=$("$ZodEnum",(e,n)=>{tt.init(e,n);const i=ip(n.entries),l=new Set(i);e._zod.values=l,e._zod.pattern=new RegExp(`^(${i.filter(o=>d1.has(typeof o)).map(o=>typeof o=="string"?yi(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const c=o.value;return l.has(c)||o.issues.push({code:"invalid_value",values:i,input:c,inst:e}),o}}),aS=$("$ZodLiteral",(e,n)=>{if(tt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const i=new Set(n.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?yi(l):l?yi(l.toString()):String(l)).join("|")})$`),e._zod.parse=(l,o)=>{const s=l.value;return i.has(s)||l.issues.push({code:"invalid_value",values:n.values,input:s,inst:e}),l}}),lS=$("$ZodTransform",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new np(e.constructor.name);const o=n.transform(i.value,i);if(l.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(i.value=c,i));if(o instanceof Promise)throw new mi;return i.value=o,i}});function Ap(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Op=$("$ZodOptional",(e,n)=>{tt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Re(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Re(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Jo(i.source)})?$`):void 0}),e._zod.parse=(i,l)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>Ap(s,i.value)):Ap(o,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,l)}}),uS=$("$ZodExactOptional",(e,n)=>{Op.init(e,n),Re(e._zod,"values",()=>n.innerType._zod.values),Re(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,l)=>n.innerType._zod.run(i,l)}),oS=$("$ZodNullable",(e,n)=>{tt.init(e,n),Re(e._zod,"optin",()=>n.innerType._zod.optin),Re(e._zod,"optout",()=>n.innerType._zod.optout),Re(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Jo(i.source)}|null)$`):void 0}),Re(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,l)=>i.value===null?i:n.innerType._zod.run(i,l)}),sS=$("$ZodDefault",(e,n)=>{tt.init(e,n),e._zod.optin="optional",Re(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);if(i.value===void 0)return i.value=n.defaultValue,i;const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>Cp(s,n)):Cp(o,n)}});function Cp(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const cS=$("$ZodPrefault",(e,n)=>{tt.init(e,n),e._zod.optin="optional",Re(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>(l.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,l))}),fS=$("$ZodNonOptional",(e,n)=>{tt.init(e,n),Re(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(l=>l!==void 0)):void 0}),e._zod.parse=(i,l)=>{const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>Np(s,e)):Np(o,e)}});function Np(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const hS=$("$ZodCatch",(e,n)=>{tt.init(e,n),Re(e._zod,"optin",()=>n.innerType._zod.optin),Re(e._zod,"optout",()=>n.innerType._zod.optout),Re(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>(i.value=s.value,s.issues.length&&(i.value=n.catchValue({...i,error:{issues:s.issues.map(c=>fr(c,l,or()))},input:i.value}),i.issues=[]),i)):(i.value=o.value,o.issues.length&&(i.value=n.catchValue({...i,error:{issues:o.issues.map(s=>fr(s,l,or()))},input:i.value}),i.issues=[]),i)}}),pS=$("$ZodPipe",(e,n)=>{tt.init(e,n),Re(e._zod,"values",()=>n.in._zod.values),Re(e._zod,"optin",()=>n.in._zod.optin),Re(e._zod,"optout",()=>n.out._zod.optout),Re(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,l)=>{if(l.direction==="backward"){const s=n.out._zod.run(i,l);return s instanceof Promise?s.then(c=>Xl(c,n.in,l)):Xl(s,n.in,l)}const o=n.in._zod.run(i,l);return o instanceof Promise?o.then(s=>Xl(s,n.out,l)):Xl(o,n.out,l)}});function Xl(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const dS=$("$ZodReadonly",(e,n)=>{tt.init(e,n),Re(e._zod,"propValues",()=>n.innerType._zod.propValues),Re(e._zod,"values",()=>n.innerType._zod.values),Re(e._zod,"optin",()=>{var i,l;return(l=(i=n.innerType)==null?void 0:i._zod)==null?void 0:l.optin}),Re(e._zod,"optout",()=>{var i,l;return(l=(i=n.innerType)==null?void 0:i._zod)==null?void 0:l.optout}),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(Dp):Dp(o)}});function Dp(e){return e.value=Object.freeze(e.value),e}const mS=$("$ZodLazy",(e,n)=>{tt.init(e,n),Re(e._zod,"innerType",()=>n.getter()),Re(e._zod,"pattern",()=>{var i,l;return(l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.pattern}),Re(e._zod,"propValues",()=>{var i,l;return(l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.propValues}),Re(e._zod,"optin",()=>{var i,l;return((l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.optin)??void 0}),Re(e._zod,"optout",()=>{var i,l;return((l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.optout)??void 0}),e._zod.parse=(i,l)=>e._zod.innerType._zod.run(i,l)}),gS=$("$ZodCustom",(e,n)=>{Bt.init(e,n),tt.init(e,n),e._zod.parse=(i,l)=>i,e._zod.check=i=>{const l=i.value,o=n.fn(l);if(o instanceof Promise)return o.then(s=>Mp(s,i,l,e));Mp(o,i,l,e)}});function Mp(e,n,i,l){if(!e){const o={code:"custom",input:i,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(o.params=l._zod.def.params),n.issues.push(wa(o))}}var Rp;class yS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const l=i[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const l={...this.get(i)??{}};delete l.id;const o={...l,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function vS(){return new yS}(Rp=globalThis).__zod_globalRegistry??(Rp.__zod_globalRegistry=vS());const ka=globalThis.__zod_globalRegistry;function bS(e,n){return new e({type:"string",...oe(n)})}function _S(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...oe(n)})}function jp(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...oe(n)})}function SS(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...oe(n)})}function xS(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...oe(n)})}function ES(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...oe(n)})}function zS(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...oe(n)})}function wS(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...oe(n)})}function kS(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...oe(n)})}function TS(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...oe(n)})}function AS(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...oe(n)})}function OS(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...oe(n)})}function CS(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...oe(n)})}function NS(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...oe(n)})}function DS(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...oe(n)})}function MS(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...oe(n)})}function RS(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...oe(n)})}function jS(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...oe(n)})}function US(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...oe(n)})}function ZS(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...oe(n)})}function LS(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...oe(n)})}function IS(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...oe(n)})}function BS(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...oe(n)})}function HS(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...oe(n)})}function qS(e,n){return new e({type:"string",format:"date",check:"string_format",...oe(n)})}function $S(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...oe(n)})}function VS(e,n){return new e({type:"string",format:"duration",check:"string_format",...oe(n)})}function YS(e,n){return new e({type:"number",checks:[],...oe(n)})}function GS(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...oe(n)})}function XS(e,n){return new e({type:"boolean",...oe(n)})}function FS(e,n){return new e({type:"null",...oe(n)})}function JS(e){return new e({type:"unknown"})}function QS(e,n){return new e({type:"never",...oe(n)})}function Up(e,n){return new vp({check:"less_than",...oe(n),value:e,inclusive:!1})}function ts(e,n){return new vp({check:"less_than",...oe(n),value:e,inclusive:!0})}function Zp(e,n){return new bp({check:"greater_than",...oe(n),value:e,inclusive:!1})}function ns(e,n){return new bp({check:"greater_than",...oe(n),value:e,inclusive:!0})}function Lp(e,n){return new o_({check:"multiple_of",...oe(n),value:e})}function Ip(e,n){return new c_({check:"max_length",...oe(n),maximum:e})}function Fl(e,n){return new f_({check:"min_length",...oe(n),minimum:e})}function Bp(e,n){return new h_({check:"length_equals",...oe(n),length:e})}function PS(e,n){return new p_({check:"string_format",format:"regex",...oe(n),pattern:e})}function KS(e){return new d_({check:"string_format",format:"lowercase",...oe(e)})}function WS(e){return new m_({check:"string_format",format:"uppercase",...oe(e)})}function ex(e,n){return new g_({check:"string_format",format:"includes",...oe(n),includes:e})}function tx(e,n){return new y_({check:"string_format",format:"starts_with",...oe(n),prefix:e})}function nx(e,n){return new v_({check:"string_format",format:"ends_with",...oe(n),suffix:e})}function _i(e){return new b_({check:"overwrite",tx:e})}function rx(e){return _i(n=>n.normalize(e))}function ix(){return _i(e=>e.trim())}function ax(){return _i(e=>e.toLowerCase())}function lx(){return _i(e=>e.toUpperCase())}function ux(){return _i(e=>h1(e))}function ox(e,n,i){return new e({type:"array",element:n,...oe(i)})}function sx(e,n,i){const l=oe(i);return l.abort??(l.abort=!0),new e({type:"custom",check:"custom",fn:n,...l})}function cx(e,n,i){return new e({type:"custom",check:"custom",fn:n,...oe(i)})}function fx(e){const n=hx(i=>(i.addIssue=l=>{if(typeof l=="string")i.issues.push(wa(l,i.value,n._zod.def));else{const o=l;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(wa(o))}},e(i.value,i)));return n}function hx(e,n){const i=new Bt({check:"custom",...oe(n)});return i._zod.check=e,i}function Jl(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??ka,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function We(e,n,i={path:[],schemaPath:[]}){var y,g;var l;const o=e._zod.def,s=n.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;const c={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,c);const h=(g=(y=e._zod).toJSONSchema)==null?void 0:g.call(y);if(h)c.schema=h;else{const _={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,c.schema,_);else{const E=c.schema,T=n.processors[o.type];if(!T)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);T(e,n,E,_)}const b=e._zod.parent;b&&(c.ref||(c.ref=b),We(b,n,_),n.seen.get(b).isParent=!0)}const m=n.metadataRegistry.get(e);return m&&Object.assign(c.schema,m),n.io==="input"&&Dt(e)&&(delete c.schema.examples,delete c.schema.default),n.io==="input"&&c.schema._prefault&&((l=c.schema).default??(l.default=c.schema._prefault)),delete c.schema._prefault,n.seen.get(e).schema}function Ql(e,n){var c,h,m,d;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const y of e.seen.entries()){const g=(c=e.metadataRegistry.get(y[0]))==null?void 0:c.id;if(g){const _=l.get(g);if(_&&_!==y[0])throw new Error(`Duplicate schema id "${g}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(g,y[0])}}const o=y=>{var T;const g=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const M=(T=e.external.registry.get(y[0]))==null?void 0:T.id,O=e.external.uri??(k=>k);if(M)return{ref:O(M)};const B=y[1].defId??y[1].schema.id??`schema${e.counter++}`;return y[1].defId=B,{defId:B,ref:`${O("__shared")}#/${g}/${B}`}}if(y[1]===i)return{ref:"#"};const b=`#/${g}/`,E=y[1].schema.id??`__schema${e.counter++}`;return{defId:E,ref:b+E}},s=y=>{if(y[1].schema.$ref)return;const g=y[1],{ref:_,defId:b}=o(y);g.def={...g.schema},b&&(g.defId=b);const E=g.schema;for(const T in E)delete E[T];E.$ref=_};if(e.cycles==="throw")for(const y of e.seen.entries()){const g=y[1];if(g.cycle)throw new Error(`Cycle detected: #/${(h=g.cycle)==null?void 0:h.join("/")}/<root>
|
|
87
|
+
`)}b.write("payload.value = newResult;"),b.write("return payload;");const B=b.compile();return(P,F)=>B(_,P,F)};let s;const c=za,h=!rp.jitless,d=h&&p1.value,y=n.catchall;let g;e._zod.parse=(_,b)=>{g??(g=l.value);const E=_.value;return c(E)?h&&d&&(b==null?void 0:b.async)===!1&&b.jitless!==!0?(s||(s=o(n.shape)),_=s(_,b),y?zp([],E,_,b,g,e):_):i(_,b):(_.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),_)}});function wp(e,n,i,l){for(const s of e)if(s.issues.length===0)return n.value=s.value,n;const o=e.filter(s=>!vi(s));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(s=>s.issues.map(c=>fr(c,l,or())))}),n)}const kp=$("$ZodUnion",(e,n)=>{tt.init(e,n),Re(e._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Re(e._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Re(e._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Re(e._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Jo(s.source)).join("|")})$`)}});const i=n.options.length===1,l=n.options[0]._zod.run;e._zod.parse=(o,s)=>{if(i)return l(o,s);let c=!1;const h=[];for(const m of n.options){const d=m._zod.run({value:o.value,issues:[]},s);if(d instanceof Promise)h.push(d),c=!0;else{if(d.issues.length===0)return d;h.push(d)}}return c?Promise.all(h).then(m=>wp(m,o,e,s)):wp(h,o,e,s)}}),tS=$("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,kp.init(e,n);const i=e._zod.parse;Re(e._zod,"propValues",()=>{const o={};for(const s of n.options){const c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);for(const[h,m]of Object.entries(c)){o[h]||(o[h]=new Set);for(const d of m)o[h].add(d)}}return o});const l=Hl(()=>{var c;const o=n.options,s=new Map;for(const h of o){const m=(c=h._zod.propValues)==null?void 0:c[n.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(h)}"`);for(const d of m){if(s.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);s.set(d,h)}}return s});e._zod.parse=(o,s)=>{const c=o.value;if(!za(c))return o.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),o;const h=l.value.get(c==null?void 0:c[n.discriminator]);return h?h._zod.run(o,s):n.unionFallback?i(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:c,path:[n.discriminator],inst:e}),o)}}),nS=$("$ZodIntersection",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value,s=n.left._zod.run({value:o,issues:[]},l),c=n.right._zod.run({value:o,issues:[]},l);return s instanceof Promise||c instanceof Promise?Promise.all([s,c]).then(([m,d])=>Tp(i,m,d)):Tp(i,s,c)}});function es(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(gi(e)&&gi(n)){const i=Object.keys(n),l=Object.keys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...n};for(const s of l){const c=es(e[s],n[s]);if(!c.valid)return{valid:!1,mergeErrorPath:[s,...c.mergeErrorPath]};o[s]=c.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let l=0;l<e.length;l++){const o=e[l],s=n[l],c=es(o,s);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};i.push(c.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function Tp(e,n,i){const l=new Map;let o;for(const h of n.issues)if(h.code==="unrecognized_keys"){o??(o=h);for(const m of h.keys)l.has(m)||l.set(m,{}),l.get(m).l=!0}else e.issues.push(h);for(const h of i.issues)if(h.code==="unrecognized_keys")for(const m of h.keys)l.has(m)||l.set(m,{}),l.get(m).r=!0;else e.issues.push(h);const s=[...l].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(s.length&&o&&e.issues.push({...o,keys:s}),vi(e))return e;const c=es(n.value,i.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const rS=$("$ZodRecord",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{const o=i.value;if(!gi(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;const s=[],c=n.keyType._zod.values;if(c){i.value={};const h=new Set;for(const d of c)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){h.add(typeof d=="number"?d.toString():d);const y=n.valueType._zod.run({value:o[d],issues:[]},l);y instanceof Promise?s.push(y.then(g=>{g.issues.length&&i.issues.push(...bi(d,g.issues)),i.value[d]=g.value})):(y.issues.length&&i.issues.push(...bi(d,y.issues)),i.value[d]=y.value)}let m;for(const d in o)h.has(d)||(m=m??[],m.push(d));m&&m.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:m})}else{i.value={};for(const h of Reflect.ownKeys(o)){if(h==="__proto__")continue;let m=n.keyType._zod.run({value:h,issues:[]},l);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof h=="string"&&gp.test(h)&&m.issues.length){const g=n.keyType._zod.run({value:Number(h),issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(m=g)}if(m.issues.length){n.mode==="loose"?i.value[h]=o[h]:i.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(g=>fr(g,l,or())),input:h,path:[h],inst:e});continue}const y=n.valueType._zod.run({value:o[h],issues:[]},l);y instanceof Promise?s.push(y.then(g=>{g.issues.length&&i.issues.push(...bi(h,g.issues)),i.value[m.value]=g.value})):(y.issues.length&&i.issues.push(...bi(h,y.issues)),i.value[m.value]=y.value)}}return s.length?Promise.all(s).then(()=>i):i}}),iS=$("$ZodEnum",(e,n)=>{tt.init(e,n);const i=ip(n.entries),l=new Set(i);e._zod.values=l,e._zod.pattern=new RegExp(`^(${i.filter(o=>d1.has(typeof o)).map(o=>typeof o=="string"?yi(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const c=o.value;return l.has(c)||o.issues.push({code:"invalid_value",values:i,input:c,inst:e}),o}}),aS=$("$ZodLiteral",(e,n)=>{if(tt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const i=new Set(n.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?yi(l):l?yi(l.toString()):String(l)).join("|")})$`),e._zod.parse=(l,o)=>{const s=l.value;return i.has(s)||l.issues.push({code:"invalid_value",values:n.values,input:s,inst:e}),l}}),lS=$("$ZodTransform",(e,n)=>{tt.init(e,n),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new np(e.constructor.name);const o=n.transform(i.value,i);if(l.async)return(o instanceof Promise?o:Promise.resolve(o)).then(c=>(i.value=c,i));if(o instanceof Promise)throw new mi;return i.value=o,i}});function Ap(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Op=$("$ZodOptional",(e,n)=>{tt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Re(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Re(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Jo(i.source)})?$`):void 0}),e._zod.parse=(i,l)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>Ap(s,i.value)):Ap(o,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,l)}}),uS=$("$ZodExactOptional",(e,n)=>{Op.init(e,n),Re(e._zod,"values",()=>n.innerType._zod.values),Re(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,l)=>n.innerType._zod.run(i,l)}),oS=$("$ZodNullable",(e,n)=>{tt.init(e,n),Re(e._zod,"optin",()=>n.innerType._zod.optin),Re(e._zod,"optout",()=>n.innerType._zod.optout),Re(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Jo(i.source)}|null)$`):void 0}),Re(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,l)=>i.value===null?i:n.innerType._zod.run(i,l)}),sS=$("$ZodDefault",(e,n)=>{tt.init(e,n),e._zod.optin="optional",Re(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);if(i.value===void 0)return i.value=n.defaultValue,i;const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>Cp(s,n)):Cp(o,n)}});function Cp(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const cS=$("$ZodPrefault",(e,n)=>{tt.init(e,n),e._zod.optin="optional",Re(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>(l.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,l))}),fS=$("$ZodNonOptional",(e,n)=>{tt.init(e,n),Re(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(l=>l!==void 0)):void 0}),e._zod.parse=(i,l)=>{const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>Np(s,e)):Np(o,e)}});function Np(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const hS=$("$ZodCatch",(e,n)=>{tt.init(e,n),Re(e._zod,"optin",()=>n.innerType._zod.optin),Re(e._zod,"optout",()=>n.innerType._zod.optout),Re(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(s=>(i.value=s.value,s.issues.length&&(i.value=n.catchValue({...i,error:{issues:s.issues.map(c=>fr(c,l,or()))},input:i.value}),i.issues=[]),i)):(i.value=o.value,o.issues.length&&(i.value=n.catchValue({...i,error:{issues:o.issues.map(s=>fr(s,l,or()))},input:i.value}),i.issues=[]),i)}}),pS=$("$ZodPipe",(e,n)=>{tt.init(e,n),Re(e._zod,"values",()=>n.in._zod.values),Re(e._zod,"optin",()=>n.in._zod.optin),Re(e._zod,"optout",()=>n.out._zod.optout),Re(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,l)=>{if(l.direction==="backward"){const s=n.out._zod.run(i,l);return s instanceof Promise?s.then(c=>Xl(c,n.in,l)):Xl(s,n.in,l)}const o=n.in._zod.run(i,l);return o instanceof Promise?o.then(s=>Xl(s,n.out,l)):Xl(o,n.out,l)}});function Xl(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const dS=$("$ZodReadonly",(e,n)=>{tt.init(e,n),Re(e._zod,"propValues",()=>n.innerType._zod.propValues),Re(e._zod,"values",()=>n.innerType._zod.values),Re(e._zod,"optin",()=>{var i,l;return(l=(i=n.innerType)==null?void 0:i._zod)==null?void 0:l.optin}),Re(e._zod,"optout",()=>{var i,l;return(l=(i=n.innerType)==null?void 0:i._zod)==null?void 0:l.optout}),e._zod.parse=(i,l)=>{if(l.direction==="backward")return n.innerType._zod.run(i,l);const o=n.innerType._zod.run(i,l);return o instanceof Promise?o.then(Dp):Dp(o)}});function Dp(e){return e.value=Object.freeze(e.value),e}const mS=$("$ZodLazy",(e,n)=>{tt.init(e,n),Re(e._zod,"innerType",()=>n.getter()),Re(e._zod,"pattern",()=>{var i,l;return(l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.pattern}),Re(e._zod,"propValues",()=>{var i,l;return(l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.propValues}),Re(e._zod,"optin",()=>{var i,l;return((l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.optin)??void 0}),Re(e._zod,"optout",()=>{var i,l;return((l=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:l.optout)??void 0}),e._zod.parse=(i,l)=>e._zod.innerType._zod.run(i,l)}),gS=$("$ZodCustom",(e,n)=>{Bt.init(e,n),tt.init(e,n),e._zod.parse=(i,l)=>i,e._zod.check=i=>{const l=i.value,o=n.fn(l);if(o instanceof Promise)return o.then(s=>Mp(s,i,l,e));Mp(o,i,l,e)}});function Mp(e,n,i,l){if(!e){const o={code:"custom",input:i,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(o.params=l._zod.def.params),n.issues.push(wa(o))}}var Rp;class yS{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const l=i[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const l={...this.get(i)??{}};delete l.id;const o={...l,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function vS(){return new yS}(Rp=globalThis).__zod_globalRegistry??(Rp.__zod_globalRegistry=vS());const ka=globalThis.__zod_globalRegistry;function bS(e,n){return new e({type:"string",...oe(n)})}function _S(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...oe(n)})}function jp(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...oe(n)})}function SS(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...oe(n)})}function xS(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...oe(n)})}function ES(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...oe(n)})}function zS(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...oe(n)})}function wS(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...oe(n)})}function kS(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...oe(n)})}function TS(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...oe(n)})}function AS(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...oe(n)})}function OS(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...oe(n)})}function CS(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...oe(n)})}function NS(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...oe(n)})}function DS(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...oe(n)})}function MS(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...oe(n)})}function RS(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...oe(n)})}function jS(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...oe(n)})}function US(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...oe(n)})}function ZS(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...oe(n)})}function LS(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...oe(n)})}function IS(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...oe(n)})}function BS(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...oe(n)})}function HS(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...oe(n)})}function qS(e,n){return new e({type:"string",format:"date",check:"string_format",...oe(n)})}function $S(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...oe(n)})}function VS(e,n){return new e({type:"string",format:"duration",check:"string_format",...oe(n)})}function YS(e,n){return new e({type:"number",checks:[],...oe(n)})}function GS(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...oe(n)})}function XS(e,n){return new e({type:"boolean",...oe(n)})}function FS(e,n){return new e({type:"null",...oe(n)})}function JS(e){return new e({type:"unknown"})}function QS(e,n){return new e({type:"never",...oe(n)})}function Up(e,n){return new vp({check:"less_than",...oe(n),value:e,inclusive:!1})}function ts(e,n){return new vp({check:"less_than",...oe(n),value:e,inclusive:!0})}function Zp(e,n){return new bp({check:"greater_than",...oe(n),value:e,inclusive:!1})}function ns(e,n){return new bp({check:"greater_than",...oe(n),value:e,inclusive:!0})}function Lp(e,n){return new o_({check:"multiple_of",...oe(n),value:e})}function Ip(e,n){return new c_({check:"max_length",...oe(n),maximum:e})}function Fl(e,n){return new f_({check:"min_length",...oe(n),minimum:e})}function Bp(e,n){return new h_({check:"length_equals",...oe(n),length:e})}function PS(e,n){return new p_({check:"string_format",format:"regex",...oe(n),pattern:e})}function KS(e){return new d_({check:"string_format",format:"lowercase",...oe(e)})}function WS(e){return new m_({check:"string_format",format:"uppercase",...oe(e)})}function ex(e,n){return new g_({check:"string_format",format:"includes",...oe(n),includes:e})}function tx(e,n){return new y_({check:"string_format",format:"starts_with",...oe(n),prefix:e})}function nx(e,n){return new v_({check:"string_format",format:"ends_with",...oe(n),suffix:e})}function _i(e){return new b_({check:"overwrite",tx:e})}function rx(e){return _i(n=>n.normalize(e))}function ix(){return _i(e=>e.trim())}function ax(){return _i(e=>e.toLowerCase())}function lx(){return _i(e=>e.toUpperCase())}function ux(){return _i(e=>h1(e))}function ox(e,n,i){return new e({type:"array",element:n,...oe(i)})}function sx(e,n,i){const l=oe(i);return l.abort??(l.abort=!0),new e({type:"custom",check:"custom",fn:n,...l})}function cx(e,n,i){return new e({type:"custom",check:"custom",fn:n,...oe(i)})}function fx(e){const n=hx(i=>(i.addIssue=l=>{if(typeof l=="string")i.issues.push(wa(l,i.value,n._zod.def));else{const o=l;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(wa(o))}},e(i.value,i)));return n}function hx(e,n){const i=new Bt({check:"custom",...oe(n)});return i._zod.check=e,i}function Jl(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??ka,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function We(e,n,i={path:[],schemaPath:[]}){var y,g;var l;const o=e._zod.def,s=n.seen.get(e);if(s)return s.count++,i.schemaPath.includes(e)&&(s.cycle=i.path),s.schema;const c={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,c);const h=(g=(y=e._zod).toJSONSchema)==null?void 0:g.call(y);if(h)c.schema=h;else{const _={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,c.schema,_);else{const E=c.schema,k=n.processors[o.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);k(e,n,E,_)}const b=e._zod.parent;b&&(c.ref||(c.ref=b),We(b,n,_),n.seen.get(b).isParent=!0)}const m=n.metadataRegistry.get(e);return m&&Object.assign(c.schema,m),n.io==="input"&&Dt(e)&&(delete c.schema.examples,delete c.schema.default),n.io==="input"&&c.schema._prefault&&((l=c.schema).default??(l.default=c.schema._prefault)),delete c.schema._prefault,n.seen.get(e).schema}function Ql(e,n){var c,h,m,d;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const y of e.seen.entries()){const g=(c=e.metadataRegistry.get(y[0]))==null?void 0:c.id;if(g){const _=l.get(g);if(_&&_!==y[0])throw new Error(`Duplicate schema id "${g}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(g,y[0])}}const o=y=>{var k;const g=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const R=(k=e.external.registry.get(y[0]))==null?void 0:k.id,C=e.external.uri??(w=>w);if(R)return{ref:C(R)};const B=y[1].defId??y[1].schema.id??`schema${e.counter++}`;return y[1].defId=B,{defId:B,ref:`${C("__shared")}#/${g}/${B}`}}if(y[1]===i)return{ref:"#"};const b=`#/${g}/`,E=y[1].schema.id??`__schema${e.counter++}`;return{defId:E,ref:b+E}},s=y=>{if(y[1].schema.$ref)return;const g=y[1],{ref:_,defId:b}=o(y);g.def={...g.schema},b&&(g.defId=b);const E=g.schema;for(const k in E)delete E[k];E.$ref=_};if(e.cycles==="throw")for(const y of e.seen.entries()){const g=y[1];if(g.cycle)throw new Error(`Cycle detected: #/${(h=g.cycle)==null?void 0:h.join("/")}/<root>
|
|
88
88
|
|
|
89
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const y of e.seen.entries()){const g=y[1];if(n===y[0]){s(y);continue}if(e.external){const b=(m=e.external.registry.get(y[0]))==null?void 0:m.id;if(n!==y[0]&&b){s(y);continue}}if((d=e.metadataRegistry.get(y[0]))==null?void 0:d.id){s(y);continue}if(g.cycle){s(y);continue}if(g.count>1&&e.reused==="ref"){s(y);continue}}}function Pl(e,n){var c,h,m;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=d=>{const y=e.seen.get(d);if(y.ref===null)return;const g=y.def??y.schema,_={...g},b=y.ref;if(y.ref=null,b){l(b);const T=e.seen.get(b),M=T.schema;if(M.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(M)):Object.assign(g,M),Object.assign(g,_),d._zod.parent===b)for(const B in g)B==="$ref"||B==="allOf"||B in _||delete g[B];if(M.$ref&&T.def)for(const B in g)B==="$ref"||B==="allOf"||B in T.def&&JSON.stringify(g[B])===JSON.stringify(T.def[B])&&delete g[B]}const E=d._zod.parent;if(E&&E!==b){l(E);const T=e.seen.get(E);if(T!=null&&T.schema.$ref&&(g.$ref=T.schema.$ref,T.def))for(const M in g)M==="$ref"||M==="allOf"||M in T.def&&JSON.stringify(g[M])===JSON.stringify(T.def[M])&&delete g[M]}e.override({zodSchema:d,jsonSchema:g,path:y.path??[]})};for(const d of[...e.seen.entries()].reverse())l(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const d=(h=e.external.registry.get(n))==null?void 0:h.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,i.def??i.schema);const s=((m=e.external)==null?void 0:m.defs)??{};for(const d of e.seen.entries()){const y=d[1];y.def&&y.defId&&(s[y.defId]=y.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:Kl(n,"input",e.processors),output:Kl(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Dt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const l=e._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Dt(l.element,i);if(l.type==="set")return Dt(l.valueType,i);if(l.type==="lazy")return Dt(l.getter(),i);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Dt(l.innerType,i);if(l.type==="intersection")return Dt(l.left,i)||Dt(l.right,i);if(l.type==="record"||l.type==="map")return Dt(l.keyType,i)||Dt(l.valueType,i);if(l.type==="pipe")return Dt(l.in,i)||Dt(l.out,i);if(l.type==="object"){for(const o in l.shape)if(Dt(l.shape[o],i))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(Dt(o,i))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(Dt(o,i))return!0;return!!(l.rest&&Dt(l.rest,i))}return!1}const px=(e,n={})=>i=>{const l=Jl({...i,processors:n});return We(e,l),Ql(l,e),Pl(l,e)},Kl=(e,n,i={})=>l=>{const{libraryOptions:o,target:s}=l??{},c=Jl({...o??{},target:s,io:n,processors:i});return We(e,c),Ql(c,e),Pl(c,e)},dx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hp=(e,n,i,l)=>{const o=i;o.type="string";const{minimum:s,maximum:c,format:h,patterns:m,contentEncoding:d}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof c=="number"&&(o.maxLength=c),h&&(o.format=dx[h]??h,o.format===""&&delete o.format,h==="time"&&delete o.format),d&&(o.contentEncoding=d),m&&m.size>0){const y=[...m];y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(g=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},qp=(e,n,i,l)=>{const o=i,{minimum:s,maximum:c,format:h,multipleOf:m,exclusiveMaximum:d,exclusiveMinimum:y}=e._zod.bag;typeof h=="string"&&h.includes("int")?o.type="integer":o.type="number",typeof y=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=y,o.exclusiveMinimum=!0):o.exclusiveMinimum=y),typeof s=="number"&&(o.minimum=s,typeof y=="number"&&n.target!=="draft-04"&&(y>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof d=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=d,o.exclusiveMaximum=!0):o.exclusiveMaximum=d),typeof c=="number"&&(o.maximum=c,typeof d=="number"&&n.target!=="draft-04"&&(d<=c?delete o.maximum:delete o.exclusiveMaximum)),typeof m=="number"&&(o.multipleOf=m)},$p=(e,n,i,l)=>{i.type="boolean"},mx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},gx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Vp=(e,n,i,l)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},yx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},vx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Yp=(e,n,i,l)=>{i.not={}},bx=(e,n,i,l)=>{},Gp=(e,n,i,l)=>{},_x=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Xp=(e,n,i,l)=>{const o=e._zod.def,s=ip(o.entries);s.every(c=>typeof c=="number")&&(i.type="number"),s.every(c=>typeof c=="string")&&(i.type="string"),i.enum=s},Fp=(e,n,i,l)=>{const o=e._zod.def,s=[];for(const c of o.values)if(c===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(c))}else s.push(c);if(s.length!==0)if(s.length===1){const c=s[0];i.type=c===null?"null":typeof c,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[c]:i.const=c}else s.every(c=>typeof c=="number")&&(i.type="number"),s.every(c=>typeof c=="string")&&(i.type="string"),s.every(c=>typeof c=="boolean")&&(i.type="boolean"),s.every(c=>c===null)&&(i.type="null"),i.enum=s},Sx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xx=(e,n,i,l)=>{const o=i,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=s.source},Ex=(e,n,i,l)=>{const o=i,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:h,mime:m}=e._zod.bag;c!==void 0&&(s.minLength=c),h!==void 0&&(s.maxLength=h),m?m.length===1?(s.contentMediaType=m[0],Object.assign(o,s)):(Object.assign(o,s),o.anyOf=m.map(d=>({contentMediaType:d}))):Object.assign(o,s)},zx=(e,n,i,l)=>{i.type="boolean"},Jp=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Qp=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Tx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Pp=(e,n,i,l)=>{const o=i,s=e._zod.def,{minimum:c,maximum:h}=e._zod.bag;typeof c=="number"&&(o.minItems=c),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=We(s.element,n,{...l,path:[...l.path,"items"]})},Kp=(e,n,i,l)=>{var d;const o=i,s=e._zod.def;o.type="object",o.properties={};const c=s.shape;for(const y in c)o.properties[y]=We(c[y],n,{...l,path:[...l.path,"properties",y]});const h=new Set(Object.keys(c)),m=new Set([...h].filter(y=>{const g=s.shape[y]._zod;return n.io==="input"?g.optin===void 0:g.optout===void 0}));m.size>0&&(o.required=Array.from(m)),((d=s.catchall)==null?void 0:d._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=We(s.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},Wp=(e,n,i,l)=>{const o=e._zod.def,s=o.inclusive===!1,c=o.options.map((h,m)=>We(h,n,{...l,path:[...l.path,s?"oneOf":"anyOf",m]}));s?i.oneOf=c:i.anyOf=c},ed=(e,n,i,l)=>{const o=e._zod.def,s=We(o.left,n,{...l,path:[...l.path,"allOf",0]}),c=We(o.right,n,{...l,path:[...l.path,"allOf",1]}),h=d=>"allOf"in d&&Object.keys(d).length===1,m=[...h(s)?s.allOf:[s],...h(c)?c.allOf:[c]];i.allOf=m},Ax=(e,n,i,l)=>{const o=i,s=e._zod.def;o.type="array";const c=n.target==="draft-2020-12"?"prefixItems":"items",h=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",m=s.items.map((_,b)=>We(_,n,{...l,path:[...l.path,c,b]})),d=s.rest?We(s.rest,n,{...l,path:[...l.path,h,...n.target==="openapi-3.0"?[s.items.length]:[]]}):null;n.target==="draft-2020-12"?(o.prefixItems=m,d&&(o.items=d)):n.target==="openapi-3.0"?(o.items={anyOf:m},d&&o.items.anyOf.push(d),o.minItems=m.length,d||(o.maxItems=m.length)):(o.items=m,d&&(o.additionalItems=d));const{minimum:y,maximum:g}=e._zod.bag;typeof y=="number"&&(o.minItems=y),typeof g=="number"&&(o.maxItems=g)},td=(e,n,i,l)=>{const o=i,s=e._zod.def;o.type="object";const c=s.keyType,h=c._zod.bag,m=h==null?void 0:h.patterns;if(s.mode==="loose"&&m&&m.size>0){const y=We(s.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});o.patternProperties={};for(const g of m)o.patternProperties[g.source]=y}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=We(s.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=We(s.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const d=c._zod.values;if(d){const y=[...d].filter(g=>typeof g=="string"||typeof g=="number");y.length>0&&(o.required=y)}},nd=(e,n,i,l)=>{const o=e._zod.def,s=We(o.innerType,n,l),c=n.seen.get(e);n.target==="openapi-3.0"?(c.ref=o.innerType,i.nullable=!0):i.anyOf=[s,{type:"null"}]},rd=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType},id=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType,i.default=JSON.parse(JSON.stringify(o.defaultValue))},ad=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ld=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType;let c;try{c=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=c},ud=(e,n,i,l)=>{const o=e._zod.def,s=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;We(s,n,l);const c=n.seen.get(e);c.ref=s},od=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType,i.readOnly=!0},Ox=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType},rs=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType},sd=(e,n,i,l)=>{const o=e._zod.innerType;We(o,n,l);const s=n.seen.get(e);s.ref=o},cd={string:Hp,number:qp,boolean:$p,bigint:mx,symbol:gx,null:Vp,undefined:yx,void:vx,never:Yp,any:bx,unknown:Gp,date:_x,enum:Xp,literal:Fp,nan:Sx,template_literal:xx,file:Ex,success:zx,custom:Jp,function:wx,transform:Qp,map:kx,set:Tx,array:Pp,object:Kp,union:Wp,intersection:ed,tuple:Ax,record:td,nullable:nd,nonoptional:rd,default:id,prefault:ad,catch:ld,pipe:ud,readonly:od,promise:Ox,optional:rs,lazy:sd};function Cx(e,n){if("_idmap"in e){const l=e,o=Jl({...n,processors:cd}),s={};for(const m of l._idmap.entries()){const[d,y]=m;We(y,o)}const c={},h={registry:l,uri:n==null?void 0:n.uri,defs:s};o.external=h;for(const m of l._idmap.entries()){const[d,y]=m;Ql(o,y),c[d]=Pl(o,y)}if(Object.keys(s).length>0){const m=o.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[m]:s}}return{schemas:c}}const i=Jl({...n,processors:cd});return We(e,i),Ql(i,e),Pl(i,e)}const Nx=$("ZodISODateTime",(e,n)=>{M_.init(e,n),ct.init(e,n)});function Dx(e){return HS(Nx,e)}const Mx=$("ZodISODate",(e,n)=>{R_.init(e,n),ct.init(e,n)});function Rx(e){return qS(Mx,e)}const jx=$("ZodISOTime",(e,n)=>{j_.init(e,n),ct.init(e,n)});function Ux(e){return $S(jx,e)}const Zx=$("ZodISODuration",(e,n)=>{U_.init(e,n),ct.init(e,n)});function Lx(e){return VS(Zx,e)}const sn=$("ZodError",(e,n)=>{cp.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>w1(e,i)},flatten:{value:i=>z1(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,Xo,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,Xo,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ix=Po(sn),Bx=Ko(sn),Hx=$l(sn),fd=Vl(sn),qx=A1(sn),$x=O1(sn),Vx=C1(sn),Yx=N1(sn),Gx=D1(sn),Xx=M1(sn),Fx=R1(sn),Jx=j1(sn),nt=$("ZodType",(e,n)=>(tt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Kl(e,"input"),output:Kl(e,"output")}}),e.toJSONSchema=px(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(sr(n,{checks:[...n.checks??[],...i.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),e.with=e.check,e.clone=(i,l)=>cr(e,i,l),e.brand=()=>e,e.register=(i,l)=>(i.add(e,l),e),e.parse=(i,l)=>Ix(e,i,l,{callee:e.parse}),e.safeParse=(i,l)=>Hx(e,i,l),e.parseAsync=async(i,l)=>Bx(e,i,l,{callee:e.parseAsync}),e.safeParseAsync=async(i,l)=>fd(e,i,l),e.spa=e.safeParseAsync,e.encode=(i,l)=>qx(e,i,l),e.decode=(i,l)=>$x(e,i,l),e.encodeAsync=async(i,l)=>Vx(e,i,l),e.decodeAsync=async(i,l)=>Yx(e,i,l),e.safeEncode=(i,l)=>Gx(e,i,l),e.safeDecode=(i,l)=>Xx(e,i,l),e.safeEncodeAsync=async(i,l)=>Fx(e,i,l),e.safeDecodeAsync=async(i,l)=>Jx(e,i,l),e.refine=(i,l)=>e.check(YE(i,l)),e.superRefine=i=>e.check(GE(i)),e.overwrite=i=>e.check(_i(i)),e.optional=()=>Sd(e),e.exactOptional=()=>NE(e),e.nullable=()=>xd(e),e.nullish=()=>Sd(xd(e)),e.nonoptional=i=>ZE(e,i),e.array=()=>Si(e),e.or=i=>Rt([e,i]),e.and=i=>wE(e,i),e.transform=i=>zd(e,OE(i)),e.default=i=>RE(e,i),e.prefault=i=>UE(e,i),e.catch=i=>IE(e,i),e.pipe=i=>zd(e,i),e.readonly=()=>qE(e),e.describe=i=>{const l=e.clone();return ka.add(l,{description:i}),l},Object.defineProperty(e,"description",{get(){var i;return(i=ka.get(e))==null?void 0:i.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return ka.get(e);const l=e.clone();return ka.add(l,i[0]),l},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),hd=$("_ZodString",(e,n)=>{Wo.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,o,s)=>Hp(e,l,o);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...l)=>e.check(PS(...l)),e.includes=(...l)=>e.check(ex(...l)),e.startsWith=(...l)=>e.check(tx(...l)),e.endsWith=(...l)=>e.check(nx(...l)),e.min=(...l)=>e.check(Fl(...l)),e.max=(...l)=>e.check(Ip(...l)),e.length=(...l)=>e.check(Bp(...l)),e.nonempty=(...l)=>e.check(Fl(1,...l)),e.lowercase=l=>e.check(KS(l)),e.uppercase=l=>e.check(WS(l)),e.trim=()=>e.check(ix()),e.normalize=(...l)=>e.check(rx(...l)),e.toLowerCase=()=>e.check(ax()),e.toUpperCase=()=>e.check(lx()),e.slugify=()=>e.check(ux())}),Qx=$("ZodString",(e,n)=>{Wo.init(e,n),hd.init(e,n),e.email=i=>e.check(_S(Px,i)),e.url=i=>e.check(wS(Kx,i)),e.jwt=i=>e.check(BS(pE,i)),e.emoji=i=>e.check(kS(Wx,i)),e.guid=i=>e.check(jp(pd,i)),e.uuid=i=>e.check(SS(Wl,i)),e.uuidv4=i=>e.check(xS(Wl,i)),e.uuidv6=i=>e.check(ES(Wl,i)),e.uuidv7=i=>e.check(zS(Wl,i)),e.nanoid=i=>e.check(TS(eE,i)),e.guid=i=>e.check(jp(pd,i)),e.cuid=i=>e.check(AS(tE,i)),e.cuid2=i=>e.check(OS(nE,i)),e.ulid=i=>e.check(CS(rE,i)),e.base64=i=>e.check(ZS(cE,i)),e.base64url=i=>e.check(LS(fE,i)),e.xid=i=>e.check(NS(iE,i)),e.ksuid=i=>e.check(DS(aE,i)),e.ipv4=i=>e.check(MS(lE,i)),e.ipv6=i=>e.check(RS(uE,i)),e.cidrv4=i=>e.check(jS(oE,i)),e.cidrv6=i=>e.check(US(sE,i)),e.e164=i=>e.check(IS(hE,i)),e.datetime=i=>e.check(Dx(i)),e.date=i=>e.check(Rx(i)),e.time=i=>e.check(Ux(i)),e.duration=i=>e.check(Lx(i))});function ee(e){return bS(Qx,e)}const ct=$("ZodStringFormat",(e,n)=>{ut.init(e,n),hd.init(e,n)}),Px=$("ZodEmail",(e,n)=>{z_.init(e,n),ct.init(e,n)}),pd=$("ZodGUID",(e,n)=>{x_.init(e,n),ct.init(e,n)}),Wl=$("ZodUUID",(e,n)=>{E_.init(e,n),ct.init(e,n)}),Kx=$("ZodURL",(e,n)=>{w_.init(e,n),ct.init(e,n)}),Wx=$("ZodEmoji",(e,n)=>{k_.init(e,n),ct.init(e,n)}),eE=$("ZodNanoID",(e,n)=>{T_.init(e,n),ct.init(e,n)}),tE=$("ZodCUID",(e,n)=>{A_.init(e,n),ct.init(e,n)}),nE=$("ZodCUID2",(e,n)=>{O_.init(e,n),ct.init(e,n)}),rE=$("ZodULID",(e,n)=>{C_.init(e,n),ct.init(e,n)}),iE=$("ZodXID",(e,n)=>{N_.init(e,n),ct.init(e,n)}),aE=$("ZodKSUID",(e,n)=>{D_.init(e,n),ct.init(e,n)}),lE=$("ZodIPv4",(e,n)=>{Z_.init(e,n),ct.init(e,n)}),uE=$("ZodIPv6",(e,n)=>{L_.init(e,n),ct.init(e,n)}),oE=$("ZodCIDRv4",(e,n)=>{I_.init(e,n),ct.init(e,n)}),sE=$("ZodCIDRv6",(e,n)=>{B_.init(e,n),ct.init(e,n)}),cE=$("ZodBase64",(e,n)=>{H_.init(e,n),ct.init(e,n)}),fE=$("ZodBase64URL",(e,n)=>{$_.init(e,n),ct.init(e,n)}),hE=$("ZodE164",(e,n)=>{V_.init(e,n),ct.init(e,n)}),pE=$("ZodJWT",(e,n)=>{G_.init(e,n),ct.init(e,n)}),dd=$("ZodNumber",(e,n)=>{Sp.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,o,s)=>qp(e,l,o),e.gt=(l,o)=>e.check(Zp(l,o)),e.gte=(l,o)=>e.check(ns(l,o)),e.min=(l,o)=>e.check(ns(l,o)),e.lt=(l,o)=>e.check(Up(l,o)),e.lte=(l,o)=>e.check(ts(l,o)),e.max=(l,o)=>e.check(ts(l,o)),e.int=l=>e.check(md(l)),e.safe=l=>e.check(md(l)),e.positive=l=>e.check(Zp(0,l)),e.nonnegative=l=>e.check(ns(0,l)),e.negative=l=>e.check(Up(0,l)),e.nonpositive=l=>e.check(ts(0,l)),e.multipleOf=(l,o)=>e.check(Lp(l,o)),e.step=(l,o)=>e.check(Lp(l,o)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function dE(e){return YS(dd,e)}const mE=$("ZodNumberFormat",(e,n)=>{X_.init(e,n),dd.init(e,n)});function md(e){return GS(mE,e)}const gE=$("ZodBoolean",(e,n)=>{F_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>$p(e,i,l)});function Mt(e){return XS(gE,e)}const yE=$("ZodNull",(e,n)=>{J_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Vp(e,i,l)});function vE(e){return FS(yE,e)}const bE=$("ZodUnknown",(e,n)=>{Q_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Gp()});function Nn(){return JS(bE)}const _E=$("ZodNever",(e,n)=>{P_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Yp(e,i,l)});function gd(e){return QS(_E,e)}const SE=$("ZodArray",(e,n)=>{K_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Pp(e,i,l,o),e.element=n.element,e.min=(i,l)=>e.check(Fl(i,l)),e.nonempty=i=>e.check(Fl(1,i)),e.max=(i,l)=>e.check(Ip(i,l)),e.length=(i,l)=>e.check(Bp(i,l)),e.unwrap=()=>e.element});function Si(e,n){return ox(SE,e,n)}const yd=$("ZodObject",(e,n)=>{eS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Kp(e,i,l,o),Re(e,"shape",()=>n.shape),e.keyof=()=>bd(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nn()}),e.strict=()=>e.clone({...e._zod.def,catchall:gd()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>b1(e,i),e.safeExtend=i=>_1(e,i),e.merge=i=>S1(e,i),e.pick=i=>y1(e,i),e.omit=i=>v1(e,i),e.partial=(...i)=>x1(_d,e,i[0]),e.required=(...i)=>E1(Ed,e,i[0])});function Je(e,n){const i={type:"object",shape:e??{},...oe(n)};return new yd(i)}function rt(e,n){return new yd({type:"object",shape:e,catchall:gd(),...oe(n)})}const vd=$("ZodUnion",(e,n)=>{kp.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Wp(e,i,l,o),e.options=n.options});function Rt(e,n){return new vd({type:"union",options:e,...oe(n)})}const xE=$("ZodDiscriminatedUnion",(e,n)=>{vd.init(e,n),tS.init(e,n)});function EE(e,n,i){return new xE({type:"union",options:n,discriminator:e,...oe(i)})}const zE=$("ZodIntersection",(e,n)=>{nS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ed(e,i,l,o)});function wE(e,n){return new zE({type:"intersection",left:e,right:n})}const kE=$("ZodRecord",(e,n)=>{rS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>td(e,i,l,o),e.keyType=n.keyType,e.valueType=n.valueType});function Ta(e,n,i){return new kE({type:"record",keyType:e,valueType:n,...oe(i)})}const is=$("ZodEnum",(e,n)=>{iS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,o,s)=>Xp(e,l,o),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(l,o)=>{const s={};for(const c of l)if(i.has(c))s[c]=n.entries[c];else throw new Error(`Key ${c} not found in enum`);return new is({...n,checks:[],...oe(o),entries:s})},e.exclude=(l,o)=>{const s={...n.entries};for(const c of l)if(i.has(c))delete s[c];else throw new Error(`Key ${c} not found in enum`);return new is({...n,checks:[],...oe(o),entries:s})}});function bd(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new is({type:"enum",entries:i,...oe(n)})}const TE=$("ZodLiteral",(e,n)=>{aS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Fp(e,i,l),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function ye(e,n){return new TE({type:"literal",values:Array.isArray(e)?e:[e],...oe(n)})}const AE=$("ZodTransform",(e,n)=>{lS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Qp(e,i),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new np(e.constructor.name);i.addIssue=s=>{if(typeof s=="string")i.issues.push(wa(s,i.value,n));else{const c=s;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=i.value),c.inst??(c.inst=e),i.issues.push(wa(c))}};const o=n.transform(i.value,i);return o instanceof Promise?o.then(s=>(i.value=s,i)):(i.value=o,i)}});function OE(e){return new AE({type:"transform",transform:e})}const _d=$("ZodOptional",(e,n)=>{Op.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>rs(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function Sd(e){return new _d({type:"optional",innerType:e})}const CE=$("ZodExactOptional",(e,n)=>{uS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>rs(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function NE(e){return new CE({type:"optional",innerType:e})}const DE=$("ZodNullable",(e,n)=>{oS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>nd(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function xd(e){return new DE({type:"nullable",innerType:e})}const ME=$("ZodDefault",(e,n)=>{sS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>id(e,i,l,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function RE(e,n){return new ME({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():op(n)}})}const jE=$("ZodPrefault",(e,n)=>{cS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ad(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function UE(e,n){return new jE({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():op(n)}})}const Ed=$("ZodNonOptional",(e,n)=>{fS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>rd(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function ZE(e,n){return new Ed({type:"nonoptional",innerType:e,...oe(n)})}const LE=$("ZodCatch",(e,n)=>{hS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ld(e,i,l,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function IE(e,n){return new LE({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const BE=$("ZodPipe",(e,n)=>{pS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ud(e,i,l,o),e.in=n.in,e.out=n.out});function zd(e,n){return new BE({type:"pipe",in:e,out:n})}const HE=$("ZodReadonly",(e,n)=>{dS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>od(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function qE(e){return new HE({type:"readonly",innerType:e})}const $E=$("ZodLazy",(e,n)=>{mS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>sd(e,i,l,o),e.unwrap=()=>e._zod.def.getter()});function VE(e){return new $E({type:"lazy",getter:e})}const as=$("ZodCustom",(e,n)=>{gS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Jp(e,i)});function wd(e,n){return sx(as,e??(()=>!0),n)}function YE(e,n={}){return cx(as,e,n)}function GE(e){return fx(e)}function eu(e,n={}){const i=new as({type:"custom",check:"custom",fn:l=>l instanceof e,abort:!0,...oe(n)});return i._zod.bag.Class=e,i._zod.check=l=>{l.value instanceof e||l.issues.push({code:"invalid_type",expected:e.name,input:l.value,inst:i,path:[...i._zod.def.path??[]]})},i}var Aa;(function(e){e.assertEqual=o=>{};function n(o){}e.assertIs=n;function i(o){throw new Error}e.assertNever=i,e.arrayToEnum=o=>{const s={};for(const c of o)s[c]=c;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(h=>typeof o[o[h]]!="number"),c={};for(const h of s)c[h]=o[h];return e.objectValues(c)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},e.find=(o,s)=>{for(const c of o)if(s(c))return c},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function l(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}e.joinValues=l,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Aa||(Aa={}));var kd;(function(e){e.mergeShapes=(n,i)=>({...n,...i})})(kd||(kd={})),Aa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Aa.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 tu extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=n}format(n){const i=n||function(s){return s.message},l={_errors:[]},o=s=>{for(const c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)l._errors.push(i(c));else{let h=l,m=0;for(;m<c.path.length;){const d=c.path[m];m===c.path.length-1?(h[d]=h[d]||{_errors:[]},h[d]._errors.push(i(c))):h[d]=h[d]||{_errors:[]},h=h[d],m++}}};return o(this),l}static assert(n){if(!(n instanceof tu))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Aa.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=i=>i.message){const i=Object.create(null),l=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];i[s]=i[s]||[],i[s].push(n(o))}else l.push(n(o));return{formErrors:l,fieldErrors:i}}get formErrors(){return this.flatten()}}tu.create=e=>new tu(e);var Td;(function(e){e.errToObj=n=>typeof n=="string"?{message:n}:n||{},e.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(Td||(Td={}));var xe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(xe||(xe={}));class Ad extends Error{constructor(n,i){super(n),this.name="ParseError",this.type=i.type,this.field=i.field,this.value=i.value,this.line=i.line}}function ls(e){}function XE(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:n=ls,onError:i=ls,onRetry:l=ls,onComment:o}=e;let s="",c=!0,h,m="",d="";function y(T){const M=c?T.replace(/^\xEF\xBB\xBF/,""):T,[O,B]=FE(`${s}${M}`);for(const k of O)g(k);s=B,c=!1}function g(T){if(T===""){b();return}if(T.startsWith(":")){o&&o(T.slice(T.startsWith(": ")?2:1));return}const M=T.indexOf(":");if(M!==-1){const O=T.slice(0,M),B=T[M+1]===" "?2:1,k=T.slice(M+B);_(O,k,T);return}_(T,"",T)}function _(T,M,O){switch(T){case"event":d=M;break;case"data":m=`${m}${M}
|
|
90
|
-
`;break;case"id":h=
|
|
91
|
-
`)?m.slice(0,-1):m}),h=void 0,m="",d=""}function E(
|
|
89
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const y of e.seen.entries()){const g=y[1];if(n===y[0]){s(y);continue}if(e.external){const b=(m=e.external.registry.get(y[0]))==null?void 0:m.id;if(n!==y[0]&&b){s(y);continue}}if((d=e.metadataRegistry.get(y[0]))==null?void 0:d.id){s(y);continue}if(g.cycle){s(y);continue}if(g.count>1&&e.reused==="ref"){s(y);continue}}}function Pl(e,n){var c,h,m;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=d=>{const y=e.seen.get(d);if(y.ref===null)return;const g=y.def??y.schema,_={...g},b=y.ref;if(y.ref=null,b){l(b);const k=e.seen.get(b),R=k.schema;if(R.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(R)):Object.assign(g,R),Object.assign(g,_),d._zod.parent===b)for(const B in g)B==="$ref"||B==="allOf"||B in _||delete g[B];if(R.$ref&&k.def)for(const B in g)B==="$ref"||B==="allOf"||B in k.def&&JSON.stringify(g[B])===JSON.stringify(k.def[B])&&delete g[B]}const E=d._zod.parent;if(E&&E!==b){l(E);const k=e.seen.get(E);if(k!=null&&k.schema.$ref&&(g.$ref=k.schema.$ref,k.def))for(const R in g)R==="$ref"||R==="allOf"||R in k.def&&JSON.stringify(g[R])===JSON.stringify(k.def[R])&&delete g[R]}e.override({zodSchema:d,jsonSchema:g,path:y.path??[]})};for(const d of[...e.seen.entries()].reverse())l(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(c=e.external)!=null&&c.uri){const d=(h=e.external.registry.get(n))==null?void 0:h.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,i.def??i.schema);const s=((m=e.external)==null?void 0:m.defs)??{};for(const d of e.seen.entries()){const y=d[1];y.def&&y.defId&&(s[y.defId]=y.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:Kl(n,"input",e.processors),output:Kl(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Dt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const l=e._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Dt(l.element,i);if(l.type==="set")return Dt(l.valueType,i);if(l.type==="lazy")return Dt(l.getter(),i);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Dt(l.innerType,i);if(l.type==="intersection")return Dt(l.left,i)||Dt(l.right,i);if(l.type==="record"||l.type==="map")return Dt(l.keyType,i)||Dt(l.valueType,i);if(l.type==="pipe")return Dt(l.in,i)||Dt(l.out,i);if(l.type==="object"){for(const o in l.shape)if(Dt(l.shape[o],i))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(Dt(o,i))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(Dt(o,i))return!0;return!!(l.rest&&Dt(l.rest,i))}return!1}const px=(e,n={})=>i=>{const l=Jl({...i,processors:n});return We(e,l),Ql(l,e),Pl(l,e)},Kl=(e,n,i={})=>l=>{const{libraryOptions:o,target:s}=l??{},c=Jl({...o??{},target:s,io:n,processors:i});return We(e,c),Ql(c,e),Pl(c,e)},dx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hp=(e,n,i,l)=>{const o=i;o.type="string";const{minimum:s,maximum:c,format:h,patterns:m,contentEncoding:d}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof c=="number"&&(o.maxLength=c),h&&(o.format=dx[h]??h,o.format===""&&delete o.format,h==="time"&&delete o.format),d&&(o.contentEncoding=d),m&&m.size>0){const y=[...m];y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(g=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},qp=(e,n,i,l)=>{const o=i,{minimum:s,maximum:c,format:h,multipleOf:m,exclusiveMaximum:d,exclusiveMinimum:y}=e._zod.bag;typeof h=="string"&&h.includes("int")?o.type="integer":o.type="number",typeof y=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=y,o.exclusiveMinimum=!0):o.exclusiveMinimum=y),typeof s=="number"&&(o.minimum=s,typeof y=="number"&&n.target!=="draft-04"&&(y>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof d=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=d,o.exclusiveMaximum=!0):o.exclusiveMaximum=d),typeof c=="number"&&(o.maximum=c,typeof d=="number"&&n.target!=="draft-04"&&(d<=c?delete o.maximum:delete o.exclusiveMaximum)),typeof m=="number"&&(o.multipleOf=m)},$p=(e,n,i,l)=>{i.type="boolean"},mx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},gx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Vp=(e,n,i,l)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},yx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},vx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Yp=(e,n,i,l)=>{i.not={}},bx=(e,n,i,l)=>{},Gp=(e,n,i,l)=>{},_x=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Xp=(e,n,i,l)=>{const o=e._zod.def,s=ip(o.entries);s.every(c=>typeof c=="number")&&(i.type="number"),s.every(c=>typeof c=="string")&&(i.type="string"),i.enum=s},Fp=(e,n,i,l)=>{const o=e._zod.def,s=[];for(const c of o.values)if(c===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(c))}else s.push(c);if(s.length!==0)if(s.length===1){const c=s[0];i.type=c===null?"null":typeof c,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[c]:i.const=c}else s.every(c=>typeof c=="number")&&(i.type="number"),s.every(c=>typeof c=="string")&&(i.type="string"),s.every(c=>typeof c=="boolean")&&(i.type="boolean"),s.every(c=>c===null)&&(i.type="null"),i.enum=s},Sx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},xx=(e,n,i,l)=>{const o=i,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=s.source},Ex=(e,n,i,l)=>{const o=i,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:h,mime:m}=e._zod.bag;c!==void 0&&(s.minLength=c),h!==void 0&&(s.maxLength=h),m?m.length===1?(s.contentMediaType=m[0],Object.assign(o,s)):(Object.assign(o,s),o.anyOf=m.map(d=>({contentMediaType:d}))):Object.assign(o,s)},zx=(e,n,i,l)=>{i.type="boolean"},Jp=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},wx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Qp=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},kx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Tx=(e,n,i,l)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Pp=(e,n,i,l)=>{const o=i,s=e._zod.def,{minimum:c,maximum:h}=e._zod.bag;typeof c=="number"&&(o.minItems=c),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=We(s.element,n,{...l,path:[...l.path,"items"]})},Kp=(e,n,i,l)=>{var d;const o=i,s=e._zod.def;o.type="object",o.properties={};const c=s.shape;for(const y in c)o.properties[y]=We(c[y],n,{...l,path:[...l.path,"properties",y]});const h=new Set(Object.keys(c)),m=new Set([...h].filter(y=>{const g=s.shape[y]._zod;return n.io==="input"?g.optin===void 0:g.optout===void 0}));m.size>0&&(o.required=Array.from(m)),((d=s.catchall)==null?void 0:d._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=We(s.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},Wp=(e,n,i,l)=>{const o=e._zod.def,s=o.inclusive===!1,c=o.options.map((h,m)=>We(h,n,{...l,path:[...l.path,s?"oneOf":"anyOf",m]}));s?i.oneOf=c:i.anyOf=c},ed=(e,n,i,l)=>{const o=e._zod.def,s=We(o.left,n,{...l,path:[...l.path,"allOf",0]}),c=We(o.right,n,{...l,path:[...l.path,"allOf",1]}),h=d=>"allOf"in d&&Object.keys(d).length===1,m=[...h(s)?s.allOf:[s],...h(c)?c.allOf:[c]];i.allOf=m},Ax=(e,n,i,l)=>{const o=i,s=e._zod.def;o.type="array";const c=n.target==="draft-2020-12"?"prefixItems":"items",h=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",m=s.items.map((_,b)=>We(_,n,{...l,path:[...l.path,c,b]})),d=s.rest?We(s.rest,n,{...l,path:[...l.path,h,...n.target==="openapi-3.0"?[s.items.length]:[]]}):null;n.target==="draft-2020-12"?(o.prefixItems=m,d&&(o.items=d)):n.target==="openapi-3.0"?(o.items={anyOf:m},d&&o.items.anyOf.push(d),o.minItems=m.length,d||(o.maxItems=m.length)):(o.items=m,d&&(o.additionalItems=d));const{minimum:y,maximum:g}=e._zod.bag;typeof y=="number"&&(o.minItems=y),typeof g=="number"&&(o.maxItems=g)},td=(e,n,i,l)=>{const o=i,s=e._zod.def;o.type="object";const c=s.keyType,h=c._zod.bag,m=h==null?void 0:h.patterns;if(s.mode==="loose"&&m&&m.size>0){const y=We(s.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});o.patternProperties={};for(const g of m)o.patternProperties[g.source]=y}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=We(s.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=We(s.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const d=c._zod.values;if(d){const y=[...d].filter(g=>typeof g=="string"||typeof g=="number");y.length>0&&(o.required=y)}},nd=(e,n,i,l)=>{const o=e._zod.def,s=We(o.innerType,n,l),c=n.seen.get(e);n.target==="openapi-3.0"?(c.ref=o.innerType,i.nullable=!0):i.anyOf=[s,{type:"null"}]},rd=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType},id=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType,i.default=JSON.parse(JSON.stringify(o.defaultValue))},ad=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ld=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType;let c;try{c=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=c},ud=(e,n,i,l)=>{const o=e._zod.def,s=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;We(s,n,l);const c=n.seen.get(e);c.ref=s},od=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType,i.readOnly=!0},Ox=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType},rs=(e,n,i,l)=>{const o=e._zod.def;We(o.innerType,n,l);const s=n.seen.get(e);s.ref=o.innerType},sd=(e,n,i,l)=>{const o=e._zod.innerType;We(o,n,l);const s=n.seen.get(e);s.ref=o},cd={string:Hp,number:qp,boolean:$p,bigint:mx,symbol:gx,null:Vp,undefined:yx,void:vx,never:Yp,any:bx,unknown:Gp,date:_x,enum:Xp,literal:Fp,nan:Sx,template_literal:xx,file:Ex,success:zx,custom:Jp,function:wx,transform:Qp,map:kx,set:Tx,array:Pp,object:Kp,union:Wp,intersection:ed,tuple:Ax,record:td,nullable:nd,nonoptional:rd,default:id,prefault:ad,catch:ld,pipe:ud,readonly:od,promise:Ox,optional:rs,lazy:sd};function Cx(e,n){if("_idmap"in e){const l=e,o=Jl({...n,processors:cd}),s={};for(const m of l._idmap.entries()){const[d,y]=m;We(y,o)}const c={},h={registry:l,uri:n==null?void 0:n.uri,defs:s};o.external=h;for(const m of l._idmap.entries()){const[d,y]=m;Ql(o,y),c[d]=Pl(o,y)}if(Object.keys(s).length>0){const m=o.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[m]:s}}return{schemas:c}}const i=Jl({...n,processors:cd});return We(e,i),Ql(i,e),Pl(i,e)}const Nx=$("ZodISODateTime",(e,n)=>{M_.init(e,n),ct.init(e,n)});function Dx(e){return HS(Nx,e)}const Mx=$("ZodISODate",(e,n)=>{R_.init(e,n),ct.init(e,n)});function Rx(e){return qS(Mx,e)}const jx=$("ZodISOTime",(e,n)=>{j_.init(e,n),ct.init(e,n)});function Ux(e){return $S(jx,e)}const Zx=$("ZodISODuration",(e,n)=>{U_.init(e,n),ct.init(e,n)});function Lx(e){return VS(Zx,e)}const sn=$("ZodError",(e,n)=>{cp.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>w1(e,i)},flatten:{value:i=>z1(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,Xo,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,Xo,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ix=Po(sn),Bx=Ko(sn),Hx=$l(sn),fd=Vl(sn),qx=A1(sn),$x=O1(sn),Vx=C1(sn),Yx=N1(sn),Gx=D1(sn),Xx=M1(sn),Fx=R1(sn),Jx=j1(sn),nt=$("ZodType",(e,n)=>(tt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Kl(e,"input"),output:Kl(e,"output")}}),e.toJSONSchema=px(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(sr(n,{checks:[...n.checks??[],...i.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),e.with=e.check,e.clone=(i,l)=>cr(e,i,l),e.brand=()=>e,e.register=(i,l)=>(i.add(e,l),e),e.parse=(i,l)=>Ix(e,i,l,{callee:e.parse}),e.safeParse=(i,l)=>Hx(e,i,l),e.parseAsync=async(i,l)=>Bx(e,i,l,{callee:e.parseAsync}),e.safeParseAsync=async(i,l)=>fd(e,i,l),e.spa=e.safeParseAsync,e.encode=(i,l)=>qx(e,i,l),e.decode=(i,l)=>$x(e,i,l),e.encodeAsync=async(i,l)=>Vx(e,i,l),e.decodeAsync=async(i,l)=>Yx(e,i,l),e.safeEncode=(i,l)=>Gx(e,i,l),e.safeDecode=(i,l)=>Xx(e,i,l),e.safeEncodeAsync=async(i,l)=>Fx(e,i,l),e.safeDecodeAsync=async(i,l)=>Jx(e,i,l),e.refine=(i,l)=>e.check(YE(i,l)),e.superRefine=i=>e.check(GE(i)),e.overwrite=i=>e.check(_i(i)),e.optional=()=>Sd(e),e.exactOptional=()=>NE(e),e.nullable=()=>xd(e),e.nullish=()=>Sd(xd(e)),e.nonoptional=i=>ZE(e,i),e.array=()=>Si(e),e.or=i=>Rt([e,i]),e.and=i=>wE(e,i),e.transform=i=>zd(e,OE(i)),e.default=i=>RE(e,i),e.prefault=i=>UE(e,i),e.catch=i=>IE(e,i),e.pipe=i=>zd(e,i),e.readonly=()=>qE(e),e.describe=i=>{const l=e.clone();return ka.add(l,{description:i}),l},Object.defineProperty(e,"description",{get(){var i;return(i=ka.get(e))==null?void 0:i.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return ka.get(e);const l=e.clone();return ka.add(l,i[0]),l},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),hd=$("_ZodString",(e,n)=>{Wo.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,o,s)=>Hp(e,l,o);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...l)=>e.check(PS(...l)),e.includes=(...l)=>e.check(ex(...l)),e.startsWith=(...l)=>e.check(tx(...l)),e.endsWith=(...l)=>e.check(nx(...l)),e.min=(...l)=>e.check(Fl(...l)),e.max=(...l)=>e.check(Ip(...l)),e.length=(...l)=>e.check(Bp(...l)),e.nonempty=(...l)=>e.check(Fl(1,...l)),e.lowercase=l=>e.check(KS(l)),e.uppercase=l=>e.check(WS(l)),e.trim=()=>e.check(ix()),e.normalize=(...l)=>e.check(rx(...l)),e.toLowerCase=()=>e.check(ax()),e.toUpperCase=()=>e.check(lx()),e.slugify=()=>e.check(ux())}),Qx=$("ZodString",(e,n)=>{Wo.init(e,n),hd.init(e,n),e.email=i=>e.check(_S(Px,i)),e.url=i=>e.check(wS(Kx,i)),e.jwt=i=>e.check(BS(pE,i)),e.emoji=i=>e.check(kS(Wx,i)),e.guid=i=>e.check(jp(pd,i)),e.uuid=i=>e.check(SS(Wl,i)),e.uuidv4=i=>e.check(xS(Wl,i)),e.uuidv6=i=>e.check(ES(Wl,i)),e.uuidv7=i=>e.check(zS(Wl,i)),e.nanoid=i=>e.check(TS(eE,i)),e.guid=i=>e.check(jp(pd,i)),e.cuid=i=>e.check(AS(tE,i)),e.cuid2=i=>e.check(OS(nE,i)),e.ulid=i=>e.check(CS(rE,i)),e.base64=i=>e.check(ZS(cE,i)),e.base64url=i=>e.check(LS(fE,i)),e.xid=i=>e.check(NS(iE,i)),e.ksuid=i=>e.check(DS(aE,i)),e.ipv4=i=>e.check(MS(lE,i)),e.ipv6=i=>e.check(RS(uE,i)),e.cidrv4=i=>e.check(jS(oE,i)),e.cidrv6=i=>e.check(US(sE,i)),e.e164=i=>e.check(IS(hE,i)),e.datetime=i=>e.check(Dx(i)),e.date=i=>e.check(Rx(i)),e.time=i=>e.check(Ux(i)),e.duration=i=>e.check(Lx(i))});function ee(e){return bS(Qx,e)}const ct=$("ZodStringFormat",(e,n)=>{ut.init(e,n),hd.init(e,n)}),Px=$("ZodEmail",(e,n)=>{z_.init(e,n),ct.init(e,n)}),pd=$("ZodGUID",(e,n)=>{x_.init(e,n),ct.init(e,n)}),Wl=$("ZodUUID",(e,n)=>{E_.init(e,n),ct.init(e,n)}),Kx=$("ZodURL",(e,n)=>{w_.init(e,n),ct.init(e,n)}),Wx=$("ZodEmoji",(e,n)=>{k_.init(e,n),ct.init(e,n)}),eE=$("ZodNanoID",(e,n)=>{T_.init(e,n),ct.init(e,n)}),tE=$("ZodCUID",(e,n)=>{A_.init(e,n),ct.init(e,n)}),nE=$("ZodCUID2",(e,n)=>{O_.init(e,n),ct.init(e,n)}),rE=$("ZodULID",(e,n)=>{C_.init(e,n),ct.init(e,n)}),iE=$("ZodXID",(e,n)=>{N_.init(e,n),ct.init(e,n)}),aE=$("ZodKSUID",(e,n)=>{D_.init(e,n),ct.init(e,n)}),lE=$("ZodIPv4",(e,n)=>{Z_.init(e,n),ct.init(e,n)}),uE=$("ZodIPv6",(e,n)=>{L_.init(e,n),ct.init(e,n)}),oE=$("ZodCIDRv4",(e,n)=>{I_.init(e,n),ct.init(e,n)}),sE=$("ZodCIDRv6",(e,n)=>{B_.init(e,n),ct.init(e,n)}),cE=$("ZodBase64",(e,n)=>{H_.init(e,n),ct.init(e,n)}),fE=$("ZodBase64URL",(e,n)=>{$_.init(e,n),ct.init(e,n)}),hE=$("ZodE164",(e,n)=>{V_.init(e,n),ct.init(e,n)}),pE=$("ZodJWT",(e,n)=>{G_.init(e,n),ct.init(e,n)}),dd=$("ZodNumber",(e,n)=>{Sp.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,o,s)=>qp(e,l,o),e.gt=(l,o)=>e.check(Zp(l,o)),e.gte=(l,o)=>e.check(ns(l,o)),e.min=(l,o)=>e.check(ns(l,o)),e.lt=(l,o)=>e.check(Up(l,o)),e.lte=(l,o)=>e.check(ts(l,o)),e.max=(l,o)=>e.check(ts(l,o)),e.int=l=>e.check(md(l)),e.safe=l=>e.check(md(l)),e.positive=l=>e.check(Zp(0,l)),e.nonnegative=l=>e.check(ns(0,l)),e.negative=l=>e.check(Up(0,l)),e.nonpositive=l=>e.check(ts(0,l)),e.multipleOf=(l,o)=>e.check(Lp(l,o)),e.step=(l,o)=>e.check(Lp(l,o)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function dE(e){return YS(dd,e)}const mE=$("ZodNumberFormat",(e,n)=>{X_.init(e,n),dd.init(e,n)});function md(e){return GS(mE,e)}const gE=$("ZodBoolean",(e,n)=>{F_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>$p(e,i,l)});function Mt(e){return XS(gE,e)}const yE=$("ZodNull",(e,n)=>{J_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Vp(e,i,l)});function vE(e){return FS(yE,e)}const bE=$("ZodUnknown",(e,n)=>{Q_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Gp()});function Nn(){return JS(bE)}const _E=$("ZodNever",(e,n)=>{P_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Yp(e,i,l)});function gd(e){return QS(_E,e)}const SE=$("ZodArray",(e,n)=>{K_.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Pp(e,i,l,o),e.element=n.element,e.min=(i,l)=>e.check(Fl(i,l)),e.nonempty=i=>e.check(Fl(1,i)),e.max=(i,l)=>e.check(Ip(i,l)),e.length=(i,l)=>e.check(Bp(i,l)),e.unwrap=()=>e.element});function Si(e,n){return ox(SE,e,n)}const yd=$("ZodObject",(e,n)=>{eS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Kp(e,i,l,o),Re(e,"shape",()=>n.shape),e.keyof=()=>bd(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Nn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Nn()}),e.strict=()=>e.clone({...e._zod.def,catchall:gd()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>b1(e,i),e.safeExtend=i=>_1(e,i),e.merge=i=>S1(e,i),e.pick=i=>y1(e,i),e.omit=i=>v1(e,i),e.partial=(...i)=>x1(_d,e,i[0]),e.required=(...i)=>E1(Ed,e,i[0])});function Je(e,n){const i={type:"object",shape:e??{},...oe(n)};return new yd(i)}function rt(e,n){return new yd({type:"object",shape:e,catchall:gd(),...oe(n)})}const vd=$("ZodUnion",(e,n)=>{kp.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Wp(e,i,l,o),e.options=n.options});function Rt(e,n){return new vd({type:"union",options:e,...oe(n)})}const xE=$("ZodDiscriminatedUnion",(e,n)=>{vd.init(e,n),tS.init(e,n)});function EE(e,n,i){return new xE({type:"union",options:n,discriminator:e,...oe(i)})}const zE=$("ZodIntersection",(e,n)=>{nS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ed(e,i,l,o)});function wE(e,n){return new zE({type:"intersection",left:e,right:n})}const kE=$("ZodRecord",(e,n)=>{rS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>td(e,i,l,o),e.keyType=n.keyType,e.valueType=n.valueType});function Ta(e,n,i){return new kE({type:"record",keyType:e,valueType:n,...oe(i)})}const is=$("ZodEnum",(e,n)=>{iS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(l,o,s)=>Xp(e,l,o),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(l,o)=>{const s={};for(const c of l)if(i.has(c))s[c]=n.entries[c];else throw new Error(`Key ${c} not found in enum`);return new is({...n,checks:[],...oe(o),entries:s})},e.exclude=(l,o)=>{const s={...n.entries};for(const c of l)if(i.has(c))delete s[c];else throw new Error(`Key ${c} not found in enum`);return new is({...n,checks:[],...oe(o),entries:s})}});function bd(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(l=>[l,l])):e;return new is({type:"enum",entries:i,...oe(n)})}const TE=$("ZodLiteral",(e,n)=>{aS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Fp(e,i,l),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function ge(e,n){return new TE({type:"literal",values:Array.isArray(e)?e:[e],...oe(n)})}const AE=$("ZodTransform",(e,n)=>{lS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Qp(e,i),e._zod.parse=(i,l)=>{if(l.direction==="backward")throw new np(e.constructor.name);i.addIssue=s=>{if(typeof s=="string")i.issues.push(wa(s,i.value,n));else{const c=s;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=i.value),c.inst??(c.inst=e),i.issues.push(wa(c))}};const o=n.transform(i.value,i);return o instanceof Promise?o.then(s=>(i.value=s,i)):(i.value=o,i)}});function OE(e){return new AE({type:"transform",transform:e})}const _d=$("ZodOptional",(e,n)=>{Op.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>rs(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function Sd(e){return new _d({type:"optional",innerType:e})}const CE=$("ZodExactOptional",(e,n)=>{uS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>rs(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function NE(e){return new CE({type:"optional",innerType:e})}const DE=$("ZodNullable",(e,n)=>{oS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>nd(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function xd(e){return new DE({type:"nullable",innerType:e})}const ME=$("ZodDefault",(e,n)=>{sS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>id(e,i,l,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function RE(e,n){return new ME({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():op(n)}})}const jE=$("ZodPrefault",(e,n)=>{cS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ad(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function UE(e,n){return new jE({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():op(n)}})}const Ed=$("ZodNonOptional",(e,n)=>{fS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>rd(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function ZE(e,n){return new Ed({type:"nonoptional",innerType:e,...oe(n)})}const LE=$("ZodCatch",(e,n)=>{hS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ld(e,i,l,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function IE(e,n){return new LE({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const BE=$("ZodPipe",(e,n)=>{pS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>ud(e,i,l,o),e.in=n.in,e.out=n.out});function zd(e,n){return new BE({type:"pipe",in:e,out:n})}const HE=$("ZodReadonly",(e,n)=>{dS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>od(e,i,l,o),e.unwrap=()=>e._zod.def.innerType});function qE(e){return new HE({type:"readonly",innerType:e})}const $E=$("ZodLazy",(e,n)=>{mS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>sd(e,i,l,o),e.unwrap=()=>e._zod.def.getter()});function VE(e){return new $E({type:"lazy",getter:e})}const as=$("ZodCustom",(e,n)=>{gS.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,l,o)=>Jp(e,i)});function wd(e,n){return sx(as,e??(()=>!0),n)}function YE(e,n={}){return cx(as,e,n)}function GE(e){return fx(e)}function eu(e,n={}){const i=new as({type:"custom",check:"custom",fn:l=>l instanceof e,abort:!0,...oe(n)});return i._zod.bag.Class=e,i._zod.check=l=>{l.value instanceof e||l.issues.push({code:"invalid_type",expected:e.name,input:l.value,inst:i,path:[...i._zod.def.path??[]]})},i}var Aa;(function(e){e.assertEqual=o=>{};function n(o){}e.assertIs=n;function i(o){throw new Error}e.assertNever=i,e.arrayToEnum=o=>{const s={};for(const c of o)s[c]=c;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(h=>typeof o[o[h]]!="number"),c={};for(const h of s)c[h]=o[h];return e.objectValues(c)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&s.push(c);return s},e.find=(o,s)=>{for(const c of o)if(s(c))return c},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function l(o,s=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}e.joinValues=l,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(Aa||(Aa={}));var kd;(function(e){e.mergeShapes=(n,i)=>({...n,...i})})(kd||(kd={})),Aa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Aa.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 tu extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=l=>{this.issues=[...this.issues,l]},this.addIssues=(l=[])=>{this.issues=[...this.issues,...l]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=n}format(n){const i=n||function(s){return s.message},l={_errors:[]},o=s=>{for(const c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)l._errors.push(i(c));else{let h=l,m=0;for(;m<c.path.length;){const d=c.path[m];m===c.path.length-1?(h[d]=h[d]||{_errors:[]},h[d]._errors.push(i(c))):h[d]=h[d]||{_errors:[]},h=h[d],m++}}};return o(this),l}static assert(n){if(!(n instanceof tu))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Aa.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=i=>i.message){const i=Object.create(null),l=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];i[s]=i[s]||[],i[s].push(n(o))}else l.push(n(o));return{formErrors:l,fieldErrors:i}}get formErrors(){return this.flatten()}}tu.create=e=>new tu(e);var Td;(function(e){e.errToObj=n=>typeof n=="string"?{message:n}:n||{},e.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(Td||(Td={}));var xe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(xe||(xe={}));class Ad extends Error{constructor(n,i){super(n),this.name="ParseError",this.type=i.type,this.field=i.field,this.value=i.value,this.line=i.line}}function ls(e){}function XE(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:n=ls,onError:i=ls,onRetry:l=ls,onComment:o}=e;let s="",c=!0,h,m="",d="";function y(k){const R=c?k.replace(/^\xEF\xBB\xBF/,""):k,[C,B]=FE(`${s}${R}`);for(const w of C)g(w);s=B,c=!1}function g(k){if(k===""){b();return}if(k.startsWith(":")){o&&o(k.slice(k.startsWith(": ")?2:1));return}const R=k.indexOf(":");if(R!==-1){const C=k.slice(0,R),B=k[R+1]===" "?2:1,w=k.slice(R+B);_(C,w,k);return}_(k,"",k)}function _(k,R,C){switch(k){case"event":d=R;break;case"data":m=`${m}${R}
|
|
90
|
+
`;break;case"id":h=R.includes("\0")?void 0:R;break;case"retry":/^\d+$/.test(R)?l(parseInt(R,10)):i(new Ad(`Invalid \`retry\` value: "${R}"`,{type:"invalid-retry",value:R,line:C}));break;default:i(new Ad(`Unknown field "${k.length>20?`${k.slice(0,20)}…`:k}"`,{type:"unknown-field",field:k,value:R,line:C}));break}}function b(){m.length>0&&n({id:h,event:d||void 0,data:m.endsWith(`
|
|
91
|
+
`)?m.slice(0,-1):m}),h=void 0,m="",d=""}function E(k={}){s&&k.consume&&g(s),c=!0,h=void 0,m="",d="",s=""}return{feed:y,reset:E}}function FE(e){const n=[];let i="",l=0;for(;l<e.length;){const o=e.indexOf("\r",l),s=e.indexOf(`
|
|
92
92
|
`,l);let c=-1;if(o!==-1&&s!==-1?c=Math.min(o,s):o!==-1?o===e.length-1?c=-1:c=o:s!==-1&&(c=s),c===-1){i=e.slice(l);break}else{const h=e.slice(l,c);n.push(h),l=c+1,e[l-1]==="\r"&&e[l]===`
|
|
93
93
|
`&&l++}}return[n,i]}class JE extends TransformStream{constructor({onError:n,onRetry:i,onComment:l}={}){let o;super({start(s){o=XE({onEvent:c=>{s.enqueue(c)},onError(c){n==="terminate"?s.error(c):typeof n=="function"&&n(c)},onRetry:i,onComment:l})},transform(s){o.feed(s)}})}}var Oa=({prefix:e,size:n=16,alphabet:i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:l="-"}={})=>{const o=()=>{const s=i.length,c=new Array(n);for(let h=0;h<n;h++)c[h]=i[Math.random()*s|0];return c.join("")};if(e==null)return o;if(i.includes(l))throw new o1({argument:"separator",message:`The separator "${l}" must not be part of the alphabet "${i}".`});return()=>`${e}${l}${o()}`},QE=Oa();function Od(e=globalThis){var n,i,l;return e.window?"runtime/browser":(n=e.navigator)!=null&&n.userAgent?`runtime/${e.navigator.userAgent.toLowerCase()}`:(l=(i=e.process)==null?void 0:i.versions)!=null&&l.node?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Vr(e){if(e==null)return{};const n={};if(e instanceof Headers)e.forEach((i,l)=>{n[l.toLowerCase()]=i});else{Array.isArray(e)||(e=Object.entries(e));for(const[i,l]of e)l!=null&&(n[i.toLowerCase()]=l)}return n}function Cd(e,...n){const i=new Headers(Vr(e)),l=i.get("user-agent")||"";return i.set("user-agent",[l,...n].filter(Boolean).join(" ")),Object.fromEntries(i.entries())}var PE=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,KE=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Nd(e){const n=JSON.parse(e);return n===null||typeof n!="object"||PE.test(e)===!1&&KE.test(e)===!1?n:WE(n)}function WE(e){let n=[e];for(;n.length;){const i=n;n=[];for(const l of i){if(Object.prototype.hasOwnProperty.call(l,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(l,"constructor")&&l.constructor!==null&&typeof l.constructor=="object"&&Object.prototype.hasOwnProperty.call(l.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const o in l){const s=l[o];s&&typeof s=="object"&&n.push(s)}}}return e}function ez(e){const{stackTraceLimit:n}=Error;try{Error.stackTraceLimit=0}catch{return Nd(e)}try{return Nd(e)}finally{Error.stackTraceLimit=n}}function us(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:i}=e;if(i!=null)for(const l of Object.keys(i))i[l]=Yr(i[l])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(Yr):Yr(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(Yr)),e.allOf!=null&&(e.allOf=e.allOf.map(Yr)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(Yr));const{definitions:n}=e;if(n!=null)for(const i of Object.keys(n))n[i]=Yr(n[i]);return e}function Yr(e){return typeof e=="boolean"?e:us(e)}var tz=Symbol("Let zodToJsonSchema decide on which parser to use"),Dd={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},nz=e=>typeof e=="string"?{...Dd,name:e}:{...Dd,...e};function Pt(){return{}}function rz(e,n){var i,l,o;const s={type:"array"};return(i=e.type)!=null&&i._def&&((o=(l=e.type)==null?void 0:l._def)==null?void 0:o.typeName)!==xe.ZodAny&&(s.items=qe(e.type._def,{...n,currentPath:[...n.currentPath,"items"]})),e.minLength&&(s.minItems=e.minLength.value),e.maxLength&&(s.maxItems=e.maxLength.value),e.exactLength&&(s.minItems=e.exactLength.value,s.maxItems=e.exactLength.value),s}function iz(e){const n={type:"integer",format:"int64"};if(!e.checks)return n;for(const i of e.checks)switch(i.kind){case"min":i.inclusive?n.minimum=i.value:n.exclusiveMinimum=i.value;break;case"max":i.inclusive?n.maximum=i.value:n.exclusiveMaximum=i.value;break;case"multipleOf":n.multipleOf=i.value;break}return n}function az(){return{type:"boolean"}}function Md(e,n){return qe(e.type._def,n)}var lz=(e,n)=>qe(e.innerType._def,n);function Rd(e,n,i){const l=i??n.dateStrategy;if(Array.isArray(l))return{anyOf:l.map((o,s)=>Rd(e,n,o))};switch(l){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return uz(e)}}var uz=e=>{const n={type:"integer",format:"unix-time"};for(const i of e.checks)switch(i.kind){case"min":n.minimum=i.value;break;case"max":n.maximum=i.value;break}return n};function oz(e,n){return{...qe(e.innerType._def,n),default:e.defaultValue()}}function sz(e,n){return n.effectStrategy==="input"?qe(e.schema._def,n):Pt()}function cz(e){return{type:"string",enum:Array.from(e.values)}}var fz=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function hz(e,n){const i=[qe(e.left._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),qe(e.right._def,{...n,currentPath:[...n.currentPath,"allOf","1"]})].filter(o=>!!o),l=[];return i.forEach(o=>{if(fz(o))l.push(...o.allOf);else{let s=o;if("additionalProperties"in o&&o.additionalProperties===!1){const{additionalProperties:c,...h}=o;s=h}l.push(s)}}),l.length?{allOf:l}:void 0}function pz(e){const n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:n==="bigint"?"integer":n,const:e.value}}var os=void 0,En={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(os===void 0&&(os=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),os),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function jd(e,n){const i={type:"string"};if(e.checks)for(const l of e.checks)switch(l.kind){case"min":i.minLength=typeof i.minLength=="number"?Math.max(i.minLength,l.value):l.value;break;case"max":i.maxLength=typeof i.maxLength=="number"?Math.min(i.maxLength,l.value):l.value;break;case"email":switch(n.emailStrategy){case"format:email":zn(i,"email",l.message,n);break;case"format:idn-email":zn(i,"idn-email",l.message,n);break;case"pattern:zod":jt(i,En.email,l.message,n);break}break;case"url":zn(i,"uri",l.message,n);break;case"uuid":zn(i,"uuid",l.message,n);break;case"regex":jt(i,l.regex,l.message,n);break;case"cuid":jt(i,En.cuid,l.message,n);break;case"cuid2":jt(i,En.cuid2,l.message,n);break;case"startsWith":jt(i,RegExp(`^${ss(l.value,n)}`),l.message,n);break;case"endsWith":jt(i,RegExp(`${ss(l.value,n)}$`),l.message,n);break;case"datetime":zn(i,"date-time",l.message,n);break;case"date":zn(i,"date",l.message,n);break;case"time":zn(i,"time",l.message,n);break;case"duration":zn(i,"duration",l.message,n);break;case"length":i.minLength=typeof i.minLength=="number"?Math.max(i.minLength,l.value):l.value,i.maxLength=typeof i.maxLength=="number"?Math.min(i.maxLength,l.value):l.value;break;case"includes":{jt(i,RegExp(ss(l.value,n)),l.message,n);break}case"ip":{l.version!=="v6"&&zn(i,"ipv4",l.message,n),l.version!=="v4"&&zn(i,"ipv6",l.message,n);break}case"base64url":jt(i,En.base64url,l.message,n);break;case"jwt":jt(i,En.jwt,l.message,n);break;case"cidr":{l.version!=="v6"&&jt(i,En.ipv4Cidr,l.message,n),l.version!=="v4"&&jt(i,En.ipv6Cidr,l.message,n);break}case"emoji":jt(i,En.emoji(),l.message,n);break;case"ulid":{jt(i,En.ulid,l.message,n);break}case"base64":{switch(n.base64Strategy){case"format:binary":{zn(i,"binary",l.message,n);break}case"contentEncoding:base64":{i.contentEncoding="base64";break}case"pattern:zod":{jt(i,En.base64,l.message,n);break}}break}case"nanoid":jt(i,En.nanoid,l.message,n)}return i}function ss(e,n){return n.patternStrategy==="escape"?mz(e):e}var dz=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function mz(e){let n="";for(let i=0;i<e.length;i++)dz.has(e[i])||(n+="\\"),n+=e[i];return n}function zn(e,n,i,l){var o;e.format||(o=e.anyOf)!=null&&o.some(s=>s.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:n,...i&&l.errorMessages&&{errorMessage:{format:i}}})):e.format=n}function jt(e,n,i,l){var o;e.pattern||(o=e.allOf)!=null&&o.some(s=>s.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:Ud(n,l),...i&&l.errorMessages&&{errorMessage:{pattern:i}}})):e.pattern=Ud(n,l)}function Ud(e,n){var i;if(!n.applyRegexFlags||!e.flags)return e.source;const l={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=l.i?e.source.toLowerCase():e.source;let s="",c=!1,h=!1,m=!1;for(let d=0;d<o.length;d++){if(c){s+=o[d],c=!1;continue}if(l.i){if(h){if(o[d].match(/[a-z]/)){m?(s+=o[d],s+=`${o[d-2]}-${o[d]}`.toUpperCase(),m=!1):o[d+1]==="-"&&((i=o[d+2])!=null&&i.match(/[a-z]/))?(s+=o[d],m=!0):s+=`${o[d]}${o[d].toUpperCase()}`;continue}}else if(o[d].match(/[a-z]/)){s+=`[${o[d]}${o[d].toUpperCase()}]`;continue}}if(l.m){if(o[d]==="^"){s+=`(^|(?<=[\r
|
|
94
94
|
]))`;continue}else if(o[d]==="$"){s+=`($|(?=[\r
|
|
95
95
|
]))`;continue}}if(l.s&&o[d]==="."){s+=h?`${o[d]}\r
|
|
96
96
|
`:`[${o[d]}\r
|
|
97
|
-
]`;continue}s+=o[d],o[d]==="\\"?c=!0:h&&o[d]==="]"?h=!1:!h&&o[d]==="["&&(h=!0)}try{new RegExp(s)}catch{return console.warn(`Could not convert regex pattern at ${n.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return s}function Zd(e,n){var i,l,o,s,c,h;const m={type:"object",additionalProperties:(i=qe(e.valueType._def,{...n,currentPath:[...n.currentPath,"additionalProperties"]}))!=null?i:n.allowedAdditionalProperties};if(((l=e.keyType)==null?void 0:l._def.typeName)===xe.ZodString&&((o=e.keyType._def.checks)!=null&&o.length)){const{type:d,...y}=jd(e.keyType._def,n);return{...m,propertyNames:y}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===xe.ZodEnum)return{...m,propertyNames:{enum:e.keyType._def.values}};if(((c=e.keyType)==null?void 0:c._def.typeName)===xe.ZodBranded&&e.keyType._def.type._def.typeName===xe.ZodString&&((h=e.keyType._def.type._def.checks)!=null&&h.length)){const{type:d,...y}=Md(e.keyType._def,n);return{...m,propertyNames:y}}}return m}function gz(e,n){if(n.mapStrategy==="record")return Zd(e,n);const i=qe(e.keyType._def,{...n,currentPath:[...n.currentPath,"items","items","0"]})||Pt(),l=qe(e.valueType._def,{...n,currentPath:[...n.currentPath,"items","items","1"]})||Pt();return{type:"array",maxItems:125,items:{type:"array",items:[i,l],minItems:2,maxItems:2}}}function yz(e){const n=e.values,l=Object.keys(e.values).filter(s=>typeof n[n[s]]!="number").map(s=>n[s]),o=Array.from(new Set(l.map(s=>typeof s)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:l}}function vz(){return{not:Pt()}}function bz(){return{type:"null"}}var cs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function _z(e,n){const i=e.options instanceof Map?Array.from(e.options.values()):e.options;if(i.every(l=>l._def.typeName in cs&&(!l._def.checks||!l._def.checks.length))){const l=i.reduce((o,s)=>{const c=cs[s._def.typeName];return c&&!o.includes(c)?[...o,c]:o},[]);return{type:l.length>1?l:l[0]}}else if(i.every(l=>l._def.typeName==="ZodLiteral"&&!l.description)){const l=i.reduce((o,s)=>{const c=typeof s._def.value;switch(c){case"string":case"number":case"boolean":return[...o,c];case"bigint":return[...o,"integer"];case"object":if(s._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(l.length===i.length){const o=l.filter((s,c,h)=>h.indexOf(s)===c);return{type:o.length>1?o:o[0],enum:i.reduce((s,c)=>s.includes(c._def.value)?s:[...s,c._def.value],[])}}}else if(i.every(l=>l._def.typeName==="ZodEnum"))return{type:"string",enum:i.reduce((l,o)=>[...l,...o._def.values.filter(s=>!l.includes(s))],[])};return Sz(e,n)}var Sz=(e,n)=>{const i=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((l,o)=>qe(l._def,{...n,currentPath:[...n.currentPath,"anyOf",`${o}`]})).filter(l=>!!l&&(!n.strictUnions||typeof l=="object"&&Object.keys(l).length>0));return i.length?{anyOf:i}:void 0};function xz(e,n){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[cs[e.innerType._def.typeName],"null"]};const i=qe(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","0"]});return i&&{anyOf:[i,{type:"null"}]}}function Ez(e){const n={type:"number"};if(!e.checks)return n;for(const i of e.checks)switch(i.kind){case"int":n.type="integer";break;case"min":i.inclusive?n.minimum=i.value:n.exclusiveMinimum=i.value;break;case"max":i.inclusive?n.maximum=i.value:n.exclusiveMaximum=i.value;break;case"multipleOf":n.multipleOf=i.value;break}return n}function zz(e,n){const i={type:"object",properties:{}},l=[],o=e.shape();for(const c in o){let h=o[c];if(h===void 0||h._def===void 0)continue;const m=kz(h),d=qe(h._def,{...n,currentPath:[...n.currentPath,"properties",c],propertyPath:[...n.currentPath,"properties",c]});d!==void 0&&(i.properties[c]=d,m||l.push(c))}l.length&&(i.required=l);const s=wz(e,n);return s!==void 0&&(i.additionalProperties=s),i}function wz(e,n){if(e.catchall._def.typeName!=="ZodNever")return qe(e.catchall._def,{...n,currentPath:[...n.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return n.allowedAdditionalProperties;case"strict":return n.rejectedAdditionalProperties;case"strip":return n.removeAdditionalStrategy==="strict"?n.allowedAdditionalProperties:n.rejectedAdditionalProperties}}function kz(e){try{return e.isOptional()}catch{return!0}}var Tz=(e,n)=>{var i;if(n.currentPath.toString()===((i=n.propertyPath)==null?void 0:i.toString()))return qe(e.innerType._def,n);const l=qe(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","1"]});return l?{anyOf:[{not:Pt()},l]}:Pt()},Az=(e,n)=>{if(n.pipeStrategy==="input")return qe(e.in._def,n);if(n.pipeStrategy==="output")return qe(e.out._def,n);const i=qe(e.in._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),l=qe(e.out._def,{...n,currentPath:[...n.currentPath,"allOf",i?"1":"0"]});return{allOf:[i,l].filter(o=>o!==void 0)}};function Oz(e,n){return qe(e.type._def,n)}function Cz(e,n){const l={type:"array",uniqueItems:!0,items:qe(e.valueType._def,{...n,currentPath:[...n.currentPath,"items"]})};return e.minSize&&(l.minItems=e.minSize.value),e.maxSize&&(l.maxItems=e.maxSize.value),l}function Nz(e,n){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((i,l)=>qe(i._def,{...n,currentPath:[...n.currentPath,"items",`${l}`]})).reduce((i,l)=>l===void 0?i:[...i,l],[]),additionalItems:qe(e.rest._def,{...n,currentPath:[...n.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((i,l)=>qe(i._def,{...n,currentPath:[...n.currentPath,"items",`${l}`]})).reduce((i,l)=>l===void 0?i:[...i,l],[])}}function Dz(){return{not:Pt()}}function Mz(){return Pt()}var Rz=(e,n)=>qe(e.innerType._def,n),jz=(e,n,i)=>{switch(n){case xe.ZodString:return jd(e,i);case xe.ZodNumber:return Ez(e);case xe.ZodObject:return zz(e,i);case xe.ZodBigInt:return iz(e);case xe.ZodBoolean:return az();case xe.ZodDate:return Rd(e,i);case xe.ZodUndefined:return Dz();case xe.ZodNull:return bz();case xe.ZodArray:return rz(e,i);case xe.ZodUnion:case xe.ZodDiscriminatedUnion:return _z(e,i);case xe.ZodIntersection:return hz(e,i);case xe.ZodTuple:return Nz(e,i);case xe.ZodRecord:return Zd(e,i);case xe.ZodLiteral:return pz(e);case xe.ZodEnum:return cz(e);case xe.ZodNativeEnum:return yz(e);case xe.ZodNullable:return xz(e,i);case xe.ZodOptional:return Tz(e,i);case xe.ZodMap:return gz(e,i);case xe.ZodSet:return Cz(e,i);case xe.ZodLazy:return()=>e.getter()._def;case xe.ZodPromise:return Oz(e,i);case xe.ZodNaN:case xe.ZodNever:return vz();case xe.ZodEffects:return sz(e,i);case xe.ZodAny:return Pt();case xe.ZodUnknown:return Mz();case xe.ZodDefault:return oz(e,i);case xe.ZodBranded:return Md(e,i);case xe.ZodReadonly:return Rz(e,i);case xe.ZodCatch:return lz(e,i);case xe.ZodPipeline:return Az(e,i);case xe.ZodFunction:case xe.ZodVoid:case xe.ZodSymbol:return;default:return(l=>{})()}},Uz=(e,n)=>{let i=0;for(;i<e.length&&i<n.length&&e[i]===n[i];i++);return[(e.length-i).toString(),...n.slice(i)].join("/")};function qe(e,n,i=!1){var l;const o=n.seen.get(e);if(n.override){const m=(l=n.override)==null?void 0:l.call(n,e,n,o,i);if(m!==tz)return m}if(o&&!i){const m=Zz(o,n);if(m!==void 0)return m}const s={def:e,path:n.currentPath,jsonSchema:void 0};n.seen.set(e,s);const c=jz(e,e.typeName,n),h=typeof c=="function"?qe(c(),n):c;if(h&&Lz(e,n,h),n.postProcess){const m=n.postProcess(h,e,n);return s.jsonSchema=h,m}return s.jsonSchema=h,h}var Zz=(e,n)=>{switch(n.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Uz(n.currentPath,e.path)};case"none":case"seen":return e.path.length<n.currentPath.length&&e.path.every((i,l)=>n.currentPath[l]===i)?(console.warn(`Recursive reference detected at ${n.currentPath.join("/")}! Defaulting to any`),Pt()):n.$refStrategy==="seen"?Pt():void 0}},Lz=(e,n,i)=>(e.description&&(i.description=e.description),i),Iz=e=>{const n=nz(e),i=n.name!==void 0?[...n.basePath,n.definitionPath,n.name]:n.basePath;return{...n,currentPath:i,propertyPath:void 0,seen:new Map(Object.entries(n.definitions).map(([l,o])=>[o._def,{def:o._def,path:[...n.basePath,n.definitionPath,l],jsonSchema:void 0}]))}},Bz=(e,n)=>{var i;const l=Iz(n);let o=typeof n=="object"&&n.definitions?Object.entries(n.definitions).reduce((d,[y,g])=>{var _;return{...d,[y]:(_=qe(g._def,{...l,currentPath:[...l.basePath,l.definitionPath,y]},!0))!=null?_:Pt()}},{}):void 0;const s=typeof n=="string"?n:(n==null?void 0:n.nameStrategy)==="title"||n==null?void 0:n.name,c=(i=qe(e._def,s===void 0?l:{...l,currentPath:[...l.basePath,l.definitionPath,s]},!1))!=null?i:Pt(),h=typeof n=="object"&&n.name!==void 0&&n.nameStrategy==="title"?n.name:void 0;h!==void 0&&(c.title=h);const m=s===void 0?o?{...c,[l.definitionPath]:o}:c:{$ref:[...l.$refStrategy==="relative"?[]:l.basePath,l.definitionPath,s].join("/"),[l.definitionPath]:{...o,[s]:c}};return m.$schema="http://json-schema.org/draft-07/schema#",m},fs=Symbol.for("vercel.ai.schema");function Hz(e){let n;return()=>(n==null&&(n=e()),n)}function nu(e,{validate:n}={}){return{[fs]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:n}}function qz(e){return typeof e=="object"&&e!==null&&fs in e&&e[fs]===!0&&"jsonSchema"in e&&"validate"in e}function hs(e){return e==null?nu({properties:{},additionalProperties:!1}):qz(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?Ld(e):$z(e):e()}function $z(e){return nu(()=>us(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async n=>{const i=await e["~standard"].validate(n);return"value"in i?{success:!0,value:i.value}:{success:!1,error:new di({value:n,cause:i.issues})}}})}function Vz(e,n){var i;const l=(i=void 0)!=null?i:!1;return nu(()=>Bz(e,{$refStrategy:l?"root":"none"}),{validate:async o=>{const s=await e.safeParseAsync(o);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Yz(e,n){var i;const l=(i=void 0)!=null?i:!1;return nu(()=>us(Cx(e,{target:"draft-7",io:"input",reused:l?"ref":"inline"})),{validate:async o=>{const s=await fd(e,o);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Gz(e){return"_zod"in e}function Ld(e,n){return Gz(e)?Yz(e):Vz(e)}async function Id({value:e,schema:n,context:i}){const l=await Ca({value:e,schema:n,context:i});if(!l.success)throw di.wrap({value:e,cause:l.error,context:i});return l.value}async function Ca({value:e,schema:n,context:i}){const l=hs(n);try{if(l.validate==null)return{success:!0,value:e,rawValue:e};const o=await l.validate(e);return o.success?{success:!0,value:o.value,rawValue:e}:{success:!1,error:di.wrap({value:e,cause:o.error,context:i}),rawValue:e}}catch(o){return{success:!1,error:di.wrap({value:e,cause:o,context:i}),rawValue:e}}}async function Gr({text:e,schema:n}){try{const i=ez(e);return n==null?{success:!0,value:i,rawValue:i}:await Ca({value:i,schema:n})}catch(i){return{success:!1,error:Ph.isInstance(i)?i:new Ph({text:e,cause:i}),rawValue:void 0}}}function Xz({stream:e,schema:n}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new JE).pipeThrough(new TransformStream({async transform({data:i},l){i!=="[DONE]"&&l.enqueue(await Gr({text:i,schema:n}))}}))}async function hr(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var Fz=Object.defineProperty,Jz=(e,n)=>{for(var i in n)Fz(e,i,{get:n[i],enumerable:!0})},Bd="AI_NoObjectGeneratedError",Hd=`vercel.ai.error.${Bd}`,Qz=Symbol.for(Hd),qd,pr=class extends Cn{constructor({message:e="No object generated.",cause:n,text:i,response:l,usage:o,finishReason:s}){super({name:Bd,message:e,cause:n}),this[qd]=!0,this.text=i,this.response=l,this.usage=o,this.finishReason=s}static isInstance(e){return Cn.hasMarker(e,Hd)}};qd=Qz;var $d="AI_UIMessageStreamError",Vd=`vercel.ai.error.${$d}`,Pz=Symbol.for(Vd),Yd,xi=class extends Cn{constructor({chunkType:e,chunkId:n,message:i}){super({name:$d,message:i}),this[Yd]=!0,this.chunkType=e,this.chunkId=n}static isInstance(e){return Cn.hasMarker(e,Vd)}};Yd=Pz;var Gd="6.0.116",Xd=Rt([ee(),eu(Uint8Array),eu(ArrayBuffer),wd(e=>{var n,i;return(i=(n=globalThis.Buffer)==null?void 0:n.isBuffer(e))!=null?i:!1},{message:"Must be a Buffer"})]),Na=VE(()=>Rt([vE(),ee(),dE(),Mt(),Ta(ee(),Na.optional()),Si(Na)])),je=Ta(ee(),Ta(ee(),Na.optional())),Fd=Je({type:ye("text"),text:ee(),providerOptions:je.optional()}),Kz=Je({type:ye("image"),image:Rt([Xd,eu(URL)]),mediaType:ee().optional(),providerOptions:je.optional()}),Jd=Je({type:ye("file"),data:Rt([Xd,eu(URL)]),filename:ee().optional(),mediaType:ee(),providerOptions:je.optional()}),Wz=Je({type:ye("reasoning"),text:ee(),providerOptions:je.optional()}),ew=Je({type:ye("tool-call"),toolCallId:ee(),toolName:ee(),input:Nn(),providerOptions:je.optional(),providerExecuted:Mt().optional()}),tw=EE("type",[Je({type:ye("text"),value:ee(),providerOptions:je.optional()}),Je({type:ye("json"),value:Na,providerOptions:je.optional()}),Je({type:ye("execution-denied"),reason:ee().optional(),providerOptions:je.optional()}),Je({type:ye("error-text"),value:ee(),providerOptions:je.optional()}),Je({type:ye("error-json"),value:Na,providerOptions:je.optional()}),Je({type:ye("content"),value:Si(Rt([Je({type:ye("text"),text:ee(),providerOptions:je.optional()}),Je({type:ye("media"),data:ee(),mediaType:ee()}),Je({type:ye("file-data"),data:ee(),mediaType:ee(),filename:ee().optional(),providerOptions:je.optional()}),Je({type:ye("file-url"),url:ee(),providerOptions:je.optional()}),Je({type:ye("file-id"),fileId:Rt([ee(),Ta(ee(),ee())]),providerOptions:je.optional()}),Je({type:ye("image-data"),data:ee(),mediaType:ee(),providerOptions:je.optional()}),Je({type:ye("image-url"),url:ee(),providerOptions:je.optional()}),Je({type:ye("image-file-id"),fileId:Rt([ee(),Ta(ee(),ee())]),providerOptions:je.optional()}),Je({type:ye("custom"),providerOptions:je.optional()})]))})]),Qd=Je({type:ye("tool-result"),toolCallId:ee(),toolName:ee(),output:tw,providerOptions:je.optional()}),nw=Je({type:ye("tool-approval-request"),approvalId:ee(),toolCallId:ee()}),rw=Je({type:ye("tool-approval-response"),approvalId:ee(),approved:Mt(),reason:ee().optional()}),iw=Je({role:ye("system"),content:ee(),providerOptions:je.optional()}),aw=Je({role:ye("user"),content:Rt([ee(),Si(Rt([Fd,Kz,Jd]))]),providerOptions:je.optional()}),lw=Je({role:ye("assistant"),content:Rt([ee(),Si(Rt([Fd,Jd,Wz,ew,Qd,nw]))]),providerOptions:je.optional()}),uw=Je({role:ye("tool"),content:Si(Rt([Qd,rw])),providerOptions:je.optional()});Rt([iw,aw,lw,uw]);function Pd(e,n){if(e===void 0&&n===void 0)return;if(e===void 0)return n;if(n===void 0)return e;const i={...e};for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)){const o=n[l];if(o===void 0)continue;const s=l in e?e[l]:void 0,c=o!==null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp),h=s!=null&&typeof s=="object"&&!Array.isArray(s)&&!(s instanceof Date)&&!(s instanceof RegExp);c&&h?i[l]=Pd(s,o):i[l]=o}return i}var ow={};Jz(ow,{array:()=>hw,choice:()=>pw,json:()=>dw,object:()=>fw,text:()=>cw});function sw(e){const n=["ROOT"];let i=-1,l=null;function o(m,d,y){switch(m){case'"':{i=d,n.pop(),n.push(y),n.push("INSIDE_STRING");break}case"f":case"t":case"n":{i=d,l=d,n.pop(),n.push(y),n.push("INSIDE_LITERAL");break}case"-":{n.pop(),n.push(y),n.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{i=d,n.pop(),n.push(y),n.push("INSIDE_NUMBER");break}case"{":{i=d,n.pop(),n.push(y),n.push("INSIDE_OBJECT_START");break}case"[":{i=d,n.pop(),n.push(y),n.push("INSIDE_ARRAY_START");break}}}function s(m,d){switch(m){case",":{n.pop(),n.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{i=d,n.pop();break}}}function c(m,d){switch(m){case",":{n.pop(),n.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{i=d,n.pop();break}}}for(let m=0;m<e.length;m++){const d=e[m];switch(n[n.length-1]){case"ROOT":o(d,m,"FINISH");break;case"INSIDE_OBJECT_START":{switch(d){case'"':{n.pop(),n.push("INSIDE_OBJECT_KEY");break}case"}":{i=m,n.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(d){case'"':{n.pop(),n.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(d){case'"':{n.pop(),n.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(d){case":":{n.pop(),n.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{o(d,m,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{s(d,m);break}case"INSIDE_STRING":{switch(d){case'"':{n.pop(),i=m;break}case"\\":{n.push("INSIDE_STRING_ESCAPE");break}default:i=m}break}case"INSIDE_ARRAY_START":{switch(d){case"]":{i=m,n.pop();break}default:{i=m,o(d,m,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(d){case",":{n.pop(),n.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{i=m,n.pop();break}default:{i=m;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{o(d,m,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{n.pop(),i=m;break}case"INSIDE_NUMBER":{switch(d){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{i=m;break}case"e":case"E":case"-":case".":break;case",":{n.pop(),n[n.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&c(d,m),n[n.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&s(d,m);break}case"}":{n.pop(),n[n.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&s(d,m);break}case"]":{n.pop(),n[n.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&c(d,m);break}default:{n.pop();break}}break}case"INSIDE_LITERAL":{const g=e.substring(l,m+1);!"false".startsWith(g)&&!"true".startsWith(g)&&!"null".startsWith(g)?(n.pop(),n[n.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?s(d,m):n[n.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&c(d,m)):i=m;break}}}let h=e.slice(0,i+1);for(let m=n.length-1;m>=0;m--)switch(n[m]){case"INSIDE_STRING":{h+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{h+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{h+="]";break}case"INSIDE_LITERAL":{const y=e.substring(l,e.length);"true".startsWith(y)?h+="true".slice(y.length):"false".startsWith(y)?h+="false".slice(y.length):"null".startsWith(y)&&(h+="null".slice(y.length))}}return h}async function Da(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let n=await Gr({text:e});return n.success?{value:n.value,state:"successful-parse"}:(n=await Gr({text:sw(e)}),n.success?{value:n.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var cw=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),fw=({schema:e,name:n,description:i})=>{const l=hs(e);return{name:"object",responseFormat:hr(l.jsonSchema).then(o=>({type:"json",schema:o,...n!=null&&{name:n},...i!=null&&{description:i}})),async parseCompleteOutput({text:o},s){const c=await Gr({text:o});if(!c.success)throw new pr({message:"No object generated: could not parse the response.",cause:c.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});const h=await Ca({value:c.value,schema:l});if(!h.success)throw new pr({message:"No object generated: response did not match schema.",cause:h.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});return h.value},async parsePartialOutput({text:o}){const s=await Da(o);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:s.value}}},createElementStreamTransform(){}}},hw=({element:e,name:n,description:i})=>{const l=hs(e);return{name:"array",responseFormat:hr(l.jsonSchema).then(o=>{const{$schema:s,...c}=o;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:c}},required:["elements"],additionalProperties:!1},...n!=null&&{name:n},...i!=null&&{description:i}}}),async parseCompleteOutput({text:o},s){const c=await Gr({text:o});if(!c.success)throw new pr({message:"No object generated: could not parse the response.",cause:c.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});const h=c.value;if(h==null||typeof h!="object"||!("elements"in h)||!Array.isArray(h.elements))throw new pr({message:"No object generated: response did not match schema.",cause:new di({value:h,cause:"response must be an object with an elements array"}),text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});for(const m of h.elements){const d=await Ca({value:m,schema:l});if(!d.success)throw new pr({message:"No object generated: response did not match schema.",cause:d.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason})}return h.elements},async parsePartialOutput({text:o}){const s=await Da(o);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const c=s.value;if(c==null||typeof c!="object"||!("elements"in c)||!Array.isArray(c.elements))return;const h=s.state==="repaired-parse"&&c.elements.length>0?c.elements.slice(0,-1):c.elements,m=[];for(const d of h){const y=await Ca({value:d,schema:l});y.success&&m.push(y.value)}return{partial:m}}}},createElementStreamTransform(){let o=0;return new TransformStream({transform({partialOutput:s},c){if(s!=null)for(;o<s.length;o++)c.enqueue(s[o])}})}}},pw=({options:e,name:n,description:i})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...n!=null&&{name:n},...i!=null&&{description:i}}),async parseCompleteOutput({text:l},o){const s=await Gr({text:l});if(!s.success)throw new pr({message:"No object generated: could not parse the response.",cause:s.error,text:l,response:o.response,usage:o.usage,finishReason:o.finishReason});const c=s.value;if(c==null||typeof c!="object"||!("result"in c)||typeof c.result!="string"||!e.includes(c.result))throw new pr({message:"No object generated: response did not match schema.",cause:new di({value:c,cause:"response must be an object that contains a choice value."}),text:l,response:o.response,usage:o.usage,finishReason:o.finishReason});return c.result},async parsePartialOutput({text:l}){const o=await Da(l);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const s=o.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string")return;const c=e.filter(h=>h.startsWith(s.result));return o.state==="successful-parse"?c.includes(s.result)?{partial:s.result}:void 0:c.length===1?{partial:c[0]}:void 0}}},createElementStreamTransform(){}}),dw=({name:e,description:n}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...n!=null&&{description:n}}),async parseCompleteOutput({text:i},l){const o=await Gr({text:i});if(!o.success)throw new pr({message:"No object generated: could not parse the response.",cause:o.error,text:i,response:l.response,usage:l.usage,finishReason:l.finishReason});return o.value},async parsePartialOutput({text:i}){const l=await Da(i);switch(l.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return l.value===void 0?void 0:{partial:l.value}}},createElementStreamTransform(){}});Oa({prefix:"aitxt",size:24}),class extends TransformStream{constructor(){super({transform(e,n){n.enqueue(`data: ${JSON.stringify(e)}
|
|
97
|
+
]`;continue}s+=o[d],o[d]==="\\"?c=!0:h&&o[d]==="]"?h=!1:!h&&o[d]==="["&&(h=!0)}try{new RegExp(s)}catch{return console.warn(`Could not convert regex pattern at ${n.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return s}function Zd(e,n){var i,l,o,s,c,h;const m={type:"object",additionalProperties:(i=qe(e.valueType._def,{...n,currentPath:[...n.currentPath,"additionalProperties"]}))!=null?i:n.allowedAdditionalProperties};if(((l=e.keyType)==null?void 0:l._def.typeName)===xe.ZodString&&((o=e.keyType._def.checks)!=null&&o.length)){const{type:d,...y}=jd(e.keyType._def,n);return{...m,propertyNames:y}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===xe.ZodEnum)return{...m,propertyNames:{enum:e.keyType._def.values}};if(((c=e.keyType)==null?void 0:c._def.typeName)===xe.ZodBranded&&e.keyType._def.type._def.typeName===xe.ZodString&&((h=e.keyType._def.type._def.checks)!=null&&h.length)){const{type:d,...y}=Md(e.keyType._def,n);return{...m,propertyNames:y}}}return m}function gz(e,n){if(n.mapStrategy==="record")return Zd(e,n);const i=qe(e.keyType._def,{...n,currentPath:[...n.currentPath,"items","items","0"]})||Pt(),l=qe(e.valueType._def,{...n,currentPath:[...n.currentPath,"items","items","1"]})||Pt();return{type:"array",maxItems:125,items:{type:"array",items:[i,l],minItems:2,maxItems:2}}}function yz(e){const n=e.values,l=Object.keys(e.values).filter(s=>typeof n[n[s]]!="number").map(s=>n[s]),o=Array.from(new Set(l.map(s=>typeof s)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:l}}function vz(){return{not:Pt()}}function bz(){return{type:"null"}}var cs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function _z(e,n){const i=e.options instanceof Map?Array.from(e.options.values()):e.options;if(i.every(l=>l._def.typeName in cs&&(!l._def.checks||!l._def.checks.length))){const l=i.reduce((o,s)=>{const c=cs[s._def.typeName];return c&&!o.includes(c)?[...o,c]:o},[]);return{type:l.length>1?l:l[0]}}else if(i.every(l=>l._def.typeName==="ZodLiteral"&&!l.description)){const l=i.reduce((o,s)=>{const c=typeof s._def.value;switch(c){case"string":case"number":case"boolean":return[...o,c];case"bigint":return[...o,"integer"];case"object":if(s._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(l.length===i.length){const o=l.filter((s,c,h)=>h.indexOf(s)===c);return{type:o.length>1?o:o[0],enum:i.reduce((s,c)=>s.includes(c._def.value)?s:[...s,c._def.value],[])}}}else if(i.every(l=>l._def.typeName==="ZodEnum"))return{type:"string",enum:i.reduce((l,o)=>[...l,...o._def.values.filter(s=>!l.includes(s))],[])};return Sz(e,n)}var Sz=(e,n)=>{const i=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((l,o)=>qe(l._def,{...n,currentPath:[...n.currentPath,"anyOf",`${o}`]})).filter(l=>!!l&&(!n.strictUnions||typeof l=="object"&&Object.keys(l).length>0));return i.length?{anyOf:i}:void 0};function xz(e,n){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[cs[e.innerType._def.typeName],"null"]};const i=qe(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","0"]});return i&&{anyOf:[i,{type:"null"}]}}function Ez(e){const n={type:"number"};if(!e.checks)return n;for(const i of e.checks)switch(i.kind){case"int":n.type="integer";break;case"min":i.inclusive?n.minimum=i.value:n.exclusiveMinimum=i.value;break;case"max":i.inclusive?n.maximum=i.value:n.exclusiveMaximum=i.value;break;case"multipleOf":n.multipleOf=i.value;break}return n}function zz(e,n){const i={type:"object",properties:{}},l=[],o=e.shape();for(const c in o){let h=o[c];if(h===void 0||h._def===void 0)continue;const m=kz(h),d=qe(h._def,{...n,currentPath:[...n.currentPath,"properties",c],propertyPath:[...n.currentPath,"properties",c]});d!==void 0&&(i.properties[c]=d,m||l.push(c))}l.length&&(i.required=l);const s=wz(e,n);return s!==void 0&&(i.additionalProperties=s),i}function wz(e,n){if(e.catchall._def.typeName!=="ZodNever")return qe(e.catchall._def,{...n,currentPath:[...n.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return n.allowedAdditionalProperties;case"strict":return n.rejectedAdditionalProperties;case"strip":return n.removeAdditionalStrategy==="strict"?n.allowedAdditionalProperties:n.rejectedAdditionalProperties}}function kz(e){try{return e.isOptional()}catch{return!0}}var Tz=(e,n)=>{var i;if(n.currentPath.toString()===((i=n.propertyPath)==null?void 0:i.toString()))return qe(e.innerType._def,n);const l=qe(e.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","1"]});return l?{anyOf:[{not:Pt()},l]}:Pt()},Az=(e,n)=>{if(n.pipeStrategy==="input")return qe(e.in._def,n);if(n.pipeStrategy==="output")return qe(e.out._def,n);const i=qe(e.in._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),l=qe(e.out._def,{...n,currentPath:[...n.currentPath,"allOf",i?"1":"0"]});return{allOf:[i,l].filter(o=>o!==void 0)}};function Oz(e,n){return qe(e.type._def,n)}function Cz(e,n){const l={type:"array",uniqueItems:!0,items:qe(e.valueType._def,{...n,currentPath:[...n.currentPath,"items"]})};return e.minSize&&(l.minItems=e.minSize.value),e.maxSize&&(l.maxItems=e.maxSize.value),l}function Nz(e,n){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((i,l)=>qe(i._def,{...n,currentPath:[...n.currentPath,"items",`${l}`]})).reduce((i,l)=>l===void 0?i:[...i,l],[]),additionalItems:qe(e.rest._def,{...n,currentPath:[...n.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((i,l)=>qe(i._def,{...n,currentPath:[...n.currentPath,"items",`${l}`]})).reduce((i,l)=>l===void 0?i:[...i,l],[])}}function Dz(){return{not:Pt()}}function Mz(){return Pt()}var Rz=(e,n)=>qe(e.innerType._def,n),jz=(e,n,i)=>{switch(n){case xe.ZodString:return jd(e,i);case xe.ZodNumber:return Ez(e);case xe.ZodObject:return zz(e,i);case xe.ZodBigInt:return iz(e);case xe.ZodBoolean:return az();case xe.ZodDate:return Rd(e,i);case xe.ZodUndefined:return Dz();case xe.ZodNull:return bz();case xe.ZodArray:return rz(e,i);case xe.ZodUnion:case xe.ZodDiscriminatedUnion:return _z(e,i);case xe.ZodIntersection:return hz(e,i);case xe.ZodTuple:return Nz(e,i);case xe.ZodRecord:return Zd(e,i);case xe.ZodLiteral:return pz(e);case xe.ZodEnum:return cz(e);case xe.ZodNativeEnum:return yz(e);case xe.ZodNullable:return xz(e,i);case xe.ZodOptional:return Tz(e,i);case xe.ZodMap:return gz(e,i);case xe.ZodSet:return Cz(e,i);case xe.ZodLazy:return()=>e.getter()._def;case xe.ZodPromise:return Oz(e,i);case xe.ZodNaN:case xe.ZodNever:return vz();case xe.ZodEffects:return sz(e,i);case xe.ZodAny:return Pt();case xe.ZodUnknown:return Mz();case xe.ZodDefault:return oz(e,i);case xe.ZodBranded:return Md(e,i);case xe.ZodReadonly:return Rz(e,i);case xe.ZodCatch:return lz(e,i);case xe.ZodPipeline:return Az(e,i);case xe.ZodFunction:case xe.ZodVoid:case xe.ZodSymbol:return;default:return(l=>{})()}},Uz=(e,n)=>{let i=0;for(;i<e.length&&i<n.length&&e[i]===n[i];i++);return[(e.length-i).toString(),...n.slice(i)].join("/")};function qe(e,n,i=!1){var l;const o=n.seen.get(e);if(n.override){const m=(l=n.override)==null?void 0:l.call(n,e,n,o,i);if(m!==tz)return m}if(o&&!i){const m=Zz(o,n);if(m!==void 0)return m}const s={def:e,path:n.currentPath,jsonSchema:void 0};n.seen.set(e,s);const c=jz(e,e.typeName,n),h=typeof c=="function"?qe(c(),n):c;if(h&&Lz(e,n,h),n.postProcess){const m=n.postProcess(h,e,n);return s.jsonSchema=h,m}return s.jsonSchema=h,h}var Zz=(e,n)=>{switch(n.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Uz(n.currentPath,e.path)};case"none":case"seen":return e.path.length<n.currentPath.length&&e.path.every((i,l)=>n.currentPath[l]===i)?(console.warn(`Recursive reference detected at ${n.currentPath.join("/")}! Defaulting to any`),Pt()):n.$refStrategy==="seen"?Pt():void 0}},Lz=(e,n,i)=>(e.description&&(i.description=e.description),i),Iz=e=>{const n=nz(e),i=n.name!==void 0?[...n.basePath,n.definitionPath,n.name]:n.basePath;return{...n,currentPath:i,propertyPath:void 0,seen:new Map(Object.entries(n.definitions).map(([l,o])=>[o._def,{def:o._def,path:[...n.basePath,n.definitionPath,l],jsonSchema:void 0}]))}},Bz=(e,n)=>{var i;const l=Iz(n);let o=typeof n=="object"&&n.definitions?Object.entries(n.definitions).reduce((d,[y,g])=>{var _;return{...d,[y]:(_=qe(g._def,{...l,currentPath:[...l.basePath,l.definitionPath,y]},!0))!=null?_:Pt()}},{}):void 0;const s=typeof n=="string"?n:(n==null?void 0:n.nameStrategy)==="title"||n==null?void 0:n.name,c=(i=qe(e._def,s===void 0?l:{...l,currentPath:[...l.basePath,l.definitionPath,s]},!1))!=null?i:Pt(),h=typeof n=="object"&&n.name!==void 0&&n.nameStrategy==="title"?n.name:void 0;h!==void 0&&(c.title=h);const m=s===void 0?o?{...c,[l.definitionPath]:o}:c:{$ref:[...l.$refStrategy==="relative"?[]:l.basePath,l.definitionPath,s].join("/"),[l.definitionPath]:{...o,[s]:c}};return m.$schema="http://json-schema.org/draft-07/schema#",m},fs=Symbol.for("vercel.ai.schema");function Hz(e){let n;return()=>(n==null&&(n=e()),n)}function nu(e,{validate:n}={}){return{[fs]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:n}}function qz(e){return typeof e=="object"&&e!==null&&fs in e&&e[fs]===!0&&"jsonSchema"in e&&"validate"in e}function hs(e){return e==null?nu({properties:{},additionalProperties:!1}):qz(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?Ld(e):$z(e):e()}function $z(e){return nu(()=>us(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async n=>{const i=await e["~standard"].validate(n);return"value"in i?{success:!0,value:i.value}:{success:!1,error:new di({value:n,cause:i.issues})}}})}function Vz(e,n){var i;const l=(i=void 0)!=null?i:!1;return nu(()=>Bz(e,{$refStrategy:l?"root":"none"}),{validate:async o=>{const s=await e.safeParseAsync(o);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Yz(e,n){var i;const l=(i=void 0)!=null?i:!1;return nu(()=>us(Cx(e,{target:"draft-7",io:"input",reused:l?"ref":"inline"})),{validate:async o=>{const s=await fd(e,o);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Gz(e){return"_zod"in e}function Ld(e,n){return Gz(e)?Yz(e):Vz(e)}async function Id({value:e,schema:n,context:i}){const l=await Ca({value:e,schema:n,context:i});if(!l.success)throw di.wrap({value:e,cause:l.error,context:i});return l.value}async function Ca({value:e,schema:n,context:i}){const l=hs(n);try{if(l.validate==null)return{success:!0,value:e,rawValue:e};const o=await l.validate(e);return o.success?{success:!0,value:o.value,rawValue:e}:{success:!1,error:di.wrap({value:e,cause:o.error,context:i}),rawValue:e}}catch(o){return{success:!1,error:di.wrap({value:e,cause:o,context:i}),rawValue:e}}}async function Gr({text:e,schema:n}){try{const i=ez(e);return n==null?{success:!0,value:i,rawValue:i}:await Ca({value:i,schema:n})}catch(i){return{success:!1,error:Ph.isInstance(i)?i:new Ph({text:e,cause:i}),rawValue:void 0}}}function Xz({stream:e,schema:n}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new JE).pipeThrough(new TransformStream({async transform({data:i},l){i!=="[DONE]"&&l.enqueue(await Gr({text:i,schema:n}))}}))}async function hr(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var Fz=Object.defineProperty,Jz=(e,n)=>{for(var i in n)Fz(e,i,{get:n[i],enumerable:!0})},Bd="AI_NoObjectGeneratedError",Hd=`vercel.ai.error.${Bd}`,Qz=Symbol.for(Hd),qd,pr=class extends Cn{constructor({message:e="No object generated.",cause:n,text:i,response:l,usage:o,finishReason:s}){super({name:Bd,message:e,cause:n}),this[qd]=!0,this.text=i,this.response=l,this.usage=o,this.finishReason=s}static isInstance(e){return Cn.hasMarker(e,Hd)}};qd=Qz;var $d="AI_UIMessageStreamError",Vd=`vercel.ai.error.${$d}`,Pz=Symbol.for(Vd),Yd,xi=class extends Cn{constructor({chunkType:e,chunkId:n,message:i}){super({name:$d,message:i}),this[Yd]=!0,this.chunkType=e,this.chunkId=n}static isInstance(e){return Cn.hasMarker(e,Vd)}};Yd=Pz;var Gd="6.0.116",Xd=Rt([ee(),eu(Uint8Array),eu(ArrayBuffer),wd(e=>{var n,i;return(i=(n=globalThis.Buffer)==null?void 0:n.isBuffer(e))!=null?i:!1},{message:"Must be a Buffer"})]),Na=VE(()=>Rt([vE(),ee(),dE(),Mt(),Ta(ee(),Na.optional()),Si(Na)])),je=Ta(ee(),Ta(ee(),Na.optional())),Fd=Je({type:ge("text"),text:ee(),providerOptions:je.optional()}),Kz=Je({type:ge("image"),image:Rt([Xd,eu(URL)]),mediaType:ee().optional(),providerOptions:je.optional()}),Jd=Je({type:ge("file"),data:Rt([Xd,eu(URL)]),filename:ee().optional(),mediaType:ee(),providerOptions:je.optional()}),Wz=Je({type:ge("reasoning"),text:ee(),providerOptions:je.optional()}),ew=Je({type:ge("tool-call"),toolCallId:ee(),toolName:ee(),input:Nn(),providerOptions:je.optional(),providerExecuted:Mt().optional()}),tw=EE("type",[Je({type:ge("text"),value:ee(),providerOptions:je.optional()}),Je({type:ge("json"),value:Na,providerOptions:je.optional()}),Je({type:ge("execution-denied"),reason:ee().optional(),providerOptions:je.optional()}),Je({type:ge("error-text"),value:ee(),providerOptions:je.optional()}),Je({type:ge("error-json"),value:Na,providerOptions:je.optional()}),Je({type:ge("content"),value:Si(Rt([Je({type:ge("text"),text:ee(),providerOptions:je.optional()}),Je({type:ge("media"),data:ee(),mediaType:ee()}),Je({type:ge("file-data"),data:ee(),mediaType:ee(),filename:ee().optional(),providerOptions:je.optional()}),Je({type:ge("file-url"),url:ee(),providerOptions:je.optional()}),Je({type:ge("file-id"),fileId:Rt([ee(),Ta(ee(),ee())]),providerOptions:je.optional()}),Je({type:ge("image-data"),data:ee(),mediaType:ee(),providerOptions:je.optional()}),Je({type:ge("image-url"),url:ee(),providerOptions:je.optional()}),Je({type:ge("image-file-id"),fileId:Rt([ee(),Ta(ee(),ee())]),providerOptions:je.optional()}),Je({type:ge("custom"),providerOptions:je.optional()})]))})]),Qd=Je({type:ge("tool-result"),toolCallId:ee(),toolName:ee(),output:tw,providerOptions:je.optional()}),nw=Je({type:ge("tool-approval-request"),approvalId:ee(),toolCallId:ee()}),rw=Je({type:ge("tool-approval-response"),approvalId:ee(),approved:Mt(),reason:ee().optional()}),iw=Je({role:ge("system"),content:ee(),providerOptions:je.optional()}),aw=Je({role:ge("user"),content:Rt([ee(),Si(Rt([Fd,Kz,Jd]))]),providerOptions:je.optional()}),lw=Je({role:ge("assistant"),content:Rt([ee(),Si(Rt([Fd,Jd,Wz,ew,Qd,nw]))]),providerOptions:je.optional()}),uw=Je({role:ge("tool"),content:Si(Rt([Qd,rw])),providerOptions:je.optional()});Rt([iw,aw,lw,uw]);function Pd(e,n){if(e===void 0&&n===void 0)return;if(e===void 0)return n;if(n===void 0)return e;const i={...e};for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)){const o=n[l];if(o===void 0)continue;const s=l in e?e[l]:void 0,c=o!==null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp),h=s!=null&&typeof s=="object"&&!Array.isArray(s)&&!(s instanceof Date)&&!(s instanceof RegExp);c&&h?i[l]=Pd(s,o):i[l]=o}return i}var ow={};Jz(ow,{array:()=>hw,choice:()=>pw,json:()=>dw,object:()=>fw,text:()=>cw});function sw(e){const n=["ROOT"];let i=-1,l=null;function o(m,d,y){switch(m){case'"':{i=d,n.pop(),n.push(y),n.push("INSIDE_STRING");break}case"f":case"t":case"n":{i=d,l=d,n.pop(),n.push(y),n.push("INSIDE_LITERAL");break}case"-":{n.pop(),n.push(y),n.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{i=d,n.pop(),n.push(y),n.push("INSIDE_NUMBER");break}case"{":{i=d,n.pop(),n.push(y),n.push("INSIDE_OBJECT_START");break}case"[":{i=d,n.pop(),n.push(y),n.push("INSIDE_ARRAY_START");break}}}function s(m,d){switch(m){case",":{n.pop(),n.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{i=d,n.pop();break}}}function c(m,d){switch(m){case",":{n.pop(),n.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{i=d,n.pop();break}}}for(let m=0;m<e.length;m++){const d=e[m];switch(n[n.length-1]){case"ROOT":o(d,m,"FINISH");break;case"INSIDE_OBJECT_START":{switch(d){case'"':{n.pop(),n.push("INSIDE_OBJECT_KEY");break}case"}":{i=m,n.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(d){case'"':{n.pop(),n.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(d){case'"':{n.pop(),n.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(d){case":":{n.pop(),n.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{o(d,m,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{s(d,m);break}case"INSIDE_STRING":{switch(d){case'"':{n.pop(),i=m;break}case"\\":{n.push("INSIDE_STRING_ESCAPE");break}default:i=m}break}case"INSIDE_ARRAY_START":{switch(d){case"]":{i=m,n.pop();break}default:{i=m,o(d,m,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(d){case",":{n.pop(),n.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{i=m,n.pop();break}default:{i=m;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{o(d,m,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{n.pop(),i=m;break}case"INSIDE_NUMBER":{switch(d){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{i=m;break}case"e":case"E":case"-":case".":break;case",":{n.pop(),n[n.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&c(d,m),n[n.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&s(d,m);break}case"}":{n.pop(),n[n.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&s(d,m);break}case"]":{n.pop(),n[n.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&c(d,m);break}default:{n.pop();break}}break}case"INSIDE_LITERAL":{const g=e.substring(l,m+1);!"false".startsWith(g)&&!"true".startsWith(g)&&!"null".startsWith(g)?(n.pop(),n[n.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?s(d,m):n[n.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&c(d,m)):i=m;break}}}let h=e.slice(0,i+1);for(let m=n.length-1;m>=0;m--)switch(n[m]){case"INSIDE_STRING":{h+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{h+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{h+="]";break}case"INSIDE_LITERAL":{const y=e.substring(l,e.length);"true".startsWith(y)?h+="true".slice(y.length):"false".startsWith(y)?h+="false".slice(y.length):"null".startsWith(y)&&(h+="null".slice(y.length))}}return h}async function Da(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let n=await Gr({text:e});return n.success?{value:n.value,state:"successful-parse"}:(n=await Gr({text:sw(e)}),n.success?{value:n.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var cw=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),fw=({schema:e,name:n,description:i})=>{const l=hs(e);return{name:"object",responseFormat:hr(l.jsonSchema).then(o=>({type:"json",schema:o,...n!=null&&{name:n},...i!=null&&{description:i}})),async parseCompleteOutput({text:o},s){const c=await Gr({text:o});if(!c.success)throw new pr({message:"No object generated: could not parse the response.",cause:c.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});const h=await Ca({value:c.value,schema:l});if(!h.success)throw new pr({message:"No object generated: response did not match schema.",cause:h.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});return h.value},async parsePartialOutput({text:o}){const s=await Da(o);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:s.value}}},createElementStreamTransform(){}}},hw=({element:e,name:n,description:i})=>{const l=hs(e);return{name:"array",responseFormat:hr(l.jsonSchema).then(o=>{const{$schema:s,...c}=o;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:c}},required:["elements"],additionalProperties:!1},...n!=null&&{name:n},...i!=null&&{description:i}}}),async parseCompleteOutput({text:o},s){const c=await Gr({text:o});if(!c.success)throw new pr({message:"No object generated: could not parse the response.",cause:c.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});const h=c.value;if(h==null||typeof h!="object"||!("elements"in h)||!Array.isArray(h.elements))throw new pr({message:"No object generated: response did not match schema.",cause:new di({value:h,cause:"response must be an object with an elements array"}),text:o,response:s.response,usage:s.usage,finishReason:s.finishReason});for(const m of h.elements){const d=await Ca({value:m,schema:l});if(!d.success)throw new pr({message:"No object generated: response did not match schema.",cause:d.error,text:o,response:s.response,usage:s.usage,finishReason:s.finishReason})}return h.elements},async parsePartialOutput({text:o}){const s=await Da(o);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const c=s.value;if(c==null||typeof c!="object"||!("elements"in c)||!Array.isArray(c.elements))return;const h=s.state==="repaired-parse"&&c.elements.length>0?c.elements.slice(0,-1):c.elements,m=[];for(const d of h){const y=await Ca({value:d,schema:l});y.success&&m.push(y.value)}return{partial:m}}}},createElementStreamTransform(){let o=0;return new TransformStream({transform({partialOutput:s},c){if(s!=null)for(;o<s.length;o++)c.enqueue(s[o])}})}}},pw=({options:e,name:n,description:i})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...n!=null&&{name:n},...i!=null&&{description:i}}),async parseCompleteOutput({text:l},o){const s=await Gr({text:l});if(!s.success)throw new pr({message:"No object generated: could not parse the response.",cause:s.error,text:l,response:o.response,usage:o.usage,finishReason:o.finishReason});const c=s.value;if(c==null||typeof c!="object"||!("result"in c)||typeof c.result!="string"||!e.includes(c.result))throw new pr({message:"No object generated: response did not match schema.",cause:new di({value:c,cause:"response must be an object that contains a choice value."}),text:l,response:o.response,usage:o.usage,finishReason:o.finishReason});return c.result},async parsePartialOutput({text:l}){const o=await Da(l);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const s=o.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string")return;const c=e.filter(h=>h.startsWith(s.result));return o.state==="successful-parse"?c.includes(s.result)?{partial:s.result}:void 0:c.length===1?{partial:c[0]}:void 0}}},createElementStreamTransform(){}}),dw=({name:e,description:n}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...n!=null&&{description:n}}),async parseCompleteOutput({text:i},l){const o=await Gr({text:i});if(!o.success)throw new pr({message:"No object generated: could not parse the response.",cause:o.error,text:i,response:l.response,usage:l.usage,finishReason:l.finishReason});return o.value},async parsePartialOutput({text:i}){const l=await Da(i);switch(l.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return l.value===void 0?void 0:{partial:l.value}}},createElementStreamTransform(){}});Oa({prefix:"aitxt",size:24}),class extends TransformStream{constructor(){super({transform(e,n){n.enqueue(`data: ${JSON.stringify(e)}
|
|
98
98
|
|
|
99
99
|
`)},flush(e){e.enqueue(`data: [DONE]
|
|
100
100
|
|
|
101
|
-
`)}})}};var mw=Hz(()=>Ld(Rt([rt({type:ye("text-start"),id:ee(),providerMetadata:je.optional()}),rt({type:ye("text-delta"),id:ee(),delta:ee(),providerMetadata:je.optional()}),rt({type:ye("text-end"),id:ee(),providerMetadata:je.optional()}),rt({type:ye("error"),errorText:ee()}),rt({type:ye("tool-input-start"),toolCallId:ee(),toolName:ee(),providerExecuted:Mt().optional(),providerMetadata:je.optional(),dynamic:Mt().optional(),title:ee().optional()}),rt({type:ye("tool-input-delta"),toolCallId:ee(),inputTextDelta:ee()}),rt({type:ye("tool-input-available"),toolCallId:ee(),toolName:ee(),input:Nn(),providerExecuted:Mt().optional(),providerMetadata:je.optional(),dynamic:Mt().optional(),title:ee().optional()}),rt({type:ye("tool-input-error"),toolCallId:ee(),toolName:ee(),input:Nn(),providerExecuted:Mt().optional(),providerMetadata:je.optional(),dynamic:Mt().optional(),errorText:ee(),title:ee().optional()}),rt({type:ye("tool-approval-request"),approvalId:ee(),toolCallId:ee()}),rt({type:ye("tool-output-available"),toolCallId:ee(),output:Nn(),providerExecuted:Mt().optional(),dynamic:Mt().optional(),preliminary:Mt().optional()}),rt({type:ye("tool-output-error"),toolCallId:ee(),errorText:ee(),providerExecuted:Mt().optional(),dynamic:Mt().optional()}),rt({type:ye("tool-output-denied"),toolCallId:ee()}),rt({type:ye("reasoning-start"),id:ee(),providerMetadata:je.optional()}),rt({type:ye("reasoning-delta"),id:ee(),delta:ee(),providerMetadata:je.optional()}),rt({type:ye("reasoning-end"),id:ee(),providerMetadata:je.optional()}),rt({type:ye("source-url"),sourceId:ee(),url:ee(),title:ee().optional(),providerMetadata:je.optional()}),rt({type:ye("source-document"),sourceId:ee(),mediaType:ee(),title:ee(),filename:ee().optional(),providerMetadata:je.optional()}),rt({type:ye("file"),url:ee(),mediaType:ee(),providerMetadata:je.optional()}),rt({type:wd(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:ee().optional(),data:Nn(),transient:Mt().optional()}),rt({type:ye("start-step")}),rt({type:ye("finish-step")}),rt({type:ye("start"),messageId:ee().optional(),messageMetadata:Nn().optional()}),rt({type:ye("finish"),finishReason:bd(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:Nn().optional()}),rt({type:ye("abort"),reason:ee().optional()}),rt({type:ye("message-metadata"),messageMetadata:Nn()})])));function gw(e){return e.type.startsWith("data-")}function ps(e){return e.type.startsWith("tool-")}function yw(e){return e.type==="dynamic-tool"}function ru(e){return ps(e)||yw(e)}function Kd(e){return e.type.split("-").slice(1).join("-")}function vw({lastMessage:e,messageId:n}){return{message:(e==null?void 0:e.role)==="assistant"?e:{id:n,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function bw({stream:e,messageMetadataSchema:n,dataPartSchemas:i,runUpdateMessageJob:l,onError:o,onToolCall:s,onData:c}){return e.pipeThrough(new TransformStream({async transform(h,m){await l(async({state:d,write:y})=>{var g,_,b,E;function T(k){const K=d.message.parts.filter(ru).find(D=>D.toolCallId===k);if(K==null)throw new xi({chunkType:"tool-invocation",chunkId:k,message:`No tool invocation found for tool call ID "${k}".`});return K}function M(k){var J;const K=d.message.parts.find(ce=>ps(ce)&&ce.toolCallId===k.toolCallId),D=k,X=K;K!=null?(K.state=k.state,X.input=D.input,X.output=D.output,X.errorText=D.errorText,X.rawInput=D.rawInput,X.preliminary=D.preliminary,k.title!==void 0&&(X.title=k.title),X.providerExecuted=(J=D.providerExecuted)!=null?J:K.providerExecuted,D.providerMetadata!=null&&(K.callProviderMetadata=D.providerMetadata)):d.message.parts.push({type:`tool-${k.toolName}`,toolCallId:k.toolCallId,state:k.state,title:k.title,input:D.input,output:D.output,rawInput:D.rawInput,errorText:D.errorText,providerExecuted:D.providerExecuted,preliminary:D.preliminary,...D.providerMetadata!=null?{callProviderMetadata:D.providerMetadata}:{}})}function O(k){var J,K;const D=d.message.parts.find(pe=>pe.type==="dynamic-tool"&&pe.toolCallId===k.toolCallId),X=k,ce=D;D!=null?(D.state=k.state,ce.toolName=k.toolName,ce.input=X.input,ce.output=X.output,ce.errorText=X.errorText,ce.rawInput=(J=X.rawInput)!=null?J:ce.rawInput,ce.preliminary=X.preliminary,k.title!==void 0&&(ce.title=k.title),ce.providerExecuted=(K=X.providerExecuted)!=null?K:D.providerExecuted,X.providerMetadata!=null&&(D.callProviderMetadata=X.providerMetadata)):d.message.parts.push({type:"dynamic-tool",toolName:k.toolName,toolCallId:k.toolCallId,state:k.state,input:X.input,output:X.output,errorText:X.errorText,preliminary:X.preliminary,providerExecuted:X.providerExecuted,title:k.title,...X.providerMetadata!=null?{callProviderMetadata:X.providerMetadata}:{}})}async function B(k){if(k!=null){const J=d.message.metadata!=null?Pd(d.message.metadata,k):k;n!=null&&await Id({value:J,schema:n,context:{field:"message.metadata",entityId:d.message.id}}),d.message.metadata=J}}switch(h.type){case"text-start":{const k={type:"text",text:"",providerMetadata:h.providerMetadata,state:"streaming"};d.activeTextParts[h.id]=k,d.message.parts.push(k),y();break}case"text-delta":{const k=d.activeTextParts[h.id];if(k==null)throw new xi({chunkType:"text-delta",chunkId:h.id,message:`Received text-delta for missing text part with ID "${h.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});k.text+=h.delta,k.providerMetadata=(g=h.providerMetadata)!=null?g:k.providerMetadata,y();break}case"text-end":{const k=d.activeTextParts[h.id];if(k==null)throw new xi({chunkType:"text-end",chunkId:h.id,message:`Received text-end for missing text part with ID "${h.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});k.state="done",k.providerMetadata=(_=h.providerMetadata)!=null?_:k.providerMetadata,delete d.activeTextParts[h.id],y();break}case"reasoning-start":{const k={type:"reasoning",text:"",providerMetadata:h.providerMetadata,state:"streaming"};d.activeReasoningParts[h.id]=k,d.message.parts.push(k),y();break}case"reasoning-delta":{const k=d.activeReasoningParts[h.id];if(k==null)throw new xi({chunkType:"reasoning-delta",chunkId:h.id,message:`Received reasoning-delta for missing reasoning part with ID "${h.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});k.text+=h.delta,k.providerMetadata=(b=h.providerMetadata)!=null?b:k.providerMetadata,y();break}case"reasoning-end":{const k=d.activeReasoningParts[h.id];if(k==null)throw new xi({chunkType:"reasoning-end",chunkId:h.id,message:`Received reasoning-end for missing reasoning part with ID "${h.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});k.providerMetadata=(E=h.providerMetadata)!=null?E:k.providerMetadata,k.state="done",delete d.activeReasoningParts[h.id],y();break}case"file":{d.message.parts.push({type:"file",mediaType:h.mediaType,url:h.url,...h.providerMetadata!=null?{providerMetadata:h.providerMetadata}:{}}),y();break}case"source-url":{d.message.parts.push({type:"source-url",sourceId:h.sourceId,url:h.url,title:h.title,providerMetadata:h.providerMetadata}),y();break}case"source-document":{d.message.parts.push({type:"source-document",sourceId:h.sourceId,mediaType:h.mediaType,title:h.title,filename:h.filename,providerMetadata:h.providerMetadata}),y();break}case"tool-input-start":{const k=d.message.parts.filter(ps);d.partialToolCalls[h.toolCallId]={text:"",toolName:h.toolName,index:k.length,dynamic:h.dynamic,title:h.title},h.dynamic?O({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-streaming",input:void 0,providerExecuted:h.providerExecuted,title:h.title,providerMetadata:h.providerMetadata}):M({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-streaming",input:void 0,providerExecuted:h.providerExecuted,title:h.title,providerMetadata:h.providerMetadata}),y();break}case"tool-input-delta":{const k=d.partialToolCalls[h.toolCallId];if(k==null)throw new xi({chunkType:"tool-input-delta",chunkId:h.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${h.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});k.text+=h.inputTextDelta;const{value:J}=await Da(k.text);k.dynamic?O({toolCallId:h.toolCallId,toolName:k.toolName,state:"input-streaming",input:J,title:k.title}):M({toolCallId:h.toolCallId,toolName:k.toolName,state:"input-streaming",input:J,title:k.title}),y();break}case"tool-input-available":{h.dynamic?O({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-available",input:h.input,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata,title:h.title}):M({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-available",input:h.input,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata,title:h.title}),y(),s&&!h.providerExecuted&&await s({toolCall:h});break}case"tool-input-error":{const k=d.message.parts.filter(ru).find(K=>K.toolCallId===h.toolCallId);(k!=null?k.type==="dynamic-tool":!!h.dynamic)?O({toolCallId:h.toolCallId,toolName:h.toolName,state:"output-error",input:h.input,errorText:h.errorText,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata}):M({toolCallId:h.toolCallId,toolName:h.toolName,state:"output-error",input:void 0,rawInput:h.input,errorText:h.errorText,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata}),y();break}case"tool-approval-request":{const k=T(h.toolCallId);k.state="approval-requested",k.approval={id:h.approvalId},y();break}case"tool-output-denied":{const k=T(h.toolCallId);k.state="output-denied",y();break}case"tool-output-available":{const k=T(h.toolCallId);k.type==="dynamic-tool"?O({toolCallId:h.toolCallId,toolName:k.toolName,state:"output-available",input:k.input,output:h.output,preliminary:h.preliminary,providerExecuted:h.providerExecuted,title:k.title}):M({toolCallId:h.toolCallId,toolName:Kd(k),state:"output-available",input:k.input,output:h.output,providerExecuted:h.providerExecuted,preliminary:h.preliminary,title:k.title}),y();break}case"tool-output-error":{const k=T(h.toolCallId);k.type==="dynamic-tool"?O({toolCallId:h.toolCallId,toolName:k.toolName,state:"output-error",input:k.input,errorText:h.errorText,providerExecuted:h.providerExecuted,title:k.title}):M({toolCallId:h.toolCallId,toolName:Kd(k),state:"output-error",input:k.input,rawInput:k.rawInput,errorText:h.errorText,providerExecuted:h.providerExecuted,title:k.title}),y();break}case"start-step":{d.message.parts.push({type:"step-start"});break}case"finish-step":{d.activeTextParts={},d.activeReasoningParts={};break}case"start":{h.messageId!=null&&(d.message.id=h.messageId),await B(h.messageMetadata),(h.messageId!=null||h.messageMetadata!=null)&&y();break}case"finish":{h.finishReason!=null&&(d.finishReason=h.finishReason),await B(h.messageMetadata),h.messageMetadata!=null&&y();break}case"message-metadata":{await B(h.messageMetadata),h.messageMetadata!=null&&y();break}case"error":{o==null||o(new Error(h.errorText));break}default:if(gw(h)){if((i==null?void 0:i[h.type])!=null){const K=d.message.parts.findIndex(X=>"id"in X&&"data"in X&&X.id===h.id&&X.type===h.type),D=K>=0?K:d.message.parts.length;await Id({value:h.data,schema:i[h.type],context:{field:`message.parts[${D}].data`,entityName:h.type,entityId:h.id}})}const k=h;if(k.transient){c==null||c(k);break}const J=k.id!=null?d.message.parts.find(K=>k.type===K.type&&k.id===K.id):void 0;J!=null?J.data=k.data:d.message.parts.push(k),c==null||c(k),y()}}m.enqueue(h)})}}))}async function _w({stream:e,onError:n}){const i=e.getReader();try{for(;;){const{done:l}=await i.read();if(l)break}}catch(l){n==null||n(l)}finally{i.releaseLock()}}Oa({prefix:"aitxt",size:24}),Oa({prefix:"aiobj",size:24});var Sw=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((n,i)=>{this.queue.push(async()=>{try{await e(),n()}catch(l){i(l)}}),this.processQueue()})}};Oa({prefix:"aiobj",size:24});async function xw(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async n=>{const{name:i,type:l}=n,o=await new Promise((s,c)=>{const h=new FileReader;h.onload=m=>{var d;s((d=m.target)==null?void 0:d.result)},h.onerror=m=>c(m),h.readAsDataURL(n)});return{type:"file",mediaType:l,filename:i,url:o}}))}var Ew=class{constructor({api:e="/api/chat",credentials:n,headers:i,body:l,fetch:o,prepareSendMessagesRequest:s,prepareReconnectToStreamRequest:c}){this.api=e,this.credentials=n,this.headers=i,this.body=l,this.fetch=o,this.prepareSendMessagesRequest=s,this.prepareReconnectToStreamRequest=c}async sendMessages({abortSignal:e,...n}){var i,l,o,s,c;const h=await hr(this.body),m=await hr(this.headers),d=await hr(this.credentials),y={...Vr(m),...Vr(n.headers)},g=await((i=this.prepareSendMessagesRequest)==null?void 0:i.call(this,{api:this.api,id:n.chatId,messages:n.messages,body:{...h,...n.body},headers:y,credentials:d,requestMetadata:n.metadata,trigger:n.trigger,messageId:n.messageId})),_=(l=g==null?void 0:g.api)!=null?l:this.api,b=(g==null?void 0:g.headers)!==void 0?Vr(g.headers):y,E=(g==null?void 0:g.body)!==void 0?g.body:{...h,...n.body,id:n.chatId,messages:n.messages,trigger:n.trigger,messageId:n.messageId},T=(o=g==null?void 0:g.credentials)!=null?o:d,O=await((s=this.fetch)!=null?s:globalThis.fetch)(_,{method:"POST",headers:Cd({"Content-Type":"application/json",...b},`ai-sdk/${Gd}`,Od()),body:JSON.stringify(E),credentials:T,signal:e});if(!O.ok)throw new Error((c=await O.text())!=null?c:"Failed to fetch the chat response.");if(!O.body)throw new Error("The response body is empty.");return this.processResponseStream(O.body)}async reconnectToStream(e){var n,i,l,o,s;const c=await hr(this.body),h=await hr(this.headers),m=await hr(this.credentials),d={...Vr(h),...Vr(e.headers)},y=await((n=this.prepareReconnectToStreamRequest)==null?void 0:n.call(this,{api:this.api,id:e.chatId,body:{...c,...e.body},headers:d,credentials:m,requestMetadata:e.metadata})),g=(i=y==null?void 0:y.api)!=null?i:`${this.api}/${e.chatId}/stream`,_=(y==null?void 0:y.headers)!==void 0?Vr(y.headers):d,b=(l=y==null?void 0:y.credentials)!=null?l:m,T=await((o=this.fetch)!=null?o:globalThis.fetch)(g,{method:"GET",headers:Cd(_,`ai-sdk/${Gd}`,Od()),credentials:b});if(T.status===204)return null;if(!T.ok)throw new Error((s=await T.text())!=null?s:"Failed to fetch the chat response.");if(!T.body)throw new Error("The response body is empty.");return this.processResponseStream(T.body)}},Wd=class extends Ew{constructor(e={}){super(e)}processResponseStream(e){return Xz({stream:e,schema:mw}).pipeThrough(new TransformStream({async transform(n,i){if(!n.success)throw n.error;i.enqueue(n.value)}}))}},zw=class{constructor({generateId:e=QE,id:n=e(),transport:i=new Wd,messageMetadataSchema:l,dataPartSchemas:o,state:s,onError:c,onToolCall:h,onFinish:m,onData:d,sendAutomaticallyWhen:y}){this.activeResponse=void 0,this.jobExecutor=new Sw,this.sendMessage=async(g,_)=>{var b,E,T,M;if(g==null){await this.makeRequest({trigger:"submit-message",messageId:(b=this.lastMessage)==null?void 0:b.id,..._});return}let O;if("text"in g||"files"in g?O={parts:[...Array.isArray(g.files)?g.files:await xw(g.files),..."text"in g&&g.text!=null?[{type:"text",text:g.text}]:[]]}:O=g,g.messageId!=null){const B=this.state.messages.findIndex(k=>k.id===g.messageId);if(B===-1)throw new Error(`message with id ${g.messageId} not found`);if(this.state.messages[B].role!=="user")throw new Error(`message with id ${g.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,B+1),this.state.replaceMessage(B,{...O,id:g.messageId,role:(E=O.role)!=null?E:"user",metadata:g.metadata})}else this.state.pushMessage({...O,id:(T=O.id)!=null?T:this.generateId(),role:(M=O.role)!=null?M:"user",metadata:g.metadata});await this.makeRequest({trigger:"submit-message",messageId:g.messageId,..._})},this.regenerate=async({messageId:g,..._}={})=>{const b=g==null?this.state.messages.length-1:this.state.messages.findIndex(E=>E.id===g);if(b===-1)throw new Error(`message ${g} not found`);this.state.messages=this.state.messages.slice(0,this.messages[b].role==="assistant"?b:b+1),await this.makeRequest({trigger:"regenerate-message",messageId:g,..._})},this.resumeStream=async(g={})=>{await this.makeRequest({trigger:"resume-stream",...g})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:g,approved:_,reason:b})=>this.jobExecutor.run(async()=>{const E=this.state.messages,T=E[E.length-1],M=O=>ru(O)&&O.state==="approval-requested"&&O.approval.id===g?{...O,state:"approval-responded",approval:{id:g,approved:_,reason:b}}:O;this.state.replaceMessage(E.length-1,{...T,parts:T.parts.map(M)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(M)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(O=>{var B;O&&this.makeRequest({trigger:"submit-message",messageId:(B=this.lastMessage)==null?void 0:B.id})})}),this.addToolOutput=async({state:g="output-available",tool:_,toolCallId:b,output:E,errorText:T})=>this.jobExecutor.run(async()=>{const M=this.state.messages,O=M[M.length-1],B=k=>ru(k)&&k.toolCallId===b?{...k,state:g,output:E,errorText:T}:k;this.state.replaceMessage(M.length-1,{...O,parts:O.parts.map(B)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(B)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(k=>{var J;k&&this.makeRequest({trigger:"submit-message",messageId:(J=this.lastMessage)==null?void 0:J.id})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var g;this.status!=="streaming"&&this.status!=="submitted"||(g=this.activeResponse)!=null&&g.abortController&&this.activeResponse.abortController.abort()},this.id=n,this.transport=i,this.generateId=e,this.messageMetadataSchema=l,this.dataPartSchemas=o,this.state=s,this.onError=c,this.onToolCall=h,this.onFinish=m,this.onData=d,this.sendAutomaticallyWhen=y}get status(){return this.state.status}setStatus({status:e,error:n}){this.status!==e&&(this.state.status=e,this.state.error=n)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:n,headers:i,body:l,messageId:o}){var s,c,h;let m;if(e==="resume-stream")try{const b=await this.transport.reconnectToStream({chatId:this.id,metadata:n,headers:i,body:l});if(b==null)return;m=b}catch(b){this.onError&&b instanceof Error&&this.onError(b),this.setStatus({status:"error",error:b});return}this.setStatus({status:"submitted",error:void 0});const d=this.lastMessage;let y=!1,g=!1,_=!1;try{const b={state:vw({lastMessage:this.state.snapshot(d),messageId:this.generateId()}),abortController:new AbortController};b.abortController.signal.addEventListener("abort",()=>{y=!0}),this.activeResponse=b;let E;e==="resume-stream"?E=m:E=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:b.abortController.signal,metadata:n,headers:i,body:l,trigger:e,messageId:o});const T=M=>this.jobExecutor.run(()=>M({state:b.state,write:()=>{var O;this.setStatus({status:"streaming"}),b.state.message.id===((O=this.lastMessage)==null?void 0:O.id)?this.state.replaceMessage(this.state.messages.length-1,b.state.message):this.state.pushMessage(b.state.message)}}));await _w({stream:bw({stream:E,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:T,onError:M=>{throw M}}),onError:M=>{throw M}}),this.setStatus({status:"ready"})}catch(b){if(y||b.name==="AbortError")return y=!0,this.setStatus({status:"ready"}),null;_=!0,b instanceof TypeError&&(b.message.toLowerCase().includes("fetch")||b.message.toLowerCase().includes("network"))&&(g=!0),this.onError&&b instanceof Error&&this.onError(b),this.setStatus({status:"error",error:b})}finally{try{(c=this.onFinish)==null||c.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:y,isDisconnect:g,isError:_,finishReason:(s=this.activeResponse)==null?void 0:s.state.finishReason})}catch(b){console.error(b)}this.activeResponse=void 0}!_&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,metadata:n,headers:i,body:l})}},ds,em;function ww(){if(em)return ds;em=1;function e(n,i){if(typeof n!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof n}\`.`);let l,o=0;return function(...c){clearTimeout(l);const h=Date.now(),m=h-o,d=i-m;d<=0?(o=h,n.apply(this,c)):l=setTimeout(()=>{o=Date.now(),n.apply(this,c)},d)}}return ds=e,ds}var kw=ww();const Tw=qr(kw);var tm=(e,n,i)=>{if(!n.has(e))throw TypeError("Cannot "+i)},it=(e,n,i)=>(tm(e,n,"read from private field"),i?i.call(e):n.get(e)),Dn=(e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)},dr=(e,n,i,l)=>(tm(e,n,"write to private field"),n.set(e,i),i);function Aw(e,n){return n!=null?Tw(e,n):e}var cn,iu,au,Ma,Ra,ja,Ei,ms,gs,Ow=class{constructor(e=[]){Dn(this,cn,void 0),Dn(this,iu,"ready"),Dn(this,au,void 0),Dn(this,Ma,new Set),Dn(this,Ra,new Set),Dn(this,ja,new Set),this.pushMessage=n=>{dr(this,cn,it(this,cn).concat(n)),it(this,Ei).call(this)},this.popMessage=()=>{dr(this,cn,it(this,cn).slice(0,-1)),it(this,Ei).call(this)},this.replaceMessage=(n,i)=>{dr(this,cn,[...it(this,cn).slice(0,n),this.snapshot(i),...it(this,cn).slice(n+1)]),it(this,Ei).call(this)},this.snapshot=n=>structuredClone(n),this["~registerMessagesCallback"]=(n,i)=>{const l=i?Aw(n,i):n;return it(this,Ma).add(l),()=>{it(this,Ma).delete(l)}},this["~registerStatusCallback"]=n=>(it(this,Ra).add(n),()=>{it(this,Ra).delete(n)}),this["~registerErrorCallback"]=n=>(it(this,ja).add(n),()=>{it(this,ja).delete(n)}),Dn(this,Ei,()=>{it(this,Ma).forEach(n=>n())}),Dn(this,ms,()=>{it(this,Ra).forEach(n=>n())}),Dn(this,gs,()=>{it(this,ja).forEach(n=>n())}),dr(this,cn,e)}get status(){return it(this,iu)}set status(e){dr(this,iu,e),it(this,ms).call(this)}get error(){return it(this,au)}set error(e){dr(this,au,e),it(this,gs).call(this)}get messages(){return it(this,cn)}set messages(e){dr(this,cn,[...e]),it(this,Ei).call(this)}};cn=new WeakMap,iu=new WeakMap,au=new WeakMap,Ma=new WeakMap,Ra=new WeakMap,ja=new WeakMap,Ei=new WeakMap,ms=new WeakMap,gs=new WeakMap;var zi,nm=class extends zw{constructor({messages:e,...n}){const i=new Ow(e);super({...n,state:i}),Dn(this,zi,void 0),this["~registerMessagesCallback"]=(l,o)=>it(this,zi)["~registerMessagesCallback"](l,o),this["~registerStatusCallback"]=l=>it(this,zi)["~registerStatusCallback"](l),this["~registerErrorCallback"]=l=>it(this,zi)["~registerErrorCallback"](l),dr(this,zi,i)}};zi=new WeakMap;function Cw({experimental_throttle:e,resume:n=!1,...i}={}){const l=ke.useRef("chat"in i?{}:{onToolCall:i.onToolCall,onData:i.onData,onFinish:i.onFinish,onError:i.onError,sendAutomaticallyWhen:i.sendAutomaticallyWhen});"chat"in i||(l.current={onToolCall:i.onToolCall,onData:i.onData,onFinish:i.onFinish,onError:i.onError,sendAutomaticallyWhen:i.sendAutomaticallyWhen});const o={...i,onToolCall:_=>{var b,E;return(E=(b=l.current).onToolCall)==null?void 0:E.call(b,_)},onData:_=>{var b,E;return(E=(b=l.current).onData)==null?void 0:E.call(b,_)},onFinish:_=>{var b,E;return(E=(b=l.current).onFinish)==null?void 0:E.call(b,_)},onError:_=>{var b,E;return(E=(b=l.current).onError)==null?void 0:E.call(b,_)},sendAutomaticallyWhen:_=>{var b,E,T;return(T=(E=(b=l.current).sendAutomaticallyWhen)==null?void 0:E.call(b,_))!=null?T:!1}},s=ke.useRef("chat"in i?i.chat:new nm(o));("chat"in i&&i.chat!==s.current||"id"in i&&s.current.id!==i.id)&&(s.current="chat"in i?i.chat:new nm(o));const h=ke.useCallback(_=>s.current["~registerMessagesCallback"](_,e),[e,s.current.id]),m=ke.useSyncExternalStore(h,()=>s.current.messages,()=>s.current.messages),d=ke.useSyncExternalStore(s.current["~registerStatusCallback"],()=>s.current.status,()=>s.current.status),y=ke.useSyncExternalStore(s.current["~registerErrorCallback"],()=>s.current.error,()=>s.current.error),g=ke.useCallback(_=>{typeof _=="function"&&(_=_(s.current.messages)),s.current.messages=_},[s]);return ke.useEffect(()=>{n&&s.current.resumeStream()},[n,s]),{id:s.current.id,messages:m,setMessages:g,sendMessage:s.current.sendMessage,regenerate:s.current.regenerate,clearError:s.current.clearError,stop:s.current.stop,error:y,resumeStream:s.current.resumeStream,status:d,addToolResult:s.current.addToolOutput,addToolOutput:s.current.addToolOutput,addToolApprovalResponse:s.current.addToolApprovalResponse}}/**
|
|
101
|
+
`)}})}};var mw=Hz(()=>Ld(Rt([rt({type:ge("text-start"),id:ee(),providerMetadata:je.optional()}),rt({type:ge("text-delta"),id:ee(),delta:ee(),providerMetadata:je.optional()}),rt({type:ge("text-end"),id:ee(),providerMetadata:je.optional()}),rt({type:ge("error"),errorText:ee()}),rt({type:ge("tool-input-start"),toolCallId:ee(),toolName:ee(),providerExecuted:Mt().optional(),providerMetadata:je.optional(),dynamic:Mt().optional(),title:ee().optional()}),rt({type:ge("tool-input-delta"),toolCallId:ee(),inputTextDelta:ee()}),rt({type:ge("tool-input-available"),toolCallId:ee(),toolName:ee(),input:Nn(),providerExecuted:Mt().optional(),providerMetadata:je.optional(),dynamic:Mt().optional(),title:ee().optional()}),rt({type:ge("tool-input-error"),toolCallId:ee(),toolName:ee(),input:Nn(),providerExecuted:Mt().optional(),providerMetadata:je.optional(),dynamic:Mt().optional(),errorText:ee(),title:ee().optional()}),rt({type:ge("tool-approval-request"),approvalId:ee(),toolCallId:ee()}),rt({type:ge("tool-output-available"),toolCallId:ee(),output:Nn(),providerExecuted:Mt().optional(),dynamic:Mt().optional(),preliminary:Mt().optional()}),rt({type:ge("tool-output-error"),toolCallId:ee(),errorText:ee(),providerExecuted:Mt().optional(),dynamic:Mt().optional()}),rt({type:ge("tool-output-denied"),toolCallId:ee()}),rt({type:ge("reasoning-start"),id:ee(),providerMetadata:je.optional()}),rt({type:ge("reasoning-delta"),id:ee(),delta:ee(),providerMetadata:je.optional()}),rt({type:ge("reasoning-end"),id:ee(),providerMetadata:je.optional()}),rt({type:ge("source-url"),sourceId:ee(),url:ee(),title:ee().optional(),providerMetadata:je.optional()}),rt({type:ge("source-document"),sourceId:ee(),mediaType:ee(),title:ee(),filename:ee().optional(),providerMetadata:je.optional()}),rt({type:ge("file"),url:ee(),mediaType:ee(),providerMetadata:je.optional()}),rt({type:wd(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:ee().optional(),data:Nn(),transient:Mt().optional()}),rt({type:ge("start-step")}),rt({type:ge("finish-step")}),rt({type:ge("start"),messageId:ee().optional(),messageMetadata:Nn().optional()}),rt({type:ge("finish"),finishReason:bd(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:Nn().optional()}),rt({type:ge("abort"),reason:ee().optional()}),rt({type:ge("message-metadata"),messageMetadata:Nn()})])));function gw(e){return e.type.startsWith("data-")}function ps(e){return e.type.startsWith("tool-")}function yw(e){return e.type==="dynamic-tool"}function ru(e){return ps(e)||yw(e)}function Kd(e){return e.type.split("-").slice(1).join("-")}function vw({lastMessage:e,messageId:n}){return{message:(e==null?void 0:e.role)==="assistant"?e:{id:n,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function bw({stream:e,messageMetadataSchema:n,dataPartSchemas:i,runUpdateMessageJob:l,onError:o,onToolCall:s,onData:c}){return e.pipeThrough(new TransformStream({async transform(h,m){await l(async({state:d,write:y})=>{var g,_,b,E;function k(w){const F=d.message.parts.filter(ru).find(D=>D.toolCallId===w);if(F==null)throw new xi({chunkType:"tool-invocation",chunkId:w,message:`No tool invocation found for tool call ID "${w}".`});return F}function R(w){var P;const F=d.message.parts.find(se=>ps(se)&&se.toolCallId===w.toolCallId),D=w,X=F;F!=null?(F.state=w.state,X.input=D.input,X.output=D.output,X.errorText=D.errorText,X.rawInput=D.rawInput,X.preliminary=D.preliminary,w.title!==void 0&&(X.title=w.title),X.providerExecuted=(P=D.providerExecuted)!=null?P:F.providerExecuted,D.providerMetadata!=null&&(F.callProviderMetadata=D.providerMetadata)):d.message.parts.push({type:`tool-${w.toolName}`,toolCallId:w.toolCallId,state:w.state,title:w.title,input:D.input,output:D.output,rawInput:D.rawInput,errorText:D.errorText,providerExecuted:D.providerExecuted,preliminary:D.preliminary,...D.providerMetadata!=null?{callProviderMetadata:D.providerMetadata}:{}})}function C(w){var P,F;const D=d.message.parts.find(be=>be.type==="dynamic-tool"&&be.toolCallId===w.toolCallId),X=w,se=D;D!=null?(D.state=w.state,se.toolName=w.toolName,se.input=X.input,se.output=X.output,se.errorText=X.errorText,se.rawInput=(P=X.rawInput)!=null?P:se.rawInput,se.preliminary=X.preliminary,w.title!==void 0&&(se.title=w.title),se.providerExecuted=(F=X.providerExecuted)!=null?F:D.providerExecuted,X.providerMetadata!=null&&(D.callProviderMetadata=X.providerMetadata)):d.message.parts.push({type:"dynamic-tool",toolName:w.toolName,toolCallId:w.toolCallId,state:w.state,input:X.input,output:X.output,errorText:X.errorText,preliminary:X.preliminary,providerExecuted:X.providerExecuted,title:w.title,...X.providerMetadata!=null?{callProviderMetadata:X.providerMetadata}:{}})}async function B(w){if(w!=null){const P=d.message.metadata!=null?Pd(d.message.metadata,w):w;n!=null&&await Id({value:P,schema:n,context:{field:"message.metadata",entityId:d.message.id}}),d.message.metadata=P}}switch(h.type){case"text-start":{const w={type:"text",text:"",providerMetadata:h.providerMetadata,state:"streaming"};d.activeTextParts[h.id]=w,d.message.parts.push(w),y();break}case"text-delta":{const w=d.activeTextParts[h.id];if(w==null)throw new xi({chunkType:"text-delta",chunkId:h.id,message:`Received text-delta for missing text part with ID "${h.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});w.text+=h.delta,w.providerMetadata=(g=h.providerMetadata)!=null?g:w.providerMetadata,y();break}case"text-end":{const w=d.activeTextParts[h.id];if(w==null)throw new xi({chunkType:"text-end",chunkId:h.id,message:`Received text-end for missing text part with ID "${h.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});w.state="done",w.providerMetadata=(_=h.providerMetadata)!=null?_:w.providerMetadata,delete d.activeTextParts[h.id],y();break}case"reasoning-start":{const w={type:"reasoning",text:"",providerMetadata:h.providerMetadata,state:"streaming"};d.activeReasoningParts[h.id]=w,d.message.parts.push(w),y();break}case"reasoning-delta":{const w=d.activeReasoningParts[h.id];if(w==null)throw new xi({chunkType:"reasoning-delta",chunkId:h.id,message:`Received reasoning-delta for missing reasoning part with ID "${h.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});w.text+=h.delta,w.providerMetadata=(b=h.providerMetadata)!=null?b:w.providerMetadata,y();break}case"reasoning-end":{const w=d.activeReasoningParts[h.id];if(w==null)throw new xi({chunkType:"reasoning-end",chunkId:h.id,message:`Received reasoning-end for missing reasoning part with ID "${h.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});w.providerMetadata=(E=h.providerMetadata)!=null?E:w.providerMetadata,w.state="done",delete d.activeReasoningParts[h.id],y();break}case"file":{d.message.parts.push({type:"file",mediaType:h.mediaType,url:h.url,...h.providerMetadata!=null?{providerMetadata:h.providerMetadata}:{}}),y();break}case"source-url":{d.message.parts.push({type:"source-url",sourceId:h.sourceId,url:h.url,title:h.title,providerMetadata:h.providerMetadata}),y();break}case"source-document":{d.message.parts.push({type:"source-document",sourceId:h.sourceId,mediaType:h.mediaType,title:h.title,filename:h.filename,providerMetadata:h.providerMetadata}),y();break}case"tool-input-start":{const w=d.message.parts.filter(ps);d.partialToolCalls[h.toolCallId]={text:"",toolName:h.toolName,index:w.length,dynamic:h.dynamic,title:h.title},h.dynamic?C({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-streaming",input:void 0,providerExecuted:h.providerExecuted,title:h.title,providerMetadata:h.providerMetadata}):R({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-streaming",input:void 0,providerExecuted:h.providerExecuted,title:h.title,providerMetadata:h.providerMetadata}),y();break}case"tool-input-delta":{const w=d.partialToolCalls[h.toolCallId];if(w==null)throw new xi({chunkType:"tool-input-delta",chunkId:h.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${h.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});w.text+=h.inputTextDelta;const{value:P}=await Da(w.text);w.dynamic?C({toolCallId:h.toolCallId,toolName:w.toolName,state:"input-streaming",input:P,title:w.title}):R({toolCallId:h.toolCallId,toolName:w.toolName,state:"input-streaming",input:P,title:w.title}),y();break}case"tool-input-available":{h.dynamic?C({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-available",input:h.input,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata,title:h.title}):R({toolCallId:h.toolCallId,toolName:h.toolName,state:"input-available",input:h.input,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata,title:h.title}),y(),s&&!h.providerExecuted&&await s({toolCall:h});break}case"tool-input-error":{const w=d.message.parts.filter(ru).find(F=>F.toolCallId===h.toolCallId);(w!=null?w.type==="dynamic-tool":!!h.dynamic)?C({toolCallId:h.toolCallId,toolName:h.toolName,state:"output-error",input:h.input,errorText:h.errorText,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata}):R({toolCallId:h.toolCallId,toolName:h.toolName,state:"output-error",input:void 0,rawInput:h.input,errorText:h.errorText,providerExecuted:h.providerExecuted,providerMetadata:h.providerMetadata}),y();break}case"tool-approval-request":{const w=k(h.toolCallId);w.state="approval-requested",w.approval={id:h.approvalId},y();break}case"tool-output-denied":{const w=k(h.toolCallId);w.state="output-denied",y();break}case"tool-output-available":{const w=k(h.toolCallId);w.type==="dynamic-tool"?C({toolCallId:h.toolCallId,toolName:w.toolName,state:"output-available",input:w.input,output:h.output,preliminary:h.preliminary,providerExecuted:h.providerExecuted,title:w.title}):R({toolCallId:h.toolCallId,toolName:Kd(w),state:"output-available",input:w.input,output:h.output,providerExecuted:h.providerExecuted,preliminary:h.preliminary,title:w.title}),y();break}case"tool-output-error":{const w=k(h.toolCallId);w.type==="dynamic-tool"?C({toolCallId:h.toolCallId,toolName:w.toolName,state:"output-error",input:w.input,errorText:h.errorText,providerExecuted:h.providerExecuted,title:w.title}):R({toolCallId:h.toolCallId,toolName:Kd(w),state:"output-error",input:w.input,rawInput:w.rawInput,errorText:h.errorText,providerExecuted:h.providerExecuted,title:w.title}),y();break}case"start-step":{d.message.parts.push({type:"step-start"});break}case"finish-step":{d.activeTextParts={},d.activeReasoningParts={};break}case"start":{h.messageId!=null&&(d.message.id=h.messageId),await B(h.messageMetadata),(h.messageId!=null||h.messageMetadata!=null)&&y();break}case"finish":{h.finishReason!=null&&(d.finishReason=h.finishReason),await B(h.messageMetadata),h.messageMetadata!=null&&y();break}case"message-metadata":{await B(h.messageMetadata),h.messageMetadata!=null&&y();break}case"error":{o==null||o(new Error(h.errorText));break}default:if(gw(h)){if((i==null?void 0:i[h.type])!=null){const F=d.message.parts.findIndex(X=>"id"in X&&"data"in X&&X.id===h.id&&X.type===h.type),D=F>=0?F:d.message.parts.length;await Id({value:h.data,schema:i[h.type],context:{field:`message.parts[${D}].data`,entityName:h.type,entityId:h.id}})}const w=h;if(w.transient){c==null||c(w);break}const P=w.id!=null?d.message.parts.find(F=>w.type===F.type&&w.id===F.id):void 0;P!=null?P.data=w.data:d.message.parts.push(w),c==null||c(w),y()}}m.enqueue(h)})}}))}async function _w({stream:e,onError:n}){const i=e.getReader();try{for(;;){const{done:l}=await i.read();if(l)break}}catch(l){n==null||n(l)}finally{i.releaseLock()}}Oa({prefix:"aitxt",size:24}),Oa({prefix:"aiobj",size:24});var Sw=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((n,i)=>{this.queue.push(async()=>{try{await e(),n()}catch(l){i(l)}}),this.processQueue()})}};Oa({prefix:"aiobj",size:24});async function xw(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async n=>{const{name:i,type:l}=n,o=await new Promise((s,c)=>{const h=new FileReader;h.onload=m=>{var d;s((d=m.target)==null?void 0:d.result)},h.onerror=m=>c(m),h.readAsDataURL(n)});return{type:"file",mediaType:l,filename:i,url:o}}))}var Ew=class{constructor({api:e="/api/chat",credentials:n,headers:i,body:l,fetch:o,prepareSendMessagesRequest:s,prepareReconnectToStreamRequest:c}){this.api=e,this.credentials=n,this.headers=i,this.body=l,this.fetch=o,this.prepareSendMessagesRequest=s,this.prepareReconnectToStreamRequest=c}async sendMessages({abortSignal:e,...n}){var i,l,o,s,c;const h=await hr(this.body),m=await hr(this.headers),d=await hr(this.credentials),y={...Vr(m),...Vr(n.headers)},g=await((i=this.prepareSendMessagesRequest)==null?void 0:i.call(this,{api:this.api,id:n.chatId,messages:n.messages,body:{...h,...n.body},headers:y,credentials:d,requestMetadata:n.metadata,trigger:n.trigger,messageId:n.messageId})),_=(l=g==null?void 0:g.api)!=null?l:this.api,b=(g==null?void 0:g.headers)!==void 0?Vr(g.headers):y,E=(g==null?void 0:g.body)!==void 0?g.body:{...h,...n.body,id:n.chatId,messages:n.messages,trigger:n.trigger,messageId:n.messageId},k=(o=g==null?void 0:g.credentials)!=null?o:d,C=await((s=this.fetch)!=null?s:globalThis.fetch)(_,{method:"POST",headers:Cd({"Content-Type":"application/json",...b},`ai-sdk/${Gd}`,Od()),body:JSON.stringify(E),credentials:k,signal:e});if(!C.ok)throw new Error((c=await C.text())!=null?c:"Failed to fetch the chat response.");if(!C.body)throw new Error("The response body is empty.");return this.processResponseStream(C.body)}async reconnectToStream(e){var n,i,l,o,s;const c=await hr(this.body),h=await hr(this.headers),m=await hr(this.credentials),d={...Vr(h),...Vr(e.headers)},y=await((n=this.prepareReconnectToStreamRequest)==null?void 0:n.call(this,{api:this.api,id:e.chatId,body:{...c,...e.body},headers:d,credentials:m,requestMetadata:e.metadata})),g=(i=y==null?void 0:y.api)!=null?i:`${this.api}/${e.chatId}/stream`,_=(y==null?void 0:y.headers)!==void 0?Vr(y.headers):d,b=(l=y==null?void 0:y.credentials)!=null?l:m,k=await((o=this.fetch)!=null?o:globalThis.fetch)(g,{method:"GET",headers:Cd(_,`ai-sdk/${Gd}`,Od()),credentials:b});if(k.status===204)return null;if(!k.ok)throw new Error((s=await k.text())!=null?s:"Failed to fetch the chat response.");if(!k.body)throw new Error("The response body is empty.");return this.processResponseStream(k.body)}},Wd=class extends Ew{constructor(e={}){super(e)}processResponseStream(e){return Xz({stream:e,schema:mw}).pipeThrough(new TransformStream({async transform(n,i){if(!n.success)throw n.error;i.enqueue(n.value)}}))}},zw=class{constructor({generateId:e=QE,id:n=e(),transport:i=new Wd,messageMetadataSchema:l,dataPartSchemas:o,state:s,onError:c,onToolCall:h,onFinish:m,onData:d,sendAutomaticallyWhen:y}){this.activeResponse=void 0,this.jobExecutor=new Sw,this.sendMessage=async(g,_)=>{var b,E,k,R;if(g==null){await this.makeRequest({trigger:"submit-message",messageId:(b=this.lastMessage)==null?void 0:b.id,..._});return}let C;if("text"in g||"files"in g?C={parts:[...Array.isArray(g.files)?g.files:await xw(g.files),..."text"in g&&g.text!=null?[{type:"text",text:g.text}]:[]]}:C=g,g.messageId!=null){const B=this.state.messages.findIndex(w=>w.id===g.messageId);if(B===-1)throw new Error(`message with id ${g.messageId} not found`);if(this.state.messages[B].role!=="user")throw new Error(`message with id ${g.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,B+1),this.state.replaceMessage(B,{...C,id:g.messageId,role:(E=C.role)!=null?E:"user",metadata:g.metadata})}else this.state.pushMessage({...C,id:(k=C.id)!=null?k:this.generateId(),role:(R=C.role)!=null?R:"user",metadata:g.metadata});await this.makeRequest({trigger:"submit-message",messageId:g.messageId,..._})},this.regenerate=async({messageId:g,..._}={})=>{const b=g==null?this.state.messages.length-1:this.state.messages.findIndex(E=>E.id===g);if(b===-1)throw new Error(`message ${g} not found`);this.state.messages=this.state.messages.slice(0,this.messages[b].role==="assistant"?b:b+1),await this.makeRequest({trigger:"regenerate-message",messageId:g,..._})},this.resumeStream=async(g={})=>{await this.makeRequest({trigger:"resume-stream",...g})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:g,approved:_,reason:b})=>this.jobExecutor.run(async()=>{const E=this.state.messages,k=E[E.length-1],R=C=>ru(C)&&C.state==="approval-requested"&&C.approval.id===g?{...C,state:"approval-responded",approval:{id:g,approved:_,reason:b}}:C;this.state.replaceMessage(E.length-1,{...k,parts:k.parts.map(R)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(R)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(C=>{var B;C&&this.makeRequest({trigger:"submit-message",messageId:(B=this.lastMessage)==null?void 0:B.id})})}),this.addToolOutput=async({state:g="output-available",tool:_,toolCallId:b,output:E,errorText:k})=>this.jobExecutor.run(async()=>{const R=this.state.messages,C=R[R.length-1],B=w=>ru(w)&&w.toolCallId===b?{...w,state:g,output:E,errorText:k}:w;this.state.replaceMessage(R.length-1,{...C,parts:C.parts.map(B)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(B)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(w=>{var P;w&&this.makeRequest({trigger:"submit-message",messageId:(P=this.lastMessage)==null?void 0:P.id})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var g;this.status!=="streaming"&&this.status!=="submitted"||(g=this.activeResponse)!=null&&g.abortController&&this.activeResponse.abortController.abort()},this.id=n,this.transport=i,this.generateId=e,this.messageMetadataSchema=l,this.dataPartSchemas=o,this.state=s,this.onError=c,this.onToolCall=h,this.onFinish=m,this.onData=d,this.sendAutomaticallyWhen=y}get status(){return this.state.status}setStatus({status:e,error:n}){this.status!==e&&(this.state.status=e,this.state.error=n)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:n,headers:i,body:l,messageId:o}){var s,c,h;let m;if(e==="resume-stream")try{const b=await this.transport.reconnectToStream({chatId:this.id,metadata:n,headers:i,body:l});if(b==null)return;m=b}catch(b){this.onError&&b instanceof Error&&this.onError(b),this.setStatus({status:"error",error:b});return}this.setStatus({status:"submitted",error:void 0});const d=this.lastMessage;let y=!1,g=!1,_=!1;try{const b={state:vw({lastMessage:this.state.snapshot(d),messageId:this.generateId()}),abortController:new AbortController};b.abortController.signal.addEventListener("abort",()=>{y=!0}),this.activeResponse=b;let E;e==="resume-stream"?E=m:E=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:b.abortController.signal,metadata:n,headers:i,body:l,trigger:e,messageId:o});const k=R=>this.jobExecutor.run(()=>R({state:b.state,write:()=>{var C;this.setStatus({status:"streaming"}),b.state.message.id===((C=this.lastMessage)==null?void 0:C.id)?this.state.replaceMessage(this.state.messages.length-1,b.state.message):this.state.pushMessage(b.state.message)}}));await _w({stream:bw({stream:E,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:k,onError:R=>{throw R}}),onError:R=>{throw R}}),this.setStatus({status:"ready"})}catch(b){if(y||b.name==="AbortError")return y=!0,this.setStatus({status:"ready"}),null;_=!0,b instanceof TypeError&&(b.message.toLowerCase().includes("fetch")||b.message.toLowerCase().includes("network"))&&(g=!0),this.onError&&b instanceof Error&&this.onError(b),this.setStatus({status:"error",error:b})}finally{try{(c=this.onFinish)==null||c.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:y,isDisconnect:g,isError:_,finishReason:(s=this.activeResponse)==null?void 0:s.state.finishReason})}catch(b){console.error(b)}this.activeResponse=void 0}!_&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,metadata:n,headers:i,body:l})}},ds,em;function ww(){if(em)return ds;em=1;function e(n,i){if(typeof n!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof n}\`.`);let l,o=0;return function(...c){clearTimeout(l);const h=Date.now(),m=h-o,d=i-m;d<=0?(o=h,n.apply(this,c)):l=setTimeout(()=>{o=Date.now(),n.apply(this,c)},d)}}return ds=e,ds}var kw=ww();const Tw=qr(kw);var tm=(e,n,i)=>{if(!n.has(e))throw TypeError("Cannot "+i)},it=(e,n,i)=>(tm(e,n,"read from private field"),i?i.call(e):n.get(e)),Dn=(e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)},dr=(e,n,i,l)=>(tm(e,n,"write to private field"),n.set(e,i),i);function Aw(e,n){return n!=null?Tw(e,n):e}var cn,iu,au,Ma,Ra,ja,Ei,ms,gs,Ow=class{constructor(e=[]){Dn(this,cn,void 0),Dn(this,iu,"ready"),Dn(this,au,void 0),Dn(this,Ma,new Set),Dn(this,Ra,new Set),Dn(this,ja,new Set),this.pushMessage=n=>{dr(this,cn,it(this,cn).concat(n)),it(this,Ei).call(this)},this.popMessage=()=>{dr(this,cn,it(this,cn).slice(0,-1)),it(this,Ei).call(this)},this.replaceMessage=(n,i)=>{dr(this,cn,[...it(this,cn).slice(0,n),this.snapshot(i),...it(this,cn).slice(n+1)]),it(this,Ei).call(this)},this.snapshot=n=>structuredClone(n),this["~registerMessagesCallback"]=(n,i)=>{const l=i?Aw(n,i):n;return it(this,Ma).add(l),()=>{it(this,Ma).delete(l)}},this["~registerStatusCallback"]=n=>(it(this,Ra).add(n),()=>{it(this,Ra).delete(n)}),this["~registerErrorCallback"]=n=>(it(this,ja).add(n),()=>{it(this,ja).delete(n)}),Dn(this,Ei,()=>{it(this,Ma).forEach(n=>n())}),Dn(this,ms,()=>{it(this,Ra).forEach(n=>n())}),Dn(this,gs,()=>{it(this,ja).forEach(n=>n())}),dr(this,cn,e)}get status(){return it(this,iu)}set status(e){dr(this,iu,e),it(this,ms).call(this)}get error(){return it(this,au)}set error(e){dr(this,au,e),it(this,gs).call(this)}get messages(){return it(this,cn)}set messages(e){dr(this,cn,[...e]),it(this,Ei).call(this)}};cn=new WeakMap,iu=new WeakMap,au=new WeakMap,Ma=new WeakMap,Ra=new WeakMap,ja=new WeakMap,Ei=new WeakMap,ms=new WeakMap,gs=new WeakMap;var zi,nm=class extends zw{constructor({messages:e,...n}){const i=new Ow(e);super({...n,state:i}),Dn(this,zi,void 0),this["~registerMessagesCallback"]=(l,o)=>it(this,zi)["~registerMessagesCallback"](l,o),this["~registerStatusCallback"]=l=>it(this,zi)["~registerStatusCallback"](l),this["~registerErrorCallback"]=l=>it(this,zi)["~registerErrorCallback"](l),dr(this,zi,i)}};zi=new WeakMap;function Cw({experimental_throttle:e,resume:n=!1,...i}={}){const l=ke.useRef("chat"in i?{}:{onToolCall:i.onToolCall,onData:i.onData,onFinish:i.onFinish,onError:i.onError,sendAutomaticallyWhen:i.sendAutomaticallyWhen});"chat"in i||(l.current={onToolCall:i.onToolCall,onData:i.onData,onFinish:i.onFinish,onError:i.onError,sendAutomaticallyWhen:i.sendAutomaticallyWhen});const o={...i,onToolCall:_=>{var b,E;return(E=(b=l.current).onToolCall)==null?void 0:E.call(b,_)},onData:_=>{var b,E;return(E=(b=l.current).onData)==null?void 0:E.call(b,_)},onFinish:_=>{var b,E;return(E=(b=l.current).onFinish)==null?void 0:E.call(b,_)},onError:_=>{var b,E;return(E=(b=l.current).onError)==null?void 0:E.call(b,_)},sendAutomaticallyWhen:_=>{var b,E,k;return(k=(E=(b=l.current).sendAutomaticallyWhen)==null?void 0:E.call(b,_))!=null?k:!1}},s=ke.useRef("chat"in i?i.chat:new nm(o));("chat"in i&&i.chat!==s.current||"id"in i&&s.current.id!==i.id)&&(s.current="chat"in i?i.chat:new nm(o));const h=ke.useCallback(_=>s.current["~registerMessagesCallback"](_,e),[e,s.current.id]),m=ke.useSyncExternalStore(h,()=>s.current.messages,()=>s.current.messages),d=ke.useSyncExternalStore(s.current["~registerStatusCallback"],()=>s.current.status,()=>s.current.status),y=ke.useSyncExternalStore(s.current["~registerErrorCallback"],()=>s.current.error,()=>s.current.error),g=ke.useCallback(_=>{typeof _=="function"&&(_=_(s.current.messages)),s.current.messages=_},[s]);return ke.useEffect(()=>{n&&s.current.resumeStream()},[n,s]),{id:s.current.id,messages:m,setMessages:g,sendMessage:s.current.sendMessage,regenerate:s.current.regenerate,clearError:s.current.clearError,stop:s.current.stop,error:y,resumeStream:s.current.resumeStream,status:d,addToolResult:s.current.addToolOutput,addToolOutput:s.current.addToolOutput,addToolApprovalResponse:s.current.addToolApprovalResponse}}/**
|
|
102
102
|
* @license lucide-react v0.460.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
@@ -149,20 +149,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/const am=wi("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ys={english:{title:"Popup Assistant",initial:"Need any help?",placeholder:"Type your message...",actionSuccess:`I've completed the action "{actionName}". Is there anything else you'd like me to help you with?`,actionError:'I encountered an error while performing "{actionName}": {error}'},spanish:{title:"Asistente Emergente",initial:"¿Necesitas ayuda?",placeholder:"Escribe tu mensaje...",actionSuccess:'He completado la acción "{actionName}". ¿Hay algo más en lo que pueda ayudarte?',actionError:'Encontré un error al realizar "{actionName}": {error}'},french:{title:"Assistant Popup",initial:"Besoin d'aide ?",placeholder:"Tapez votre message...",actionSuccess:`J'ai terminé l'action "{actionName}". Y a-t-il autre chose que je puisse faire pour vous aider ?`,actionError:`J'ai rencontré une erreur lors de l'exécution de "{actionName}": {error}`},german:{title:"Popup-Assistent",initial:"Brauchen Sie Hilfe?",placeholder:"Geben Sie Ihre Nachricht ein...",actionSuccess:'Ich habe die Aktion "{actionName}" abgeschlossen. Kann ich Ihnen bei etwas anderem helfen?',actionError:'Beim Ausführen von "{actionName}" ist ein Fehler aufgetreten: {error}'},portuguese:{title:"Assistente Popup",initial:"Precisa de ajuda?",placeholder:"Digite sua mensagem...",actionSuccess:'Concluí a ação "{actionName}". Há mais alguma coisa que eu possa ajudá-lo?',actionError:'Encontrei um erro ao executar "{actionName}": {error}'},italian:{title:"Assistente Popup",initial:"Hai bisogno di aiuto?",placeholder:"Scrivi il tuo messaggio...",actionSuccess:`Ho completato l'azione "{actionName}". C'è qualcos'altro che posso fare per aiutarti?`,actionError:`Ho riscontrato un errore durante l'esecuzione di "{actionName}": {error}`}};function CD(){}function ND(){}function Lw(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const Iw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hw={};function lm(e,n){return(Hw.jsx?Bw:Iw).test(e)}const qw=/[ \t\n\f\r]/g;function $w(e){return typeof e=="object"?e.type==="text"?um(e.value):!1:um(e)}function um(e){return e.replace(qw,"")===""}class Ua{constructor(n,i,l){this.normal=i,this.property=n,l&&(this.space=l)}}Ua.prototype.normal={},Ua.prototype.property={},Ua.prototype.space=void 0;function om(e,n){const i={},l={};for(const o of e)Object.assign(i,o.property),Object.assign(l,o.normal);return new Ua(i,l,n)}function vs(e){return e.toLowerCase()}class Ht{constructor(n,i){this.attribute=i,this.property=n}}Ht.prototype.attribute="",Ht.prototype.booleanish=!1,Ht.prototype.boolean=!1,Ht.prototype.commaOrSpaceSeparated=!1,Ht.prototype.commaSeparated=!1,Ht.prototype.defined=!1,Ht.prototype.mustUseProperty=!1,Ht.prototype.number=!1,Ht.prototype.overloadedBoolean=!1,Ht.prototype.property="",Ht.prototype.spaceSeparated=!1,Ht.prototype.space=void 0;let Vw=0;const ze=Xr(),mt=Xr(),bs=Xr(),Q=Xr(),et=Xr(),ki=Xr(),Kt=Xr();function Xr(){return 2**++Vw}const _s=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:mt,commaOrSpaceSeparated:Kt,commaSeparated:ki,number:Q,overloadedBoolean:bs,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Ss=Object.keys(_s);class xs extends Ht{constructor(n,i,l,o){let s=-1;if(super(n,i),sm(this,"space",o),typeof l=="number")for(;++s<Ss.length;){const c=Ss[s];sm(this,Ss[s],(l&_s[c])===_s[c])}}}xs.prototype.defined=!0;function sm(e,n,i){i&&(e[n]=i)}function Ti(e){const n={},i={};for(const[l,o]of Object.entries(e.properties)){const s=new xs(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(s.mustUseProperty=!0),n[l]=s,i[vs(l)]=l,i[vs(s.attribute)]=l}return new Ua(n,i,e.space)}const cm=Ti({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:et,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:Q,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:et,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:mt,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function fm(e,n){return n in e?e[n]:n}function hm(e,n){return fm(e,n.toLowerCase())}const Yw=Ti({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:et,autoFocus:ze,autoPlay:ze,blocking:et,capture:null,charSet:null,checked:ze,cite:null,className:et,cols:Q,colSpan:null,content:null,contentEditable:mt,controls:ze,controlsList:et,coords:Q|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:bs,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:et,height:Q,hidden:bs,high:Q,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:et,itemRef:et,itemScope:ze,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:Q,pattern:null,ping:et,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:et,required:ze,reversed:ze,rows:Q,rowSpan:Q,sandbox:et,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:mt,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:hm}),Gw=Ti({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Kt,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ki,g2:ki,glyphName:ki,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Kt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kt,rev:Kt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kt,requiredFeatures:Kt,requiredFonts:Kt,requiredFormats:Kt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Kt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kt,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fm}),pm=Ti({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),dm=Ti({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hm}),mm=Ti({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Xw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Fw=/[A-Z]/g,gm=/-[a-z]/g,Jw=/^data[-\w.:]+$/i;function Qw(e,n){const i=vs(n);let l=n,o=Ht;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&Jw.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(gm,Kw);l="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!gm.test(s)){let c=s.replace(Fw,Pw);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=xs}return new o(l,n)}function Pw(e){return"-"+e.toLowerCase()}function Kw(e){return e.charAt(1).toUpperCase()}const Ww=om([cm,Yw,pm,dm,mm],"html"),Es=om([cm,Gw,pm,dm,mm],"svg");function ek(e){return e.join(" ").trim()}var Ai={},zs,ym;function tk(){if(ym)return zs;ym=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,h=/^\s+|\s+$/g,m=`
|
|
152
|
-
`,d="/",y="*",g="",_="comment",b="declaration";zs=function(T,M){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];M=M||{};var O=1,B=1;function k(le){var ae=le.match(n);ae&&(O+=ae.length);var fe=le.lastIndexOf(m);B=~fe?le.length-fe:B+le.length}function J(){var le={line:O,column:B};return function(ae){return ae.position=new K(le),ce(),ae}}function K(le){this.start=le,this.end={line:O,column:B},this.source=M.source}K.prototype.content=T;function D(le){var ae=new Error(M.source+":"+O+":"+B+": "+le);if(ae.reason=le,ae.filename=M.source,ae.line=O,ae.column=B,ae.source=T,!M.silent)throw ae}function X(le){var ae=le.exec(T);if(ae){var fe=ae[0];return k(fe),T=T.slice(fe.length),ae}}function ce(){X(i)}function pe(le){var ae;for(le=le||[];ae=L();)ae!==!1&&le.push(ae);return le}function L(){var le=J();if(!(d!=T.charAt(0)||y!=T.charAt(1))){for(var ae=2;g!=T.charAt(ae)&&(y!=T.charAt(ae)||d!=T.charAt(ae+1));)++ae;if(ae+=2,g===T.charAt(ae-1))return D("End of comment missing");var fe=T.slice(2,ae-2);return B+=2,k(fe),T=T.slice(ae),B+=2,le({type:_,comment:fe})}}function ie(){var le=J(),ae=X(l);if(ae){if(L(),!X(o))return D("property missing ':'");var fe=X(s),Z=le({type:b,property:E(ae[0].replace(e,g)),value:fe?E(fe[0].replace(e,g)):g});return X(c),Z}}function re(){var le=[];pe(le);for(var ae;ae=ie();)ae!==!1&&(le.push(ae),pe(le));return le}return ce(),re()};function E(T){return T?T.replace(h,g):g}return zs}var vm;function nk(){if(vm)return Ai;vm=1;var e=Ai&&Ai.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.default=i;var n=e(tk());function i(l,o){var s=null;if(!l||typeof l!="string")return s;var c=(0,n.default)(l),h=typeof o=="function";return c.forEach(function(m){if(m.type==="declaration"){var d=m.property,y=m.value;h?o(d,y,m):y&&(s=s||{},s[d]=y)}}),s}return Ai}var Za={},bm;function rk(){if(bm)return Za;bm=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(d){return!d||i.test(d)||e.test(d)},c=function(d,y){return y.toUpperCase()},h=function(d,y){return"".concat(y,"-")},m=function(d,y){return y===void 0&&(y={}),s(d)?d:(d=d.toLowerCase(),y.reactCompat?d=d.replace(o,h):d=d.replace(l,h),d.replace(n,c))};return Za.camelCase=m,Za}var La,_m;function ik(){if(_m)return La;_m=1;var e=La&&La.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(nk()),i=rk();function l(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(h,m){h&&m&&(c[(0,i.camelCase)(h,s)]=m)}),c}return l.default=l,La=l,La}var ak=ik();const lk=qr(ak),Sm=xm("end"),ws=xm("start");function xm(e){return n;function n(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function uk(e){const n=ws(e),i=Sm(e);if(n&&i)return{start:n,end:i}}function Ia(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Em(e.position):"start"in e||"end"in e?Em(e):"line"in e||"column"in e?ks(e):""}function ks(e){return zm(e&&e.line)+":"+zm(e&&e.column)}function Em(e){return ks(e&&e.start)+"-"+ks(e&&e.end)}function zm(e){return e&&typeof e=="number"?e:1}class Ct extends Error{constructor(n,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof l=="string"){const m=l.indexOf(":");m===-1?s.ruleId=l:(s.source=l.slice(0,m),s.ruleId=l.slice(m+1))}if(!s.place&&s.ancestors&&s.ancestors){const m=s.ancestors[s.ancestors.length-1];m&&(s.place=m.position)}const h=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=h?h.line:void 0,this.name=Ia(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ct.prototype.file="",Ct.prototype.name="",Ct.prototype.reason="",Ct.prototype.message="",Ct.prototype.stack="",Ct.prototype.column=void 0,Ct.prototype.line=void 0,Ct.prototype.ancestors=void 0,Ct.prototype.cause=void 0,Ct.prototype.fatal=void 0,Ct.prototype.place=void 0,Ct.prototype.ruleId=void 0,Ct.prototype.source=void 0;const Ts={}.hasOwnProperty,ok=new Map,sk=/[A-Z]/g,ck=new Set(["table","tbody","thead","tfoot","tr"]),fk=new Set(["td","th"]),wm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hk(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=_k(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=bk(i,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Es:Ww,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=km(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function km(e,n,i){if(n.type==="element")return pk(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return dk(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return gk(e,n,i);if(n.type==="mdxjsEsm")return mk(e,n);if(n.type==="root")return yk(e,n,i);if(n.type==="text")return vk(e,n)}function pk(e,n,i){const l=e.schema;let o=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=Es,e.schema=o),e.ancestors.push(n);const s=Am(e,n.tagName,!1),c=Sk(e,n);let h=Os(e,n);return ck.has(n.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!$w(m):!0})),Tm(e,c,s,n),As(c,h),e.ancestors.pop(),e.schema=l,e.create(n,s,c,i)}function dk(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Ba(e,n.position)}function mk(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ba(e,n.position)}function gk(e,n,i){const l=e.schema;let o=l;n.name==="svg"&&l.space==="html"&&(o=Es,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:Am(e,n.name,!0),c=xk(e,n),h=Os(e,n);return Tm(e,c,s,n),As(c,h),e.ancestors.pop(),e.schema=l,e.create(n,s,c,i)}function yk(e,n,i){const l={};return As(l,Os(e,n)),e.create(n,e.Fragment,l,i)}function vk(e,n){return n.value}function Tm(e,n,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=l)}function As(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function bk(e,n,i){return l;function l(o,s,c,h){const d=Array.isArray(c.children)?i:n;return h?d(s,c,h):d(s,c)}}function _k(e,n){return i;function i(l,o,s,c){const h=Array.isArray(s.children),m=ws(l);return n(o,s,c,h,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function Sk(e,n){const i={};let l,o;for(o in n.properties)if(o!=="children"&&Ts.call(n.properties,o)){const s=Ek(e,o,n.properties[o]);if(s){const[c,h]=s;e.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&fk.has(n.tagName)?l=h:i[c]=h}}if(l){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function xk(e,n){const i={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const s=l.data.estree.body[0];s.type;const c=s.expression;c.type;const h=c.properties[0];h.type,Object.assign(i,e.evaluater.evaluateExpression(h.argument))}else Ba(e,n.position);else{const o=l.name;let s;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const h=l.value.data.estree.body[0];h.type,s=e.evaluater.evaluateExpression(h.expression)}else Ba(e,n.position);else s=l.value===null?!0:l.value;i[o]=s}return i}function Os(e,n){const i=[];let l=-1;const o=e.passKeys?new Map:ok;for(;++l<n.children.length;){const s=n.children[l];let c;if(e.passKeys){const m=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(m){const d=o.get(m)||0;c=m+"-"+d,o.set(m,d+1)}}const h=km(e,s,c);h!==void 0&&i.push(h)}return i}function Ek(e,n,i){const l=Qw(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?Lw(i):ek(i)),l.property==="style"){let o=typeof i=="object"?i:zk(e,String(i));return e.stylePropertyNameCase==="css"&&(o=wk(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?Xw[l.property]||l.property:l.attribute,i]}}function zk(e,n){try{return lk(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,o=new Ct("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=wm+"#cannot-parse-style-attribute",o}}function Am(e,n,i){let l;if(!i)l={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const h=lm(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:h,computed:!!(s&&h.type==="Literal"),optional:!1}:h}l=c}else l=lm(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const o=l.value;return Ts.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);Ba(e)}function Ba(e,n){const i=new Ct("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=wm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function wk(e){const n={};let i;for(i in e)Ts.call(e,i)&&(n[kk(i)]=e[i]);return n}function kk(e){let n=e.replace(sk,Tk);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Tk(e){return"-"+e.toLowerCase()}const Cs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ak={};function Ns(e,n){const i=Ak,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Om(e,l,o)}function Om(e,n,i){if(Ok(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cm(e.children,n,i)}return Array.isArray(e)?Cm(e,n,i):""}function Cm(e,n,i){const l=[];let o=-1;for(;++o<e.length;)l[o]=Om(e[o],n,i);return l.join("")}function Ok(e){return!!(e&&typeof e=="object")}const Nm=document.createElement("i");function Ds(e){const n="&"+e+";";Nm.innerHTML=n;const i=Nm.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function Wt(e,n,i,l){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);s<l.length;)c=l.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function fn(e,n){return e.length>0?(Wt(e,e.length,0,n),e):n}const Dm={}.hasOwnProperty;function Mm(e){const n={};let i=-1;for(;++i<e.length;)Ck(n,e[i]);return n}function Ck(e,n){let i;for(i in n){const o=(Dm.call(e,i)?e[i]:void 0)||(e[i]={}),s=n[i];let c;if(s)for(c in s){Dm.call(o,c)||(o[c]=[]);const h=s[c];Nk(o[c],Array.isArray(h)?h:h?[h]:[])}}}function Nk(e,n){let i=-1;const l=[];for(;++i<n.length;)(n[i].add==="after"?e:l).push(n[i]);Wt(e,0,0,l)}function Rm(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=mr(/[A-Za-z]/),Nt=mr(/[\dA-Za-z]/),Dk=mr(/[#-'*+\--9=?A-Z^-~]/);function lu(e){return e!==null&&(e<32||e===127)}const Ms=mr(/\d/),Mk=mr(/[\dA-Fa-f]/),Rk=mr(/[!-/:-@[-`{-~]/);function ge(e){return e!==null&&e<-2}function Qe(e){return e!==null&&(e<0||e===32)}function Te(e){return e===-2||e===-1||e===32}const uu=mr(new RegExp("\\p{P}|\\p{S}","u")),Fr=mr(/\s/);function mr(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Oi(e){const n=[];let i=-1,l=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&Nt(e.charCodeAt(i+1))&&Nt(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const h=e.charCodeAt(i+1);s<56320&&h>56319&&h<57344?(c=String.fromCharCode(s,h),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(l,i),encodeURIComponent(c)),l=i+o+1,c=""),o&&(i+=o,o=0)}return n.join("")+e.slice(l)}function Ze(e,n,i,l){const o=l?l-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(m){return Te(m)?(e.enter(i),h(m)):n(m)}function h(m){return Te(m)&&s++<o?(e.consume(m),h):(e.exit(i),n(m))}}const jk={tokenize:Uk};function Uk(e){const n=e.attempt(this.parser.constructs.contentInitial,l,o);let i;return n;function l(h){if(h===null){e.consume(h);return}return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ze(e,n,"linePrefix")}function o(h){return e.enter("paragraph"),s(h)}function s(h){const m=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,c(h)}function c(h){if(h===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(h);return}return ge(h)?(e.consume(h),e.exit("chunkText"),s):(e.consume(h),c)}}const Zk={tokenize:Lk},jm={tokenize:Ik};function Lk(e){const n=this,i=[];let l=0,o,s,c;return h;function h(k){if(l<i.length){const J=i[l];return n.containerState=J[1],e.attempt(J[0].continuation,m,d)(k)}return d(k)}function m(k){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&B();const J=n.events.length;let K=J,D;for(;K--;)if(n.events[K][0]==="exit"&&n.events[K][1].type==="chunkFlow"){D=n.events[K][1].end;break}O(l);let X=J;for(;X<n.events.length;)n.events[X][1].end={...D},X++;return Wt(n.events,K+1,0,n.events.slice(J)),n.events.length=X,d(k)}return h(k)}function d(k){if(l===i.length){if(!o)return _(k);if(o.currentConstruct&&o.currentConstruct.concrete)return E(k);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(jm,y,g)(k)}function y(k){return o&&B(),O(l),_(k)}function g(k){return n.parser.lazy[n.now().line]=l!==i.length,c=n.now().offset,E(k)}function _(k){return n.containerState={},e.attempt(jm,b,E)(k)}function b(k){return l++,i.push([n.currentConstruct,n.containerState]),_(k)}function E(k){if(k===null){o&&B(),O(0),e.consume(k);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),T(k)}function T(k){if(k===null){M(e.exit("chunkFlow"),!0),O(0),e.consume(k);return}return ge(k)?(e.consume(k),M(e.exit("chunkFlow")),l=0,n.interrupt=void 0,h):(e.consume(k),T)}function M(k,J){const K=n.sliceStream(k);if(J&&K.push(null),k.previous=s,s&&(s.next=k),s=k,o.defineSkip(k.start),o.write(K),n.parser.lazy[k.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<c&&(!o.events[D][1].end||o.events[D][1].end.offset>c))return;const X=n.events.length;let ce=X,pe,L;for(;ce--;)if(n.events[ce][0]==="exit"&&n.events[ce][1].type==="chunkFlow"){if(pe){L=n.events[ce][1].end;break}pe=!0}for(O(l),D=X;D<n.events.length;)n.events[D][1].end={...L},D++;Wt(n.events,ce+1,0,n.events.slice(X)),n.events.length=D}}function O(k){let J=i.length;for(;J-- >k;){const K=i[J];n.containerState=K[1],K[0].exit.call(n,e)}i.length=k}function B(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function Ik(e,n,i){return Ze(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ci(e){if(e===null||Qe(e)||Fr(e))return 1;if(uu(e))return 2}function ou(e,n,i){const l=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!l.includes(s)&&(n=s(n,i),l.push(s))}return n}const Rs={name:"attention",resolveAll:Bk,tokenize:Hk};function Bk(e,n){let i=-1,l,o,s,c,h,m,d,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;m=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[l][1].end},_={...e[i][1].start};Um(g,-m),Um(_,m),c={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:_},s={type:m>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},o={type:m>1?"strong":"emphasis",start:{...c.start},end:{...h.end}},e[l][1].end={...c.start},e[i][1].start={...h.end},d=[],e[l][1].end.offset-e[l][1].start.offset&&(d=fn(d,[["enter",e[l][1],n],["exit",e[l][1],n]])),d=fn(d,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),d=fn(d,ou(n.parser.constructs.insideSpan.null,e.slice(l+1,i),n)),d=fn(d,[["exit",s,n],["enter",h,n],["exit",h,n],["exit",o,n]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,d=fn(d,[["enter",e[i][1],n],["exit",e[i][1],n]])):y=0,Wt(e,l-1,i-l+3,d),i=l+d.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function Hk(e,n){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Ci(l);let s;return c;function c(m){return s=m,e.enter("attentionSequence"),h(m)}function h(m){if(m===s)return e.consume(m),h;const d=e.exit("attentionSequence"),y=Ci(m),g=!y||y===2&&o||i.includes(m),_=!o||o===2&&y||i.includes(l);return d._open=!!(s===42?g:g&&(o||!_)),d._close=!!(s===42?_:_&&(y||!g)),n(m)}}function Um(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const qk={name:"autolink",tokenize:$k};function $k(e,n,i){let l=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return Ut(b)?(e.consume(b),c):b===64?i(b):d(b)}function c(b){return b===43||b===45||b===46||Nt(b)?(l=1,h(b)):d(b)}function h(b){return b===58?(e.consume(b),l=0,m):(b===43||b===45||b===46||Nt(b))&&l++<32?(e.consume(b),h):(l=0,d(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||lu(b)?i(b):(e.consume(b),m)}function d(b){return b===64?(e.consume(b),y):Dk(b)?(e.consume(b),d):i(b)}function y(b){return Nt(b)?g(b):i(b)}function g(b){return b===46?(e.consume(b),l=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):_(b)}function _(b){if((b===45||Nt(b))&&l++<63){const E=b===45?_:g;return e.consume(b),E}return i(b)}}const Ha={partial:!0,tokenize:Vk};function Vk(e,n,i){return l;function l(s){return Te(s)?Ze(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||ge(s)?n(s):i(s)}}const Zm={continuation:{tokenize:Gk},exit:Xk,name:"blockQuote",tokenize:Yk};function Yk(e,n,i){const l=this;return o;function o(c){if(c===62){const h=l.containerState;return h.open||(e.enter("blockQuote",{_container:!0}),h.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Te(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function Gk(e,n,i){const l=this;return o;function o(c){return Te(c)?Ze(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(Zm,n,i)(c)}}function Xk(e){e.exit("blockQuote")}const Lm={name:"characterEscape",tokenize:Fk};function Fk(e,n,i){return l;function l(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return Rk(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(s)}}const Im={name:"characterReference",tokenize:Jk};function Jk(e,n,i){const l=this;let o=0,s,c;return h;function h(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,c=Nt,y(g))}function d(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=Mk,y):(e.enter("characterReferenceValue"),s=7,c=Ms,y(g))}function y(g){if(g===59&&o){const _=e.exit("characterReferenceValue");return c===Nt&&!Ds(l.sliceSerialize(_))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(g)&&o++<s?(e.consume(g),y):i(g)}}const Bm={partial:!0,tokenize:Pk},Hm={concrete:!0,name:"codeFenced",tokenize:Qk};function Qk(e,n,i){const l=this,o={partial:!0,tokenize:K};let s=0,c=0,h;return m;function m(D){return d(D)}function d(D){const X=l.events[l.events.length-1];return s=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,h=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(D)}function y(D){return D===h?(c++,e.consume(D),y):c<3?i(D):(e.exit("codeFencedFenceSequence"),Te(D)?Ze(e,g,"whitespace")(D):g(D))}function g(D){return D===null||ge(D)?(e.exit("codeFencedFence"),l.interrupt?n(D):e.check(Bm,T,J)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||ge(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Te(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(D)):D===96&&D===h?i(D):(e.consume(D),_)}function b(D){return D===null||ge(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||ge(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===h?i(D):(e.consume(D),E)}function T(D){return e.attempt(o,J,M)(D)}function M(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),O}function O(D){return s>0&&Te(D)?Ze(e,B,"linePrefix",s+1)(D):B(D)}function B(D){return D===null||ge(D)?e.check(Bm,T,J)(D):(e.enter("codeFlowValue"),k(D))}function k(D){return D===null||ge(D)?(e.exit("codeFlowValue"),B(D)):(e.consume(D),k)}function J(D){return e.exit("codeFenced"),n(D)}function K(D,X,ce){let pe=0;return L;function L(fe){return D.enter("lineEnding"),D.consume(fe),D.exit("lineEnding"),ie}function ie(fe){return D.enter("codeFencedFence"),Te(fe)?Ze(D,re,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(fe):re(fe)}function re(fe){return fe===h?(D.enter("codeFencedFenceSequence"),le(fe)):ce(fe)}function le(fe){return fe===h?(pe++,D.consume(fe),le):pe>=c?(D.exit("codeFencedFenceSequence"),Te(fe)?Ze(D,ae,"whitespace")(fe):ae(fe)):ce(fe)}function ae(fe){return fe===null||ge(fe)?(D.exit("codeFencedFence"),X(fe)):ce(fe)}}}function Pk(e,n,i){const l=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}const js={name:"codeIndented",tokenize:Wk},Kk={partial:!0,tokenize:eT};function Wk(e,n,i){const l=this;return o;function o(d){return e.enter("codeIndented"),Ze(e,s,"linePrefix",5)(d)}function s(d){const y=l.events[l.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(d):i(d)}function c(d){return d===null?m(d):ge(d)?e.attempt(Kk,c,m)(d):(e.enter("codeFlowValue"),h(d))}function h(d){return d===null||ge(d)?(e.exit("codeFlowValue"),c(d)):(e.consume(d),h)}function m(d){return e.exit("codeIndented"),n(d)}}function eT(e,n,i){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?i(c):ge(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ze(e,s,"linePrefix",5)(c)}function s(c){const h=l.events[l.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(c):ge(c)?o(c):i(c)}}const tT={name:"codeText",previous:rT,resolve:nT,tokenize:iT};function nT(e){let n=e.length-4,i=3,l,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=i;++l<n;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(l=i-1,n++;++l<=n;)o===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(o=l):(l===n||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),n-=l-o-2,l=o+2),o=void 0);return e}function rT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iT(e,n,i){let l=0,o,s;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),h(g)}function h(g){return g===96?(e.consume(g),l++,h):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):ge(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),d(g))}function d(g){return g===null||g===32||g===96||ge(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),d)}function y(g){return g===96?(e.consume(g),o++,y):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(s.type="codeTextData",d(g))}}class aT{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,i,l){const o=i||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&qa(this.left,l),s.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),qa(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),qa(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);qa(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);qa(this.left,i.reverse())}}}function qa(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function qm(e){const n={};let i=-1,l,o,s,c,h,m,d;const y=new aT(e);for(;++i<y.length;){for(;i in n;)i=n[i];if(l=y.get(i),i&&l[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(m=l[1]._tokenizer.events,s=0,s<m.length&&m[s][1].type==="lineEndingBlank"&&(s+=2),s<m.length&&m[s][1].type==="content"))for(;++s<m.length&&m[s][1].type!=="content";)m[s][1].type==="chunkText"&&(m[s][1]._isInFirstContentOfListItem=!0,s++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,lT(y,i)),i=n[i],d=!0);else if(l[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...y.get(o)[1].start},h=y.slice(o,i),h.unshift(l),y.splice(o,i-o+1,h))}}return Wt(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!d}function lT(e,n){const i=e.get(n)[1],l=e.get(n)[2];let o=n-1;const s=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const h=c.events,m=[],d={};let y,g,_=-1,b=i,E=0,T=0;const M=[T];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(y=l.sliceStream(b),b.next||y.push(null),g&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=i;++_<h.length;)h[_][0]==="exit"&&h[_-1][0]==="enter"&&h[_][1].type===h[_-1][1].type&&h[_][1].start.line!==h[_][1].end.line&&(T=_+1,M.push(T),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):M.pop(),_=M.length;_--;){const O=h.slice(M[_],M[_+1]),B=s.pop();m.push([B,B+O.length-1]),e.splice(B,2,O)}for(m.reverse(),_=-1;++_<m.length;)d[E+m[_][0]]=E+m[_][1],E+=m[_][1]-m[_][0]-1;return d}const uT={resolve:sT,tokenize:cT},oT={partial:!0,tokenize:fT};function sT(e){return qm(e),e}function cT(e,n){let i;return l;function l(h){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?s(h):ge(h)?e.check(oT,c,s)(h):(e.consume(h),o)}function s(h){return e.exit("chunkContent"),e.exit("content"),n(h)}function c(h){return e.consume(h),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function fT(e,n,i){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,s,"linePrefix")}function s(c){if(c===null||ge(c))return i(c);const h=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,i,n)(c)}}function $m(e,n,i,l,o,s,c,h,m){const d=m||Number.POSITIVE_INFINITY;let y=0;return g;function g(O){return O===60?(e.enter(l),e.enter(o),e.enter(s),e.consume(O),e.exit(s),_):O===null||O===32||O===41||lu(O)?i(O):(e.enter(l),e.enter(c),e.enter(h),e.enter("chunkString",{contentType:"string"}),T(O))}function _(O){return O===62?(e.enter(s),e.consume(O),e.exit(s),e.exit(o),e.exit(l),n):(e.enter(h),e.enter("chunkString",{contentType:"string"}),b(O))}function b(O){return O===62?(e.exit("chunkString"),e.exit(h),_(O)):O===null||O===60||ge(O)?i(O):(e.consume(O),O===92?E:b)}function E(O){return O===60||O===62||O===92?(e.consume(O),b):b(O)}function T(O){return!y&&(O===null||O===41||Qe(O))?(e.exit("chunkString"),e.exit(h),e.exit(c),e.exit(l),n(O)):y<d&&O===40?(e.consume(O),y++,T):O===41?(e.consume(O),y--,T):O===null||O===32||O===40||lu(O)?i(O):(e.consume(O),O===92?M:T)}function M(O){return O===40||O===41||O===92?(e.consume(O),T):T(O)}}function Vm(e,n,i,l,o,s){const c=this;let h=0,m;return d;function d(b){return e.enter(l),e.enter(o),e.consume(b),e.exit(o),e.enter(s),y}function y(b){return h>999||b===null||b===91||b===93&&!m||b===94&&!h&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(l),n):ge(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||ge(b)||h++>999?(e.exit("chunkString"),y(b)):(e.consume(b),m||(m=!Te(b)),b===92?_:g)}function _(b){return b===91||b===92||b===93?(e.consume(b),h++,g):g(b)}}function Ym(e,n,i,l,o,s){let c;return h;function h(_){return _===34||_===39||_===40?(e.enter(l),e.enter(o),e.consume(_),e.exit(o),c=_===40?41:_,m):i(_)}function m(_){return _===c?(e.enter(o),e.consume(_),e.exit(o),e.exit(l),n):(e.enter(s),d(_))}function d(_){return _===c?(e.exit(s),m(c)):_===null?i(_):ge(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Ze(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===c||_===null||ge(_)?(e.exit("chunkString"),d(_)):(e.consume(_),_===92?g:y)}function g(_){return _===c||_===92?(e.consume(_),y):y(_)}}function $a(e,n){let i;return l;function l(o){return ge(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,l):Te(o)?Ze(e,l,i?"linePrefix":"lineSuffix")(o):n(o)}}const hT={name:"definition",tokenize:dT},pT={partial:!0,tokenize:mT};function dT(e,n,i){const l=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return Vm.call(l,e,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return o=wn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):i(b)}function m(b){return Qe(b)?$a(e,d)(b):d(b)}function d(b){return $m(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(pT,g,g)(b)}function g(b){return Te(b)?Ze(e,_,"whitespace")(b):_(b)}function _(b){return b===null||ge(b)?(e.exit("definition"),l.parser.defined.push(o),n(b)):i(b)}}function mT(e,n,i){return l;function l(h){return Qe(h)?$a(e,o)(h):i(h)}function o(h){return Ym(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function s(h){return Te(h)?Ze(e,c,"whitespace")(h):c(h)}function c(h){return h===null||ge(h)?n(h):i(h)}}const gT={name:"hardBreakEscape",tokenize:yT};function yT(e,n,i){return l;function l(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return ge(s)?(e.exit("hardBreakEscape"),n(s)):i(s)}}const vT={name:"headingAtx",resolve:bT,tokenize:_T};function bT(e,n){let i=e.length-2,l=3,o,s;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},s={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},Wt(e,l,i-l+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function _T(e,n,i){let l=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&l++<6?(e.consume(y),c):y===null||Qe(y)?(e.exit("atxHeadingSequence"),h(y)):i(y)}function h(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||ge(y)?(e.exit("atxHeading"),n(y)):Te(y)?Ze(e,h,"whitespace")(y):(e.enter("atxHeadingText"),d(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),h(y))}function d(y){return y===null||y===35||Qe(y)?(e.exit("atxHeadingText"),h(y)):(e.consume(y),d)}}const ST=["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"],Gm=["pre","script","style","textarea"],xT={concrete:!0,name:"htmlFlow",resolveTo:wT,tokenize:kT},ET={partial:!0,tokenize:AT},zT={partial:!0,tokenize:TT};function wT(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function kT(e,n,i){const l=this;let o,s,c,h,m;return d;function d(x){return y(x)}function y(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),g}function g(x){return x===33?(e.consume(x),_):x===47?(e.consume(x),s=!0,T):x===63?(e.consume(x),o=3,l.interrupt?n:z):Ut(x)?(e.consume(x),c=String.fromCharCode(x),M):i(x)}function _(x){return x===45?(e.consume(x),o=2,b):x===91?(e.consume(x),o=5,h=0,E):Ut(x)?(e.consume(x),o=4,l.interrupt?n:z):i(x)}function b(x){return x===45?(e.consume(x),l.interrupt?n:z):i(x)}function E(x){const ne="CDATA[";return x===ne.charCodeAt(h++)?(e.consume(x),h===ne.length?l.interrupt?n:re:E):i(x)}function T(x){return Ut(x)?(e.consume(x),c=String.fromCharCode(x),M):i(x)}function M(x){if(x===null||x===47||x===62||Qe(x)){const ne=x===47,be=c.toLowerCase();return!ne&&!s&&Gm.includes(be)?(o=1,l.interrupt?n(x):re(x)):ST.includes(c.toLowerCase())?(o=6,ne?(e.consume(x),O):l.interrupt?n(x):re(x)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(x):s?B(x):k(x))}return x===45||Nt(x)?(e.consume(x),c+=String.fromCharCode(x),M):i(x)}function O(x){return x===62?(e.consume(x),l.interrupt?n:re):i(x)}function B(x){return Te(x)?(e.consume(x),B):L(x)}function k(x){return x===47?(e.consume(x),L):x===58||x===95||Ut(x)?(e.consume(x),J):Te(x)?(e.consume(x),k):L(x)}function J(x){return x===45||x===46||x===58||x===95||Nt(x)?(e.consume(x),J):K(x)}function K(x){return x===61?(e.consume(x),D):Te(x)?(e.consume(x),K):k(x)}function D(x){return x===null||x===60||x===61||x===62||x===96?i(x):x===34||x===39?(e.consume(x),m=x,X):Te(x)?(e.consume(x),D):ce(x)}function X(x){return x===m?(e.consume(x),m=null,pe):x===null||ge(x)?i(x):(e.consume(x),X)}function ce(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Qe(x)?K(x):(e.consume(x),ce)}function pe(x){return x===47||x===62||Te(x)?k(x):i(x)}function L(x){return x===62?(e.consume(x),ie):i(x)}function ie(x){return x===null||ge(x)?re(x):Te(x)?(e.consume(x),ie):i(x)}function re(x){return x===45&&o===2?(e.consume(x),Z):x===60&&o===1?(e.consume(x),F):x===62&&o===4?(e.consume(x),A):x===63&&o===3?(e.consume(x),z):x===93&&o===5?(e.consume(x),he):ge(x)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ET,H,le)(x)):x===null||ge(x)?(e.exit("htmlFlowData"),le(x)):(e.consume(x),re)}function le(x){return e.check(zT,ae,H)(x)}function ae(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),fe}function fe(x){return x===null||ge(x)?le(x):(e.enter("htmlFlowData"),re(x))}function Z(x){return x===45?(e.consume(x),z):re(x)}function F(x){return x===47?(e.consume(x),c="",te):re(x)}function te(x){if(x===62){const ne=c.toLowerCase();return Gm.includes(ne)?(e.consume(x),A):re(x)}return Ut(x)&&c.length<8?(e.consume(x),c+=String.fromCharCode(x),te):re(x)}function he(x){return x===93?(e.consume(x),z):re(x)}function z(x){return x===62?(e.consume(x),A):x===45&&o===2?(e.consume(x),z):re(x)}function A(x){return x===null||ge(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),A)}function H(x){return e.exit("htmlFlow"),n(x)}}function TT(e,n,i){const l=this;return o;function o(c){return ge(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):i(c)}function s(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}function AT(e,n,i){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ha,n,i)}}const OT={name:"htmlText",tokenize:CT};function CT(e,n,i){const l=this;let o,s,c;return h;function h(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),d):z===47?(e.consume(z),K):z===63?(e.consume(z),k):Ut(z)?(e.consume(z),ce):i(z)}function d(z){return z===45?(e.consume(z),y):z===91?(e.consume(z),s=0,E):Ut(z)?(e.consume(z),B):i(z)}function y(z){return z===45?(e.consume(z),b):i(z)}function g(z){return z===null?i(z):z===45?(e.consume(z),_):ge(z)?(c=g,F(z)):(e.consume(z),g)}function _(z){return z===45?(e.consume(z),b):g(z)}function b(z){return z===62?Z(z):z===45?_(z):g(z)}function E(z){const A="CDATA[";return z===A.charCodeAt(s++)?(e.consume(z),s===A.length?T:E):i(z)}function T(z){return z===null?i(z):z===93?(e.consume(z),M):ge(z)?(c=T,F(z)):(e.consume(z),T)}function M(z){return z===93?(e.consume(z),O):T(z)}function O(z){return z===62?Z(z):z===93?(e.consume(z),O):T(z)}function B(z){return z===null||z===62?Z(z):ge(z)?(c=B,F(z)):(e.consume(z),B)}function k(z){return z===null?i(z):z===63?(e.consume(z),J):ge(z)?(c=k,F(z)):(e.consume(z),k)}function J(z){return z===62?Z(z):k(z)}function K(z){return Ut(z)?(e.consume(z),D):i(z)}function D(z){return z===45||Nt(z)?(e.consume(z),D):X(z)}function X(z){return ge(z)?(c=X,F(z)):Te(z)?(e.consume(z),X):Z(z)}function ce(z){return z===45||Nt(z)?(e.consume(z),ce):z===47||z===62||Qe(z)?pe(z):i(z)}function pe(z){return z===47?(e.consume(z),Z):z===58||z===95||Ut(z)?(e.consume(z),L):ge(z)?(c=pe,F(z)):Te(z)?(e.consume(z),pe):Z(z)}function L(z){return z===45||z===46||z===58||z===95||Nt(z)?(e.consume(z),L):ie(z)}function ie(z){return z===61?(e.consume(z),re):ge(z)?(c=ie,F(z)):Te(z)?(e.consume(z),ie):pe(z)}function re(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(e.consume(z),o=z,le):ge(z)?(c=re,F(z)):Te(z)?(e.consume(z),re):(e.consume(z),ae)}function le(z){return z===o?(e.consume(z),o=void 0,fe):z===null?i(z):ge(z)?(c=le,F(z)):(e.consume(z),le)}function ae(z){return z===null||z===34||z===39||z===60||z===61||z===96?i(z):z===47||z===62||Qe(z)?pe(z):(e.consume(z),ae)}function fe(z){return z===47||z===62||Qe(z)?pe(z):i(z)}function Z(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),n):i(z)}function F(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),te}function te(z){return Te(z)?Ze(e,he,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):he(z)}function he(z){return e.enter("htmlTextData"),c(z)}}const Us={name:"labelEnd",resolveAll:RT,resolveTo:jT,tokenize:UT},NT={tokenize:ZT},DT={tokenize:LT},MT={tokenize:IT};function RT(e){let n=-1;const i=[];for(;++n<e.length;){const l=e[n][1];if(i.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",n+=o}}return e.length!==i.length&&Wt(e,0,e.length,i),e}function jT(e,n){let i=e.length,l=0,o,s,c,h;for(;i--;)if(o=e[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=i);const m={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[s+l+2][1].end},end:{...e[c-2][1].start}};return h=[["enter",m,n],["enter",d,n]],h=fn(h,e.slice(s+1,s+l+3)),h=fn(h,[["enter",y,n]]),h=fn(h,ou(n.parser.constructs.insideSpan.null,e.slice(s+l+4,c-3),n)),h=fn(h,[["exit",y,n],e[c-2],e[c-1],["exit",d,n]]),h=fn(h,e.slice(c+1)),h=fn(h,[["exit",m,n]]),Wt(e,s,e.length,h),e}function UT(e,n,i){const l=this;let o=l.events.length,s,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){s=l.events[o][1];break}return h;function h(_){return s?s._inactive?g(_):(c=l.parser.defined.includes(wn(l.sliceSerialize({start:s.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),m):i(_)}function m(_){return _===40?e.attempt(NT,y,c?y:g)(_):_===91?e.attempt(DT,y,c?d:g)(_):c?y(_):g(_)}function d(_){return e.attempt(MT,y,g)(_)}function y(_){return n(_)}function g(_){return s._balanced=!0,i(_)}}function ZT(e,n,i){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return Qe(g)?$a(e,s)(g):s(g)}function s(g){return g===41?y(g):$m(e,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Qe(g)?$a(e,m)(g):y(g)}function h(g){return i(g)}function m(g){return g===34||g===39||g===40?Ym(e,d,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function d(g){return Qe(g)?$a(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):i(g)}}function LT(e,n,i){const l=this;return o;function o(h){return Vm.call(l,e,s,c,"reference","referenceMarker","referenceString")(h)}function s(h){return l.parser.defined.includes(wn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(h):i(h)}function c(h){return i(h)}}function IT(e,n,i){return l;function l(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):i(s)}}const BT={name:"labelStartImage",resolveAll:Us.resolveAll,tokenize:HT};function HT(e,n,i){const l=this;return o;function o(h){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(h),e.exit("labelImageMarker"),s}function s(h){return h===91?(e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelImage"),c):i(h)}function c(h){return h===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(h):n(h)}}const qT={name:"labelStartLink",resolveAll:Us.resolveAll,tokenize:$T};function $T(e,n,i){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):n(c)}}const Zs={name:"lineEnding",tokenize:VT};function VT(e,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ze(e,n,"linePrefix")}}const su={name:"thematicBreak",tokenize:YT};function YT(e,n,i){let l=0,o;return s;function s(d){return e.enter("thematicBreak"),c(d)}function c(d){return o=d,h(d)}function h(d){return d===o?(e.enter("thematicBreakSequence"),m(d)):l>=3&&(d===null||ge(d))?(e.exit("thematicBreak"),n(d)):i(d)}function m(d){return d===o?(e.consume(d),l++,m):(e.exit("thematicBreakSequence"),Te(d)?Ze(e,h,"whitespace")(d):h(d))}}const qt={continuation:{tokenize:JT},exit:PT,name:"list",tokenize:FT},GT={partial:!0,tokenize:KT},XT={partial:!0,tokenize:QT};function FT(e,n,i){const l=this,o=l.events[l.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return h;function h(b){const E=l.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!l.containerState.marker||b===l.containerState.marker:Ms(b)){if(l.containerState.type||(l.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(su,i,d)(b):d(b);if(!l.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return i(b)}function m(b){return Ms(b)&&++c<10?(e.consume(b),m):(!l.interrupt||c<2)&&(l.containerState.marker?b===l.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),d(b)):i(b)}function d(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||b,e.check(Ha,l.interrupt?i:y,e.attempt(GT,_,g))}function y(b){return l.containerState.initialBlankLine=!0,s++,_(b)}function g(b){return Te(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),_):i(b)}function _(b){return l.containerState.size=s+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function JT(e,n,i){const l=this;return l.containerState._closeFlow=void 0,e.check(Ha,o,s);function o(h){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ze(e,n,"listItemIndent",l.containerState.size+1)(h)}function s(h){return l.containerState.furtherBlankLines||!Te(h)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(h)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(XT,n,c)(h))}function c(h){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ze(e,e.attempt(qt,n,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function QT(e,n,i){const l=this;return Ze(e,o,"listItemIndent",l.containerState.size+1);function o(s){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(s):i(s)}}function PT(e){e.exit(this.containerState.type)}function KT(e,n,i){const l=this;return Ze(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=l.events[l.events.length-1];return!Te(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):i(s)}}const Xm={name:"setextUnderline",resolveTo:WT,tokenize:eA};function WT(e,n){let i=e.length,l,o,s;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!s&&e[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[l][1],n]),e[l][1].end={...e[s][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function eA(e,n,i){const l=this;let o;return s;function s(d){let y=l.events.length,g;for(;y--;)if(l.events[y][1].type!=="lineEnding"&&l.events[y][1].type!=="linePrefix"&&l.events[y][1].type!=="content"){g=l.events[y][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),o=d,c(d)):i(d)}function c(d){return e.enter("setextHeadingLineSequence"),h(d)}function h(d){return d===o?(e.consume(d),h):(e.exit("setextHeadingLineSequence"),Te(d)?Ze(e,m,"lineSuffix")(d):m(d))}function m(d){return d===null||ge(d)?(e.exit("setextHeadingLine"),n(d)):i(d)}}const tA={tokenize:nA};function nA(e){const n=this,i=e.attempt(Ha,l,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(uT,o)),"linePrefix")));return i;function l(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const rA={resolveAll:Jm()},iA=Fm("string"),aA=Fm("text");function Fm(e){return{resolveAll:Jm(e==="text"?lA:void 0),tokenize:n};function n(i){const l=this,o=this.parser.constructs[e],s=i.attempt(o,c,h);return c;function c(y){return d(y)?s(y):h(y)}function h(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),m}function m(y){return d(y)?(i.exit("data"),s(y)):(i.consume(y),m)}function d(y){if(y===null)return!0;const g=o[y];let _=-1;if(g)for(;++_<g.length;){const b=g[_];if(!b.previous||b.previous.call(l,l.previous))return!0}return!1}}}function Jm(e){return n;function n(i,l){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(i,l):i}}function lA(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],o=n.sliceStream(l);let s=o.length,c=-1,h=0,m;for(;s--;){const d=o[s];if(typeof d=="string"){for(c=d.length;d.charCodeAt(c-1)===32;)h++,c--;if(c)break;c=-1}else if(d===-2)m=!0,h++;else if(d!==-1){s++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(h=0),h){const d={type:i===e.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:l.start._bufferIndex+c,_index:l.start._index+s,line:l.end.line,column:l.end.column-h,offset:l.end.offset-h},end:{...l.end}};l.end={...d.start},l.start.offset===l.end.offset?Object.assign(l,d):(e.splice(i,0,["enter",d,n],["exit",d,n]),i+=2)}i++}return e}const uA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:hT},disable:{null:[]},document:{42:qt,43:qt,45:qt,48:qt,49:qt,50:qt,51:qt,52:qt,53:qt,54:qt,55:qt,56:qt,57:qt,62:Zm},flow:{35:vT,42:su,45:[Xm,su],60:xT,61:Xm,95:su,96:Hm,126:Hm},flowInitial:{[-2]:js,[-1]:js,32:js},insideSpan:{null:[Rs,rA]},string:{38:Im,92:Lm},text:{[-5]:Zs,[-4]:Zs,[-3]:Zs,33:BT,38:Im,42:Rs,60:[qk,OT],91:qT,92:[gT,Lm],93:Us,95:Rs,96:tT}},Symbol.toStringTag,{value:"Module"}));function oA(e,n,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],h=[];const m={attempt:X(K),check:X(D),consume:B,enter:k,exit:J,interrupt:X(D,{interrupt:!0})},d={code:null,containerState:{},defineSkip:T,events:[],now:E,parser:e,previous:null,sliceSerialize:_,sliceStream:b,write:g};let y=n.tokenize.call(d,m);return n.resolveAll&&s.push(n),d;function g(ie){return c=fn(c,ie),M(),c[c.length-1]!==null?[]:(ce(n,0),d.events=ou(s,d.events,d),d.events)}function _(ie,re){return cA(b(ie),re)}function b(ie){return sA(c,ie)}function E(){const{_bufferIndex:ie,_index:re,line:le,column:ae,offset:fe}=l;return{_bufferIndex:ie,_index:re,line:le,column:ae,offset:fe}}function T(ie){o[ie.line]=ie.column,L()}function M(){let ie;for(;l._index<c.length;){const re=c[l._index];if(typeof re=="string")for(ie=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===ie&&l._bufferIndex<re.length;)O(re.charCodeAt(l._bufferIndex));else O(re)}}function O(ie){y=y(ie)}function B(ie){ge(ie)?(l.line++,l.column=1,l.offset+=ie===-3?2:1,L()):ie!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),d.previous=ie}function k(ie,re){const le=re||{};return le.type=ie,le.start=E(),d.events.push(["enter",le,d]),h.push(le),le}function J(ie){const re=h.pop();return re.end=E(),d.events.push(["exit",re,d]),re}function K(ie,re){ce(ie,re.from)}function D(ie,re){re.restore()}function X(ie,re){return le;function le(ae,fe,Z){let F,te,he,z;return Array.isArray(ae)?H(ae):"tokenize"in ae?H([ae]):A(ae);function A(de){return Ne;function Ne(ot){const Ye=ot!==null&&de[ot],hn=ot!==null&&de.null,Hn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(hn)?hn:hn?[hn]:[]];return H(Hn)(ot)}}function H(de){return F=de,te=0,de.length===0?Z:x(de[te])}function x(de){return Ne;function Ne(ot){return z=pe(),he=de,de.partial||(d.currentConstruct=de),de.name&&d.parser.constructs.disable.null.includes(de.name)?be():de.tokenize.call(re?Object.assign(Object.create(d),re):d,m,ne,be)(ot)}}function ne(de){return ie(he,z),fe}function be(de){return z.restore(),++te<F.length?x(F[te]):Z}}}function ce(ie,re){ie.resolveAll&&!s.includes(ie)&&s.push(ie),ie.resolve&&Wt(d.events,re,d.events.length-re,ie.resolve(d.events.slice(re),d)),ie.resolveTo&&(d.events=ie.resolveTo(d.events,d))}function pe(){const ie=E(),re=d.previous,le=d.currentConstruct,ae=d.events.length,fe=Array.from(h);return{from:ae,restore:Z};function Z(){l=ie,d.previous=re,d.currentConstruct=le,d.events.length=ae,h=fe,L()}}function L(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function sA(e,n){const i=n.start._index,l=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(i===o)c=[e[i].slice(l,s)];else{if(c=e.slice(i,o),l>-1){const h=c[0];typeof h=="string"?c[0]=h.slice(l):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function cA(e,n){let i=-1;const l=[];let o;for(;++i<e.length;){const s=e[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
152
|
+
`,d="/",y="*",g="",_="comment",b="declaration";zs=function(k,R){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];R=R||{};var C=1,B=1;function w(ae){var re=ae.match(n);re&&(C+=re.length);var fe=ae.lastIndexOf(m);B=~fe?ae.length-fe:B+ae.length}function P(){var ae={line:C,column:B};return function(re){return re.position=new F(ae),se(),re}}function F(ae){this.start=ae,this.end={line:C,column:B},this.source=R.source}F.prototype.content=k;function D(ae){var re=new Error(R.source+":"+C+":"+B+": "+ae);if(re.reason=ae,re.filename=R.source,re.line=C,re.column=B,re.source=k,!R.silent)throw re}function X(ae){var re=ae.exec(k);if(re){var fe=re[0];return w(fe),k=k.slice(fe.length),re}}function se(){X(i)}function be(ae){var re;for(ae=ae||[];re=Z();)re!==!1&&ae.push(re);return ae}function Z(){var ae=P();if(!(d!=k.charAt(0)||y!=k.charAt(1))){for(var re=2;g!=k.charAt(re)&&(y!=k.charAt(re)||d!=k.charAt(re+1));)++re;if(re+=2,g===k.charAt(re-1))return D("End of comment missing");var fe=k.slice(2,re-2);return B+=2,w(fe),k=k.slice(re),B+=2,ae({type:_,comment:fe})}}function ie(){var ae=P(),re=X(l);if(re){if(Z(),!X(o))return D("property missing ':'");var fe=X(s),L=ae({type:b,property:E(re[0].replace(e,g)),value:fe?E(fe[0].replace(e,g)):g});return X(c),L}}function ne(){var ae=[];be(ae);for(var re;re=ie();)re!==!1&&(ae.push(re),be(ae));return ae}return se(),ne()};function E(k){return k?k.replace(h,g):g}return zs}var vm;function nk(){if(vm)return Ai;vm=1;var e=Ai&&Ai.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.default=i;var n=e(tk());function i(l,o){var s=null;if(!l||typeof l!="string")return s;var c=(0,n.default)(l),h=typeof o=="function";return c.forEach(function(m){if(m.type==="declaration"){var d=m.property,y=m.value;h?o(d,y,m):y&&(s=s||{},s[d]=y)}}),s}return Ai}var Za={},bm;function rk(){if(bm)return Za;bm=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(d){return!d||i.test(d)||e.test(d)},c=function(d,y){return y.toUpperCase()},h=function(d,y){return"".concat(y,"-")},m=function(d,y){return y===void 0&&(y={}),s(d)?d:(d=d.toLowerCase(),y.reactCompat?d=d.replace(o,h):d=d.replace(l,h),d.replace(n,c))};return Za.camelCase=m,Za}var La,_m;function ik(){if(_m)return La;_m=1;var e=La&&La.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(nk()),i=rk();function l(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(h,m){h&&m&&(c[(0,i.camelCase)(h,s)]=m)}),c}return l.default=l,La=l,La}var ak=ik();const lk=qr(ak),Sm=xm("end"),ws=xm("start");function xm(e){return n;function n(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function uk(e){const n=ws(e),i=Sm(e);if(n&&i)return{start:n,end:i}}function Ia(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Em(e.position):"start"in e||"end"in e?Em(e):"line"in e||"column"in e?ks(e):""}function ks(e){return zm(e&&e.line)+":"+zm(e&&e.column)}function Em(e){return ks(e&&e.start)+"-"+ks(e&&e.end)}function zm(e){return e&&typeof e=="number"?e:1}class Ct extends Error{constructor(n,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof l=="string"){const m=l.indexOf(":");m===-1?s.ruleId=l:(s.source=l.slice(0,m),s.ruleId=l.slice(m+1))}if(!s.place&&s.ancestors&&s.ancestors){const m=s.ancestors[s.ancestors.length-1];m&&(s.place=m.position)}const h=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=h?h.line:void 0,this.name=Ia(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ct.prototype.file="",Ct.prototype.name="",Ct.prototype.reason="",Ct.prototype.message="",Ct.prototype.stack="",Ct.prototype.column=void 0,Ct.prototype.line=void 0,Ct.prototype.ancestors=void 0,Ct.prototype.cause=void 0,Ct.prototype.fatal=void 0,Ct.prototype.place=void 0,Ct.prototype.ruleId=void 0,Ct.prototype.source=void 0;const Ts={}.hasOwnProperty,ok=new Map,sk=/[A-Z]/g,ck=new Set(["table","tbody","thead","tfoot","tr"]),fk=new Set(["td","th"]),wm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hk(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=_k(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=bk(i,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Es:Ww,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=km(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function km(e,n,i){if(n.type==="element")return pk(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return dk(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return gk(e,n,i);if(n.type==="mdxjsEsm")return mk(e,n);if(n.type==="root")return yk(e,n,i);if(n.type==="text")return vk(e,n)}function pk(e,n,i){const l=e.schema;let o=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=Es,e.schema=o),e.ancestors.push(n);const s=Am(e,n.tagName,!1),c=Sk(e,n);let h=Os(e,n);return ck.has(n.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!$w(m):!0})),Tm(e,c,s,n),As(c,h),e.ancestors.pop(),e.schema=l,e.create(n,s,c,i)}function dk(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Ba(e,n.position)}function mk(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ba(e,n.position)}function gk(e,n,i){const l=e.schema;let o=l;n.name==="svg"&&l.space==="html"&&(o=Es,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:Am(e,n.name,!0),c=xk(e,n),h=Os(e,n);return Tm(e,c,s,n),As(c,h),e.ancestors.pop(),e.schema=l,e.create(n,s,c,i)}function yk(e,n,i){const l={};return As(l,Os(e,n)),e.create(n,e.Fragment,l,i)}function vk(e,n){return n.value}function Tm(e,n,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=l)}function As(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function bk(e,n,i){return l;function l(o,s,c,h){const d=Array.isArray(c.children)?i:n;return h?d(s,c,h):d(s,c)}}function _k(e,n){return i;function i(l,o,s,c){const h=Array.isArray(s.children),m=ws(l);return n(o,s,c,h,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function Sk(e,n){const i={};let l,o;for(o in n.properties)if(o!=="children"&&Ts.call(n.properties,o)){const s=Ek(e,o,n.properties[o]);if(s){const[c,h]=s;e.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&fk.has(n.tagName)?l=h:i[c]=h}}if(l){const s=i.style||(i.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function xk(e,n){const i={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const s=l.data.estree.body[0];s.type;const c=s.expression;c.type;const h=c.properties[0];h.type,Object.assign(i,e.evaluater.evaluateExpression(h.argument))}else Ba(e,n.position);else{const o=l.name;let s;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const h=l.value.data.estree.body[0];h.type,s=e.evaluater.evaluateExpression(h.expression)}else Ba(e,n.position);else s=l.value===null?!0:l.value;i[o]=s}return i}function Os(e,n){const i=[];let l=-1;const o=e.passKeys?new Map:ok;for(;++l<n.children.length;){const s=n.children[l];let c;if(e.passKeys){const m=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(m){const d=o.get(m)||0;c=m+"-"+d,o.set(m,d+1)}}const h=km(e,s,c);h!==void 0&&i.push(h)}return i}function Ek(e,n,i){const l=Qw(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?Lw(i):ek(i)),l.property==="style"){let o=typeof i=="object"?i:zk(e,String(i));return e.stylePropertyNameCase==="css"&&(o=wk(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?Xw[l.property]||l.property:l.attribute,i]}}function zk(e,n){try{return lk(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,o=new Ct("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=wm+"#cannot-parse-style-attribute",o}}function Am(e,n,i){let l;if(!i)l={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const h=lm(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:h,computed:!!(s&&h.type==="Literal"),optional:!1}:h}l=c}else l=lm(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const o=l.value;return Ts.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);Ba(e)}function Ba(e,n){const i=new Ct("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=wm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function wk(e){const n={};let i;for(i in e)Ts.call(e,i)&&(n[kk(i)]=e[i]);return n}function kk(e){let n=e.replace(sk,Tk);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Tk(e){return"-"+e.toLowerCase()}const Cs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Ak={};function Ns(e,n){const i=Ak,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Om(e,l,o)}function Om(e,n,i){if(Ok(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cm(e.children,n,i)}return Array.isArray(e)?Cm(e,n,i):""}function Cm(e,n,i){const l=[];let o=-1;for(;++o<e.length;)l[o]=Om(e[o],n,i);return l.join("")}function Ok(e){return!!(e&&typeof e=="object")}const Nm=document.createElement("i");function Ds(e){const n="&"+e+";";Nm.innerHTML=n;const i=Nm.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function Wt(e,n,i,l){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);s<l.length;)c=l.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function fn(e,n){return e.length>0?(Wt(e,e.length,0,n),e):n}const Dm={}.hasOwnProperty;function Mm(e){const n={};let i=-1;for(;++i<e.length;)Ck(n,e[i]);return n}function Ck(e,n){let i;for(i in n){const o=(Dm.call(e,i)?e[i]:void 0)||(e[i]={}),s=n[i];let c;if(s)for(c in s){Dm.call(o,c)||(o[c]=[]);const h=s[c];Nk(o[c],Array.isArray(h)?h:h?[h]:[])}}}function Nk(e,n){let i=-1;const l=[];for(;++i<n.length;)(n[i].add==="after"?e:l).push(n[i]);Wt(e,0,0,l)}function Rm(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function wn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=mr(/[A-Za-z]/),Nt=mr(/[\dA-Za-z]/),Dk=mr(/[#-'*+\--9=?A-Z^-~]/);function lu(e){return e!==null&&(e<32||e===127)}const Ms=mr(/\d/),Mk=mr(/[\dA-Fa-f]/),Rk=mr(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Qe(e){return e!==null&&(e<0||e===32)}function Te(e){return e===-2||e===-1||e===32}const uu=mr(new RegExp("\\p{P}|\\p{S}","u")),Fr=mr(/\s/);function mr(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Oi(e){const n=[];let i=-1,l=0,o=0;for(;++i<e.length;){const s=e.charCodeAt(i);let c="";if(s===37&&Nt(e.charCodeAt(i+1))&&Nt(e.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const h=e.charCodeAt(i+1);s<56320&&h>56319&&h<57344?(c=String.fromCharCode(s,h),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(l,i),encodeURIComponent(c)),l=i+o+1,c=""),o&&(i+=o,o=0)}return n.join("")+e.slice(l)}function Ze(e,n,i,l){const o=l?l-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(m){return Te(m)?(e.enter(i),h(m)):n(m)}function h(m){return Te(m)&&s++<o?(e.consume(m),h):(e.exit(i),n(m))}}const jk={tokenize:Uk};function Uk(e){const n=e.attempt(this.parser.constructs.contentInitial,l,o);let i;return n;function l(h){if(h===null){e.consume(h);return}return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ze(e,n,"linePrefix")}function o(h){return e.enter("paragraph"),s(h)}function s(h){const m=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,c(h)}function c(h){if(h===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(h);return}return me(h)?(e.consume(h),e.exit("chunkText"),s):(e.consume(h),c)}}const Zk={tokenize:Lk},jm={tokenize:Ik};function Lk(e){const n=this,i=[];let l=0,o,s,c;return h;function h(w){if(l<i.length){const P=i[l];return n.containerState=P[1],e.attempt(P[0].continuation,m,d)(w)}return d(w)}function m(w){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&B();const P=n.events.length;let F=P,D;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){D=n.events[F][1].end;break}C(l);let X=P;for(;X<n.events.length;)n.events[X][1].end={...D},X++;return Wt(n.events,F+1,0,n.events.slice(P)),n.events.length=X,d(w)}return h(w)}function d(w){if(l===i.length){if(!o)return _(w);if(o.currentConstruct&&o.currentConstruct.concrete)return E(w);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(jm,y,g)(w)}function y(w){return o&&B(),C(l),_(w)}function g(w){return n.parser.lazy[n.now().line]=l!==i.length,c=n.now().offset,E(w)}function _(w){return n.containerState={},e.attempt(jm,b,E)(w)}function b(w){return l++,i.push([n.currentConstruct,n.containerState]),_(w)}function E(w){if(w===null){o&&B(),C(0),e.consume(w);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),k(w)}function k(w){if(w===null){R(e.exit("chunkFlow"),!0),C(0),e.consume(w);return}return me(w)?(e.consume(w),R(e.exit("chunkFlow")),l=0,n.interrupt=void 0,h):(e.consume(w),k)}function R(w,P){const F=n.sliceStream(w);if(P&&F.push(null),w.previous=s,s&&(s.next=w),s=w,o.defineSkip(w.start),o.write(F),n.parser.lazy[w.start.line]){let D=o.events.length;for(;D--;)if(o.events[D][1].start.offset<c&&(!o.events[D][1].end||o.events[D][1].end.offset>c))return;const X=n.events.length;let se=X,be,Z;for(;se--;)if(n.events[se][0]==="exit"&&n.events[se][1].type==="chunkFlow"){if(be){Z=n.events[se][1].end;break}be=!0}for(C(l),D=X;D<n.events.length;)n.events[D][1].end={...Z},D++;Wt(n.events,se+1,0,n.events.slice(X)),n.events.length=D}}function C(w){let P=i.length;for(;P-- >w;){const F=i[P];n.containerState=F[1],F[0].exit.call(n,e)}i.length=w}function B(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function Ik(e,n,i){return Ze(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ci(e){if(e===null||Qe(e)||Fr(e))return 1;if(uu(e))return 2}function ou(e,n,i){const l=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!l.includes(s)&&(n=s(n,i),l.push(s))}return n}const Rs={name:"attention",resolveAll:Bk,tokenize:Hk};function Bk(e,n){let i=-1,l,o,s,c,h,m,d,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;m=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[l][1].end},_={...e[i][1].start};Um(g,-m),Um(_,m),c={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:_},s={type:m>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},o={type:m>1?"strong":"emphasis",start:{...c.start},end:{...h.end}},e[l][1].end={...c.start},e[i][1].start={...h.end},d=[],e[l][1].end.offset-e[l][1].start.offset&&(d=fn(d,[["enter",e[l][1],n],["exit",e[l][1],n]])),d=fn(d,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),d=fn(d,ou(n.parser.constructs.insideSpan.null,e.slice(l+1,i),n)),d=fn(d,[["exit",s,n],["enter",h,n],["exit",h,n],["exit",o,n]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,d=fn(d,[["enter",e[i][1],n],["exit",e[i][1],n]])):y=0,Wt(e,l-1,i-l+3,d),i=l+d.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function Hk(e,n){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Ci(l);let s;return c;function c(m){return s=m,e.enter("attentionSequence"),h(m)}function h(m){if(m===s)return e.consume(m),h;const d=e.exit("attentionSequence"),y=Ci(m),g=!y||y===2&&o||i.includes(m),_=!o||o===2&&y||i.includes(l);return d._open=!!(s===42?g:g&&(o||!_)),d._close=!!(s===42?_:_&&(y||!g)),n(m)}}function Um(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const qk={name:"autolink",tokenize:$k};function $k(e,n,i){let l=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return Ut(b)?(e.consume(b),c):b===64?i(b):d(b)}function c(b){return b===43||b===45||b===46||Nt(b)?(l=1,h(b)):d(b)}function h(b){return b===58?(e.consume(b),l=0,m):(b===43||b===45||b===46||Nt(b))&&l++<32?(e.consume(b),h):(l=0,d(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||lu(b)?i(b):(e.consume(b),m)}function d(b){return b===64?(e.consume(b),y):Dk(b)?(e.consume(b),d):i(b)}function y(b){return Nt(b)?g(b):i(b)}function g(b){return b===46?(e.consume(b),l=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):_(b)}function _(b){if((b===45||Nt(b))&&l++<63){const E=b===45?_:g;return e.consume(b),E}return i(b)}}const Ha={partial:!0,tokenize:Vk};function Vk(e,n,i){return l;function l(s){return Te(s)?Ze(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||me(s)?n(s):i(s)}}const Zm={continuation:{tokenize:Gk},exit:Xk,name:"blockQuote",tokenize:Yk};function Yk(e,n,i){const l=this;return o;function o(c){if(c===62){const h=l.containerState;return h.open||(e.enter("blockQuote",{_container:!0}),h.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Te(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function Gk(e,n,i){const l=this;return o;function o(c){return Te(c)?Ze(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(Zm,n,i)(c)}}function Xk(e){e.exit("blockQuote")}const Lm={name:"characterEscape",tokenize:Fk};function Fk(e,n,i){return l;function l(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return Rk(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(s)}}const Im={name:"characterReference",tokenize:Jk};function Jk(e,n,i){const l=this;let o=0,s,c;return h;function h(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,c=Nt,y(g))}function d(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=Mk,y):(e.enter("characterReferenceValue"),s=7,c=Ms,y(g))}function y(g){if(g===59&&o){const _=e.exit("characterReferenceValue");return c===Nt&&!Ds(l.sliceSerialize(_))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(g)&&o++<s?(e.consume(g),y):i(g)}}const Bm={partial:!0,tokenize:Pk},Hm={concrete:!0,name:"codeFenced",tokenize:Qk};function Qk(e,n,i){const l=this,o={partial:!0,tokenize:F};let s=0,c=0,h;return m;function m(D){return d(D)}function d(D){const X=l.events[l.events.length-1];return s=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,h=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(D)}function y(D){return D===h?(c++,e.consume(D),y):c<3?i(D):(e.exit("codeFencedFenceSequence"),Te(D)?Ze(e,g,"whitespace")(D):g(D))}function g(D){return D===null||me(D)?(e.exit("codeFencedFence"),l.interrupt?n(D):e.check(Bm,k,P)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||me(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Te(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,b,"whitespace")(D)):D===96&&D===h?i(D):(e.consume(D),_)}function b(D){return D===null||me(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||me(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===h?i(D):(e.consume(D),E)}function k(D){return e.attempt(o,P,R)(D)}function R(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),C}function C(D){return s>0&&Te(D)?Ze(e,B,"linePrefix",s+1)(D):B(D)}function B(D){return D===null||me(D)?e.check(Bm,k,P)(D):(e.enter("codeFlowValue"),w(D))}function w(D){return D===null||me(D)?(e.exit("codeFlowValue"),B(D)):(e.consume(D),w)}function P(D){return e.exit("codeFenced"),n(D)}function F(D,X,se){let be=0;return Z;function Z(fe){return D.enter("lineEnding"),D.consume(fe),D.exit("lineEnding"),ie}function ie(fe){return D.enter("codeFencedFence"),Te(fe)?Ze(D,ne,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(fe):ne(fe)}function ne(fe){return fe===h?(D.enter("codeFencedFenceSequence"),ae(fe)):se(fe)}function ae(fe){return fe===h?(be++,D.consume(fe),ae):be>=c?(D.exit("codeFencedFenceSequence"),Te(fe)?Ze(D,re,"whitespace")(fe):re(fe)):se(fe)}function re(fe){return fe===null||me(fe)?(D.exit("codeFencedFence"),X(fe)):se(fe)}}}function Pk(e,n,i){const l=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}const js={name:"codeIndented",tokenize:Wk},Kk={partial:!0,tokenize:eT};function Wk(e,n,i){const l=this;return o;function o(d){return e.enter("codeIndented"),Ze(e,s,"linePrefix",5)(d)}function s(d){const y=l.events[l.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(d):i(d)}function c(d){return d===null?m(d):me(d)?e.attempt(Kk,c,m)(d):(e.enter("codeFlowValue"),h(d))}function h(d){return d===null||me(d)?(e.exit("codeFlowValue"),c(d)):(e.consume(d),h)}function m(d){return e.exit("codeIndented"),n(d)}}function eT(e,n,i){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?i(c):me(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ze(e,s,"linePrefix",5)(c)}function s(c){const h=l.events[l.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(c):me(c)?o(c):i(c)}}const tT={name:"codeText",previous:rT,resolve:nT,tokenize:iT};function nT(e){let n=e.length-4,i=3,l,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=i;++l<n;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(l=i-1,n++;++l<=n;)o===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(o=l):(l===n||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),n-=l-o-2,l=o+2),o=void 0);return e}function rT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iT(e,n,i){let l=0,o,s;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),h(g)}function h(g){return g===96?(e.consume(g),l++,h):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):me(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),d(g))}function d(g){return g===null||g===32||g===96||me(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),d)}function y(g){return g===96?(e.consume(g),o++,y):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(s.type="codeTextData",d(g))}}class aT{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,i,l){const o=i||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&qa(this.left,l),s.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),qa(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),qa(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);qa(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);qa(this.left,i.reverse())}}}function qa(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function qm(e){const n={};let i=-1,l,o,s,c,h,m,d;const y=new aT(e);for(;++i<y.length;){for(;i in n;)i=n[i];if(l=y.get(i),i&&l[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(m=l[1]._tokenizer.events,s=0,s<m.length&&m[s][1].type==="lineEndingBlank"&&(s+=2),s<m.length&&m[s][1].type==="content"))for(;++s<m.length&&m[s][1].type!=="content";)m[s][1].type==="chunkText"&&(m[s][1]._isInFirstContentOfListItem=!0,s++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,lT(y,i)),i=n[i],d=!0);else if(l[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...y.get(o)[1].start},h=y.slice(o,i),h.unshift(l),y.splice(o,i-o+1,h))}}return Wt(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!d}function lT(e,n){const i=e.get(n)[1],l=e.get(n)[2];let o=n-1;const s=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const h=c.events,m=[],d={};let y,g,_=-1,b=i,E=0,k=0;const R=[k];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(y=l.sliceStream(b),b.next||y.push(null),g&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=i;++_<h.length;)h[_][0]==="exit"&&h[_-1][0]==="enter"&&h[_][1].type===h[_-1][1].type&&h[_][1].start.line!==h[_][1].end.line&&(k=_+1,R.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):R.pop(),_=R.length;_--;){const C=h.slice(R[_],R[_+1]),B=s.pop();m.push([B,B+C.length-1]),e.splice(B,2,C)}for(m.reverse(),_=-1;++_<m.length;)d[E+m[_][0]]=E+m[_][1],E+=m[_][1]-m[_][0]-1;return d}const uT={resolve:sT,tokenize:cT},oT={partial:!0,tokenize:fT};function sT(e){return qm(e),e}function cT(e,n){let i;return l;function l(h){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?s(h):me(h)?e.check(oT,c,s)(h):(e.consume(h),o)}function s(h){return e.exit("chunkContent"),e.exit("content"),n(h)}function c(h){return e.consume(h),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function fT(e,n,i){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,s,"linePrefix")}function s(c){if(c===null||me(c))return i(c);const h=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,i,n)(c)}}function $m(e,n,i,l,o,s,c,h,m){const d=m||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(e.enter(l),e.enter(o),e.enter(s),e.consume(C),e.exit(s),_):C===null||C===32||C===41||lu(C)?i(C):(e.enter(l),e.enter(c),e.enter(h),e.enter("chunkString",{contentType:"string"}),k(C))}function _(C){return C===62?(e.enter(s),e.consume(C),e.exit(s),e.exit(o),e.exit(l),n):(e.enter(h),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(e.exit("chunkString"),e.exit(h),_(C)):C===null||C===60||me(C)?i(C):(e.consume(C),C===92?E:b)}function E(C){return C===60||C===62||C===92?(e.consume(C),b):b(C)}function k(C){return!y&&(C===null||C===41||Qe(C))?(e.exit("chunkString"),e.exit(h),e.exit(c),e.exit(l),n(C)):y<d&&C===40?(e.consume(C),y++,k):C===41?(e.consume(C),y--,k):C===null||C===32||C===40||lu(C)?i(C):(e.consume(C),C===92?R:k)}function R(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function Vm(e,n,i,l,o,s){const c=this;let h=0,m;return d;function d(b){return e.enter(l),e.enter(o),e.consume(b),e.exit(o),e.enter(s),y}function y(b){return h>999||b===null||b===91||b===93&&!m||b===94&&!h&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(l),n):me(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||me(b)||h++>999?(e.exit("chunkString"),y(b)):(e.consume(b),m||(m=!Te(b)),b===92?_:g)}function _(b){return b===91||b===92||b===93?(e.consume(b),h++,g):g(b)}}function Ym(e,n,i,l,o,s){let c;return h;function h(_){return _===34||_===39||_===40?(e.enter(l),e.enter(o),e.consume(_),e.exit(o),c=_===40?41:_,m):i(_)}function m(_){return _===c?(e.enter(o),e.consume(_),e.exit(o),e.exit(l),n):(e.enter(s),d(_))}function d(_){return _===c?(e.exit(s),m(c)):_===null?i(_):me(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Ze(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===c||_===null||me(_)?(e.exit("chunkString"),d(_)):(e.consume(_),_===92?g:y)}function g(_){return _===c||_===92?(e.consume(_),y):y(_)}}function $a(e,n){let i;return l;function l(o){return me(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,l):Te(o)?Ze(e,l,i?"linePrefix":"lineSuffix")(o):n(o)}}const hT={name:"definition",tokenize:dT},pT={partial:!0,tokenize:mT};function dT(e,n,i){const l=this;let o;return s;function s(b){return e.enter("definition"),c(b)}function c(b){return Vm.call(l,e,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return o=wn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):i(b)}function m(b){return Qe(b)?$a(e,d)(b):d(b)}function d(b){return $m(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(pT,g,g)(b)}function g(b){return Te(b)?Ze(e,_,"whitespace")(b):_(b)}function _(b){return b===null||me(b)?(e.exit("definition"),l.parser.defined.push(o),n(b)):i(b)}}function mT(e,n,i){return l;function l(h){return Qe(h)?$a(e,o)(h):i(h)}function o(h){return Ym(e,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function s(h){return Te(h)?Ze(e,c,"whitespace")(h):c(h)}function c(h){return h===null||me(h)?n(h):i(h)}}const gT={name:"hardBreakEscape",tokenize:yT};function yT(e,n,i){return l;function l(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return me(s)?(e.exit("hardBreakEscape"),n(s)):i(s)}}const vT={name:"headingAtx",resolve:bT,tokenize:_T};function bT(e,n){let i=e.length-2,l=3,o,s;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},s={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},Wt(e,l,i-l+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function _T(e,n,i){let l=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&l++<6?(e.consume(y),c):y===null||Qe(y)?(e.exit("atxHeadingSequence"),h(y)):i(y)}function h(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||me(y)?(e.exit("atxHeading"),n(y)):Te(y)?Ze(e,h,"whitespace")(y):(e.enter("atxHeadingText"),d(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),h(y))}function d(y){return y===null||y===35||Qe(y)?(e.exit("atxHeadingText"),h(y)):(e.consume(y),d)}}const ST=["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"],Gm=["pre","script","style","textarea"],xT={concrete:!0,name:"htmlFlow",resolveTo:wT,tokenize:kT},ET={partial:!0,tokenize:AT},zT={partial:!0,tokenize:TT};function wT(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function kT(e,n,i){const l=this;let o,s,c,h,m;return d;function d(x){return y(x)}function y(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),g}function g(x){return x===33?(e.consume(x),_):x===47?(e.consume(x),s=!0,k):x===63?(e.consume(x),o=3,l.interrupt?n:z):Ut(x)?(e.consume(x),c=String.fromCharCode(x),R):i(x)}function _(x){return x===45?(e.consume(x),o=2,b):x===91?(e.consume(x),o=5,h=0,E):Ut(x)?(e.consume(x),o=4,l.interrupt?n:z):i(x)}function b(x){return x===45?(e.consume(x),l.interrupt?n:z):i(x)}function E(x){const te="CDATA[";return x===te.charCodeAt(h++)?(e.consume(x),h===te.length?l.interrupt?n:ne:E):i(x)}function k(x){return Ut(x)?(e.consume(x),c=String.fromCharCode(x),R):i(x)}function R(x){if(x===null||x===47||x===62||Qe(x)){const te=x===47,ve=c.toLowerCase();return!te&&!s&&Gm.includes(ve)?(o=1,l.interrupt?n(x):ne(x)):ST.includes(c.toLowerCase())?(o=6,te?(e.consume(x),C):l.interrupt?n(x):ne(x)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(x):s?B(x):w(x))}return x===45||Nt(x)?(e.consume(x),c+=String.fromCharCode(x),R):i(x)}function C(x){return x===62?(e.consume(x),l.interrupt?n:ne):i(x)}function B(x){return Te(x)?(e.consume(x),B):Z(x)}function w(x){return x===47?(e.consume(x),Z):x===58||x===95||Ut(x)?(e.consume(x),P):Te(x)?(e.consume(x),w):Z(x)}function P(x){return x===45||x===46||x===58||x===95||Nt(x)?(e.consume(x),P):F(x)}function F(x){return x===61?(e.consume(x),D):Te(x)?(e.consume(x),F):w(x)}function D(x){return x===null||x===60||x===61||x===62||x===96?i(x):x===34||x===39?(e.consume(x),m=x,X):Te(x)?(e.consume(x),D):se(x)}function X(x){return x===m?(e.consume(x),m=null,be):x===null||me(x)?i(x):(e.consume(x),X)}function se(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||Qe(x)?F(x):(e.consume(x),se)}function be(x){return x===47||x===62||Te(x)?w(x):i(x)}function Z(x){return x===62?(e.consume(x),ie):i(x)}function ie(x){return x===null||me(x)?ne(x):Te(x)?(e.consume(x),ie):i(x)}function ne(x){return x===45&&o===2?(e.consume(x),L):x===60&&o===1?(e.consume(x),J):x===62&&o===4?(e.consume(x),A):x===63&&o===3?(e.consume(x),z):x===93&&o===5?(e.consume(x),he):me(x)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ET,H,ae)(x)):x===null||me(x)?(e.exit("htmlFlowData"),ae(x)):(e.consume(x),ne)}function ae(x){return e.check(zT,re,H)(x)}function re(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),fe}function fe(x){return x===null||me(x)?ae(x):(e.enter("htmlFlowData"),ne(x))}function L(x){return x===45?(e.consume(x),z):ne(x)}function J(x){return x===47?(e.consume(x),c="",ue):ne(x)}function ue(x){if(x===62){const te=c.toLowerCase();return Gm.includes(te)?(e.consume(x),A):ne(x)}return Ut(x)&&c.length<8?(e.consume(x),c+=String.fromCharCode(x),ue):ne(x)}function he(x){return x===93?(e.consume(x),z):ne(x)}function z(x){return x===62?(e.consume(x),A):x===45&&o===2?(e.consume(x),z):ne(x)}function A(x){return x===null||me(x)?(e.exit("htmlFlowData"),H(x)):(e.consume(x),A)}function H(x){return e.exit("htmlFlow"),n(x)}}function TT(e,n,i){const l=this;return o;function o(c){return me(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):i(c)}function s(c){return l.parser.lazy[l.now().line]?i(c):n(c)}}function AT(e,n,i){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ha,n,i)}}const OT={name:"htmlText",tokenize:CT};function CT(e,n,i){const l=this;let o,s,c;return h;function h(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),d):z===47?(e.consume(z),F):z===63?(e.consume(z),w):Ut(z)?(e.consume(z),se):i(z)}function d(z){return z===45?(e.consume(z),y):z===91?(e.consume(z),s=0,E):Ut(z)?(e.consume(z),B):i(z)}function y(z){return z===45?(e.consume(z),b):i(z)}function g(z){return z===null?i(z):z===45?(e.consume(z),_):me(z)?(c=g,J(z)):(e.consume(z),g)}function _(z){return z===45?(e.consume(z),b):g(z)}function b(z){return z===62?L(z):z===45?_(z):g(z)}function E(z){const A="CDATA[";return z===A.charCodeAt(s++)?(e.consume(z),s===A.length?k:E):i(z)}function k(z){return z===null?i(z):z===93?(e.consume(z),R):me(z)?(c=k,J(z)):(e.consume(z),k)}function R(z){return z===93?(e.consume(z),C):k(z)}function C(z){return z===62?L(z):z===93?(e.consume(z),C):k(z)}function B(z){return z===null||z===62?L(z):me(z)?(c=B,J(z)):(e.consume(z),B)}function w(z){return z===null?i(z):z===63?(e.consume(z),P):me(z)?(c=w,J(z)):(e.consume(z),w)}function P(z){return z===62?L(z):w(z)}function F(z){return Ut(z)?(e.consume(z),D):i(z)}function D(z){return z===45||Nt(z)?(e.consume(z),D):X(z)}function X(z){return me(z)?(c=X,J(z)):Te(z)?(e.consume(z),X):L(z)}function se(z){return z===45||Nt(z)?(e.consume(z),se):z===47||z===62||Qe(z)?be(z):i(z)}function be(z){return z===47?(e.consume(z),L):z===58||z===95||Ut(z)?(e.consume(z),Z):me(z)?(c=be,J(z)):Te(z)?(e.consume(z),be):L(z)}function Z(z){return z===45||z===46||z===58||z===95||Nt(z)?(e.consume(z),Z):ie(z)}function ie(z){return z===61?(e.consume(z),ne):me(z)?(c=ie,J(z)):Te(z)?(e.consume(z),ie):be(z)}function ne(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(e.consume(z),o=z,ae):me(z)?(c=ne,J(z)):Te(z)?(e.consume(z),ne):(e.consume(z),re)}function ae(z){return z===o?(e.consume(z),o=void 0,fe):z===null?i(z):me(z)?(c=ae,J(z)):(e.consume(z),ae)}function re(z){return z===null||z===34||z===39||z===60||z===61||z===96?i(z):z===47||z===62||Qe(z)?be(z):(e.consume(z),re)}function fe(z){return z===47||z===62||Qe(z)?be(z):i(z)}function L(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),n):i(z)}function J(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),ue}function ue(z){return Te(z)?Ze(e,he,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):he(z)}function he(z){return e.enter("htmlTextData"),c(z)}}const Us={name:"labelEnd",resolveAll:RT,resolveTo:jT,tokenize:UT},NT={tokenize:ZT},DT={tokenize:LT},MT={tokenize:IT};function RT(e){let n=-1;const i=[];for(;++n<e.length;){const l=e[n][1];if(i.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",n+=o}}return e.length!==i.length&&Wt(e,0,e.length,i),e}function jT(e,n){let i=e.length,l=0,o,s,c,h;for(;i--;)if(o=e[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=i);const m={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[s+l+2][1].end},end:{...e[c-2][1].start}};return h=[["enter",m,n],["enter",d,n]],h=fn(h,e.slice(s+1,s+l+3)),h=fn(h,[["enter",y,n]]),h=fn(h,ou(n.parser.constructs.insideSpan.null,e.slice(s+l+4,c-3),n)),h=fn(h,[["exit",y,n],e[c-2],e[c-1],["exit",d,n]]),h=fn(h,e.slice(c+1)),h=fn(h,[["exit",m,n]]),Wt(e,s,e.length,h),e}function UT(e,n,i){const l=this;let o=l.events.length,s,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){s=l.events[o][1];break}return h;function h(_){return s?s._inactive?g(_):(c=l.parser.defined.includes(wn(l.sliceSerialize({start:s.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),m):i(_)}function m(_){return _===40?e.attempt(NT,y,c?y:g)(_):_===91?e.attempt(DT,y,c?d:g)(_):c?y(_):g(_)}function d(_){return e.attempt(MT,y,g)(_)}function y(_){return n(_)}function g(_){return s._balanced=!0,i(_)}}function ZT(e,n,i){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return Qe(g)?$a(e,s)(g):s(g)}function s(g){return g===41?y(g):$m(e,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Qe(g)?$a(e,m)(g):y(g)}function h(g){return i(g)}function m(g){return g===34||g===39||g===40?Ym(e,d,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function d(g){return Qe(g)?$a(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):i(g)}}function LT(e,n,i){const l=this;return o;function o(h){return Vm.call(l,e,s,c,"reference","referenceMarker","referenceString")(h)}function s(h){return l.parser.defined.includes(wn(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(h):i(h)}function c(h){return i(h)}}function IT(e,n,i){return l;function l(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):i(s)}}const BT={name:"labelStartImage",resolveAll:Us.resolveAll,tokenize:HT};function HT(e,n,i){const l=this;return o;function o(h){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(h),e.exit("labelImageMarker"),s}function s(h){return h===91?(e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelImage"),c):i(h)}function c(h){return h===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(h):n(h)}}const qT={name:"labelStartLink",resolveAll:Us.resolveAll,tokenize:$T};function $T(e,n,i){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):n(c)}}const Zs={name:"lineEnding",tokenize:VT};function VT(e,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ze(e,n,"linePrefix")}}const su={name:"thematicBreak",tokenize:YT};function YT(e,n,i){let l=0,o;return s;function s(d){return e.enter("thematicBreak"),c(d)}function c(d){return o=d,h(d)}function h(d){return d===o?(e.enter("thematicBreakSequence"),m(d)):l>=3&&(d===null||me(d))?(e.exit("thematicBreak"),n(d)):i(d)}function m(d){return d===o?(e.consume(d),l++,m):(e.exit("thematicBreakSequence"),Te(d)?Ze(e,h,"whitespace")(d):h(d))}}const qt={continuation:{tokenize:JT},exit:PT,name:"list",tokenize:FT},GT={partial:!0,tokenize:KT},XT={partial:!0,tokenize:QT};function FT(e,n,i){const l=this,o=l.events[l.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return h;function h(b){const E=l.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!l.containerState.marker||b===l.containerState.marker:Ms(b)){if(l.containerState.type||(l.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(su,i,d)(b):d(b);if(!l.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return i(b)}function m(b){return Ms(b)&&++c<10?(e.consume(b),m):(!l.interrupt||c<2)&&(l.containerState.marker?b===l.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),d(b)):i(b)}function d(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||b,e.check(Ha,l.interrupt?i:y,e.attempt(GT,_,g))}function y(b){return l.containerState.initialBlankLine=!0,s++,_(b)}function g(b){return Te(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),_):i(b)}function _(b){return l.containerState.size=s+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function JT(e,n,i){const l=this;return l.containerState._closeFlow=void 0,e.check(Ha,o,s);function o(h){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ze(e,n,"listItemIndent",l.containerState.size+1)(h)}function s(h){return l.containerState.furtherBlankLines||!Te(h)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(h)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(XT,n,c)(h))}function c(h){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ze(e,e.attempt(qt,n,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function QT(e,n,i){const l=this;return Ze(e,o,"listItemIndent",l.containerState.size+1);function o(s){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(s):i(s)}}function PT(e){e.exit(this.containerState.type)}function KT(e,n,i){const l=this;return Ze(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=l.events[l.events.length-1];return!Te(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):i(s)}}const Xm={name:"setextUnderline",resolveTo:WT,tokenize:eA};function WT(e,n){let i=e.length,l,o,s;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!s&&e[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[l][1],n]),e[l][1].end={...e[s][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function eA(e,n,i){const l=this;let o;return s;function s(d){let y=l.events.length,g;for(;y--;)if(l.events[y][1].type!=="lineEnding"&&l.events[y][1].type!=="linePrefix"&&l.events[y][1].type!=="content"){g=l.events[y][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),o=d,c(d)):i(d)}function c(d){return e.enter("setextHeadingLineSequence"),h(d)}function h(d){return d===o?(e.consume(d),h):(e.exit("setextHeadingLineSequence"),Te(d)?Ze(e,m,"lineSuffix")(d):m(d))}function m(d){return d===null||me(d)?(e.exit("setextHeadingLine"),n(d)):i(d)}}const tA={tokenize:nA};function nA(e){const n=this,i=e.attempt(Ha,l,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(uT,o)),"linePrefix")));return i;function l(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const rA={resolveAll:Jm()},iA=Fm("string"),aA=Fm("text");function Fm(e){return{resolveAll:Jm(e==="text"?lA:void 0),tokenize:n};function n(i){const l=this,o=this.parser.constructs[e],s=i.attempt(o,c,h);return c;function c(y){return d(y)?s(y):h(y)}function h(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),m}function m(y){return d(y)?(i.exit("data"),s(y)):(i.consume(y),m)}function d(y){if(y===null)return!0;const g=o[y];let _=-1;if(g)for(;++_<g.length;){const b=g[_];if(!b.previous||b.previous.call(l,l.previous))return!0}return!1}}}function Jm(e){return n;function n(i,l){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(i,l):i}}function lA(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],o=n.sliceStream(l);let s=o.length,c=-1,h=0,m;for(;s--;){const d=o[s];if(typeof d=="string"){for(c=d.length;d.charCodeAt(c-1)===32;)h++,c--;if(c)break;c=-1}else if(d===-2)m=!0,h++;else if(d!==-1){s++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(h=0),h){const d={type:i===e.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:l.start._bufferIndex+c,_index:l.start._index+s,line:l.end.line,column:l.end.column-h,offset:l.end.offset-h},end:{...l.end}};l.end={...d.start},l.start.offset===l.end.offset?Object.assign(l,d):(e.splice(i,0,["enter",d,n],["exit",d,n]),i+=2)}i++}return e}const uA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:hT},disable:{null:[]},document:{42:qt,43:qt,45:qt,48:qt,49:qt,50:qt,51:qt,52:qt,53:qt,54:qt,55:qt,56:qt,57:qt,62:Zm},flow:{35:vT,42:su,45:[Xm,su],60:xT,61:Xm,95:su,96:Hm,126:Hm},flowInitial:{[-2]:js,[-1]:js,32:js},insideSpan:{null:[Rs,rA]},string:{38:Im,92:Lm},text:{[-5]:Zs,[-4]:Zs,[-3]:Zs,33:BT,38:Im,42:Rs,60:[qk,OT],91:qT,92:[gT,Lm],93:Us,95:Rs,96:tT}},Symbol.toStringTag,{value:"Module"}));function oA(e,n,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],h=[];const m={attempt:X(F),check:X(D),consume:B,enter:w,exit:P,interrupt:X(D,{interrupt:!0})},d={code:null,containerState:{},defineSkip:k,events:[],now:E,parser:e,previous:null,sliceSerialize:_,sliceStream:b,write:g};let y=n.tokenize.call(d,m);return n.resolveAll&&s.push(n),d;function g(ie){return c=fn(c,ie),R(),c[c.length-1]!==null?[]:(se(n,0),d.events=ou(s,d.events,d),d.events)}function _(ie,ne){return cA(b(ie),ne)}function b(ie){return sA(c,ie)}function E(){const{_bufferIndex:ie,_index:ne,line:ae,column:re,offset:fe}=l;return{_bufferIndex:ie,_index:ne,line:ae,column:re,offset:fe}}function k(ie){o[ie.line]=ie.column,Z()}function R(){let ie;for(;l._index<c.length;){const ne=c[l._index];if(typeof ne=="string")for(ie=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===ie&&l._bufferIndex<ne.length;)C(ne.charCodeAt(l._bufferIndex));else C(ne)}}function C(ie){y=y(ie)}function B(ie){me(ie)?(l.line++,l.column=1,l.offset+=ie===-3?2:1,Z()):ie!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),d.previous=ie}function w(ie,ne){const ae=ne||{};return ae.type=ie,ae.start=E(),d.events.push(["enter",ae,d]),h.push(ae),ae}function P(ie){const ne=h.pop();return ne.end=E(),d.events.push(["exit",ne,d]),ne}function F(ie,ne){se(ie,ne.from)}function D(ie,ne){ne.restore()}function X(ie,ne){return ae;function ae(re,fe,L){let J,ue,he,z;return Array.isArray(re)?H(re):"tokenize"in re?H([re]):A(re);function A(pe){return Ne;function Ne(ot){const Ye=ot!==null&&pe[ot],hn=ot!==null&&pe.null,Hn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(hn)?hn:hn?[hn]:[]];return H(Hn)(ot)}}function H(pe){return J=pe,ue=0,pe.length===0?L:x(pe[ue])}function x(pe){return Ne;function Ne(ot){return z=be(),he=pe,pe.partial||(d.currentConstruct=pe),pe.name&&d.parser.constructs.disable.null.includes(pe.name)?ve():pe.tokenize.call(ne?Object.assign(Object.create(d),ne):d,m,te,ve)(ot)}}function te(pe){return ie(he,z),fe}function ve(pe){return z.restore(),++ue<J.length?x(J[ue]):L}}}function se(ie,ne){ie.resolveAll&&!s.includes(ie)&&s.push(ie),ie.resolve&&Wt(d.events,ne,d.events.length-ne,ie.resolve(d.events.slice(ne),d)),ie.resolveTo&&(d.events=ie.resolveTo(d.events,d))}function be(){const ie=E(),ne=d.previous,ae=d.currentConstruct,re=d.events.length,fe=Array.from(h);return{from:re,restore:L};function L(){l=ie,d.previous=ne,d.currentConstruct=ae,d.events.length=re,h=fe,Z()}}function Z(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function sA(e,n){const i=n.start._index,l=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(i===o)c=[e[i].slice(l,s)];else{if(c=e.slice(i,o),l>-1){const h=c[0];typeof h=="string"?c[0]=h.slice(l):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function cA(e,n){let i=-1;const l=[];let o;for(;++i<e.length;){const s=e[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
153
153
|
`;break}case-3:{c=`\r
|
|
154
|
-
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,l.push(c)}return l.join("")}function fA(e){const l={constructs:Mm([uA,...(e||{}).extensions||[]]),content:o(jk),defined:[],document:o(Zk),flow:o(tA),lazy:{},string:o(iA),text:o(aA)};return l;function o(s){return c;function c(h){return oA(l,s,h)}}}function hA(e){for(;!qm(e););return e}const Qm=/[\0\t\n\r]/g;function pA(){let e=1,n="",i=!0,l;return o;function o(s,c,h){const m=[];let d,y,g,_,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,n="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(Qm.lastIndex=g,d=Qm.exec(s),_=d&&d.index!==void 0?d.index:s.length,b=s.charCodeAt(_),!d){n=s.slice(g);break}if(b===10&&g===_&&l)m.push(-3),l=void 0;else switch(l&&(m.push(-5),l=void 0),g<_&&(m.push(s.slice(g,_)),e+=_-g),b){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:l=!0,e=1}g=_+1}return h&&(l&&m.push(-5),n&&m.push(n),m.push(null)),m}}const dA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mA(e){return e.replace(dA,gA)}function gA(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Rm(i.slice(s?2:1),s?16:10)}return Ds(i)||e}const Pm={}.hasOwnProperty;function yA(e,n,i){return n&&typeof n=="object"&&(i=n,n=void 0),vA(i)(hA(fA(i).document().write(pA()(e,n,!0))))}function vA(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ui),autolinkProtocol:pe,autolinkEmail:pe,atxHeading:s(Ri),blockQuote:s(hn),characterEscape:pe,characterReference:pe,codeFenced:s(Hn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Hn,c),codeText:s(Fa,c),codeTextData:pe,data:pe,codeFlowValue:pe,definition:s(_u),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(qn),hardBreakEscape:s(ji),hardBreakTrailing:s(ji),htmlFlow:s(Su,c),htmlFlowData:pe,htmlText:s(Su,c),htmlTextData:pe,image:s(xu),label:c,link:s(Ui),listItem:s(Ja),listItemValue:_,listOrdered:s(Zi,g),listUnordered:s(Zi),paragraph:s(fc),reference:x,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Ri),strong:s(hc),thematicBreak:s(pc)},exit:{atxHeading:m(),atxHeadingSequence:K,autolink:m(),autolinkEmail:Ye,autolinkProtocol:ot,blockQuote:m(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:de,characterReference:Ne,codeFenced:m(M),codeFencedFence:T,codeFencedFenceInfo:b,codeFencedFenceMeta:E,codeFlowValue:L,codeIndented:m(O),codeText:m(fe),codeTextData:L,data:L,definition:m(),definitionDestinationString:J,definitionLabelString:B,definitionTitleString:k,emphasis:m(),hardBreakEscape:m(re),hardBreakTrailing:m(re),htmlFlow:m(le),htmlFlowData:L,htmlText:m(ae),htmlTextData:L,image:m(F),label:he,labelText:te,lineEnding:ie,link:m(Z),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ne,resourceDestinationString:z,resourceTitleString:A,resource:H,setextHeading:m(ce),setextHeadingLineSequence:X,setextHeadingText:D,strong:m(),thematicBreak:m()}};Km(n,(e||{}).mdastExtensions||[]);const i={};return l;function l(V){let W={type:"root",children:[]};const _e={stack:[W],tokenStack:[],config:n,enter:h,exit:d,buffer:c,resume:y,data:i},Ae=[];let He=-1;for(;++He<V.length;)if(V[He][1].type==="listOrdered"||V[He][1].type==="listUnordered")if(V[He][0]==="enter")Ae.push(He);else{const en=Ae.pop();He=o(V,en,He)}for(He=-1;++He<V.length;){const en=n[V[He][0]];Pm.call(en,V[He][1].type)&&en[V[He][1].type].call(Object.assign({sliceSerialize:V[He][2].sliceSerialize},_e),V[He][1])}if(_e.tokenStack.length>0){const en=_e.tokenStack[_e.tokenStack.length-1];(en[1]||Wm).call(_e,void 0,en[0])}for(W.position={start:gr(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:gr(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<n.transforms.length;)W=n.transforms[He](W)||W;return W}function o(V,W,_e){let Ae=W-1,He=-1,en=!1,$n,Lt,_t,$t;for(;++Ae<=_e;){const Pe=V[Ae];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?He++:He--,$t=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&($n&&!$t&&!He&&!_t&&(_t=Ae),$t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$t=void 0}if(!He&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||He===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if($n){let yr=Ae;for(Lt=void 0;yr--;){const kn=V[yr];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;Lt&&(V[Lt][1].type="lineEndingBlank",en=!0),kn[1].type="lineEnding",Lt=yr}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}_t&&(!Lt||_t<Lt)&&($n._spread=!0),$n.end=Object.assign({},Lt?V[Lt][1].start:Pe[1].end),V.splice(Lt||Ae,0,["exit",$n,Pe[2]]),Ae++,_e++}if(Pe[1].type==="listItemPrefix"){const yr={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};$n=yr,V.splice(Ae,0,["enter",yr,Pe[2]]),Ae++,_e++,_t=void 0,$t=!0}}}return V[W][1]._spread=en,_e}function s(V,W){return _e;function _e(Ae){h.call(this,V(Ae),Ae),W&&W.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(V,W,_e){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([W,_e||void 0]),V.position={start:gr(W.start),end:void 0}}function m(V){return W;function W(_e){V&&V.call(this,_e),d.call(this,_e)}}function d(V,W){const _e=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==V.type&&(W?W.call(this,V,Ae[0]):(Ae[1]||Wm).call(this,V,Ae[0]));else throw new Error("Cannot close `"+V.type+"` ("+Ia({start:V.start,end:V.end})+"): it’s not open");_e.position.end=gr(V.end)}function y(){return Ns(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function _(V){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function b(){const V=this.resume(),W=this.stack[this.stack.length-1];W.lang=V}function E(){const V=this.resume(),W=this.stack[this.stack.length-1];W.meta=V}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function M(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V.replace(/(\r?\n|\r)$/g,"")}function B(V){const W=this.resume(),_e=this.stack[this.stack.length-1];_e.label=W,_e.identifier=wn(this.sliceSerialize(V)).toLowerCase()}function k(){const V=this.resume(),W=this.stack[this.stack.length-1];W.title=V}function J(){const V=this.resume(),W=this.stack[this.stack.length-1];W.url=V}function K(V){const W=this.stack[this.stack.length-1];if(!W.depth){const _e=this.sliceSerialize(V).length;W.depth=_e}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function X(V){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function pe(V){const _e=this.stack[this.stack.length-1].children;let Ae=_e[_e.length-1];(!Ae||Ae.type!=="text")&&(Ae=Zt(),Ae.position={start:gr(V.start),end:void 0},_e.push(Ae)),this.stack.push(Ae)}function L(V){const W=this.stack.pop();W.value+=this.sliceSerialize(V),W.position.end=gr(V.end)}function ie(V){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=W.children[W.children.length-1];_e.position.end=gr(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(W.type)&&(pe.call(this,V),L.call(this,V))}function re(){this.data.atHardBreak=!0}function le(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V}function ae(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V}function fe(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V}function Z(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=W,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function F(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=W,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function te(V){const W=this.sliceSerialize(V),_e=this.stack[this.stack.length-2];_e.label=mA(W),_e.identifier=wn(W).toLowerCase()}function he(){const V=this.stack[this.stack.length-1],W=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Ae=V.children;_e.children=Ae}else _e.alt=W}function z(){const V=this.resume(),W=this.stack[this.stack.length-1];W.url=V}function A(){const V=this.resume(),W=this.stack[this.stack.length-1];W.title=V}function H(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function ne(V){const W=this.resume(),_e=this.stack[this.stack.length-1];_e.label=W,_e.identifier=wn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function be(V){this.data.characterReferenceType=V.type}function de(V){const W=this.sliceSerialize(V),_e=this.data.characterReferenceType;let Ae;_e?(Ae=Rm(W,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=Ds(W);const He=this.stack[this.stack.length-1];He.value+=Ae}function Ne(V){const W=this.stack.pop();W.position.end=gr(V.end)}function ot(V){L.call(this,V);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(V)}function Ye(V){L.call(this,V);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(V)}function hn(){return{type:"blockquote",children:[]}}function Hn(){return{type:"code",lang:null,meta:null,value:""}}function Fa(){return{type:"inlineCode",value:""}}function _u(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qn(){return{type:"emphasis",children:[]}}function Ri(){return{type:"heading",depth:0,children:[]}}function ji(){return{type:"break"}}function Su(){return{type:"html",value:""}}function xu(){return{type:"image",title:null,url:"",alt:null}}function Ui(){return{type:"link",title:null,url:"",children:[]}}function Zi(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function Ja(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function fc(){return{type:"paragraph",children:[]}}function hc(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function pc(){return{type:"thematicBreak"}}}function gr(e){return{line:e.line,column:e.column,offset:e.offset}}function Km(e,n){let i=-1;for(;++i<n.length;){const l=n[i];Array.isArray(l)?Km(e,l):bA(e,l)}}function bA(e,n){let i;for(i in n)if(Pm.call(n,i))switch(i){case"canContainEols":{const l=n[i];l&&e[i].push(...l);break}case"transforms":{const l=n[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=n[i];l&&Object.assign(e[i],l);break}}}function Wm(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ia({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ia({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ia({start:n.start,end:n.end})+") is still open")}function _A(e){const n=this;n.parser=i;function i(l){return yA(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function SA(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function xA(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
|
|
154
|
+
`;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,l.push(c)}return l.join("")}function fA(e){const l={constructs:Mm([uA,...(e||{}).extensions||[]]),content:o(jk),defined:[],document:o(Zk),flow:o(tA),lazy:{},string:o(iA),text:o(aA)};return l;function o(s){return c;function c(h){return oA(l,s,h)}}}function hA(e){for(;!qm(e););return e}const Qm=/[\0\t\n\r]/g;function pA(){let e=1,n="",i=!0,l;return o;function o(s,c,h){const m=[];let d,y,g,_,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,n="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(Qm.lastIndex=g,d=Qm.exec(s),_=d&&d.index!==void 0?d.index:s.length,b=s.charCodeAt(_),!d){n=s.slice(g);break}if(b===10&&g===_&&l)m.push(-3),l=void 0;else switch(l&&(m.push(-5),l=void 0),g<_&&(m.push(s.slice(g,_)),e+=_-g),b){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:l=!0,e=1}g=_+1}return h&&(l&&m.push(-5),n&&m.push(n),m.push(null)),m}}const dA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mA(e){return e.replace(dA,gA)}function gA(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Rm(i.slice(s?2:1),s?16:10)}return Ds(i)||e}const Pm={}.hasOwnProperty;function yA(e,n,i){return n&&typeof n=="object"&&(i=n,n=void 0),vA(i)(hA(fA(i).document().write(pA()(e,n,!0))))}function vA(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ui),autolinkProtocol:be,autolinkEmail:be,atxHeading:s(Ri),blockQuote:s(hn),characterEscape:be,characterReference:be,codeFenced:s(Hn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Hn,c),codeText:s(Fa,c),codeTextData:be,data:be,codeFlowValue:be,definition:s(_u),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(qn),hardBreakEscape:s(ji),hardBreakTrailing:s(ji),htmlFlow:s(Su,c),htmlFlowData:be,htmlText:s(Su,c),htmlTextData:be,image:s(xu),label:c,link:s(Ui),listItem:s(Ja),listItemValue:_,listOrdered:s(Zi,g),listUnordered:s(Zi),paragraph:s(fc),reference:x,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Ri),strong:s(hc),thematicBreak:s(pc)},exit:{atxHeading:m(),atxHeadingSequence:F,autolink:m(),autolinkEmail:Ye,autolinkProtocol:ot,blockQuote:m(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:pe,characterReference:Ne,codeFenced:m(R),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:E,codeFlowValue:Z,codeIndented:m(C),codeText:m(fe),codeTextData:Z,data:Z,definition:m(),definitionDestinationString:P,definitionLabelString:B,definitionTitleString:w,emphasis:m(),hardBreakEscape:m(ne),hardBreakTrailing:m(ne),htmlFlow:m(ae),htmlFlowData:Z,htmlText:m(re),htmlTextData:Z,image:m(J),label:he,labelText:ue,lineEnding:ie,link:m(L),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:te,resourceDestinationString:z,resourceTitleString:A,resource:H,setextHeading:m(se),setextHeadingLineSequence:X,setextHeadingText:D,strong:m(),thematicBreak:m()}};Km(n,(e||{}).mdastExtensions||[]);const i={};return l;function l(V){let W={type:"root",children:[]};const _e={stack:[W],tokenStack:[],config:n,enter:h,exit:d,buffer:c,resume:y,data:i},Ae=[];let He=-1;for(;++He<V.length;)if(V[He][1].type==="listOrdered"||V[He][1].type==="listUnordered")if(V[He][0]==="enter")Ae.push(He);else{const en=Ae.pop();He=o(V,en,He)}for(He=-1;++He<V.length;){const en=n[V[He][0]];Pm.call(en,V[He][1].type)&&en[V[He][1].type].call(Object.assign({sliceSerialize:V[He][2].sliceSerialize},_e),V[He][1])}if(_e.tokenStack.length>0){const en=_e.tokenStack[_e.tokenStack.length-1];(en[1]||Wm).call(_e,void 0,en[0])}for(W.position={start:gr(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:gr(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<n.transforms.length;)W=n.transforms[He](W)||W;return W}function o(V,W,_e){let Ae=W-1,He=-1,en=!1,$n,Lt,_t,$t;for(;++Ae<=_e;){const Pe=V[Ae];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?He++:He--,$t=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&($n&&!$t&&!He&&!_t&&(_t=Ae),$t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$t=void 0}if(!He&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||He===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if($n){let yr=Ae;for(Lt=void 0;yr--;){const kn=V[yr];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;Lt&&(V[Lt][1].type="lineEndingBlank",en=!0),kn[1].type="lineEnding",Lt=yr}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}_t&&(!Lt||_t<Lt)&&($n._spread=!0),$n.end=Object.assign({},Lt?V[Lt][1].start:Pe[1].end),V.splice(Lt||Ae,0,["exit",$n,Pe[2]]),Ae++,_e++}if(Pe[1].type==="listItemPrefix"){const yr={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};$n=yr,V.splice(Ae,0,["enter",yr,Pe[2]]),Ae++,_e++,_t=void 0,$t=!0}}}return V[W][1]._spread=en,_e}function s(V,W){return _e;function _e(Ae){h.call(this,V(Ae),Ae),W&&W.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(V,W,_e){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([W,_e||void 0]),V.position={start:gr(W.start),end:void 0}}function m(V){return W;function W(_e){V&&V.call(this,_e),d.call(this,_e)}}function d(V,W){const _e=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==V.type&&(W?W.call(this,V,Ae[0]):(Ae[1]||Wm).call(this,V,Ae[0]));else throw new Error("Cannot close `"+V.type+"` ("+Ia({start:V.start,end:V.end})+"): it’s not open");_e.position.end=gr(V.end)}function y(){return Ns(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function _(V){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function b(){const V=this.resume(),W=this.stack[this.stack.length-1];W.lang=V}function E(){const V=this.resume(),W=this.stack[this.stack.length-1];W.meta=V}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V.replace(/(\r?\n|\r)$/g,"")}function B(V){const W=this.resume(),_e=this.stack[this.stack.length-1];_e.label=W,_e.identifier=wn(this.sliceSerialize(V)).toLowerCase()}function w(){const V=this.resume(),W=this.stack[this.stack.length-1];W.title=V}function P(){const V=this.resume(),W=this.stack[this.stack.length-1];W.url=V}function F(V){const W=this.stack[this.stack.length-1];if(!W.depth){const _e=this.sliceSerialize(V).length;W.depth=_e}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function X(V){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function be(V){const _e=this.stack[this.stack.length-1].children;let Ae=_e[_e.length-1];(!Ae||Ae.type!=="text")&&(Ae=Zt(),Ae.position={start:gr(V.start),end:void 0},_e.push(Ae)),this.stack.push(Ae)}function Z(V){const W=this.stack.pop();W.value+=this.sliceSerialize(V),W.position.end=gr(V.end)}function ie(V){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=W.children[W.children.length-1];_e.position.end=gr(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(W.type)&&(be.call(this,V),Z.call(this,V))}function ne(){this.data.atHardBreak=!0}function ae(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V}function re(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V}function fe(){const V=this.resume(),W=this.stack[this.stack.length-1];W.value=V}function L(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=W,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 W=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=W,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function ue(V){const W=this.sliceSerialize(V),_e=this.stack[this.stack.length-2];_e.label=mA(W),_e.identifier=wn(W).toLowerCase()}function he(){const V=this.stack[this.stack.length-1],W=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Ae=V.children;_e.children=Ae}else _e.alt=W}function z(){const V=this.resume(),W=this.stack[this.stack.length-1];W.url=V}function A(){const V=this.resume(),W=this.stack[this.stack.length-1];W.title=V}function H(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function te(V){const W=this.resume(),_e=this.stack[this.stack.length-1];_e.label=W,_e.identifier=wn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function ve(V){this.data.characterReferenceType=V.type}function pe(V){const W=this.sliceSerialize(V),_e=this.data.characterReferenceType;let Ae;_e?(Ae=Rm(W,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=Ds(W);const He=this.stack[this.stack.length-1];He.value+=Ae}function Ne(V){const W=this.stack.pop();W.position.end=gr(V.end)}function ot(V){Z.call(this,V);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(V)}function Ye(V){Z.call(this,V);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(V)}function hn(){return{type:"blockquote",children:[]}}function Hn(){return{type:"code",lang:null,meta:null,value:""}}function Fa(){return{type:"inlineCode",value:""}}function _u(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qn(){return{type:"emphasis",children:[]}}function Ri(){return{type:"heading",depth:0,children:[]}}function ji(){return{type:"break"}}function Su(){return{type:"html",value:""}}function xu(){return{type:"image",title:null,url:"",alt:null}}function Ui(){return{type:"link",title:null,url:"",children:[]}}function Zi(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function Ja(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function fc(){return{type:"paragraph",children:[]}}function hc(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function pc(){return{type:"thematicBreak"}}}function gr(e){return{line:e.line,column:e.column,offset:e.offset}}function Km(e,n){let i=-1;for(;++i<n.length;){const l=n[i];Array.isArray(l)?Km(e,l):bA(e,l)}}function bA(e,n){let i;for(i in n)if(Pm.call(n,i))switch(i){case"canContainEols":{const l=n[i];l&&e[i].push(...l);break}case"transforms":{const l=n[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=n[i];l&&Object.assign(e[i],l);break}}}function Wm(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ia({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ia({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ia({start:n.start,end:n.end})+") is still open")}function _A(e){const n=this;n.parser=i;function i(l){return yA(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function SA(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function xA(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
|
|
155
155
|
`}]}function EA(e,n){const i=n.value?n.value+`
|
|
156
156
|
`:"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function zA(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function wA(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function kA(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=Oi(l.toLowerCase()),s=e.footnoteOrder.indexOf(l);let c,h=e.footnoteCounts.get(l);h===void 0?(h=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=s+1,h+=1,e.footnoteCounts.set(l,h);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,m);const d={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(n,d),e.applyData(n,d)}function TA(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function AA(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function eg(e,n){const i=n.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=l:o.push({type:"text",value:l}),o}function OA(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return eg(e,n);const o={src:Oi(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function CA(e,n){const i={src:Oi(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function NA(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,l),e.applyData(n,l)}function DA(e,n){const i=String(n.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return eg(e,n);const o={href:Oi(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function MA(e,n){const i={href:Oi(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function RA(e,n,i){const l=e.all(n),o=i?jA(i):tg(n),s={},c=[];if(typeof n.checked=="boolean"){const y=l[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let h=-1;for(;++h<l.length;){const y=l[h];(o||h!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
157
157
|
`}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const m=l[l.length-1];m&&(o||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
158
|
-
`});const d={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,d),e.applyData(n,d)}function jA(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let l=-1;for(;!n&&++l<i.length;)n=tg(i[l])}return n}function tg(e){const n=e.spread;return n??e.children.length>1}function UA(e,n){const i={},l=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(n,s),e.applyData(n,s)}function ZA(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function LA(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function IA(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function BA(e,n){const i=e.all(n),l=i.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},h=ws(n.children[1]),m=Sm(n.children[n.children.length-1]);h&&m&&(c.position={start:h,end:m}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function HA(e,n,i){const l=i?i.children:void 0,s=(l?l.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,h=c?c.length:n.children.length;let m=-1;const d=[];for(;++m<h;){const g=n.children[m],_={},b=c?c[m]:void 0;b&&(_.align=b);let E={type:"element",tagName:s,properties:_,children:[]};g&&(E.children=e.all(g),e.patch(g,E),E=e.applyData(g,E)),d.push(E)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(n,y),e.applyData(n,y)}function qA(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const ng=9,rg=32;function $A(e){const n=String(e),i=/\r?\n|\r/g;let l=i.exec(n),o=0;const s=[];for(;l;)s.push(ig(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=i.exec(n);return s.push(ig(n.slice(o),o>0,!1)),s.join("")}function ig(e,n,i){let l=0,o=e.length;if(n){let s=e.codePointAt(l);for(;s===ng||s===rg;)l++,s=e.codePointAt(l)}if(i){let s=e.codePointAt(o-1);for(;s===ng||s===rg;)o--,s=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function VA(e,n){const i={type:"text",value:$A(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function YA(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const GA={blockquote:SA,break:xA,code:EA,delete:zA,emphasis:wA,footnoteReference:kA,heading:TA,html:AA,imageReference:OA,image:CA,inlineCode:NA,linkReference:DA,link:MA,listItem:RA,list:UA,paragraph:ZA,root:LA,strong:IA,table:BA,tableCell:qA,tableRow:HA,text:VA,thematicBreak:YA,toml:cu,yaml:cu,definition:cu,footnoteDefinition:cu};function cu(){}const ag=-1,fu=0,Va=1,hu=2,Ls=3,Is=4,Bs=5,Hs=6,lg=7,ug=8,og=typeof self=="object"?self:globalThis,XA=(e,n)=>{const i=(o,s)=>(e.set(s,o),o),l=o=>{if(e.has(o))return e.get(o);const[s,c]=n[o];switch(s){case fu:case ag:return i(c,o);case Va:{const h=i([],o);for(const m of c)h.push(l(m));return h}case hu:{const h=i({},o);for(const[m,d]of c)h[l(m)]=l(d);return h}case Ls:return i(new Date(c),o);case Is:{const{source:h,flags:m}=c;return i(new RegExp(h,m),o)}case Bs:{const h=i(new Map,o);for(const[m,d]of c)h.set(l(m),l(d));return h}case Hs:{const h=i(new Set,o);for(const m of c)h.add(l(m));return h}case lg:{const{name:h,message:m}=c;return i(new og[h](m),o)}case ug:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:h}=new Uint8Array(c);return i(new DataView(h),c)}}return i(new og[s](c),o)};return l},sg=e=>XA(new Map,e)(0),Ni="",{toString:FA}={},{keys:JA}=Object,Ya=e=>{const n=typeof e;if(n!=="object"||!e)return[fu,n];const i=FA.call(e).slice(8,-1);switch(i){case"Array":return[Va,Ni];case"Object":return[hu,Ni];case"Date":return[Ls,Ni];case"RegExp":return[Is,Ni];case"Map":return[Bs,Ni];case"Set":return[Hs,Ni];case"DataView":return[Va,i]}return i.includes("Array")?[Va,i]:i.includes("Error")?[lg,i]:[hu,i]},pu=([e,n])=>e===fu&&(n==="function"||n==="symbol"),QA=(e,n,i,l)=>{const o=(c,h)=>{const m=l.push(c)-1;return i.set(h,m),m},s=c=>{if(i.has(c))return i.get(c);let[h,m]=Ya(c);switch(h){case fu:{let y=c;switch(m){case"bigint":h=ug,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return o([ag],c)}return o([h,y],c)}case Va:{if(m){let _=c;return m==="DataView"?_=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(_=new Uint8Array(c)),o([m,[..._]],c)}const y=[],g=o([h,y],c);for(const _ of c)y.push(s(_));return g}case hu:{if(m)switch(m){case"BigInt":return o([m,c.toString()],c);case"Boolean":case"Number":case"String":return o([m,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([h,y],c);for(const _ of JA(c))(e||!pu(Ya(c[_])))&&y.push([s(_),s(c[_])]);return g}case Ls:return o([h,c.toISOString()],c);case Is:{const{source:y,flags:g}=c;return o([h,{source:y,flags:g}],c)}case Bs:{const y=[],g=o([h,y],c);for(const[_,b]of c)(e||!(pu(Ya(_))||pu(Ya(b))))&&y.push([s(_),s(b)]);return g}case Hs:{const y=[],g=o([h,y],c);for(const _ of c)(e||!pu(Ya(_)))&&y.push(s(_));return g}}const{message:d}=c;return o([h,{name:m,message:d}],c)};return s},cg=(e,{json:n,lossy:i}={})=>{const l=[];return QA(!(n||i),!!n,new Map,l)(e),l},du=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?sg(cg(e,n)):structuredClone(e):(e,n)=>sg(cg(e,n));function PA(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function KA(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function WA(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||PA,l=e.options.footnoteBackLabel||KA,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let m=-1;for(;++m<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[m]);if(!d)continue;const y=e.all(d),g=String(d.identifier).toUpperCase(),_=Oi(g.toLowerCase());let b=0;const E=[],
|
|
158
|
+
`});const d={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,d),e.applyData(n,d)}function jA(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let l=-1;for(;!n&&++l<i.length;)n=tg(i[l])}return n}function tg(e){const n=e.spread;return n??e.children.length>1}function UA(e,n){const i={},l=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(n,s),e.applyData(n,s)}function ZA(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function LA(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function IA(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function BA(e,n){const i=e.all(n),l=i.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},h=ws(n.children[1]),m=Sm(n.children[n.children.length-1]);h&&m&&(c.position={start:h,end:m}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function HA(e,n,i){const l=i?i.children:void 0,s=(l?l.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,h=c?c.length:n.children.length;let m=-1;const d=[];for(;++m<h;){const g=n.children[m],_={},b=c?c[m]:void 0;b&&(_.align=b);let E={type:"element",tagName:s,properties:_,children:[]};g&&(E.children=e.all(g),e.patch(g,E),E=e.applyData(g,E)),d.push(E)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(n,y),e.applyData(n,y)}function qA(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const ng=9,rg=32;function $A(e){const n=String(e),i=/\r?\n|\r/g;let l=i.exec(n),o=0;const s=[];for(;l;)s.push(ig(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=i.exec(n);return s.push(ig(n.slice(o),o>0,!1)),s.join("")}function ig(e,n,i){let l=0,o=e.length;if(n){let s=e.codePointAt(l);for(;s===ng||s===rg;)l++,s=e.codePointAt(l)}if(i){let s=e.codePointAt(o-1);for(;s===ng||s===rg;)o--,s=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function VA(e,n){const i={type:"text",value:$A(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function YA(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const GA={blockquote:SA,break:xA,code:EA,delete:zA,emphasis:wA,footnoteReference:kA,heading:TA,html:AA,imageReference:OA,image:CA,inlineCode:NA,linkReference:DA,link:MA,listItem:RA,list:UA,paragraph:ZA,root:LA,strong:IA,table:BA,tableCell:qA,tableRow:HA,text:VA,thematicBreak:YA,toml:cu,yaml:cu,definition:cu,footnoteDefinition:cu};function cu(){}const ag=-1,fu=0,Va=1,hu=2,Ls=3,Is=4,Bs=5,Hs=6,lg=7,ug=8,og=typeof self=="object"?self:globalThis,XA=(e,n)=>{const i=(o,s)=>(e.set(s,o),o),l=o=>{if(e.has(o))return e.get(o);const[s,c]=n[o];switch(s){case fu:case ag:return i(c,o);case Va:{const h=i([],o);for(const m of c)h.push(l(m));return h}case hu:{const h=i({},o);for(const[m,d]of c)h[l(m)]=l(d);return h}case Ls:return i(new Date(c),o);case Is:{const{source:h,flags:m}=c;return i(new RegExp(h,m),o)}case Bs:{const h=i(new Map,o);for(const[m,d]of c)h.set(l(m),l(d));return h}case Hs:{const h=i(new Set,o);for(const m of c)h.add(l(m));return h}case lg:{const{name:h,message:m}=c;return i(new og[h](m),o)}case ug:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:h}=new Uint8Array(c);return i(new DataView(h),c)}}return i(new og[s](c),o)};return l},sg=e=>XA(new Map,e)(0),Ni="",{toString:FA}={},{keys:JA}=Object,Ya=e=>{const n=typeof e;if(n!=="object"||!e)return[fu,n];const i=FA.call(e).slice(8,-1);switch(i){case"Array":return[Va,Ni];case"Object":return[hu,Ni];case"Date":return[Ls,Ni];case"RegExp":return[Is,Ni];case"Map":return[Bs,Ni];case"Set":return[Hs,Ni];case"DataView":return[Va,i]}return i.includes("Array")?[Va,i]:i.includes("Error")?[lg,i]:[hu,i]},pu=([e,n])=>e===fu&&(n==="function"||n==="symbol"),QA=(e,n,i,l)=>{const o=(c,h)=>{const m=l.push(c)-1;return i.set(h,m),m},s=c=>{if(i.has(c))return i.get(c);let[h,m]=Ya(c);switch(h){case fu:{let y=c;switch(m){case"bigint":h=ug,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return o([ag],c)}return o([h,y],c)}case Va:{if(m){let _=c;return m==="DataView"?_=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(_=new Uint8Array(c)),o([m,[..._]],c)}const y=[],g=o([h,y],c);for(const _ of c)y.push(s(_));return g}case hu:{if(m)switch(m){case"BigInt":return o([m,c.toString()],c);case"Boolean":case"Number":case"String":return o([m,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([h,y],c);for(const _ of JA(c))(e||!pu(Ya(c[_])))&&y.push([s(_),s(c[_])]);return g}case Ls:return o([h,c.toISOString()],c);case Is:{const{source:y,flags:g}=c;return o([h,{source:y,flags:g}],c)}case Bs:{const y=[],g=o([h,y],c);for(const[_,b]of c)(e||!(pu(Ya(_))||pu(Ya(b))))&&y.push([s(_),s(b)]);return g}case Hs:{const y=[],g=o([h,y],c);for(const _ of c)(e||!pu(Ya(_)))&&y.push(s(_));return g}}const{message:d}=c;return o([h,{name:m,message:d}],c)};return s},cg=(e,{json:n,lossy:i}={})=>{const l=[];return QA(!(n||i),!!n,new Map,l)(e),l},du=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?sg(cg(e,n)):structuredClone(e):(e,n)=>sg(cg(e,n));function PA(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function KA(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function WA(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||PA,l=e.options.footnoteBackLabel||KA,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let m=-1;for(;++m<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[m]);if(!d)continue;const y=e.all(d),g=String(d.identifier).toUpperCase(),_=Oi(g.toLowerCase());let b=0;const E=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++b<=k;){E.length>0&&E.push({type:"text",value:" "});let B=typeof i=="string"?i:i(m,b);typeof B=="string"&&(B={type:"text",value:B}),E.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+_+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(m,b),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const R=y[y.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const B=R.children[R.children.length-1];B&&B.type==="text"?B.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...E)}else y.push(...E);const C={type:"element",tagName:"li",properties:{id:n+"fn-"+_},children:e.wrap(y,!0)};e.patch(d,C),h.push(C)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...du(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
159
159
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(h,!0)},{type:"text",value:`
|
|
160
|
-
`}]}}const mu=function(e){if(e==null)return r2;if(typeof e=="function")return gu(e);if(typeof e=="object")return Array.isArray(e)?e2(e):t2(e);if(typeof e=="string")return n2(e);throw new Error("Expected function, string, or object as test")};function e2(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=mu(e[i]);return gu(l);function l(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function t2(e){const n=e;return gu(i);function i(l){const o=l;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function n2(e){return gu(n);function n(i){return i&&i.type===e}}function gu(e){return n;function n(i,l,o){return!!(i2(i)&&e.call(this,i,typeof l=="number"?l:void 0,o||void 0))}}function r2(){return!0}function i2(e){return e!==null&&typeof e=="object"&&"type"in e}function HD(e){return e}const fg=[],a2=!0,qs=!1,l2="skip";function hg(e,n,i,l){let o;typeof n=="function"&&typeof i!="function"?(l=i,i=n):o=n;const s=mu(o),c=l?-1:1;h(e,void 0,[])();function h(m,d,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return _;function _(){let b=fg,E,
|
|
160
|
+
`}]}}const mu=function(e){if(e==null)return r2;if(typeof e=="function")return gu(e);if(typeof e=="object")return Array.isArray(e)?e2(e):t2(e);if(typeof e=="string")return n2(e);throw new Error("Expected function, string, or object as test")};function e2(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=mu(e[i]);return gu(l);function l(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function t2(e){const n=e;return gu(i);function i(l){const o=l;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function n2(e){return gu(n);function n(i){return i&&i.type===e}}function gu(e){return n;function n(i,l,o){return!!(i2(i)&&e.call(this,i,typeof l=="number"?l:void 0,o||void 0))}}function r2(){return!0}function i2(e){return e!==null&&typeof e=="object"&&"type"in e}function HD(e){return e}const fg=[],a2=!0,qs=!1,l2="skip";function hg(e,n,i,l){let o;typeof n=="function"&&typeof i!="function"?(l=i,i=n):o=n;const s=mu(o),c=l?-1:1;h(e,void 0,[])();function h(m,d,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return _;function _(){let b=fg,E,k,R;if((!n||s(m,d,y[y.length-1]||void 0))&&(b=u2(i(m,y)),b[0]===qs))return b;if("children"in m&&m.children){const C=m;if(C.children&&b[0]!==l2)for(k=(l?C.children.length:-1)+c,R=y.concat(C);k>-1&&k<C.children.length;){const B=C.children[k];if(E=h(B,k,R)(),E[0]===qs)return E;k=typeof E[1]=="number"?E[1]:k+c}}return b}}}function u2(e){return Array.isArray(e)?e:typeof e=="number"?[a2,e]:e==null?fg:[e]}function $s(e,n,i,l){let o,s,c;typeof n=="function"?(s=void 0,c=n,o=i):(s=n,c=i,o=l),hg(e,s,h,o);function h(m,d){const y=d[d.length-1],g=y?y.children.indexOf(m):void 0;return c(m,g,y)}}const Vs={}.hasOwnProperty,o2={};function s2(e,n){const i=n||o2,l=new Map,o=new Map,s=new Map,c={...GA,...i.handlers},h={all:d,applyData:f2,definitionById:l,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:m,options:i,patch:c2,wrap:p2};return $s(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?l:o,_=String(y.identifier).toUpperCase();g.has(_)||g.set(_,y)}}),h;function m(y,g){const _=y.type,b=h.handlers[_];if(Vs.call(h.handlers,_)&&b)return b(h,y,g);if(h.options.passThrough&&h.options.passThrough.includes(_)){if("children"in y){const{children:k,...R}=y,C=du(R);return C.children=h.all(y),C}return du(y)}return(h.options.unknownHandler||h2)(h,y,g)}function d(y){const g=[];if("children"in y){const _=y.children;let b=-1;for(;++b<_.length;){const E=h.one(_[b],y);if(E){if(b&&_[b-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=pg(E.value)),!Array.isArray(E)&&E.type==="element")){const k=E.children[0];k&&k.type==="text"&&(k.value=pg(k.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function c2(e,n){e.position&&(n.position=uk(e))}function f2(e,n){let i=n;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const c="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,du(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function h2(e,n){const i=n.data||{},l="value"in n&&!(Vs.call(i,"hProperties")||Vs.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function p2(e,n){const i=[];let l=-1;for(n&&i.push({type:"text",value:`
|
|
161
161
|
`});++l<e.length;)l&&i.push({type:"text",value:`
|
|
162
162
|
`}),i.push(e[l]);return n&&e.length>0&&i.push({type:"text",value:`
|
|
163
163
|
`}),i}function pg(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function dg(e,n){const i=s2(e,n),l=i.one(e,void 0),o=WA(i),s=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
164
|
-
`},o),s}function d2(e,n){return e&&"run"in e?async function(i,l){const o=dg(i,{file:l,...n});await e.run(o,l)}:function(i,l){return dg(i,{file:l,...e||n})}}function mg(e){if(e)throw e}var Ys,gg;function m2(){if(gg)return Ys;gg=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},s=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var y=e.call(d,"constructor"),g=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!y&&!g)return!1;var _;for(_ in d);return typeof _>"u"||e.call(d,_)},c=function(d,y){i&&y.name==="__proto__"?i(d,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):d[y.name]=y.newValue},h=function(d,y){if(y==="__proto__")if(e.call(d,y)){if(l)return l(d,y).value}else return;return d[y]};return Ys=function m(){var d,y,g,_,b,E,T=arguments[0],M=1,O=arguments.length,B=!1;for(typeof T=="boolean"&&(B=T,T=arguments[1]||{},M=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});M<O;++M)if(d=arguments[M],d!=null)for(y in d)g=h(T,y),_=h(d,y),T!==_&&(B&&_&&(s(_)||(b=o(_)))?(b?(b=!1,E=g&&o(g)?g:[]):E=g&&s(g)?g:{},c(T,{name:y,newValue:m(B,E,_)})):typeof _<"u"&&c(T,{name:y,newValue:_}));return T},Ys}var g2=m2();const Gs=qr(g2);function Xs(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function y2(){const e=[],n={run:i,use:l};return n;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);h(null,...o);function h(m,...d){const y=e[++s];let g=-1;if(m){c(m);return}for(;++g<o.length;)(d[g]===null||d[g]===void 0)&&(d[g]=o[g]);o=d,y?v2(y,h)(...d):c(null,...d)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function v2(e,n){let i;return l;function l(...c){const h=e.length>c.length;let m;h&&c.push(o);try{m=e.apply(this,c)}catch(d){const y=d;if(h&&i)throw y;return o(y)}h||(m&&m.then&&typeof m.then=="function"?m.then(s,o):m instanceof Error?o(m):s(m))}function o(c,...h){i||(i=!0,n(c,...h))}function s(c){o(null,c)}}const Mn={basename:b2,dirname:_2,extname:S2,join:x2,sep:"/"};function b2(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ga(e);let i=0,l=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else l<0&&(s=!0,l=o+1);return l<0?"":e.slice(i,l)}if(n===e)return"";let c=-1,h=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),h>-1&&(e.codePointAt(o)===n.codePointAt(h--)?h<0&&(l=o):(h=-1,l=c));return i===l?l=c:l<0&&(l=e.length),e.slice(i,l)}function _2(e){if(Ga(e),e.length===0)return".";let n=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){n=i;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function S2(e){Ga(e);let n=e.length,i=-1,l=0,o=-1,s=0,c;for(;n--;){const h=e.codePointAt(n);if(h===47){if(c){l=n+1;break}continue}i<0&&(c=!0,i=n+1),h===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===l+1?"":e.slice(o,i)}function x2(...e){let n=-1,i;for(;++n<e.length;)Ga(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":E2(i)}function E2(e){Ga(e);const n=e.codePointAt(0)===47;let i=z2(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function z2(e,n){let i="",l=0,o=-1,s=0,c=-1,h,m;for(;++c<=e.length;){if(c<e.length)h=e.codePointAt(c);else{if(h===47)break;h=47}if(h===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",l=0):(i=i.slice(0,m),l=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",l=0,o=c,s=0;continue}}n&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),l=c-o-1;o=c,s=0}else h===46&&s>-1?s++:s=-1}return i}function Ga(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const w2={cwd:k2};function k2(){return"/"}function Fs(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function T2(e){if(typeof e=="string")e=new URL(e);else if(!Fs(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return A2(e)}function A2(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const l=n.codePointAt(i+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Js=["history","path","basename","stem","extname","dirname"];class yg{constructor(n){let i;n?Fs(n)?i={path:n}:typeof n=="string"||O2(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":w2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Js.length;){const s=Js[l];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)Js.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(n){Ps(n,"basename"),Qs(n,"basename"),this.path=Mn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(n){vg(this.basename,"dirname"),this.path=Mn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(n){if(Qs(n,"extname"),vg(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=Mn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Fs(n)&&(n=T2(n)),Ps(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(n){Ps(n,"stem"),Qs(n,"stem"),this.path=Mn.join(this.dirname||"",n+(this.extname||""))}fail(n,i,l){const o=this.message(n,i,l);throw o.fatal=!0,o}info(n,i,l){const o=this.message(n,i,l);return o.fatal=void 0,o}message(n,i,l){const o=new Ct(n,i,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Qs(e,n){if(e&&e.includes(Mn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Mn.sep+"`")}function Ps(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function vg(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function O2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C2=function(e){const l=this.constructor.prototype,o=l[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,l),s},N2={}.hasOwnProperty;class Ks extends C2{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=y2()}copy(){const n=new Ks;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];n.use(...l)}return n.data(Gs(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(tc("data",this.frozen),this.namespace[n]=i,this):N2.call(this.namespace,n)&&this.namespace[n]||void 0:n?(tc("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=i.call(n,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=yu(n),l=this.parser||this.Parser;return Ws("parse",l),l(String(i),i)}process(n,i){const l=this;return this.freeze(),Ws("process",this.parser||this.Parser),ec("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const h=yu(n),m=l.parse(h);l.run(m,h,function(y,g,_){if(y||!g||!_)return d(y);const b=g,E=l.stringify(b,_);R2(E)?_.value=E:_.result=E,d(y,_)});function d(y,g){y||!g?c(y):s?s(g):i(void 0,g)}}}processSync(n){let i=!1,l;return this.freeze(),Ws("processSync",this.parser||this.Parser),ec("processSync",this.compiler||this.Compiler),this.process(n,o),_g("processSync","process",i),l;function o(s,c){i=!0,mg(s),l=c}}run(n,i,l){bg(n),this.freeze();const o=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?s(void 0,l):new Promise(s);function s(c,h){const m=yu(i);o.run(n,m,d);function d(y,g,_){const b=g||n;y?h(y):c?c(b):l(void 0,b,_)}}}runSync(n,i){let l=!1,o;return this.run(n,i,s),_g("runSync","run",l),o;function s(c,h){mg(c),o=h,l=!0}}stringify(n,i){this.freeze();const l=yu(i),o=this.compiler||this.Compiler;return ec("stringify",o),bg(n),o(n,l)}use(n,...i){const l=this.attachers,o=this.namespace;if(tc("use",this.frozen),n!=null)if(typeof n=="function")m(n,i);else if(typeof n=="object")Array.isArray(n)?h(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(d){if(typeof d=="function")m(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[y,...g]=d;m(y,g)}else c(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function c(d){if(!("plugins"in d)&&!("settings"in d))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(d.plugins),d.settings&&(o.settings=Gs(!0,o.settings,d.settings))}function h(d){let y=-1;if(d!=null)if(Array.isArray(d))for(;++y<d.length;){const g=d[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function m(d,y){let g=-1,_=-1;for(;++g<l.length;)if(l[g][0]===d){_=g;break}if(_===-1)l.push([d,...y]);else if(y.length>0){let[b,...E]=y;const T=l[_][1];Xs(T)&&Xs(b)&&(b=Gs(!0,T,b)),l[_]=[d,b,...E]}}}}const D2=new Ks().freeze();function Ws(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ec(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tc(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bg(e){if(!Xs(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _g(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function yu(e){return M2(e)?e:new yg(e)}function M2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function R2(e){return typeof e=="string"||j2(e)}function j2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sg=[],xg={allowDangerousHtml:!0},Z2=/^(https?|ircs?|mailto|xmpp)$/i,L2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function I2(e){const n=B2(e),i=H2(e);return q2(n.runSync(n.parse(i),i),e)}function B2(e){const n=e.rehypePlugins||Sg,i=e.remarkPlugins||Sg,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xg}:xg;return D2().use(_A).use(i).use(d2,l).use(n)}function H2(e){const n=e.children||"",i=new yg;return typeof n=="string"&&(i.value=n),i}function q2(e,n){const i=n.allowedElements,l=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,h=n.unwrapDisallowed,m=n.urlTransform||$2;for(const y of L2)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+U2+y.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),$s(e,d),hk(e,{Fragment:P.Fragment,components:o,ignoreInvalidStyle:!0,jsx:P.jsx,jsxs:P.jsxs,passKeys:!0,passNode:!0});function d(y,g,_){if(y.type==="raw"&&_&&typeof g=="number")return c?_.children.splice(g,1):_.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in Cs)if(Object.hasOwn(Cs,b)&&Object.hasOwn(y.properties,b)){const E=y.properties[b],T=Cs[b];(T===null||T.includes(y.tagName))&&(y.properties[b]=m(String(E||""),b,y))}}if(y.type==="element"){let b=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!b&&l&&typeof g=="number"&&(b=!l(y,g,_)),b&&_&&typeof g=="number")return h&&y.children?_.children.splice(g,1,...y.children):_.children.splice(g,1),g}}}function $2(e){const n=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||i!==-1&&n>i||l!==-1&&n>l||Z2.test(e.slice(0,n))?e:""}function Eg(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,o=i.indexOf(n);for(;o!==-1;)l++,o=i.indexOf(n,o+n.length);return l}function V2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Y2(e,n,i){const o=mu((i||{}).ignore||[]),s=G2(n);let c=-1;for(;++c<s.length;)hg(e,"text",h);function h(d,y){let g=-1,_;for(;++g<y.length;){const b=y[g],E=_?_.children:void 0;if(o(b,E?E.indexOf(b):void 0,_))return;_=b}if(_)return m(d,y)}function m(d,y){const g=y[y.length-1],_=s[c][0],b=s[c][1];let E=0;const M=g.children.indexOf(d);let O=!1,B=[];_.lastIndex=0;let k=_.exec(d.value);for(;k;){const J=k.index,K={index:k.index,input:k.input,stack:[...y,d]};let D=b(...k,K);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?_.lastIndex=J+1:(E!==J&&B.push({type:"text",value:d.value.slice(E,J)}),Array.isArray(D)?B.push(...D):D&&B.push(D),E=J+k[0].length,O=!0),!_.global)break;k=_.exec(d.value)}return O?(E<d.value.length&&B.push({type:"text",value:d.value.slice(E)}),g.children.splice(M,1,...B)):B=[d],M+B.length}}function G2(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const o=i[l];n.push([X2(o[0]),F2(o[1])])}return n}function X2(e){return typeof e=="string"?new RegExp(V2(e),"g"):e}function F2(e){return typeof e=="function"?e:function(){return e}}const nc="phrasing",rc=["autolink","link","image","label"];function J2(){return{transforms:[nO],enter:{literalAutolink:P2,literalAutolinkEmail:ic,literalAutolinkHttp:ic,literalAutolinkWww:ic},exit:{literalAutolink:tO,literalAutolinkEmail:eO,literalAutolinkHttp:K2,literalAutolinkWww:W2}}}function Q2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nc,notInConstruct:rc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nc,notInConstruct:rc},{character:":",before:"[ps]",after:"\\/",inConstruct:nc,notInConstruct:rc}]}}function P2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ic(e){this.config.enter.autolinkProtocol.call(this,e)}function K2(e){this.config.exit.autolinkProtocol.call(this,e)}function W2(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function eO(e){this.config.exit.autolinkEmail.call(this,e)}function tO(e){this.exit(e)}function nO(e){Y2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),iO]],{ignore:["link","linkReference"]})}function rO(e,n,i,l,o){let s="";if(!zg(o)||(/^w/i.test(n)&&(i=n+i,n="",s="http://"),!aO(i)))return!1;const c=lO(i+l);if(!c[0])return!1;const h={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[h,{type:"text",value:c[1]}]:h}function iO(e,n,i,l){return!zg(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function aO(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function lO(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],l=i.indexOf(")");const o=Eg(e,"(");let s=Eg(e,")");for(;l!==-1&&o>s;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),s++;return[e,i]}function zg(e,n){const i=e.input.charCodeAt(e.index-1);return(e.index===0||Fr(i)||uu(i))&&(!n||i!==47)}wg.peek=mO;function uO(){this.buffer()}function oO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sO(){this.buffer()}function cO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fO(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=wn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function hO(e){this.exit(e)}function pO(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=wn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function dO(e){this.exit(e)}function mO(){return"["}function wg(e,n,i,l){const o=i.createTracker(l);let s=o.move("[^");const c=i.enter("footnoteReference"),h=i.enter("reference");return s+=o.move(i.safe(i.associationId(e),{after:"]",before:s})),h(),c(),s+=o.move("]"),s}function gO(){return{enter:{gfmFootnoteCallString:uO,gfmFootnoteCall:oO,gfmFootnoteDefinitionLabelString:sO,gfmFootnoteDefinition:cO},exit:{gfmFootnoteCallString:fO,gfmFootnoteCall:hO,gfmFootnoteDefinitionLabelString:pO,gfmFootnoteDefinition:dO}}}function yO(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:i,footnoteReference:wg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,o,s,c){const h=s.createTracker(c);let m=h.move("[^");const d=s.enter("footnoteDefinition"),y=s.enter("label");return m+=h.move(s.safe(s.associationId(l),{before:m,after:"]"})),y(),m+=h.move("]:"),l.children&&l.children.length>0&&(h.shift(4),m+=h.move((n?`
|
|
165
|
-
`:" ")+s.indentLines(s.containerFlow(l,h.current()),n?kg:vO))),d(),m}}function vO(e,n,i){return n===0?e:kg(e,n,i)}function kg(e,n,i){return(i?"":" ")+e}const bO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tg.peek=zO;function _O(){return{canContainEols:["delete"],enter:{strikethrough:xO},exit:{strikethrough:EO}}}function SO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bO}],handlers:{delete:Tg}}}function xO(e){this.enter({type:"delete",children:[]},e)}function EO(e){this.exit(e)}function Tg(e,n,i,l){const o=i.createTracker(l),s=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function zO(){return"~"}function wO(e){return e.length}function kO(e,n){const i=n||{},l=(i.align||[]).concat(),o=i.stringLength||wO,s=[],c=[],h=[],m=[];let d=0,y=-1;for(;++y<e.length;){const
|
|
164
|
+
`},o),s}function d2(e,n){return e&&"run"in e?async function(i,l){const o=dg(i,{file:l,...n});await e.run(o,l)}:function(i,l){return dg(i,{file:l,...e||n})}}function mg(e){if(e)throw e}var Ys,gg;function m2(){if(gg)return Ys;gg=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},s=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var y=e.call(d,"constructor"),g=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!y&&!g)return!1;var _;for(_ in d);return typeof _>"u"||e.call(d,_)},c=function(d,y){i&&y.name==="__proto__"?i(d,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):d[y.name]=y.newValue},h=function(d,y){if(y==="__proto__")if(e.call(d,y)){if(l)return l(d,y).value}else return;return d[y]};return Ys=function m(){var d,y,g,_,b,E,k=arguments[0],R=1,C=arguments.length,B=!1;for(typeof k=="boolean"&&(B=k,k=arguments[1]||{},R=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});R<C;++R)if(d=arguments[R],d!=null)for(y in d)g=h(k,y),_=h(d,y),k!==_&&(B&&_&&(s(_)||(b=o(_)))?(b?(b=!1,E=g&&o(g)?g:[]):E=g&&s(g)?g:{},c(k,{name:y,newValue:m(B,E,_)})):typeof _<"u"&&c(k,{name:y,newValue:_}));return k},Ys}var g2=m2();const Gs=qr(g2);function Xs(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function y2(){const e=[],n={run:i,use:l};return n;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);h(null,...o);function h(m,...d){const y=e[++s];let g=-1;if(m){c(m);return}for(;++g<o.length;)(d[g]===null||d[g]===void 0)&&(d[g]=o[g]);o=d,y?v2(y,h)(...d):c(null,...d)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function v2(e,n){let i;return l;function l(...c){const h=e.length>c.length;let m;h&&c.push(o);try{m=e.apply(this,c)}catch(d){const y=d;if(h&&i)throw y;return o(y)}h||(m&&m.then&&typeof m.then=="function"?m.then(s,o):m instanceof Error?o(m):s(m))}function o(c,...h){i||(i=!0,n(c,...h))}function s(c){o(null,c)}}const Mn={basename:b2,dirname:_2,extname:S2,join:x2,sep:"/"};function b2(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ga(e);let i=0,l=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else l<0&&(s=!0,l=o+1);return l<0?"":e.slice(i,l)}if(n===e)return"";let c=-1,h=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),h>-1&&(e.codePointAt(o)===n.codePointAt(h--)?h<0&&(l=o):(h=-1,l=c));return i===l?l=c:l<0&&(l=e.length),e.slice(i,l)}function _2(e){if(Ga(e),e.length===0)return".";let n=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){n=i;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function S2(e){Ga(e);let n=e.length,i=-1,l=0,o=-1,s=0,c;for(;n--;){const h=e.codePointAt(n);if(h===47){if(c){l=n+1;break}continue}i<0&&(c=!0,i=n+1),h===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===l+1?"":e.slice(o,i)}function x2(...e){let n=-1,i;for(;++n<e.length;)Ga(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":E2(i)}function E2(e){Ga(e);const n=e.codePointAt(0)===47;let i=z2(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function z2(e,n){let i="",l=0,o=-1,s=0,c=-1,h,m;for(;++c<=e.length;){if(c<e.length)h=e.codePointAt(c);else{if(h===47)break;h=47}if(h===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",l=0):(i=i.slice(0,m),l=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",l=0,o=c,s=0;continue}}n&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),l=c-o-1;o=c,s=0}else h===46&&s>-1?s++:s=-1}return i}function Ga(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const w2={cwd:k2};function k2(){return"/"}function Fs(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function T2(e){if(typeof e=="string")e=new URL(e);else if(!Fs(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return A2(e)}function A2(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const l=n.codePointAt(i+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const Js=["history","path","basename","stem","extname","dirname"];class yg{constructor(n){let i;n?Fs(n)?i={path:n}:typeof n=="string"||O2(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":w2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Js.length;){const s=Js[l];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)Js.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(n){Ps(n,"basename"),Qs(n,"basename"),this.path=Mn.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(n){vg(this.basename,"dirname"),this.path=Mn.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(n){if(Qs(n,"extname"),vg(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=Mn.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Fs(n)&&(n=T2(n)),Ps(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(n){Ps(n,"stem"),Qs(n,"stem"),this.path=Mn.join(this.dirname||"",n+(this.extname||""))}fail(n,i,l){const o=this.message(n,i,l);throw o.fatal=!0,o}info(n,i,l){const o=this.message(n,i,l);return o.fatal=void 0,o}message(n,i,l){const o=new Ct(n,i,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Qs(e,n){if(e&&e.includes(Mn.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Mn.sep+"`")}function Ps(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function vg(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function O2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C2=function(e){const l=this.constructor.prototype,o=l[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,l),s},N2={}.hasOwnProperty;class Ks extends C2{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=y2()}copy(){const n=new Ks;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];n.use(...l)}return n.data(Gs(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(tc("data",this.frozen),this.namespace[n]=i,this):N2.call(this.namespace,n)&&this.namespace[n]||void 0:n?(tc("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=i.call(n,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=yu(n),l=this.parser||this.Parser;return Ws("parse",l),l(String(i),i)}process(n,i){const l=this;return this.freeze(),Ws("process",this.parser||this.Parser),ec("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const h=yu(n),m=l.parse(h);l.run(m,h,function(y,g,_){if(y||!g||!_)return d(y);const b=g,E=l.stringify(b,_);R2(E)?_.value=E:_.result=E,d(y,_)});function d(y,g){y||!g?c(y):s?s(g):i(void 0,g)}}}processSync(n){let i=!1,l;return this.freeze(),Ws("processSync",this.parser||this.Parser),ec("processSync",this.compiler||this.Compiler),this.process(n,o),_g("processSync","process",i),l;function o(s,c){i=!0,mg(s),l=c}}run(n,i,l){bg(n),this.freeze();const o=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?s(void 0,l):new Promise(s);function s(c,h){const m=yu(i);o.run(n,m,d);function d(y,g,_){const b=g||n;y?h(y):c?c(b):l(void 0,b,_)}}}runSync(n,i){let l=!1,o;return this.run(n,i,s),_g("runSync","run",l),o;function s(c,h){mg(c),o=h,l=!0}}stringify(n,i){this.freeze();const l=yu(i),o=this.compiler||this.Compiler;return ec("stringify",o),bg(n),o(n,l)}use(n,...i){const l=this.attachers,o=this.namespace;if(tc("use",this.frozen),n!=null)if(typeof n=="function")m(n,i);else if(typeof n=="object")Array.isArray(n)?h(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(d){if(typeof d=="function")m(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[y,...g]=d;m(y,g)}else c(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function c(d){if(!("plugins"in d)&&!("settings"in d))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(d.plugins),d.settings&&(o.settings=Gs(!0,o.settings,d.settings))}function h(d){let y=-1;if(d!=null)if(Array.isArray(d))for(;++y<d.length;){const g=d[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function m(d,y){let g=-1,_=-1;for(;++g<l.length;)if(l[g][0]===d){_=g;break}if(_===-1)l.push([d,...y]);else if(y.length>0){let[b,...E]=y;const k=l[_][1];Xs(k)&&Xs(b)&&(b=Gs(!0,k,b)),l[_]=[d,b,...E]}}}}const D2=new Ks().freeze();function Ws(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ec(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tc(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bg(e){if(!Xs(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _g(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function yu(e){return M2(e)?e:new yg(e)}function M2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function R2(e){return typeof e=="string"||j2(e)}function j2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sg=[],xg={allowDangerousHtml:!0},Z2=/^(https?|ircs?|mailto|xmpp)$/i,L2=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function I2(e){const n=B2(e),i=H2(e);return q2(n.runSync(n.parse(i),i),e)}function B2(e){const n=e.rehypePlugins||Sg,i=e.remarkPlugins||Sg,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xg}:xg;return D2().use(_A).use(i).use(d2,l).use(n)}function H2(e){const n=e.children||"",i=new yg;return typeof n=="string"&&(i.value=n),i}function q2(e,n){const i=n.allowedElements,l=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,h=n.unwrapDisallowed,m=n.urlTransform||$2;for(const y of L2)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+U2+y.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),$s(e,d),hk(e,{Fragment:K.Fragment,components:o,ignoreInvalidStyle:!0,jsx:K.jsx,jsxs:K.jsxs,passKeys:!0,passNode:!0});function d(y,g,_){if(y.type==="raw"&&_&&typeof g=="number")return c?_.children.splice(g,1):_.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in Cs)if(Object.hasOwn(Cs,b)&&Object.hasOwn(y.properties,b)){const E=y.properties[b],k=Cs[b];(k===null||k.includes(y.tagName))&&(y.properties[b]=m(String(E||""),b,y))}}if(y.type==="element"){let b=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!b&&l&&typeof g=="number"&&(b=!l(y,g,_)),b&&_&&typeof g=="number")return h&&y.children?_.children.splice(g,1,...y.children):_.children.splice(g,1),g}}}function $2(e){const n=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||i!==-1&&n>i||l!==-1&&n>l||Z2.test(e.slice(0,n))?e:""}function Eg(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,o=i.indexOf(n);for(;o!==-1;)l++,o=i.indexOf(n,o+n.length);return l}function V2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Y2(e,n,i){const o=mu((i||{}).ignore||[]),s=G2(n);let c=-1;for(;++c<s.length;)hg(e,"text",h);function h(d,y){let g=-1,_;for(;++g<y.length;){const b=y[g],E=_?_.children:void 0;if(o(b,E?E.indexOf(b):void 0,_))return;_=b}if(_)return m(d,y)}function m(d,y){const g=y[y.length-1],_=s[c][0],b=s[c][1];let E=0;const R=g.children.indexOf(d);let C=!1,B=[];_.lastIndex=0;let w=_.exec(d.value);for(;w;){const P=w.index,F={index:w.index,input:w.input,stack:[...y,d]};let D=b(...w,F);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?_.lastIndex=P+1:(E!==P&&B.push({type:"text",value:d.value.slice(E,P)}),Array.isArray(D)?B.push(...D):D&&B.push(D),E=P+w[0].length,C=!0),!_.global)break;w=_.exec(d.value)}return C?(E<d.value.length&&B.push({type:"text",value:d.value.slice(E)}),g.children.splice(R,1,...B)):B=[d],R+B.length}}function G2(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const o=i[l];n.push([X2(o[0]),F2(o[1])])}return n}function X2(e){return typeof e=="string"?new RegExp(V2(e),"g"):e}function F2(e){return typeof e=="function"?e:function(){return e}}const nc="phrasing",rc=["autolink","link","image","label"];function J2(){return{transforms:[nO],enter:{literalAutolink:P2,literalAutolinkEmail:ic,literalAutolinkHttp:ic,literalAutolinkWww:ic},exit:{literalAutolink:tO,literalAutolinkEmail:eO,literalAutolinkHttp:K2,literalAutolinkWww:W2}}}function Q2(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:nc,notInConstruct:rc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:nc,notInConstruct:rc},{character:":",before:"[ps]",after:"\\/",inConstruct:nc,notInConstruct:rc}]}}function P2(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ic(e){this.config.enter.autolinkProtocol.call(this,e)}function K2(e){this.config.exit.autolinkProtocol.call(this,e)}function W2(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function eO(e){this.config.exit.autolinkEmail.call(this,e)}function tO(e){this.exit(e)}function nO(e){Y2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),iO]],{ignore:["link","linkReference"]})}function rO(e,n,i,l,o){let s="";if(!zg(o)||(/^w/i.test(n)&&(i=n+i,n="",s="http://"),!aO(i)))return!1;const c=lO(i+l);if(!c[0])return!1;const h={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[h,{type:"text",value:c[1]}]:h}function iO(e,n,i,l){return!zg(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function aO(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function lO(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],l=i.indexOf(")");const o=Eg(e,"(");let s=Eg(e,")");for(;l!==-1&&o>s;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),s++;return[e,i]}function zg(e,n){const i=e.input.charCodeAt(e.index-1);return(e.index===0||Fr(i)||uu(i))&&(!n||i!==47)}wg.peek=mO;function uO(){this.buffer()}function oO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sO(){this.buffer()}function cO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fO(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=wn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function hO(e){this.exit(e)}function pO(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=wn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function dO(e){this.exit(e)}function mO(){return"["}function wg(e,n,i,l){const o=i.createTracker(l);let s=o.move("[^");const c=i.enter("footnoteReference"),h=i.enter("reference");return s+=o.move(i.safe(i.associationId(e),{after:"]",before:s})),h(),c(),s+=o.move("]"),s}function gO(){return{enter:{gfmFootnoteCallString:uO,gfmFootnoteCall:oO,gfmFootnoteDefinitionLabelString:sO,gfmFootnoteDefinition:cO},exit:{gfmFootnoteCallString:fO,gfmFootnoteCall:hO,gfmFootnoteDefinitionLabelString:pO,gfmFootnoteDefinition:dO}}}function yO(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:i,footnoteReference:wg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,o,s,c){const h=s.createTracker(c);let m=h.move("[^");const d=s.enter("footnoteDefinition"),y=s.enter("label");return m+=h.move(s.safe(s.associationId(l),{before:m,after:"]"})),y(),m+=h.move("]:"),l.children&&l.children.length>0&&(h.shift(4),m+=h.move((n?`
|
|
165
|
+
`:" ")+s.indentLines(s.containerFlow(l,h.current()),n?kg:vO))),d(),m}}function vO(e,n,i){return n===0?e:kg(e,n,i)}function kg(e,n,i){return(i?"":" ")+e}const bO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tg.peek=zO;function _O(){return{canContainEols:["delete"],enter:{strikethrough:xO},exit:{strikethrough:EO}}}function SO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bO}],handlers:{delete:Tg}}}function xO(e){this.enter({type:"delete",children:[]},e)}function EO(e){this.exit(e)}function Tg(e,n,i,l){const o=i.createTracker(l),s=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function zO(){return"~"}function wO(e){return e.length}function kO(e,n){const i=n||{},l=(i.align||[]).concat(),o=i.stringLength||wO,s=[],c=[],h=[],m=[];let d=0,y=-1;for(;++y<e.length;){const k=[],R=[];let C=-1;for(e[y].length>d&&(d=e[y].length);++C<e[y].length;){const B=TO(e[y][C]);if(i.alignDelimiters!==!1){const w=o(B);R[C]=w,(m[C]===void 0||w>m[C])&&(m[C]=w)}k.push(B)}c[y]=k,h[y]=R}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<d;)s[g]=Ag(l[g]);else{const k=Ag(l);for(;++g<d;)s[g]=k}g=-1;const _=[],b=[];for(;++g<d;){const k=s[g];let R="",C="";k===99?(R=":",C=":"):k===108?R=":":k===114&&(C=":");let B=i.alignDelimiters===!1?1:Math.max(1,m[g]-R.length-C.length);const w=R+"-".repeat(B)+C;i.alignDelimiters!==!1&&(B=R.length+B+C.length,B>m[g]&&(m[g]=B),b[g]=B),_[g]=w}c.splice(1,0,_),h.splice(1,0,b),y=-1;const E=[];for(;++y<c.length;){const k=c[y],R=h[y];g=-1;const C=[];for(;++g<d;){const B=k[g]||"";let w="",P="";if(i.alignDelimiters!==!1){const F=m[g]-(R[g]||0),D=s[g];D===114?w=" ".repeat(F):D===99?F%2?(w=" ".repeat(F/2+.5),P=" ".repeat(F/2-.5)):(w=" ".repeat(F/2),P=w):P=" ".repeat(F)}i.delimiterStart!==!1&&!g&&C.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&B==="")&&(i.delimiterStart!==!1||g)&&C.push(" "),i.alignDelimiters!==!1&&C.push(w),C.push(B),i.alignDelimiters!==!1&&C.push(P),i.padding!==!1&&C.push(" "),(i.delimiterEnd!==!1||g!==d-1)&&C.push("|")}E.push(i.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return E.join(`
|
|
166
166
|
`)}function TO(e){return e==null?"":String(e)}function Ag(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function AO(e,n,i,l){const o=i.enter("blockquote"),s=i.createTracker(l);s.move("> "),s.shift(2);const c=i.indentLines(i.containerFlow(e,s.current()),OO);return o(),c}function OO(e,n,i){return">"+(i?"":" ")+e}function CO(e,n){return Og(e,n.inConstruct,!0)&&!Og(e,n.notInConstruct,!1)}function Og(e,n,i){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return i;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function Cg(e,n,i,l){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
|
|
167
167
|
`&&CO(i.stack,i.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
168
168
|
`}function NO(e,n){const i=String(e);let l=i.indexOf(n),o=l,s=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++s>c&&(c=s):s=1,o=l+n.length,l=i.indexOf(n,o);return c}function DO(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function MO(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function RO(e,n,i,l){const o=MO(i),s=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(DO(e,i)){const g=i.enter("codeIndented"),_=i.indentLines(s,jO);return g(),_}const h=i.createTracker(l),m=o.repeat(Math.max(NO(s,o)+1,3)),d=i.enter("codeFenced");let y=h.move(m);if(e.lang){const g=i.enter(`codeFencedLang${c}`);y+=h.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...h.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${c}`);y+=h.move(" "),y+=h.move(i.safe(e.meta,{before:y,after:`
|
|
@@ -175,6 +175,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
175
175
|
`+(o===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
|
|
176
176
|
`))+1))}const c="#".repeat(o),h=i.enter("headingAtx"),m=i.enter("phrasing");s.move(c+" ");let d=i.containerPhrasing(e,{before:"# ",after:`
|
|
177
177
|
`,...s.current()});return/^[\t ]/.test(d)&&(d=Xa(d.charCodeAt(0))+d.slice(1)),d=d?c+" "+d:c,i.options.closeAtx&&(d+=" "+c),m(),h(),d}Dg.peek=HO;function Dg(e){return e.value||""}function HO(){return"<"}Mg.peek=qO;function Mg(e,n,i,l){const o=ac(i),s=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let h=i.enter("label");const m=i.createTracker(l);let d=m.move("![");return d+=m.move(i.safe(e.alt,{before:d,after:"]",...m.current()})),d+=m.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=i.enter("destinationLiteral"),d+=m.move("<"),d+=m.move(i.safe(e.url,{before:d,after:">",...m.current()})),d+=m.move(">")):(h=i.enter("destinationRaw"),d+=m.move(i.safe(e.url,{before:d,after:e.title?" ":")",...m.current()}))),h(),e.title&&(h=i.enter(`title${s}`),d+=m.move(" "+o),d+=m.move(i.safe(e.title,{before:d,after:o,...m.current()})),d+=m.move(o),h()),d+=m.move(")"),c(),d}function qO(){return"!"}Rg.peek=$O;function Rg(e,n,i,l){const o=e.referenceType,s=i.enter("imageReference");let c=i.enter("label");const h=i.createTracker(l);let m=h.move("![");const d=i.safe(e.alt,{before:m,after:"]",...h.current()});m+=h.move(d+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:m,after:"]",...h.current()});return c(),i.stack=y,s(),o==="full"||!d||d!==g?m+=h.move(g+"]"):o==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function $O(){return"!"}jg.peek=VO;function jg(e,n,i){let l=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++s<i.unsafe.length;){const c=i.unsafe[s],h=i.compilePattern(c);let m;if(c.atBreak)for(;m=h.exec(l);){let d=m.index;l.charCodeAt(d)===10&&l.charCodeAt(d-1)===13&&d--,l=l.slice(0,d)+" "+l.slice(m.index+1)}}return o+l+o}function VO(){return"`"}function Ug(e,n){const i=Ns(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Zg.peek=YO;function Zg(e,n,i,l){const o=ac(i),s=o==='"'?"Quote":"Apostrophe",c=i.createTracker(l);let h,m;if(Ug(e,i)){const y=i.stack;i.stack=[],h=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),h(),i.stack=y,g}h=i.enter("link"),m=i.enter("label");let d=c.move("[");return d+=c.move(i.containerPhrasing(e,{before:d,after:"](",...c.current()})),d+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=i.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(i.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(m=i.enter("destinationRaw"),d+=c.move(i.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=i.enter(`title${s}`),d+=c.move(" "+o),d+=c.move(i.safe(e.title,{before:d,after:o,...c.current()})),d+=c.move(o),m()),d+=c.move(")"),h(),d}function YO(e,n,i){return Ug(e,i)?"<":"["}Lg.peek=GO;function Lg(e,n,i,l){const o=e.referenceType,s=i.enter("linkReference");let c=i.enter("label");const h=i.createTracker(l);let m=h.move("[");const d=i.containerPhrasing(e,{before:m,after:"]",...h.current()});m+=h.move(d+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:m,after:"]",...h.current()});return c(),i.stack=y,s(),o==="full"||!d||d!==g?m+=h.move(g+"]"):o==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function GO(){return"["}function lc(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function XO(e){const n=lc(e),i=e.options.bulletOther;if(!i)return n==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+i+"`) to be different");return i}function FO(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ig(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function JO(e,n,i,l){const o=i.enter("list"),s=i.bulletCurrent;let c=e.ordered?FO(i):lc(i);const h=e.ordered?c==="."?")":".":XO(i);let m=n&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(m=!0),Ig(i)===c&&y){let g=-1;for(;++g<e.children.length;){const _=e.children[g];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=h),i.bulletCurrent=c;const d=i.containerFlow(e,l);return i.bulletLastUsed=c,i.bulletCurrent=s,o(),d}function QO(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function PO(e,n,i,l){const o=QO(i);let s=i.bulletCurrent||lc(i);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(i.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const h=i.createTracker(l);h.move(s+" ".repeat(c-s.length)),h.shift(c);const m=i.enter("listItem"),d=i.indentLines(i.containerFlow(e,h.current()),y);return m(),d;function y(g,_,b){return _?(b?"":" ".repeat(c))+g:(b?s:s+" ".repeat(c-s.length))+g}}function KO(e,n,i,l){const o=i.enter("paragraph"),s=i.enter("phrasing"),c=i.containerPhrasing(e,l);return s(),o(),c}const WO=mu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eC(e,n,i,l){return(e.children.some(function(c){return WO(c)})?i.containerPhrasing:i.containerFlow).call(i,e,l)}function tC(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Bg.peek=nC;function Bg(e,n,i,l){const o=tC(i),s=i.enter("strong"),c=i.createTracker(l),h=c.move(o+o);let m=c.move(i.containerPhrasing(e,{after:o,before:h,...c.current()}));const d=m.charCodeAt(0),y=vu(l.before.charCodeAt(l.before.length-1),d,o);y.inside&&(m=Xa(d)+m.slice(1));const g=m.charCodeAt(m.length-1),_=vu(l.after.charCodeAt(0),g,o);_.inside&&(m=m.slice(0,-1)+Xa(g));const b=c.move(o+o);return s(),i.attentionEncodeSurroundingInfo={after:_.outside,before:y.outside},h+m+b}function nC(e,n,i){return i.options.strong||"*"}function rC(e,n,i,l){return i.safe(e.value,l)}function iC(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function aC(e,n,i){const l=(Ig(i)+(i.options.ruleSpaces?" ":"")).repeat(iC(i));return i.options.ruleSpaces?l.slice(0,-1):l}const Hg={blockquote:AO,break:Cg,code:RO,definition:UO,emphasis:Ng,hardBreak:Cg,heading:BO,html:Dg,image:Mg,imageReference:Rg,inlineCode:jg,link:Zg,linkReference:Lg,list:JO,listItem:PO,paragraph:KO,root:eC,strong:Bg,text:rC,thematicBreak:aC};function lC(){return{enter:{table:uC,tableData:qg,tableHeader:qg,tableRow:sC},exit:{codeText:cC,table:oC,tableData:uc,tableHeader:uc,tableRow:uc}}}function uC(e){const n=e._align;this.enter({type:"table",align:n.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function oC(e){this.exit(e),this.data.inTable=void 0}function sC(e){this.enter({type:"tableRow",children:[]},e)}function uc(e){this.exit(e)}function qg(e){this.enter({type:"tableCell",children:[]},e)}function cC(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,fC));const i=this.stack[this.stack.length-1];i.type,i.value=n,this.exit(e)}function fC(e,n){return n==="|"?n:e}function hC(e){const n=e||{},i=n.tableCellPadding,l=n.tablePipeAlign,o=n.stringLength,s=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
178
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:c,tableCell:m,tableRow:h}};function c(b,E,
|
|
179
|
-
`))}function m(b,E,T,M){const O=T.enter("tableCell"),B=T.enter("phrasing"),k=T.containerPhrasing(b,{...M,before:s,after:s});return B(),O(),k}function d(b,E){return kO(b,{align:E,alignDelimiters:l,padding:i,stringLength:o})}function y(b,E,T){const M=b.children;let O=-1;const B=[],k=E.enter("table");for(;++O<M.length;)B[O]=g(M[O],E,T);return k(),B}function g(b,E,T){const M=b.children;let O=-1;const B=[],k=E.enter("tableRow");for(;++O<M.length;)B[O]=m(M[O],b,E,T);return k(),B}function _(b,E,T){let M=Hg.inlineCode(b,E,T);return T.stack.includes("tableCell")&&(M=M.replace(/\|/g,"\\$&")),M}}function pC(){return{exit:{taskListCheckValueChecked:$g,taskListCheckValueUnchecked:$g,paragraph:mC}}}function dC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gC}}}function $g(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function mC(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const o=n.children;let s=-1,c;for(;++s<o.length;){const h=o[s];if(h.type==="paragraph"){c=h;break}}c===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function gC(e,n,i,l){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",h=i.createTracker(l);s&&h.move(c);let m=Hg.listItem(e,n,i,{...l,...h.current()});return s&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),m;function d(y){return y+c}}function yC(){return[J2(),gO(),_O(),lC(),pC()]}function vC(e){return{extensions:[Q2(),yO(e),SO(),hC(e),dC()]}}const bC={tokenize:wC,partial:!0},Vg={tokenize:kC,partial:!0},Yg={tokenize:TC,partial:!0},Gg={tokenize:AC,partial:!0},_C={tokenize:OC,partial:!0},Xg={name:"wwwAutolink",tokenize:EC,previous:Jg},Fg={name:"protocolAutolink",tokenize:zC,previous:Qg},Bn={name:"emailAutolink",tokenize:xC,previous:Pg},Rn={};function SC(){return{text:Rn}}let Jr=48;for(;Jr<123;)Rn[Jr]=Bn,Jr++,Jr===58?Jr=65:Jr===91&&(Jr=97);Rn[43]=Bn,Rn[45]=Bn,Rn[46]=Bn,Rn[95]=Bn,Rn[72]=[Bn,Fg],Rn[104]=[Bn,Fg],Rn[87]=[Bn,Xg],Rn[119]=[Bn,Xg];function xC(e,n,i){const l=this;let o,s;return c;function c(g){return!oc(g)||!Pg.call(l,l.previous)||sc(l.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),h(g))}function h(g){return oc(g)?(e.consume(g),h):g===64?(e.consume(g),m):i(g)}function m(g){return g===46?e.check(_C,y,d)(g):g===45||g===95||Nt(g)?(s=!0,e.consume(g),m):y(g)}function d(g){return e.consume(g),o=!0,m}function y(g){return s&&o&&Ut(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):i(g)}}function EC(e,n,i){const l=this;return o;function o(c){return c!==87&&c!==119||!Jg.call(l,l.previous)||sc(l.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bC,e.attempt(Vg,e.attempt(Yg,s),i),i)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function zC(e,n,i){const l=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&Qg.call(l,l.previous)&&!sc(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),h):i(g)}function h(g){if(Ut(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),h;if(g===58){const _=o.toLowerCase();if(_==="http"||_==="https")return e.consume(g),m}return i(g)}function m(g){return g===47?(e.consume(g),s?d:(s=!0,m)):i(g)}function d(g){return g===null||lu(g)||Qe(g)||Fr(g)||uu(g)?i(g):e.attempt(Vg,e.attempt(Yg,y),i)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function wC(e,n,i){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),s):i(c)}function s(c){return c===null?i(c):n(c)}}function kC(e,n,i){let l,o,s;return c;function c(d){return d===46||d===95?e.check(Gg,m,h)(d):d===null||Qe(d)||Fr(d)||d!==45&&uu(d)?m(d):(s=!0,e.consume(d),c)}function h(d){return d===95?l=!0:(o=l,l=void 0),e.consume(d),c}function m(d){return o||l||!s?i(d):n(d)}}function TC(e,n){let i=0,l=0;return o;function o(c){return c===40?(i++,e.consume(c),o):c===41&&l<i?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Gg,n,s)(c):c===null||Qe(c)||Fr(c)?n(c):(e.consume(c),o)}function s(c){return c===41&&l++,e.consume(c),o}}function AC(e,n,i){return l;function l(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(e.consume(h),l):h===38?(e.consume(h),s):h===93?(e.consume(h),o):h===60||h===null||Qe(h)||Fr(h)?n(h):i(h)}function o(h){return h===null||h===40||h===91||Qe(h)||Fr(h)?n(h):l(h)}function s(h){return Ut(h)?c(h):i(h)}function c(h){return h===59?(e.consume(h),l):Ut(h)?(e.consume(h),c):i(h)}}function OC(e,n,i){return l;function l(s){return e.consume(s),o}function o(s){return Nt(s)?i(s):n(s)}}function Jg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Qe(e)}function Qg(e){return!Ut(e)}function Pg(e){return!(e===47||oc(e))}function oc(e){return e===43||e===45||e===46||e===95||Nt(e)}function sc(e){let n=e.length,i=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const CC={tokenize:LC,partial:!0};function NC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jC,continuation:{tokenize:UC},exit:ZC}},text:{91:{name:"gfmFootnoteCall",tokenize:RC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DC,resolveTo:MC}}}}function DC(e,n,i){const l=this;let o=l.events.length;const s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const m=l.events[o][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return h;function h(m){if(!c||!c._balanced)return i(m);const d=wn(l.sliceSerialize({start:c.end,end:l.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?i(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),n(m))}}function MC(e,n){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},h=[e[i+1],e[i+2],["enter",l,n],e[i+3],e[i+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(i,e.length-i+1,...h),e}function RC(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s=0,c;return h;function h(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(g){if(s>999||g===93&&!c||g===null||g===91||Qe(g))return i(g);if(g===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return o.includes(wn(l.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):i(g)}return Qe(g)||(c=!0),s++,e.consume(g),g===92?y:d}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,d):d(g)}}function jC(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s,c=0,h;return m;function m(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(E)}function y(E){if(c>999||E===93&&!h||E===null||E===91||Qe(E))return i(E);if(E===93){e.exit("chunkString");const T=e.exit("gfmFootnoteDefinitionLabelString");return s=wn(l.sliceSerialize(T)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return Qe(E)||(h=!0),c++,e.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(e.consume(E),c++,y):y(E)}function _(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),o.includes(s)||o.push(s),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):i(E)}function b(E){return n(E)}}function UC(e,n,i){return e.check(Ha,n,e.attempt(CC,n,i))}function ZC(e){e.exit("gfmFootnoteDefinition")}function LC(e,n,i){const l=this;return Ze(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):i(s)}}function IC(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:s,resolveAll:o};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,h){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let d=m;for(;d--;)if(c[d][0]==="exit"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[d][1].end.offset-c[d][1].start.offset){c[m][1].type="strikethroughSequence",c[d][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[d][1].start),end:Object.assign({},c[m][1].end)},g={type:"strikethroughText",start:Object.assign({},c[d][1].end),end:Object.assign({},c[m][1].start)},_=[["enter",y,h],["enter",c[d][1],h],["exit",c[d][1],h],["enter",g,h]],b=h.parser.constructs.insideSpan.null;b&&Wt(_,_.length,0,ou(b,c.slice(d+1,m),h)),Wt(_,_.length,0,[["exit",g,h],["enter",c[m][1],h],["exit",c[m][1],h],["exit",y,h]]),Wt(c,d-1,m-d+3,_),m=d+_.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function s(c,h,m){const d=this.previous,y=this.events;let g=0;return _;function _(E){return d===126&&y[y.length-1][1].type!=="characterEscape"?m(E):(c.enter("strikethroughSequenceTemporary"),b(E))}function b(E){const T=Ci(d);if(E===126)return g>1?m(E):(c.consume(E),g++,b);if(g<2&&!i)return m(E);const M=c.exit("strikethroughSequenceTemporary"),O=Ci(E);return M._open=!O||O===2&&!!T,M._close=!T||T===2&&!!O,h(E)}}}class BC{constructor(){this.map=[]}add(n,i,l){HC(this,n,i,l)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(n.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),n.length=this.map[i][0];l.push(n.slice()),n.length=0;let o=l.pop();for(;o;){for(const s of o)n.push(s);o=l.pop()}this.map.length=0}}function HC(e,n,i,l){let o=0;if(!(i===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=i,e.map[o][2].push(...l);return}o+=1}e.map.push([n,i,l])}}function qC(e,n){let i=!1;const l=[];for(;n<e.length;){const o=e[n];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=l.length-1;l[s]=l[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);n+=1}return l}function $C(){return{flow:{null:{name:"table",tokenize:VC,resolveAll:YC}}}}function VC(e,n,i){const l=this;let o=0,s=0,c;return h;function h(L){let ie=l.events.length-1;for(;ie>-1;){const ae=l.events[ie][1].type;if(ae==="lineEnding"||ae==="linePrefix")ie--;else break}const re=ie>-1?l.events[ie][1].type:null,le=re==="tableHead"||re==="tableRow"?D:m;return le===D&&l.parser.lazy[l.now().line]?i(L):le(L)}function m(L){return e.enter("tableHead"),e.enter("tableRow"),d(L)}function d(L){return L===124||(c=!0,s+=1),y(L)}function y(L){return L===null?i(L):ge(L)?s>1?(s=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),b):i(L):Te(L)?Ze(e,y,"whitespace")(L):(s+=1,c&&(c=!1,o+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||Qe(L)?(e.exit("data"),y(L)):(e.consume(L),L===92?_:g)}function _(L){return L===92||L===124?(e.consume(L),g):g(L)}function b(L){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(L):(e.enter("tableDelimiterRow"),c=!1,Te(L)?Ze(e,E,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):E(L))}function E(L){return L===45||L===58?M(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),T):K(L)}function T(L){return Te(L)?Ze(e,M,"whitespace")(L):M(L)}function M(L){return L===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),O):L===45?(s+=1,O(L)):L===null||ge(L)?J(L):K(L)}function O(L){return L===45?(e.enter("tableDelimiterFiller"),B(L)):K(L)}function B(L){return L===45?(e.consume(L),B):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return Te(L)?Ze(e,J,"whitespace")(L):J(L)}function J(L){return L===124?E(L):L===null||ge(L)?!c||o!==s?K(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(L)):K(L)}function K(L){return i(L)}function D(L){return e.enter("tableRow"),X(L)}function X(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),X):L===null||ge(L)?(e.exit("tableRow"),n(L)):Te(L)?Ze(e,X,"whitespace")(L):(e.enter("data"),ce(L))}function ce(L){return L===null||L===124||Qe(L)?(e.exit("data"),X(L)):(e.consume(L),L===92?pe:ce)}function pe(L){return L===92||L===124?(e.consume(L),ce):ce(L)}}function YC(e,n){let i=-1,l=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],h=!1,m=0,d,y,g;const _=new BC;for(;++i<e.length;){const b=e[i],E=b[1];b[0]==="enter"?E.type==="tableHead"?(h=!1,m!==0&&(Kg(_,n,m,d,y),y=void 0,m=0),d={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(i,0,[["enter",d,n]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(l=!0,g=void 0,s=[0,0,0,0],c=[0,i+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(i,0,[["enter",y,n]])),o=E.type==="tableDelimiterRow"?2:y?3:1):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=bu(_,n,s,o,void 0,g),s=[0,0,0,0]),c[2]=i)):E.type==="tableCellDivider"&&(l?l=!1:(s[1]!==0&&(c[0]=c[1],g=bu(_,n,s,o,void 0,g)),s=c,c=[s[1],i,0,0])):E.type==="tableHead"?(h=!0,m=i):E.type==="tableRow"||E.type==="tableDelimiterRow"?(m=i,s[1]!==0?(c[0]=c[1],g=bu(_,n,s,o,i,g)):c[1]!==0&&(g=bu(_,n,c,o,i,g)),o=0):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=i)}for(m!==0&&Kg(_,n,m,d,y),_.consume(n.events),i=-1;++i<n.events.length;){const b=n.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=qC(n.events,i))}return e}function bu(e,n,i,l,o,s){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(s.end=Object.assign({},Di(n.events,i[0])),e.add(i[0],0,[["exit",s,n]]));const m=Di(n.events,i[1]);if(s={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(i[1],0,[["enter",s,n]]),i[2]!==0){const d=Di(n.events,i[2]),y=Di(n.events,i[3]),g={type:h,start:Object.assign({},d),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",g,n]]),l!==2){const _=n.events[i[2]],b=n.events[i[3]];if(_[1].end=Object.assign({},b[1].end),_[1].type="chunkText",_[1].contentType="text",i[3]>i[2]+1){const E=i[2]+1,T=i[3]-i[2]-1;e.add(E,T,[])}}e.add(i[3]+1,0,[["exit",g,n]])}return o!==void 0&&(s.end=Object.assign({},Di(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function Kg(e,n,i,l,o){const s=[],c=Di(n.events,i);o&&(o.end=Object.assign({},c),s.push(["exit",o,n])),l.end=Object.assign({},c),s.push(["exit",l,n]),e.add(i+1,0,s)}function Di(e,n){const i=e[n],l=i[0]==="enter"?"start":"end";return i[1][l]}const GC={name:"tasklistCheck",tokenize:FC};function XC(){return{text:{91:GC}}}function FC(e,n,i){const l=this;return o;function o(m){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),s)}function s(m){return Qe(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):i(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),h):i(m)}function h(m){return ge(m)?n(m):Te(m)?e.check({tokenize:JC},n,i)(m):i(m)}}function JC(e,n,i){return Ze(e,l,"whitespace");function l(o){return o===null?i(o):n(o)}}function QC(e){return Mm([SC(),NC(),IC(e),$C(),XC()])}const PC={};function KC(e){const n=this,i=e||PC,l=n.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),s=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(QC(i)),s.push(yC()),c.push(vC(i))}function WC({content:e}){return P.jsx("div",{className:"agt-markdown",children:P.jsx(I2,{remarkPlugins:[KC],components:{a:({href:n,children:i})=>P.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:i})},children:e})})}function Mi({className:e=""}){return P.jsxs("span",{className:`agt-spinner ${e}`,role:"status","aria-label":"Loading",children:[P.jsx("span",{className:"agt-spinner__dot"}),P.jsx("span",{className:"agt-spinner__dot"}),P.jsx("span",{className:"agt-spinner__dot"})]})}function e4({toolPart:e}){const{state:n,input:i,output:l}=e,o=e.toolName||"unknown",s=n==="input-streaming"||n==="input-available",c=n==="output-available",h=n==="output-error";if(o==="webSearch"){if(s)return P.jsxs("div",{className:"agt-tool",children:[P.jsx(Mi,{}),P.jsx("span",{children:(i==null?void 0:i.statusText)||"Searching the web..."})]});if(c&&l&&typeof l=="string"){if(l.startsWith("Error"))return P.jsx("div",{className:"agt-tool agt-tool--error",children:l});const m=l.match(/\*\*Sources:\*\*\s*([\s\S]+?)(?=\n\n|$)/);if(m){const d=[],y=/\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g;let g;for(;(g=y.exec(m[1]))!==null;)d.push({label:g[1],url:g[2]});if(d.length>0)return P.jsxs("div",{className:"agt-tool agt-tool--sources",children:[P.jsx("span",{className:"agt-tool__label",children:"Sources:"}),d.map((_,b)=>P.jsxs("span",{children:[P.jsx("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",children:_.label}),b<d.length-1&&P.jsx("span",{className:"agt-tool__separator",children:"•"})]},b))]})}return null}if(h)return P.jsx("div",{className:"agt-tool agt-tool--error",children:e.errorText||"Search failed"})}if(o==="generateImage"){if(s)return P.jsxs("div",{className:"agt-tool",children:[P.jsx(Mi,{}),P.jsx("span",{children:(i==null?void 0:i.statusText)||"Generating image..."})]});if(c&&l&&typeof l=="string"){if(l.startsWith("Error"))return P.jsx("div",{className:"agt-tool agt-tool--error",children:l});if(l.startsWith("http"))return P.jsx("div",{className:"agt-tool__image",children:P.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:P.jsx("img",{src:l,alt:"Generated image"})})})}}return o==="interpretImage"?s?P.jsxs("div",{className:"agt-tool",children:[P.jsx(Mi,{}),P.jsx("span",{children:(i==null?void 0:i.statusText)||"Analyzing image..."})]}):null:o==="ragLookup"?s?P.jsxs("div",{className:"agt-tool",children:[P.jsx(Mi,{}),P.jsx("span",{children:"Searching documents..."})]}):null:s?P.jsxs("div",{className:"agt-tool",children:[P.jsx(Mi,{}),P.jsx("span",{children:"Processing..."})]}):null}function t4({message:e,isStreaming:n}){const i=e.role==="user",o=e.parts.filter(c=>c.type==="text").map(c=>c.text).join(`
|
|
180
|
-
`),s=e.parts.filter(c=>c.type.startsWith("tool-"));return
|
|
178
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:c,tableCell:m,tableRow:h}};function c(b,E,k,R){return d(y(b,k,R),b.align)}function h(b,E,k,R){const C=g(b,k,R),B=d([C]);return B.slice(0,B.indexOf(`
|
|
179
|
+
`))}function m(b,E,k,R){const C=k.enter("tableCell"),B=k.enter("phrasing"),w=k.containerPhrasing(b,{...R,before:s,after:s});return B(),C(),w}function d(b,E){return kO(b,{align:E,alignDelimiters:l,padding:i,stringLength:o})}function y(b,E,k){const R=b.children;let C=-1;const B=[],w=E.enter("table");for(;++C<R.length;)B[C]=g(R[C],E,k);return w(),B}function g(b,E,k){const R=b.children;let C=-1;const B=[],w=E.enter("tableRow");for(;++C<R.length;)B[C]=m(R[C],b,E,k);return w(),B}function _(b,E,k){let R=Hg.inlineCode(b,E,k);return k.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function pC(){return{exit:{taskListCheckValueChecked:$g,taskListCheckValueUnchecked:$g,paragraph:mC}}}function dC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gC}}}function $g(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function mC(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const o=n.children;let s=-1,c;for(;++s<o.length;){const h=o[s];if(h.type==="paragraph"){c=h;break}}c===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function gC(e,n,i,l){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",h=i.createTracker(l);s&&h.move(c);let m=Hg.listItem(e,n,i,{...l,...h.current()});return s&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),m;function d(y){return y+c}}function yC(){return[J2(),gO(),_O(),lC(),pC()]}function vC(e){return{extensions:[Q2(),yO(e),SO(),hC(e),dC()]}}const bC={tokenize:wC,partial:!0},Vg={tokenize:kC,partial:!0},Yg={tokenize:TC,partial:!0},Gg={tokenize:AC,partial:!0},_C={tokenize:OC,partial:!0},Xg={name:"wwwAutolink",tokenize:EC,previous:Jg},Fg={name:"protocolAutolink",tokenize:zC,previous:Qg},Bn={name:"emailAutolink",tokenize:xC,previous:Pg},Rn={};function SC(){return{text:Rn}}let Jr=48;for(;Jr<123;)Rn[Jr]=Bn,Jr++,Jr===58?Jr=65:Jr===91&&(Jr=97);Rn[43]=Bn,Rn[45]=Bn,Rn[46]=Bn,Rn[95]=Bn,Rn[72]=[Bn,Fg],Rn[104]=[Bn,Fg],Rn[87]=[Bn,Xg],Rn[119]=[Bn,Xg];function xC(e,n,i){const l=this;let o,s;return c;function c(g){return!oc(g)||!Pg.call(l,l.previous)||sc(l.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),h(g))}function h(g){return oc(g)?(e.consume(g),h):g===64?(e.consume(g),m):i(g)}function m(g){return g===46?e.check(_C,y,d)(g):g===45||g===95||Nt(g)?(s=!0,e.consume(g),m):y(g)}function d(g){return e.consume(g),o=!0,m}function y(g){return s&&o&&Ut(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):i(g)}}function EC(e,n,i){const l=this;return o;function o(c){return c!==87&&c!==119||!Jg.call(l,l.previous)||sc(l.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(bC,e.attempt(Vg,e.attempt(Yg,s),i),i)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function zC(e,n,i){const l=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&Qg.call(l,l.previous)&&!sc(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),h):i(g)}function h(g){if(Ut(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),h;if(g===58){const _=o.toLowerCase();if(_==="http"||_==="https")return e.consume(g),m}return i(g)}function m(g){return g===47?(e.consume(g),s?d:(s=!0,m)):i(g)}function d(g){return g===null||lu(g)||Qe(g)||Fr(g)||uu(g)?i(g):e.attempt(Vg,e.attempt(Yg,y),i)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function wC(e,n,i){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),s):i(c)}function s(c){return c===null?i(c):n(c)}}function kC(e,n,i){let l,o,s;return c;function c(d){return d===46||d===95?e.check(Gg,m,h)(d):d===null||Qe(d)||Fr(d)||d!==45&&uu(d)?m(d):(s=!0,e.consume(d),c)}function h(d){return d===95?l=!0:(o=l,l=void 0),e.consume(d),c}function m(d){return o||l||!s?i(d):n(d)}}function TC(e,n){let i=0,l=0;return o;function o(c){return c===40?(i++,e.consume(c),o):c===41&&l<i?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Gg,n,s)(c):c===null||Qe(c)||Fr(c)?n(c):(e.consume(c),o)}function s(c){return c===41&&l++,e.consume(c),o}}function AC(e,n,i){return l;function l(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(e.consume(h),l):h===38?(e.consume(h),s):h===93?(e.consume(h),o):h===60||h===null||Qe(h)||Fr(h)?n(h):i(h)}function o(h){return h===null||h===40||h===91||Qe(h)||Fr(h)?n(h):l(h)}function s(h){return Ut(h)?c(h):i(h)}function c(h){return h===59?(e.consume(h),l):Ut(h)?(e.consume(h),c):i(h)}}function OC(e,n,i){return l;function l(s){return e.consume(s),o}function o(s){return Nt(s)?i(s):n(s)}}function Jg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Qe(e)}function Qg(e){return!Ut(e)}function Pg(e){return!(e===47||oc(e))}function oc(e){return e===43||e===45||e===46||e===95||Nt(e)}function sc(e){let n=e.length,i=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const CC={tokenize:LC,partial:!0};function NC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jC,continuation:{tokenize:UC},exit:ZC}},text:{91:{name:"gfmFootnoteCall",tokenize:RC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DC,resolveTo:MC}}}}function DC(e,n,i){const l=this;let o=l.events.length;const s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const m=l.events[o][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return h;function h(m){if(!c||!c._balanced)return i(m);const d=wn(l.sliceSerialize({start:c.end,end:l.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?i(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),n(m))}}function MC(e,n){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},h=[e[i+1],e[i+2],["enter",l,n],e[i+3],e[i+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(i,e.length-i+1,...h),e}function RC(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s=0,c;return h;function h(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(g){if(s>999||g===93&&!c||g===null||g===91||Qe(g))return i(g);if(g===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return o.includes(wn(l.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):i(g)}return Qe(g)||(c=!0),s++,e.consume(g),g===92?y:d}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,d):d(g)}}function jC(e,n,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s,c=0,h;return m;function m(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(E)}function y(E){if(c>999||E===93&&!h||E===null||E===91||Qe(E))return i(E);if(E===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return s=wn(l.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return Qe(E)||(h=!0),c++,e.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(e.consume(E),c++,y):y(E)}function _(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),o.includes(s)||o.push(s),Ze(e,b,"gfmFootnoteDefinitionWhitespace")):i(E)}function b(E){return n(E)}}function UC(e,n,i){return e.check(Ha,n,e.attempt(CC,n,i))}function ZC(e){e.exit("gfmFootnoteDefinition")}function LC(e,n,i){const l=this;return Ze(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):i(s)}}function IC(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:s,resolveAll:o};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,h){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let d=m;for(;d--;)if(c[d][0]==="exit"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[d][1].end.offset-c[d][1].start.offset){c[m][1].type="strikethroughSequence",c[d][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[d][1].start),end:Object.assign({},c[m][1].end)},g={type:"strikethroughText",start:Object.assign({},c[d][1].end),end:Object.assign({},c[m][1].start)},_=[["enter",y,h],["enter",c[d][1],h],["exit",c[d][1],h],["enter",g,h]],b=h.parser.constructs.insideSpan.null;b&&Wt(_,_.length,0,ou(b,c.slice(d+1,m),h)),Wt(_,_.length,0,[["exit",g,h],["enter",c[m][1],h],["exit",c[m][1],h],["exit",y,h]]),Wt(c,d-1,m-d+3,_),m=d+_.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function s(c,h,m){const d=this.previous,y=this.events;let g=0;return _;function _(E){return d===126&&y[y.length-1][1].type!=="characterEscape"?m(E):(c.enter("strikethroughSequenceTemporary"),b(E))}function b(E){const k=Ci(d);if(E===126)return g>1?m(E):(c.consume(E),g++,b);if(g<2&&!i)return m(E);const R=c.exit("strikethroughSequenceTemporary"),C=Ci(E);return R._open=!C||C===2&&!!k,R._close=!k||k===2&&!!C,h(E)}}}class BC{constructor(){this.map=[]}add(n,i,l){HC(this,n,i,l)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(n.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),n.length=this.map[i][0];l.push(n.slice()),n.length=0;let o=l.pop();for(;o;){for(const s of o)n.push(s);o=l.pop()}this.map.length=0}}function HC(e,n,i,l){let o=0;if(!(i===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=i,e.map[o][2].push(...l);return}o+=1}e.map.push([n,i,l])}}function qC(e,n){let i=!1;const l=[];for(;n<e.length;){const o=e[n];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=l.length-1;l[s]=l[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);n+=1}return l}function $C(){return{flow:{null:{name:"table",tokenize:VC,resolveAll:YC}}}}function VC(e,n,i){const l=this;let o=0,s=0,c;return h;function h(Z){let ie=l.events.length-1;for(;ie>-1;){const re=l.events[ie][1].type;if(re==="lineEnding"||re==="linePrefix")ie--;else break}const ne=ie>-1?l.events[ie][1].type:null,ae=ne==="tableHead"||ne==="tableRow"?D:m;return ae===D&&l.parser.lazy[l.now().line]?i(Z):ae(Z)}function m(Z){return e.enter("tableHead"),e.enter("tableRow"),d(Z)}function d(Z){return Z===124||(c=!0,s+=1),y(Z)}function y(Z){return Z===null?i(Z):me(Z)?s>1?(s=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(Z),e.exit("lineEnding"),b):i(Z):Te(Z)?Ze(e,y,"whitespace")(Z):(s+=1,c&&(c=!1,o+=1),Z===124?(e.enter("tableCellDivider"),e.consume(Z),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(Z)))}function g(Z){return Z===null||Z===124||Qe(Z)?(e.exit("data"),y(Z)):(e.consume(Z),Z===92?_:g)}function _(Z){return Z===92||Z===124?(e.consume(Z),g):g(Z)}function b(Z){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(Z):(e.enter("tableDelimiterRow"),c=!1,Te(Z)?Ze(e,E,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):E(Z))}function E(Z){return Z===45||Z===58?R(Z):Z===124?(c=!0,e.enter("tableCellDivider"),e.consume(Z),e.exit("tableCellDivider"),k):F(Z)}function k(Z){return Te(Z)?Ze(e,R,"whitespace")(Z):R(Z)}function R(Z){return Z===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(Z),e.exit("tableDelimiterMarker"),C):Z===45?(s+=1,C(Z)):Z===null||me(Z)?P(Z):F(Z)}function C(Z){return Z===45?(e.enter("tableDelimiterFiller"),B(Z)):F(Z)}function B(Z){return Z===45?(e.consume(Z),B):Z===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(Z),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(Z))}function w(Z){return Te(Z)?Ze(e,P,"whitespace")(Z):P(Z)}function P(Z){return Z===124?E(Z):Z===null||me(Z)?!c||o!==s?F(Z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(Z)):F(Z)}function F(Z){return i(Z)}function D(Z){return e.enter("tableRow"),X(Z)}function X(Z){return Z===124?(e.enter("tableCellDivider"),e.consume(Z),e.exit("tableCellDivider"),X):Z===null||me(Z)?(e.exit("tableRow"),n(Z)):Te(Z)?Ze(e,X,"whitespace")(Z):(e.enter("data"),se(Z))}function se(Z){return Z===null||Z===124||Qe(Z)?(e.exit("data"),X(Z)):(e.consume(Z),Z===92?be:se)}function be(Z){return Z===92||Z===124?(e.consume(Z),se):se(Z)}}function YC(e,n){let i=-1,l=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],h=!1,m=0,d,y,g;const _=new BC;for(;++i<e.length;){const b=e[i],E=b[1];b[0]==="enter"?E.type==="tableHead"?(h=!1,m!==0&&(Kg(_,n,m,d,y),y=void 0,m=0),d={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(i,0,[["enter",d,n]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(l=!0,g=void 0,s=[0,0,0,0],c=[0,i+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(i,0,[["enter",y,n]])),o=E.type==="tableDelimiterRow"?2:y?3:1):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=bu(_,n,s,o,void 0,g),s=[0,0,0,0]),c[2]=i)):E.type==="tableCellDivider"&&(l?l=!1:(s[1]!==0&&(c[0]=c[1],g=bu(_,n,s,o,void 0,g)),s=c,c=[s[1],i,0,0])):E.type==="tableHead"?(h=!0,m=i):E.type==="tableRow"||E.type==="tableDelimiterRow"?(m=i,s[1]!==0?(c[0]=c[1],g=bu(_,n,s,o,i,g)):c[1]!==0&&(g=bu(_,n,c,o,i,g)),o=0):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=i)}for(m!==0&&Kg(_,n,m,d,y),_.consume(n.events),i=-1;++i<n.events.length;){const b=n.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=qC(n.events,i))}return e}function bu(e,n,i,l,o,s){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(s.end=Object.assign({},Di(n.events,i[0])),e.add(i[0],0,[["exit",s,n]]));const m=Di(n.events,i[1]);if(s={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(i[1],0,[["enter",s,n]]),i[2]!==0){const d=Di(n.events,i[2]),y=Di(n.events,i[3]),g={type:h,start:Object.assign({},d),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",g,n]]),l!==2){const _=n.events[i[2]],b=n.events[i[3]];if(_[1].end=Object.assign({},b[1].end),_[1].type="chunkText",_[1].contentType="text",i[3]>i[2]+1){const E=i[2]+1,k=i[3]-i[2]-1;e.add(E,k,[])}}e.add(i[3]+1,0,[["exit",g,n]])}return o!==void 0&&(s.end=Object.assign({},Di(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function Kg(e,n,i,l,o){const s=[],c=Di(n.events,i);o&&(o.end=Object.assign({},c),s.push(["exit",o,n])),l.end=Object.assign({},c),s.push(["exit",l,n]),e.add(i+1,0,s)}function Di(e,n){const i=e[n],l=i[0]==="enter"?"start":"end";return i[1][l]}const GC={name:"tasklistCheck",tokenize:FC};function XC(){return{text:{91:GC}}}function FC(e,n,i){const l=this;return o;function o(m){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),s)}function s(m){return Qe(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):i(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),h):i(m)}function h(m){return me(m)?n(m):Te(m)?e.check({tokenize:JC},n,i)(m):i(m)}}function JC(e,n,i){return Ze(e,l,"whitespace");function l(o){return o===null?i(o):n(o)}}function QC(e){return Mm([SC(),NC(),IC(e),$C(),XC()])}const PC={};function KC(e){const n=this,i=e||PC,l=n.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),s=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(QC(i)),s.push(yC()),c.push(vC(i))}function WC({content:e}){return K.jsx("div",{className:"agt-markdown",children:K.jsx(I2,{remarkPlugins:[KC],components:{a:({href:n,children:i})=>K.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:i})},children:e})})}function Mi({className:e=""}){return K.jsxs("span",{className:`agt-spinner ${e}`,role:"status","aria-label":"Loading",children:[K.jsx("span",{className:"agt-spinner__dot"}),K.jsx("span",{className:"agt-spinner__dot"}),K.jsx("span",{className:"agt-spinner__dot"})]})}function e4({toolPart:e}){const{state:n,input:i,output:l}=e,o=e.toolName||"unknown",s=n==="input-streaming"||n==="input-available",c=n==="output-available",h=n==="output-error";if(o==="webSearch"){if(s)return K.jsxs("div",{className:"agt-tool",children:[K.jsx(Mi,{}),K.jsx("span",{children:(i==null?void 0:i.statusText)||"Searching the web..."})]});if(c&&l&&typeof l=="string"){if(l.startsWith("Error"))return K.jsx("div",{className:"agt-tool agt-tool--error",children:l});const m=l.match(/\*\*Sources:\*\*\s*([\s\S]+?)(?=\n\n|$)/);if(m){const d=[],y=/\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g;let g;for(;(g=y.exec(m[1]))!==null;)d.push({label:g[1],url:g[2]});if(d.length>0)return K.jsxs("div",{className:"agt-tool agt-tool--sources",children:[K.jsx("span",{className:"agt-tool__label",children:"Sources:"}),d.map((_,b)=>K.jsxs("span",{children:[K.jsx("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",children:_.label}),b<d.length-1&&K.jsx("span",{className:"agt-tool__separator",children:"•"})]},b))]})}return null}if(h)return K.jsx("div",{className:"agt-tool agt-tool--error",children:e.errorText||"Search failed"})}if(o==="generateImage"){if(s)return K.jsxs("div",{className:"agt-tool",children:[K.jsx(Mi,{}),K.jsx("span",{children:(i==null?void 0:i.statusText)||"Generating image..."})]});if(c&&l&&typeof l=="string"){if(l.startsWith("Error"))return K.jsx("div",{className:"agt-tool agt-tool--error",children:l});if(l.startsWith("http"))return K.jsx("div",{className:"agt-tool__image",children:K.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:K.jsx("img",{src:l,alt:"Generated image"})})})}}return o==="interpretImage"?s?K.jsxs("div",{className:"agt-tool",children:[K.jsx(Mi,{}),K.jsx("span",{children:(i==null?void 0:i.statusText)||"Analyzing image..."})]}):null:o==="ragLookup"?s?K.jsxs("div",{className:"agt-tool",children:[K.jsx(Mi,{}),K.jsx("span",{children:"Searching documents..."})]}):null:s?K.jsxs("div",{className:"agt-tool",children:[K.jsx(Mi,{}),K.jsx("span",{children:"Processing..."})]}):null}function t4({message:e,isStreaming:n}){const i=e.role==="user",o=e.parts.filter(c=>c.type==="text").map(c=>c.text).join(`
|
|
180
|
+
`),s=e.parts.filter(c=>c.type.startsWith("tool-"));return K.jsx("div",{className:`agt-message ${i?"agt-message--user":"agt-message--assistant"}`,children:K.jsxs("div",{className:"agt-message__content",children:[o?K.jsx(WC,{content:o}):n&&s.length===0?K.jsxs("div",{className:"agt-message__typing",children:[K.jsx("span",{className:"agt-spinner__dot"}),K.jsx("span",{className:"agt-spinner__dot"}),K.jsx("span",{className:"agt-spinner__dot"})]}):null,s.map(c=>K.jsx(e4,{toolPart:c},c.toolCallId))]})})}function n4({messages:e,status:n,isLoading:i,errorMessage:l}){const o=ke.useRef(null);ke.useEffect(()=>{var c;(c=o.current)==null||c.scrollIntoView({behavior:"smooth"})},[e,n]);const s=n==="streaming";return K.jsx("div",{className:"agt-messages",children:K.jsxs("div",{className:"agt-messages__inner",children:[e.map((c,h)=>{const m=c.role==="assistant"&&h===e.length-1;return K.jsx(t4,{message:c,isStreaming:m&&s},c.id)}),i&&n==="submitted"&&K.jsx("div",{className:"agt-message agt-message--assistant",children:K.jsx("div",{className:"agt-message__content",children:K.jsx(Mi,{})})}),l&&K.jsx("div",{className:"agt-message agt-message--assistant",children:K.jsxs("div",{className:"agt-message__content agt-message__content--error",children:[K.jsx(jw,{size:14,style:{flexShrink:0,marginTop:2}}),K.jsx("span",{children:l})]})}),K.jsx("div",{ref:o})]})})}const Wg=ke.forwardRef(({maxRows:e=1,placeholder:n,value:i,onChange:l,onKeyDown:o,autoFocus:s,disabled:c,className:h,style:m,...d},y)=>{const g=ke.useRef(null),[_,b]=ke.useState(0);return ke.useImperativeHandle(y,()=>g.current),ke.useEffect(()=>{const E=g.current;if(E){E.style.height="auto";const k=E.scrollHeight;b(k*e),s&&E.focus()}},[e]),ke.useEffect(()=>{const E=g.current;E&&(E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,_)}px`)},[i,_]),K.jsx("textarea",{ref:g,value:i,onChange:l,onKeyDown:o,placeholder:n,disabled:c,style:{overflow:"auto",resize:"none",maxHeight:`${_}px`,...m},className:h,rows:1,...d})});Wg.displayName="AutoResizingTextarea";function r4({onSubmit:e,isLoading:n,onStop:i,placeholder:l}){const[o,s]=ke.useState(""),c=ke.useRef(null),h=n||o.trim().length>0,m=()=>{var d;n||!o.trim()||(e(o),s(""),(d=c.current)==null||d.focus())};return K.jsx("div",{className:"agt-input",children:K.jsxs("div",{className:"agt-input__container",children:[K.jsx(Wg,{ref:c,placeholder:l||"Type a message...",autoFocus:!0,maxRows:5,value:o,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),h&&m())},className:"agt-input__textarea"}),K.jsx("button",{disabled:!h,onClick:n?i:m,className:"agt-input__send","aria-label":n?"Stop":"Send",children:n?K.jsx(Zw,{size:16}):K.jsx(Rw,{size:16})})]})})}function i4(e){try{const n=e.split("/");return n[n.length-1]||null}catch{return null}}function a4(e){try{return new URL(e).origin}catch{return e.split("/").slice(0,3).join("/")}}function cc({title:e,initialMessage:n,runtimeUrl:i,apiKey:l,uiMode:o="popup",identifier:s,context:c,actions:h,theme:m}){const[d,y]=ke.useState(null),[g,_]=ke.useState("english"),[b,E]=ke.useState(null),k=ke.useMemo(()=>i4(i),[i]),R=ke.useMemo(()=>a4(i),[i]),C=k?`messages-${k}`:"messages",B=k?`widget-open-${k}`:"widget-open",[w,P]=ke.useState(()=>{if(o==="chat")return!0;try{return sessionStorage.getItem(B)==="true"}catch{return!1}});ke.useEffect(()=>{try{sessionStorage.setItem(B,String(w))}catch{}},[w,B]);const F=ys[g]||ys.english,D=n||"Need any help?",[X]=ke.useState(()=>{const he=sessionStorage.getItem(C);if(he)try{const z=JSON.parse(he);if(Array.isArray(z)&&z.length>0)return z}catch{}return[{id:"greeting",role:"assistant",parts:[{type:"text",text:D}]}]}),se=ke.useRef(new Set(X.flatMap(he=>he.parts.filter(z=>z.type.startsWith("tool-")).map(z=>z.toolCallId).filter(Boolean)))),be=ke.useMemo(()=>new Wd({api:i,headers:{authorization:`Bearer ${l}`,"X-Agent-Identifier":s||""},body:{...c?{context:c}:{},...h?{actions:h.map(({name:he,description:z,parameters:A})=>({name:he,description:z,parameters:A}))}:{}}}),[i,l,s,c,h]),{messages:Z,sendMessage:ie,status:ne,stop:ae}=Cw({id:k||"widget",messages:X,transport:be,onError:()=>{E("Agent not available. Please try again.")}});ke.useEffect(()=>{Z.length>0&&sessionStorage.setItem(C,JSON.stringify(Z.map(he=>({id:he.id,role:he.role,parts:he.parts}))))},[Z,C]),ke.useEffect(()=>{if(!(!h||h.length===0)){for(const he of Z)for(const z of he.parts)if(z.type.startsWith("tool-")){const A=z,H=A.toolName||z.type.slice(5);if(console.log("[agentsgt-widget] Tool part detected:",{type:z.type,toolName:H,state:A.state,toolCallId:A.toolCallId,input:A.input}),A.state==="output-available"&&!se.current.has(A.toolCallId)){const x=h.find(te=>te.name===H);if(x){console.log(`[agentsgt-widget] Executing action "${H}"`,A.input),se.current.add(A.toolCallId);try{x.handler(A.input)}catch(te){console.error(`[agentsgt-widget] Action "${x.name}" failed:`,te)}}else console.warn(`[agentsgt-widget] No matching action for "${H}"`)}}}},[Z,h]),ke.useEffect(()=>{Z.length>1&&E(null)},[Z.length]),ke.useEffect(()=>{k&&(async()=>{var he;try{const z=await fetch(`${R}/api/v1/agents/agent/${k}`,{headers:{Authorization:`Bearer ${l}`,"Content-Type":"application/json"}});if(z.ok){const A=await z.json();y(A.data);const H=((he=A.data.language)==null?void 0:he.toLowerCase())||"english",x=Object.keys(ys);_(x.includes(H)?H:"english")}}catch{_("english")}})()},[k,R,l]),ke.useEffect(()=>{m!=null&&m.primaryColor&&document.documentElement.style.setProperty("--agt-primary",m.primaryColor)},[m]);const re=ne==="streaming"||ne==="submitted",fe=ke.useCallback(he=>{E(null),ie({text:he})},[ie]),L=e||(d==null?void 0:d.name)||(F==null?void 0:F.title)||"Assistant",J=(F==null?void 0:F.placeholder)||"Type your message...",ue=K.jsxs("div",{className:"agt-widget",children:[K.jsx(n4,{messages:Z,status:ne,isLoading:re,errorMessage:b}),K.jsx(r4,{onSubmit:fe,isLoading:re,onStop:ae,placeholder:J})]});return o==="chat"?ue:o==="sidebar"?K.jsxs(K.Fragment,{children:[w&&K.jsxs("div",{className:"agt-sidebar",children:[K.jsxs("div",{className:"agt-header",children:[K.jsx("span",{className:"agt-header__title",children:L}),K.jsx("button",{className:"agt-header__btn",onClick:()=>P(!1),"aria-label":"Close",children:K.jsx(am,{size:16})})]}),ue,K.jsx("div",{className:"agt-footer",children:"Powered by AgentsGT"})]}),!w&&K.jsx("button",{className:"agt-trigger",onClick:()=>P(!0),"aria-label":"Open chat",children:K.jsx(im,{size:24})})]}):K.jsxs(K.Fragment,{children:[w&&K.jsxs("div",{className:"agt-popup",children:[K.jsxs("div",{className:"agt-header",children:[K.jsx("span",{className:"agt-header__title",children:L}),K.jsxs("div",{className:"agt-header__actions",children:[K.jsx("button",{className:"agt-header__btn",onClick:()=>P(!1),"aria-label":"Minimize",children:K.jsx(Uw,{size:16})}),K.jsx("button",{className:"agt-header__btn",onClick:()=>P(!1),"aria-label":"Close",children:K.jsx(am,{size:16})})]})]}),ue,K.jsx("div",{className:"agt-footer",children:"Powered by AgentsGT"})]}),!w&&K.jsx("button",{className:"agt-trigger",onClick:()=>P(!0),"aria-label":"Open chat",children:K.jsx(im,{size:24})})]})}function l4(e,n={runtimeUrl:""}){const i=n.basePath||"";return new Promise((l,o)=>{try{const s=document.createElement("link");s.rel="stylesheet",s.href=`${i}/dist/widget.css`,document.head.appendChild(s);const c=document.createElement("script");c.src=`${i}/dist/widget.umd.js`,c.onload=()=>{const h=document.getElementById(e);if(h&&window.AgentSGTWidget){const m=window.AgentSGTWidget.mountApp(h,{title:n.name,initialMessage:n.initialMessage,runtimeUrl:n.runtimeUrl,apiKey:n.apiKey||"",uiMode:n.uiMode,identifier:n.identifier,context:n.context,actions:n.actions,theme:n.theme});l(m)}else o(new Error("Failed to initialize widget"))},c.onerror=h=>o(h),document.body.appendChild(c)}catch(s){o(s)}})}const u4=(e,n)=>{const i=Lh.createRoot(e);return i.render(K.jsx(cc,{...n})),()=>i.unmount()},o4=(e,n,i,l,o)=>{Lh.createRoot(document.getElementById("root")).render(K.jsx(cc,{title:e,initialMessage:n,runtimeUrl:i||"",apiKey:l||"",uiMode:o}))};In.App=cc,In.loadWidget=l4,In.mountApp=u4,In.renderApp=o4,Object.defineProperty(In,Symbol.toStringTag,{value:"Module"})});
|