ss-chatbot-widget 0.0.1

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.
@@ -0,0 +1,177 @@
1
+ (function(){"use strict";function CA(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ac(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zp={exports:{}},kl={};var E0;function AA(){if(E0)return kl;E0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var u=null;if(s!==void 0&&(u=""+s),a.key!==void 0&&(u=""+a.key),"key"in a){s={};for(var f in a)f!=="key"&&(s[f]=a[f])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:u,ref:a!==void 0?a:null,props:s}}return kl.Fragment=t,kl.jsx=n,kl.jsxs=n,kl}var w0;function kA(){return w0||(w0=1,Zp.exports=AA()),Zp.exports}var L=kA(),Kp={exports:{}},Ol={},Wp={exports:{}},Qp={};var _0;function OA(){return _0||(_0=1,(function(e){function t(D,Y){var re=D.length;D.push(Y);e:for(;0<re;){var ae=re-1>>>1,B=D[ae];if(0<a(B,Y))D[ae]=Y,D[re]=B,re=ae;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Y=D[0],re=D.pop();if(re!==Y){D[0]=re;e:for(var ae=0,B=D.length,P=B>>>1;ae<P;){var W=2*(ae+1)-1,M=D[W],fe=W+1,ge=D[fe];if(0>a(M,re))fe<B&&0>a(ge,M)?(D[ae]=ge,D[fe]=re,ae=fe):(D[ae]=M,D[W]=re,ae=W);else if(fe<B&&0>a(ge,re))D[ae]=ge,D[fe]=re,ae=fe;else break e}}return Y}function a(D,Y){var re=D.sortIndex-Y.sortIndex;return re!==0?re:D.id-Y.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 u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,b=3,v=!1,E=!1,S=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(D){for(var Y=n(p);Y!==null;){if(Y.callback===null)r(p);else if(Y.startTime<=D)r(p),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(p)}}function N(D){if(S=!1,C(D),!E)if(n(d)!==null)E=!0,k||(k=!0,A());else{var Y=n(p);Y!==null&&U(N,Y.startTime-D)}}var k=!1,z=-1,H=5,j=-1;function G(){return w?!0:!(e.unstable_now()-j<H)}function F(){if(w=!1,k){var D=e.unstable_now();j=D;var Y=!0;try{e:{E=!1,S&&(S=!1,O(z),z=-1),v=!0;var re=b;try{t:{for(C(D),y=n(d);y!==null&&!(y.expirationTime>D&&G());){var ae=y.callback;if(typeof ae=="function"){y.callback=null,b=y.priorityLevel;var B=ae(y.expirationTime<=D);if(D=e.unstable_now(),typeof B=="function"){y.callback=B,C(D),Y=!0;break t}y===n(d)&&r(d),C(D)}else r(d);y=n(d)}if(y!==null)Y=!0;else{var P=n(p);P!==null&&U(N,P.startTime-D),Y=!1}}break e}finally{y=null,b=re,v=!1}Y=void 0}}finally{Y?A():k=!1}}}var A;if(typeof T=="function")A=function(){T(F)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,$=X.port2;X.port1.onmessage=F,A=function(){$.postMessage(null)}}else A=function(){_(F,0)};function U(D,Y){z=_(function(){D(e.unstable_now())},Y)}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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var Y=3;break;default:Y=b}var re=b;b=Y;try{return D()}finally{b=re}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(D,Y){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var re=b;b=D;try{return Y()}finally{b=re}},e.unstable_scheduleCallback=function(D,Y,re){var ae=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?ae+re:ae):re=ae,D){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=re+B,D={id:m++,callback:Y,priorityLevel:D,startTime:re,expirationTime:B,sortIndex:-1},re>ae?(D.sortIndex=re,t(p,D),n(d)===null&&D===n(p)&&(S?(O(z),z=-1):S=!0,U(N,re-ae))):(D.sortIndex=B,t(d,D),E||v||(E=!0,k||(k=!0,A()))),D},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(D){var Y=b;return function(){var re=b;b=Y;try{return D.apply(this,arguments)}finally{b=re}}}})(Qp)),Qp}var T0;function RA(){return T0||(T0=1,Wp.exports=OA()),Wp.exports}var Jp={exports:{}},Ke={};var C0;function NA(){if(C0)return Ke;C0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=b&&P[b]||P["@@iterator"],typeof P=="function"?P:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function _(P,W,M){this.props=P,this.context=W,this.refs=w,this.updater=M||E}_.prototype.isReactComponent={},_.prototype.setState=function(P,W){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,W,"setState")},_.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function O(){}O.prototype=_.prototype;function T(P,W,M){this.props=P,this.context=W,this.refs=w,this.updater=M||E}var C=T.prototype=new O;C.constructor=T,S(C,_.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function k(){}var z={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function j(P,W,M){var fe=M.ref;return{$$typeof:e,type:P,key:W,ref:fe!==void 0?fe:null,props:M}}function G(P,W){return j(P.type,W,P.props)}function F(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function A(P){var W={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(M){return W[M]})}var X=/\/+/g;function $(P,W){return typeof P=="object"&&P!==null&&P.key!=null?A(""+P.key):W.toString(36)}function U(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(k,k):(P.status="pending",P.then(function(W){P.status==="pending"&&(P.status="fulfilled",P.value=W)},function(W){P.status==="pending"&&(P.status="rejected",P.reason=W)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function D(P,W,M,fe,ge){var ye=typeof P;(ye==="undefined"||ye==="boolean")&&(P=null);var Se=!1;if(P===null)Se=!0;else switch(ye){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(P.$$typeof){case e:case t:Se=!0;break;case m:return Se=P._init,D(Se(P._payload),W,M,fe,ge)}}if(Se)return ge=ge(P),Se=fe===""?"."+$(P,0):fe,N(ge)?(M="",Se!=null&&(M=Se.replace(X,"$&/")+"/"),D(ge,W,M,"",function(Me){return Me})):ge!=null&&(F(ge)&&(ge=G(ge,M+(ge.key==null||P&&P.key===ge.key?"":(""+ge.key).replace(X,"$&/")+"/")+Se)),W.push(ge)),1;Se=0;var $e=fe===""?".":fe+":";if(N(P))for(var Ae=0;Ae<P.length;Ae++)fe=P[Ae],ye=$e+$(fe,Ae),Se+=D(fe,W,M,ye,ge);else if(Ae=v(P),typeof Ae=="function")for(P=Ae.call(P),Ae=0;!(fe=P.next()).done;)fe=fe.value,ye=$e+$(fe,Ae++),Se+=D(fe,W,M,ye,ge);else if(ye==="object"){if(typeof P.then=="function")return D(U(P),W,M,fe,ge);throw W=String(P),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Se}function Y(P,W,M){if(P==null)return P;var fe=[],ge=0;return D(P,fe,"","",function(ye){return W.call(M,ye,ge++)}),fe}function re(P){if(P._status===-1){var W=P._result;W=W(),W.then(function(M){(P._status===0||P._status===-1)&&(P._status=1,P._result=M)},function(M){(P._status===0||P._status===-1)&&(P._status=2,P._result=M)}),P._status===-1&&(P._status=0,P._result=W)}if(P._status===1)return P._result.default;throw P._result}var ae=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},B={map:Y,forEach:function(P,W,M){Y(P,function(){W.apply(this,arguments)},M)},count:function(P){var W=0;return Y(P,function(){W++}),W},toArray:function(P){return Y(P,function(W){return W})||[]},only:function(P){if(!F(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ke.Activity=y,Ke.Children=B,Ke.Component=_,Ke.Fragment=n,Ke.Profiler=a,Ke.PureComponent=T,Ke.StrictMode=r,Ke.Suspense=d,Ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Ke.__COMPILER_RUNTIME={__proto__:null,c:function(P){return z.H.useMemoCache(P)}},Ke.cache=function(P){return function(){return P.apply(null,arguments)}},Ke.cacheSignal=function(){return null},Ke.cloneElement=function(P,W,M){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var fe=S({},P.props),ge=P.key;if(W!=null)for(ye in W.key!==void 0&&(ge=""+W.key),W)!H.call(W,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&W.ref===void 0||(fe[ye]=W[ye]);var ye=arguments.length-2;if(ye===1)fe.children=M;else if(1<ye){for(var Se=Array(ye),$e=0;$e<ye;$e++)Se[$e]=arguments[$e+2];fe.children=Se}return j(P.type,ge,fe)},Ke.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:s,_context:P},P},Ke.createElement=function(P,W,M){var fe,ge={},ye=null;if(W!=null)for(fe in W.key!==void 0&&(ye=""+W.key),W)H.call(W,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(ge[fe]=W[fe]);var Se=arguments.length-2;if(Se===1)ge.children=M;else if(1<Se){for(var $e=Array(Se),Ae=0;Ae<Se;Ae++)$e[Ae]=arguments[Ae+2];ge.children=$e}if(P&&P.defaultProps)for(fe in Se=P.defaultProps,Se)ge[fe]===void 0&&(ge[fe]=Se[fe]);return j(P,ye,ge)},Ke.createRef=function(){return{current:null}},Ke.forwardRef=function(P){return{$$typeof:f,render:P}},Ke.isValidElement=F,Ke.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:re}},Ke.memo=function(P,W){return{$$typeof:p,type:P,compare:W===void 0?null:W}},Ke.startTransition=function(P){var W=z.T,M={};z.T=M;try{var fe=P(),ge=z.S;ge!==null&&ge(M,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(k,ae)}catch(ye){ae(ye)}finally{W!==null&&M.types!==null&&(W.types=M.types),z.T=W}},Ke.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Ke.use=function(P){return z.H.use(P)},Ke.useActionState=function(P,W,M){return z.H.useActionState(P,W,M)},Ke.useCallback=function(P,W){return z.H.useCallback(P,W)},Ke.useContext=function(P){return z.H.useContext(P)},Ke.useDebugValue=function(){},Ke.useDeferredValue=function(P,W){return z.H.useDeferredValue(P,W)},Ke.useEffect=function(P,W){return z.H.useEffect(P,W)},Ke.useEffectEvent=function(P){return z.H.useEffectEvent(P)},Ke.useId=function(){return z.H.useId()},Ke.useImperativeHandle=function(P,W,M){return z.H.useImperativeHandle(P,W,M)},Ke.useInsertionEffect=function(P,W){return z.H.useInsertionEffect(P,W)},Ke.useLayoutEffect=function(P,W){return z.H.useLayoutEffect(P,W)},Ke.useMemo=function(P,W){return z.H.useMemo(P,W)},Ke.useOptimistic=function(P,W){return z.H.useOptimistic(P,W)},Ke.useReducer=function(P,W,M){return z.H.useReducer(P,W,M)},Ke.useRef=function(P){return z.H.useRef(P)},Ke.useState=function(P){return z.H.useState(P)},Ke.useSyncExternalStore=function(P,W,M){return z.H.useSyncExternalStore(P,W,M)},Ke.useTransition=function(){return z.H.useTransition()},Ke.version="19.2.4",Ke}var A0;function eh(){return A0||(A0=1,Jp.exports=NA()),Jp.exports}var th={exports:{}},Zn={};var k0;function IA(){if(k0)return Zn;k0=1;var e=eh();function t(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:p,implementation:m}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Zn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Zn.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return s(d,p,null,m)},Zn.flushSync=function(d){var p=u.T,m=r.p;try{if(u.T=null,r.p=2,d)return d()}finally{u.T=p,r.p=m,r.d.f()}},Zn.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(d,p))},Zn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Zn.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?r.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Zn.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(d)},Zn.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin);r.d.L(d,m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Zn.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=f(p.as,p.crossOrigin);r.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(d)},Zn.requestFormReset=function(d){r.d.r(d)},Zn.unstable_batchedUpdates=function(d,p){return d(p)},Zn.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},Zn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Zn.version="19.2.4",Zn}var O0;function R0(){if(O0)return th.exports;O0=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(t){console.error(t)}}return e(),th.exports=IA(),th.exports}var N0;function MA(){if(N0)return Ol;N0=1;var e=RA(),t=eh(),n=R0();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function u(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function f(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(s(i)!==i)throw Error(r(188))}function p(i){var o=i.alternate;if(!o){if(o=s(i),o===null)throw Error(r(188));return o!==i?null:i}for(var l=i,c=o;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return d(h),i;if(g===c)return d(h),o;g=g.sibling}throw Error(r(188))}if(l.return!==c.return)l=h,c=g;else{for(var x=!1,R=h.child;R;){if(R===l){x=!0,l=h,c=g;break}if(R===c){x=!0,c=h,l=g;break}R=R.sibling}if(!x){for(R=g.child;R;){if(R===l){x=!0,l=g,c=h;break}if(R===c){x=!0,c=g,l=h;break}R=R.sibling}if(!x)throw Error(r(189))}}if(l.alternate!==c)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?i:o}function m(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=m(i),o!==null)return o;i=i.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function A(i){return i===null||typeof i!="object"?null:(i=F&&i[F]||i["@@iterator"],typeof i=="function"?i:null)}var X=Symbol.for("react.client.reference");function $(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===X?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case _:return"Profiler";case w:return"StrictMode";case N:return"Suspense";case k:return"SuspenseList";case j:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case T:return i.displayName||"Context";case O:return(i._context.displayName||"Context")+".Consumer";case C:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case z:return o=i.displayName||null,o!==null?o:$(i.type)||"Memo";case H:o=i._payload,i=i._init;try{return $(i(o))}catch{}}return null}var U=Array.isArray,D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ae=[],B=-1;function P(i){return{current:i}}function W(i){0>B||(i.current=ae[B],ae[B]=null,B--)}function M(i,o){B++,ae[B]=i.current,i.current=o}var fe=P(null),ge=P(null),ye=P(null),Se=P(null);function $e(i,o){switch(M(ye,o),M(ge,i),M(fe,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?Z2(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=Z2(o),i=K2(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}W(fe),M(fe,i)}function Ae(){W(fe),W(ge),W(ye)}function Me(i){i.memoizedState!==null&&M(Se,i);var o=fe.current,l=K2(o,i.type);o!==l&&(M(ge,i),M(fe,l))}function Ue(i){ge.current===i&&(W(fe),W(ge)),Se.current===i&&(W(Se),wc._currentValue=re)}var Xe,Xt;function Oe(i){if(Xe===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);Xe=o&&o[1]||"",Xt=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Xe+i+Xt}var Ge=!1;function Dt(i,o){if(!i||Ge)return"";Ge=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(o){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ne){var ee=ne}Reflect.construct(i,[],ce)}else{try{ce.call()}catch(ne){ee=ne}i.call(ce.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(ce=i())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),x=g[0],R=g[1];if(x&&R){var V=x.split(`
4
+ `),J=R.split(`
5
+ `);for(h=c=0;c<V.length&&!V[c].includes("DetermineComponentFrameRoot");)c++;for(;h<J.length&&!J[h].includes("DetermineComponentFrameRoot");)h++;if(c===V.length||h===J.length)for(c=V.length-1,h=J.length-1;1<=c&&0<=h&&V[c]!==J[h];)h--;for(;1<=c&&0<=h;c--,h--)if(V[c]!==J[h]){if(c!==1||h!==1)do if(c--,h--,0>h||V[c]!==J[h]){var oe=`
6
+ `+V[c].replace(" at new "," at ");return i.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",i.displayName)),oe}while(1<=c&&0<=h);break}}}finally{Ge=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Oe(l):""}function Rt(i,o){switch(i.tag){case 26:case 27:case 5:return Oe(i.type);case 16:return Oe("Lazy");case 13:return i.child!==o&&o!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return Dt(i.type,!1);case 11:return Dt(i.type.render,!1);case 1:return Dt(i.type,!0);case 31:return Oe("Activity");default:return""}}function ht(i){try{var o="",l=null;do o+=Rt(i,l),l=i,i=i.return;while(i);return o}catch(c){return`
7
+ Error generating stack: `+c.message+`
8
+ `+c.stack}}var ut=Object.prototype.hasOwnProperty,mt=e.unstable_scheduleCallback,ot=e.unstable_cancelCallback,ke=e.unstable_shouldYield,Bn=e.unstable_requestPaint,We=e.unstable_now,tr=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,se=e.unstable_UserBlockingPriority,xe=e.unstable_NormalPriority,Re=e.unstable_LowPriority,Ze=e.unstable_IdlePriority,je=e.log,en=e.unstable_setDisableYieldValue,Bt=null,$t=null;function Pn(i){if(typeof je=="function"&&en(i),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(Bt,i)}catch{}}var gt=Math.clz32?Math.clz32:wn,Te=Math.log,Je=Math.LN2;function wn(i){return i>>>=0,i===0?32:31-(Te(i)/Je|0)|0}var Mr=256,no=262144,Hs=4194304;function ro(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Vs(i,o,l){var c=i.pendingLanes;if(c===0)return 0;var h=0,g=i.suspendedLanes,x=i.pingedLanes;i=i.warmLanes;var R=c&134217727;return R!==0?(c=R&~g,c!==0?h=ro(c):(x&=R,x!==0?h=ro(x):l||(l=R&~i,l!==0&&(h=ro(l))))):(R=c&~g,R!==0?h=ro(R):x!==0?h=ro(x):l||(l=c&~i,l!==0&&(h=ro(l)))),h===0?0:o!==0&&o!==h&&(o&g)===0&&(g=h&-h,l=o&-o,g>=l||g===32&&(l&4194048)!==0)?o:h}function Ba(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function cy(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 et(){var i=Hs;return Hs<<=1,(Hs&62914560)===0&&(Hs=4194304),i}function Qr(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function Lu(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function tj(i,o,l,c,h,g){var x=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var R=i.entanglements,V=i.expirationTimes,J=i.hiddenUpdates;for(l=x&~l;0<l;){var oe=31-gt(l),ce=1<<oe;R[oe]=0,V[oe]=-1;var ee=J[oe];if(ee!==null)for(J[oe]=null,oe=0;oe<ee.length;oe++){var ne=ee[oe];ne!==null&&(ne.lane&=-536870913)}l&=~ce}c!==0&&N_(i,c,0),g!==0&&h===0&&i.tag!==0&&(i.suspendedLanes|=g&~(x&~o))}function N_(i,o,l){i.pendingLanes|=o,i.suspendedLanes&=~o;var c=31-gt(o);i.entangledLanes|=o,i.entanglements[c]=i.entanglements[c]|1073741824|l&261930}function I_(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var c=31-gt(l),h=1<<c;h&o|i[c]&o&&(i[c]|=o),l&=~h}}function M_(i,o){var l=o&-o;return l=(l&42)!==0?1:fy(l),(l&(i.suspendedLanes|o))!==0?0:l}function fy(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function dy(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function D_(){var i=Y.p;return i!==0?i:(i=window.event,i===void 0?32:bA(i.type))}function B_(i,o){var l=Y.p;try{return Y.p=i,o()}finally{Y.p=l}}var Uo=Math.random().toString(36).slice(2),Fn="__reactFiber$"+Uo,mr="__reactProps$"+Uo,Fs="__reactContainer$"+Uo,py="__reactEvents$"+Uo,nj="__reactListeners$"+Uo,rj="__reactHandles$"+Uo,z_="__reactResources$"+Uo,Pu="__reactMarker$"+Uo;function hy(i){delete i[Fn],delete i[mr],delete i[py],delete i[nj],delete i[rj]}function qs(i){var o=i[Fn];if(o)return o;for(var l=i.parentNode;l;){if(o=l[Fs]||l[Fn]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=rA(i);i!==null;){if(l=i[Fn])return l;i=rA(i)}return o}i=l,l=i.parentNode}return null}function Gs(i){if(i=i[Fn]||i[Fs]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function $u(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Ys(i){var o=i[z_];return o||(o=i[z_]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function $n(i){i[Pu]=!0}var L_=new Set,P_={};function za(i,o){Xs(i,o),Xs(i+"Capture",o)}function Xs(i,o){for(P_[i]=o,i=0;i<o.length;i++)L_.add(o[i])}var ij=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]*$"),$_={},U_={};function oj(i){return ut.call(U_,i)?!0:ut.call($_,i)?!1:ij.test(i)?U_[i]=!0:($_[i]=!0,!1)}function Ld(i,o,l){if(oj(o))if(l===null)i.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var c=o.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+l)}}function Pd(i,o,l){if(l===null)i.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+l)}}function io(i,o,l,c){if(c===null)i.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(o,l,""+c)}}function Jr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function j_(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function aj(i,o,l){var c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,g=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return h.call(this)},set:function(x){l=""+x,g.call(this,x)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function my(i){if(!i._valueTracker){var o=j_(i)?"checked":"value";i._valueTracker=aj(i,o,""+i[o])}}function H_(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),c="";return i&&(c=j_(i)?i.checked?"true":"false":i.value),i=c,i!==l?(o.setValue(i),!0):!1}function $d(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var sj=/[\n"\\]/g;function ei(i){return i.replace(sj,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function gy(i,o,l,c,h,g,x,R){i.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.type=x:i.removeAttribute("type"),o!=null?x==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Jr(o)):i.value!==""+Jr(o)&&(i.value=""+Jr(o)):x!=="submit"&&x!=="reset"||i.removeAttribute("value"),o!=null?yy(i,x,Jr(o)):l!=null?yy(i,x,Jr(l)):c!=null&&i.removeAttribute("value"),h==null&&g!=null&&(i.defaultChecked=!!g),h!=null&&(i.checked=h&&typeof h!="function"&&typeof h!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?i.name=""+Jr(R):i.removeAttribute("name")}function V_(i,o,l,c,h,g,x,R){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(i.type=g),o!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||o!=null)){my(i);return}l=l!=null?""+Jr(l):"",o=o!=null?""+Jr(o):l,R||o===i.value||(i.value=o),i.defaultValue=o}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,i.checked=R?i.checked:!!c,i.defaultChecked=!!c,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.name=x),my(i)}function yy(i,o,l){o==="number"&&$d(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function Zs(i,o,l,c){if(i=i.options,o){o={};for(var h=0;h<l.length;h++)o["$"+l[h]]=!0;for(l=0;l<i.length;l++)h=o.hasOwnProperty("$"+i[l].value),i[l].selected!==h&&(i[l].selected=h),h&&c&&(i[l].defaultSelected=!0)}else{for(l=""+Jr(l),o=null,h=0;h<i.length;h++){if(i[h].value===l){i[h].selected=!0,c&&(i[h].defaultSelected=!0);return}o!==null||i[h].disabled||(o=i[h])}o!==null&&(o.selected=!0)}}function F_(i,o,l){if(o!=null&&(o=""+Jr(o),o!==i.value&&(i.value=o),l==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=l!=null?""+Jr(l):""}function q_(i,o,l,c){if(o==null){if(c!=null){if(l!=null)throw Error(r(92));if(U(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),o=l}l=Jr(o),i.defaultValue=l,c=i.textContent,c===l&&c!==""&&c!==null&&(i.value=c),my(i)}function Ks(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var lj=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 G_(i,o,l){var c=o.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":c?i.setProperty(o,l):typeof l!="number"||l===0||lj.has(o)?o==="float"?i.cssFloat=l:i[o]=(""+l).trim():i[o]=l+"px"}function Y_(i,o,l){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||o!=null&&o.hasOwnProperty(c)||(c.indexOf("--")===0?i.setProperty(c,""):c==="float"?i.cssFloat="":i[c]="");for(var h in o)c=o[h],o.hasOwnProperty(h)&&l[h]!==c&&G_(i,h,c)}else for(var g in o)o.hasOwnProperty(g)&&G_(i,g,o[g])}function vy(i){if(i.indexOf("-")===-1)return!1;switch(i){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 uj=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"]]),cj=/^[\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 Ud(i){return cj.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function oo(){}var by=null;function Sy(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ws=null,Qs=null;function X_(i){var o=Gs(i);if(o&&(i=o.stateNode)){var l=i[mr]||null;e:switch(i=o.stateNode,o.type){case"input":if(gy(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ei(""+o)+'"][type="radio"]'),o=0;o<l.length;o++){var c=l[o];if(c!==i&&c.form===i.form){var h=c[mr]||null;if(!h)throw Error(r(90));gy(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(o=0;o<l.length;o++)c=l[o],c.form===i.form&&H_(c)}break e;case"textarea":F_(i,l.value,l.defaultValue);break e;case"select":o=l.value,o!=null&&Zs(i,!!l.multiple,o,!1)}}}var xy=!1;function Z_(i,o,l){if(xy)return i(o,l);xy=!0;try{var c=i(o);return c}finally{if(xy=!1,(Ws!==null||Qs!==null)&&(Ap(),Ws&&(o=Ws,i=Qs,Qs=Ws=null,X_(o),i)))for(o=0;o<i.length;o++)X_(i[o])}}function Uu(i,o){var l=i.stateNode;if(l===null)return null;var c=l[mr]||null;if(c===null)return null;l=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(i=i.type,c=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!c;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(r(231,o,typeof l));return l}var ao=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ey=!1;if(ao)try{var ju={};Object.defineProperty(ju,"passive",{get:function(){Ey=!0}}),window.addEventListener("test",ju,ju),window.removeEventListener("test",ju,ju)}catch{Ey=!1}var jo=null,wy=null,jd=null;function K_(){if(jd)return jd;var i,o=wy,l=o.length,c,h="value"in jo?jo.value:jo.textContent,g=h.length;for(i=0;i<l&&o[i]===h[i];i++);var x=l-i;for(c=1;c<=x&&o[l-c]===h[g-c];c++);return jd=h.slice(i,1<c?1-c:void 0)}function Hd(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Vd(){return!0}function W_(){return!1}function gr(i){function o(l,c,h,g,x){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(g):g[R]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Vd:W_,this.isPropagationStopped=W_,this}return y(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Vd)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Vd)},persist:function(){},isPersistent:Vd}),o}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fd=gr(La),Hu=y({},La,{view:0,detail:0}),fj=gr(Hu),_y,Ty,Vu,qd=y({},Hu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ay,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Vu&&(Vu&&i.type==="mousemove"?(_y=i.screenX-Vu.screenX,Ty=i.screenY-Vu.screenY):Ty=_y=0,Vu=i),_y)},movementY:function(i){return"movementY"in i?i.movementY:Ty}}),Q_=gr(qd),dj=y({},qd,{dataTransfer:0}),pj=gr(dj),hj=y({},Hu,{relatedTarget:0}),Cy=gr(hj),mj=y({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),gj=gr(mj),yj=y({},La,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),vj=gr(yj),bj=y({},La,{data:0}),J_=gr(bj),Sj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xj={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"},Ej={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wj(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=Ej[i])?!!o[i]:!1}function Ay(){return wj}var _j=y({},Hu,{key:function(i){if(i.key){var o=Sj[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Hd(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?xj[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ay,charCode:function(i){return i.type==="keypress"?Hd(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Hd(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Tj=gr(_j),Cj=y({},qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eT=gr(Cj),Aj=y({},Hu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ay}),kj=gr(Aj),Oj=y({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rj=gr(Oj),Nj=y({},qd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),Ij=gr(Nj),Mj=y({},La,{newState:0,oldState:0}),Dj=gr(Mj),Bj=[9,13,27,32],ky=ao&&"CompositionEvent"in window,Fu=null;ao&&"documentMode"in document&&(Fu=document.documentMode);var zj=ao&&"TextEvent"in window&&!Fu,tT=ao&&(!ky||Fu&&8<Fu&&11>=Fu),nT=" ",rT=!1;function iT(i,o){switch(i){case"keyup":return Bj.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oT(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Js=!1;function Lj(i,o){switch(i){case"compositionend":return oT(o);case"keypress":return o.which!==32?null:(rT=!0,nT);case"textInput":return i=o.data,i===nT&&rT?null:i;default:return null}}function Pj(i,o){if(Js)return i==="compositionend"||!ky&&iT(i,o)?(i=K_(),jd=wy=jo=null,Js=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return tT&&o.locale!=="ko"?null:o.data;default:return null}}var $j={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 aT(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!$j[i.type]:o==="textarea"}function sT(i,o,l,c){Ws?Qs?Qs.push(c):Qs=[c]:Ws=c,o=Dp(o,"onChange"),0<o.length&&(l=new Fd("onChange","change",null,l,c),i.push({event:l,listeners:o}))}var qu=null,Gu=null;function Uj(i){V2(i,0)}function Gd(i){var o=$u(i);if(H_(o))return i}function lT(i,o){if(i==="change")return o}var uT=!1;if(ao){var Oy;if(ao){var Ry="oninput"in document;if(!Ry){var cT=document.createElement("div");cT.setAttribute("oninput","return;"),Ry=typeof cT.oninput=="function"}Oy=Ry}else Oy=!1;uT=Oy&&(!document.documentMode||9<document.documentMode)}function fT(){qu&&(qu.detachEvent("onpropertychange",dT),Gu=qu=null)}function dT(i){if(i.propertyName==="value"&&Gd(Gu)){var o=[];sT(o,Gu,i,Sy(i)),Z_(Uj,o)}}function jj(i,o,l){i==="focusin"?(fT(),qu=o,Gu=l,qu.attachEvent("onpropertychange",dT)):i==="focusout"&&fT()}function Hj(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Gd(Gu)}function Vj(i,o){if(i==="click")return Gd(o)}function Fj(i,o){if(i==="input"||i==="change")return Gd(o)}function qj(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Dr=typeof Object.is=="function"?Object.is:qj;function Yu(i,o){if(Dr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),c=Object.keys(o);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];if(!ut.call(o,h)||!Dr(i[h],o[h]))return!1}return!0}function pT(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function hT(i,o){var l=pT(i);i=0;for(var c;l;){if(l.nodeType===3){if(c=i+l.textContent.length,i<=o&&c>=o)return{node:l,offset:o-i};i=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=pT(l)}}function mT(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?mT(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function gT(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=$d(i.document);o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)i=o.contentWindow;else break;o=$d(i.document)}return o}function Ny(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var Gj=ao&&"documentMode"in document&&11>=document.documentMode,el=null,Iy=null,Xu=null,My=!1;function yT(i,o,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;My||el==null||el!==$d(c)||(c=el,"selectionStart"in c&&Ny(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Xu&&Yu(Xu,c)||(Xu=c,c=Dp(Iy,"onSelect"),0<c.length&&(o=new Fd("onSelect","select",null,o,l),i.push({event:o,listeners:c}),o.target=el)))}function Pa(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var tl={animationend:Pa("Animation","AnimationEnd"),animationiteration:Pa("Animation","AnimationIteration"),animationstart:Pa("Animation","AnimationStart"),transitionrun:Pa("Transition","TransitionRun"),transitionstart:Pa("Transition","TransitionStart"),transitioncancel:Pa("Transition","TransitionCancel"),transitionend:Pa("Transition","TransitionEnd")},Dy={},vT={};ao&&(vT=document.createElement("div").style,"AnimationEvent"in window||(delete tl.animationend.animation,delete tl.animationiteration.animation,delete tl.animationstart.animation),"TransitionEvent"in window||delete tl.transitionend.transition);function $a(i){if(Dy[i])return Dy[i];if(!tl[i])return i;var o=tl[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in vT)return Dy[i]=o[l];return i}var bT=$a("animationend"),ST=$a("animationiteration"),xT=$a("animationstart"),Yj=$a("transitionrun"),Xj=$a("transitionstart"),Zj=$a("transitioncancel"),ET=$a("transitionend"),wT=new Map,By="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(" ");By.push("scrollEnd");function yi(i,o){wT.set(i,o),za(o,[i])}var Yd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ti=[],nl=0,zy=0;function Xd(){for(var i=nl,o=zy=nl=0;o<i;){var l=ti[o];ti[o++]=null;var c=ti[o];ti[o++]=null;var h=ti[o];ti[o++]=null;var g=ti[o];if(ti[o++]=null,c!==null&&h!==null){var x=c.pending;x===null?h.next=h:(h.next=x.next,x.next=h),c.pending=h}g!==0&&_T(l,h,g)}}function Zd(i,o,l,c){ti[nl++]=i,ti[nl++]=o,ti[nl++]=l,ti[nl++]=c,zy|=c,i.lanes|=c,i=i.alternate,i!==null&&(i.lanes|=c)}function Ly(i,o,l,c){return Zd(i,o,l,c),Kd(i)}function Ua(i,o){return Zd(i,null,null,o),Kd(i)}function _T(i,o,l){i.lanes|=l;var c=i.alternate;c!==null&&(c.lanes|=l);for(var h=!1,g=i.return;g!==null;)g.childLanes|=l,c=g.alternate,c!==null&&(c.childLanes|=l),g.tag===22&&(i=g.stateNode,i===null||i._visibility&1||(h=!0)),i=g,g=g.return;return i.tag===3?(g=i.stateNode,h&&o!==null&&(h=31-gt(l),i=g.hiddenUpdates,c=i[h],c===null?i[h]=[o]:c.push(o),o.lane=l|536870912),g):null}function Kd(i){if(50<gc)throw gc=0,Gv=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var rl={};function Kj(i,o,l,c){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(i,o,l,c){return new Kj(i,o,l,c)}function Py(i){return i=i.prototype,!(!i||!i.isReactComponent)}function so(i,o){var l=i.alternate;return l===null?(l=Br(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function TT(i,o){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,o=l.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Wd(i,o,l,c,h,g){var x=0;if(c=i,typeof i=="function")Py(i)&&(x=1);else if(typeof i=="string")x=t7(i,l,fe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case j:return i=Br(31,l,o,h),i.elementType=j,i.lanes=g,i;case S:return ja(l.children,h,g,o);case w:x=8,h|=24;break;case _:return i=Br(12,l,o,h|2),i.elementType=_,i.lanes=g,i;case N:return i=Br(13,l,o,h),i.elementType=N,i.lanes=g,i;case k:return i=Br(19,l,o,h),i.elementType=k,i.lanes=g,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:x=10;break e;case O:x=9;break e;case C:x=11;break e;case z:x=14;break e;case H:x=16,c=null;break e}x=29,l=Error(r(130,i===null?"null":typeof i,"")),c=null}return o=Br(x,l,o,h),o.elementType=i,o.type=c,o.lanes=g,o}function ja(i,o,l,c){return i=Br(7,i,c,o),i.lanes=l,i}function $y(i,o,l){return i=Br(6,i,null,o),i.lanes=l,i}function CT(i){var o=Br(18,null,null,0);return o.stateNode=i,o}function Uy(i,o,l){return o=Br(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var AT=new WeakMap;function ni(i,o){if(typeof i=="object"&&i!==null){var l=AT.get(i);return l!==void 0?l:(o={value:i,source:o,stack:ht(o)},AT.set(i,o),o)}return{value:i,source:o,stack:ht(o)}}var il=[],ol=0,Qd=null,Zu=0,ri=[],ii=0,Ho=null,Pi=1,$i="";function lo(i,o){il[ol++]=Zu,il[ol++]=Qd,Qd=i,Zu=o}function kT(i,o,l){ri[ii++]=Pi,ri[ii++]=$i,ri[ii++]=Ho,Ho=i;var c=Pi;i=$i;var h=32-gt(c)-1;c&=~(1<<h),l+=1;var g=32-gt(o)+h;if(30<g){var x=h-h%5;g=(c&(1<<x)-1).toString(32),c>>=x,h-=x,Pi=1<<32-gt(o)+h|l<<h|c,$i=g+i}else Pi=1<<g|l<<h|c,$i=i}function jy(i){i.return!==null&&(lo(i,1),kT(i,1,0))}function Hy(i){for(;i===Qd;)Qd=il[--ol],il[ol]=null,Zu=il[--ol],il[ol]=null;for(;i===Ho;)Ho=ri[--ii],ri[ii]=null,$i=ri[--ii],ri[ii]=null,Pi=ri[--ii],ri[ii]=null}function OT(i,o){ri[ii++]=Pi,ri[ii++]=$i,ri[ii++]=Ho,Pi=o.id,$i=o.overflow,Ho=i}var qn=null,tn=null,pt=!1,Vo=null,oi=!1,Vy=Error(r(519));function Fo(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ku(ni(o,i)),Vy}function RT(i){var o=i.stateNode,l=i.type,c=i.memoizedProps;switch(o[Fn]=i,o[mr]=c,l){case"dialog":st("cancel",o),st("close",o);break;case"iframe":case"object":case"embed":st("load",o);break;case"video":case"audio":for(l=0;l<vc.length;l++)st(vc[l],o);break;case"source":st("error",o);break;case"img":case"image":case"link":st("error",o),st("load",o);break;case"details":st("toggle",o);break;case"input":st("invalid",o),V_(o,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":st("invalid",o);break;case"textarea":st("invalid",o),q_(o,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||o.textContent===""+l||c.suppressHydrationWarning===!0||Y2(o.textContent,l)?(c.popover!=null&&(st("beforetoggle",o),st("toggle",o)),c.onScroll!=null&&st("scroll",o),c.onScrollEnd!=null&&st("scrollend",o),c.onClick!=null&&(o.onclick=oo),o=!0):o=!1,o||Fo(i,!0)}function NT(i){for(qn=i.return;qn;)switch(qn.tag){case 5:case 31:case 13:oi=!1;return;case 27:case 3:oi=!0;return;default:qn=qn.return}}function al(i){if(i!==qn)return!1;if(!pt)return NT(i),pt=!0,!1;var o=i.tag,l;if((l=o!==3&&o!==27)&&((l=o===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||s0(i.type,i.memoizedProps)),l=!l),l&&tn&&Fo(i),NT(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));tn=nA(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));tn=nA(i)}else o===27?(o=tn,ia(i.type)?(i=d0,d0=null,tn=i):tn=o):tn=qn?si(i.stateNode.nextSibling):null;return!0}function Ha(){tn=qn=null,pt=!1}function Fy(){var i=Vo;return i!==null&&(Sr===null?Sr=i:Sr.push.apply(Sr,i),Vo=null),i}function Ku(i){Vo===null?Vo=[i]:Vo.push(i)}var qy=P(null),Va=null,uo=null;function qo(i,o,l){M(qy,o._currentValue),o._currentValue=l}function co(i){i._currentValue=qy.current,W(qy)}function Gy(i,o,l){for(;i!==null;){var c=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),i===l)break;i=i.return}}function Yy(i,o,l,c){var h=i.child;for(h!==null&&(h.return=i);h!==null;){var g=h.dependencies;if(g!==null){var x=h.child;g=g.firstContext;e:for(;g!==null;){var R=g;g=h;for(var V=0;V<o.length;V++)if(R.context===o[V]){g.lanes|=l,R=g.alternate,R!==null&&(R.lanes|=l),Gy(g.return,l,i),c||(x=null);break e}g=R.next}}else if(h.tag===18){if(x=h.return,x===null)throw Error(r(341));x.lanes|=l,g=x.alternate,g!==null&&(g.lanes|=l),Gy(x,l,i),x=null}else x=h.child;if(x!==null)x.return=h;else for(x=h;x!==null;){if(x===i){x=null;break}if(h=x.sibling,h!==null){h.return=x.return,x=h;break}x=x.return}h=x}}function sl(i,o,l,c){i=null;for(var h=o,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var x=h.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var R=h.type;Dr(h.pendingProps.value,x.value)||(i!==null?i.push(R):i=[R])}}else if(h===Se.current){if(x=h.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(i!==null?i.push(wc):i=[wc])}h=h.return}i!==null&&Yy(o,i,l,c),o.flags|=262144}function Jd(i){for(i=i.firstContext;i!==null;){if(!Dr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Fa(i){Va=i,uo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Gn(i){return IT(Va,i)}function ep(i,o){return Va===null&&Fa(i),IT(i,o)}function IT(i,o){var l=o._currentValue;if(o={context:o,memoizedValue:l,next:null},uo===null){if(i===null)throw Error(r(308));uo=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else uo=uo.next=o;return l}var Wj=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(l,c){i.push(c)}};this.abort=function(){o.aborted=!0,i.forEach(function(l){return l()})}},Qj=e.unstable_scheduleCallback,Jj=e.unstable_NormalPriority,Rn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xy(){return{controller:new Wj,data:new Map,refCount:0}}function Wu(i){i.refCount--,i.refCount===0&&Qj(Jj,function(){i.controller.abort()})}var Qu=null,Zy=0,ll=0,ul=null;function e9(i,o){if(Qu===null){var l=Qu=[];Zy=0,ll=Qv(),ul={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Zy++,o.then(MT,MT),o}function MT(){if(--Zy===0&&Qu!==null){ul!==null&&(ul.status="fulfilled");var i=Qu;Qu=null,ll=0,ul=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function t9(i,o){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return i.then(function(){c.status="fulfilled",c.value=o;for(var h=0;h<l.length;h++)(0,l[h])(o)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var DT=D.S;D.S=function(i,o){y2=We(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&e9(i,o),DT!==null&&DT(i,o)};var qa=P(null);function Ky(){var i=qa.current;return i!==null?i:Zt.pooledCache}function tp(i,o){o===null?M(qa,qa.current):M(qa,o.pool)}function BT(){var i=Ky();return i===null?null:{parent:Rn._currentValue,pool:i}}var cl=Error(r(460)),Wy=Error(r(474)),np=Error(r(542)),rp={then:function(){}};function zT(i){return i=i.status,i==="fulfilled"||i==="rejected"}function LT(i,o,l){switch(l=i[l],l===void 0?i.push(o):l!==o&&(o.then(oo,oo),o=l),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,$T(i),i;default:if(typeof o.status=="string")o.then(oo,oo);else{if(i=Zt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(c){if(o.status==="pending"){var h=o;h.status="fulfilled",h.value=c}},function(c){if(o.status==="pending"){var h=o;h.status="rejected",h.reason=c}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,$T(i),i}throw Ya=o,cl}}function Ga(i){try{var o=i._init;return o(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ya=l,cl):l}}var Ya=null;function PT(){if(Ya===null)throw Error(r(459));var i=Ya;return Ya=null,i}function $T(i){if(i===cl||i===np)throw Error(r(483))}var fl=null,Ju=0;function ip(i){var o=Ju;return Ju+=1,fl===null&&(fl=[]),LT(fl,i,o)}function ec(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function op(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function UT(i){function o(Z,q){if(i){var Q=Z.deletions;Q===null?(Z.deletions=[q],Z.flags|=16):Q.push(q)}}function l(Z,q){if(!i)return null;for(;q!==null;)o(Z,q),q=q.sibling;return null}function c(Z){for(var q=new Map;Z!==null;)Z.key!==null?q.set(Z.key,Z):q.set(Z.index,Z),Z=Z.sibling;return q}function h(Z,q){return Z=so(Z,q),Z.index=0,Z.sibling=null,Z}function g(Z,q,Q){return Z.index=Q,i?(Q=Z.alternate,Q!==null?(Q=Q.index,Q<q?(Z.flags|=67108866,q):Q):(Z.flags|=67108866,q)):(Z.flags|=1048576,q)}function x(Z){return i&&Z.alternate===null&&(Z.flags|=67108866),Z}function R(Z,q,Q,le){return q===null||q.tag!==6?(q=$y(Q,Z.mode,le),q.return=Z,q):(q=h(q,Q),q.return=Z,q)}function V(Z,q,Q,le){var Pe=Q.type;return Pe===S?oe(Z,q,Q.props.children,le,Q.key):q!==null&&(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===H&&Ga(Pe)===q.type)?(q=h(q,Q.props),ec(q,Q),q.return=Z,q):(q=Wd(Q.type,Q.key,Q.props,null,Z.mode,le),ec(q,Q),q.return=Z,q)}function J(Z,q,Q,le){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=Uy(Q,Z.mode,le),q.return=Z,q):(q=h(q,Q.children||[]),q.return=Z,q)}function oe(Z,q,Q,le,Pe){return q===null||q.tag!==7?(q=ja(Q,Z.mode,le,Pe),q.return=Z,q):(q=h(q,Q),q.return=Z,q)}function ce(Z,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=$y(""+q,Z.mode,Q),q.return=Z,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return Q=Wd(q.type,q.key,q.props,null,Z.mode,Q),ec(Q,q),Q.return=Z,Q;case E:return q=Uy(q,Z.mode,Q),q.return=Z,q;case H:return q=Ga(q),ce(Z,q,Q)}if(U(q)||A(q))return q=ja(q,Z.mode,Q,null),q.return=Z,q;if(typeof q.then=="function")return ce(Z,ip(q),Q);if(q.$$typeof===T)return ce(Z,ep(Z,q),Q);op(Z,q)}return null}function ee(Z,q,Q,le){var Pe=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Pe!==null?null:R(Z,q,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Pe?V(Z,q,Q,le):null;case E:return Q.key===Pe?J(Z,q,Q,le):null;case H:return Q=Ga(Q),ee(Z,q,Q,le)}if(U(Q)||A(Q))return Pe!==null?null:oe(Z,q,Q,le,null);if(typeof Q.then=="function")return ee(Z,q,ip(Q),le);if(Q.$$typeof===T)return ee(Z,q,ep(Z,Q),le);op(Z,Q)}return null}function ne(Z,q,Q,le,Pe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Z=Z.get(Q)||null,R(q,Z,""+le,Pe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case v:return Z=Z.get(le.key===null?Q:le.key)||null,V(q,Z,le,Pe);case E:return Z=Z.get(le.key===null?Q:le.key)||null,J(q,Z,le,Pe);case H:return le=Ga(le),ne(Z,q,Q,le,Pe)}if(U(le)||A(le))return Z=Z.get(Q)||null,oe(q,Z,le,Pe,null);if(typeof le.then=="function")return ne(Z,q,Q,ip(le),Pe);if(le.$$typeof===T)return ne(Z,q,Q,ep(q,le),Pe);op(q,le)}return null}function _e(Z,q,Q,le){for(var Pe=null,St=null,Ne=q,it=q=0,ft=null;Ne!==null&&it<Q.length;it++){Ne.index>it?(ft=Ne,Ne=null):ft=Ne.sibling;var xt=ee(Z,Ne,Q[it],le);if(xt===null){Ne===null&&(Ne=ft);break}i&&Ne&&xt.alternate===null&&o(Z,Ne),q=g(xt,q,it),St===null?Pe=xt:St.sibling=xt,St=xt,Ne=ft}if(it===Q.length)return l(Z,Ne),pt&&lo(Z,it),Pe;if(Ne===null){for(;it<Q.length;it++)Ne=ce(Z,Q[it],le),Ne!==null&&(q=g(Ne,q,it),St===null?Pe=Ne:St.sibling=Ne,St=Ne);return pt&&lo(Z,it),Pe}for(Ne=c(Ne);it<Q.length;it++)ft=ne(Ne,Z,it,Q[it],le),ft!==null&&(i&&ft.alternate!==null&&Ne.delete(ft.key===null?it:ft.key),q=g(ft,q,it),St===null?Pe=ft:St.sibling=ft,St=ft);return i&&Ne.forEach(function(ua){return o(Z,ua)}),pt&&lo(Z,it),Pe}function He(Z,q,Q,le){if(Q==null)throw Error(r(151));for(var Pe=null,St=null,Ne=q,it=q=0,ft=null,xt=Q.next();Ne!==null&&!xt.done;it++,xt=Q.next()){Ne.index>it?(ft=Ne,Ne=null):ft=Ne.sibling;var ua=ee(Z,Ne,xt.value,le);if(ua===null){Ne===null&&(Ne=ft);break}i&&Ne&&ua.alternate===null&&o(Z,Ne),q=g(ua,q,it),St===null?Pe=ua:St.sibling=ua,St=ua,Ne=ft}if(xt.done)return l(Z,Ne),pt&&lo(Z,it),Pe;if(Ne===null){for(;!xt.done;it++,xt=Q.next())xt=ce(Z,xt.value,le),xt!==null&&(q=g(xt,q,it),St===null?Pe=xt:St.sibling=xt,St=xt);return pt&&lo(Z,it),Pe}for(Ne=c(Ne);!xt.done;it++,xt=Q.next())xt=ne(Ne,Z,it,xt.value,le),xt!==null&&(i&&xt.alternate!==null&&Ne.delete(xt.key===null?it:xt.key),q=g(xt,q,it),St===null?Pe=xt:St.sibling=xt,St=xt);return i&&Ne.forEach(function(d7){return o(Z,d7)}),pt&&lo(Z,it),Pe}function Yt(Z,q,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===S&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Pe=Q.key;q!==null;){if(q.key===Pe){if(Pe=Q.type,Pe===S){if(q.tag===7){l(Z,q.sibling),le=h(q,Q.props.children),le.return=Z,Z=le;break e}}else if(q.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===H&&Ga(Pe)===q.type){l(Z,q.sibling),le=h(q,Q.props),ec(le,Q),le.return=Z,Z=le;break e}l(Z,q);break}else o(Z,q);q=q.sibling}Q.type===S?(le=ja(Q.props.children,Z.mode,le,Q.key),le.return=Z,Z=le):(le=Wd(Q.type,Q.key,Q.props,null,Z.mode,le),ec(le,Q),le.return=Z,Z=le)}return x(Z);case E:e:{for(Pe=Q.key;q!==null;){if(q.key===Pe)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){l(Z,q.sibling),le=h(q,Q.children||[]),le.return=Z,Z=le;break e}else{l(Z,q);break}else o(Z,q);q=q.sibling}le=Uy(Q,Z.mode,le),le.return=Z,Z=le}return x(Z);case H:return Q=Ga(Q),Yt(Z,q,Q,le)}if(U(Q))return _e(Z,q,Q,le);if(A(Q)){if(Pe=A(Q),typeof Pe!="function")throw Error(r(150));return Q=Pe.call(Q),He(Z,q,Q,le)}if(typeof Q.then=="function")return Yt(Z,q,ip(Q),le);if(Q.$$typeof===T)return Yt(Z,q,ep(Z,Q),le);op(Z,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,q!==null&&q.tag===6?(l(Z,q.sibling),le=h(q,Q),le.return=Z,Z=le):(l(Z,q),le=$y(Q,Z.mode,le),le.return=Z,Z=le),x(Z)):l(Z,q)}return function(Z,q,Q,le){try{Ju=0;var Pe=Yt(Z,q,Q,le);return fl=null,Pe}catch(Ne){if(Ne===cl||Ne===np)throw Ne;var St=Br(29,Ne,null,Z.mode);return St.lanes=le,St.return=Z,St}}}var Xa=UT(!0),jT=UT(!1),Go=!1;function Qy(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jy(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Yo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Xo(i,o,l){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,(Nt&2)!==0){var h=c.pending;return h===null?o.next=o:(o.next=h.next,h.next=o),c.pending=o,o=Kd(i),_T(i,null,l),o}return Zd(i,c,o,l),Kd(i)}function tc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194048)!==0)){var c=o.lanes;c&=i.pendingLanes,l|=c,o.lanes=l,I_(i,l)}}function ev(i,o){var l=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var x={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=x:g=g.next=x,l=l.next}while(l!==null);g===null?h=g=o:g=g.next=o}else h=g=o;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}var tv=!1;function nc(){if(tv){var i=ul;if(i!==null)throw i}}function rc(i,o,l,c){tv=!1;var h=i.updateQueue;Go=!1;var g=h.firstBaseUpdate,x=h.lastBaseUpdate,R=h.shared.pending;if(R!==null){h.shared.pending=null;var V=R,J=V.next;V.next=null,x===null?g=J:x.next=J,x=V;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,R=oe.lastBaseUpdate,R!==x&&(R===null?oe.firstBaseUpdate=J:R.next=J,oe.lastBaseUpdate=V))}if(g!==null){var ce=h.baseState;x=0,oe=J=V=null,R=g;do{var ee=R.lane&-536870913,ne=ee!==R.lane;if(ne?(ct&ee)===ee:(c&ee)===ee){ee!==0&&ee===ll&&(tv=!0),oe!==null&&(oe=oe.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var _e=i,He=R;ee=o;var Yt=l;switch(He.tag){case 1:if(_e=He.payload,typeof _e=="function"){ce=_e.call(Yt,ce,ee);break e}ce=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=He.payload,ee=typeof _e=="function"?_e.call(Yt,ce,ee):_e,ee==null)break e;ce=y({},ce,ee);break e;case 2:Go=!0}}ee=R.callback,ee!==null&&(i.flags|=64,ne&&(i.flags|=8192),ne=h.callbacks,ne===null?h.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:R.tag,payload:R.payload,callback:R.callback,next:null},oe===null?(J=oe=ne,V=ce):oe=oe.next=ne,x|=ee;if(R=R.next,R===null){if(R=h.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,h.lastBaseUpdate=ne,h.shared.pending=null}}while(!0);oe===null&&(V=ce),h.baseState=V,h.firstBaseUpdate=J,h.lastBaseUpdate=oe,g===null&&(h.shared.lanes=0),Jo|=x,i.lanes=x,i.memoizedState=ce}}function HT(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function VT(i,o){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)HT(l[i],o)}var dl=P(null),ap=P(0);function FT(i,o){i=So,M(ap,i),M(dl,o),So=i|o.baseLanes}function nv(){M(ap,So),M(dl,dl.current)}function rv(){So=ap.current,W(dl),W(ap)}var zr=P(null),ai=null;function Zo(i){var o=i.alternate;M(_n,_n.current&1),M(zr,i),ai===null&&(o===null||dl.current!==null||o.memoizedState!==null)&&(ai=i)}function iv(i){M(_n,_n.current),M(zr,i),ai===null&&(ai=i)}function qT(i){i.tag===22?(M(_n,_n.current),M(zr,i),ai===null&&(ai=i)):Ko()}function Ko(){M(_n,_n.current),M(zr,zr.current)}function Lr(i){W(zr),ai===i&&(ai=null),W(_n)}var _n=P(0);function sp(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||c0(l)||f0(l)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var fo=0,tt=null,qt=null,Nn=null,lp=!1,pl=!1,Za=!1,up=0,ic=0,hl=null,n9=0;function vn(){throw Error(r(321))}function ov(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!Dr(i[l],o[l]))return!1;return!0}function av(i,o,l,c,h,g){return fo=g,tt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,D.H=i===null||i.memoizedState===null?kC:xv,Za=!1,g=l(c,h),Za=!1,pl&&(g=YT(o,l,c,h)),GT(i),g}function GT(i){D.H=sc;var o=qt!==null&&qt.next!==null;if(fo=0,Nn=qt=tt=null,lp=!1,ic=0,hl=null,o)throw Error(r(300));i===null||In||(i=i.dependencies,i!==null&&Jd(i)&&(In=!0))}function YT(i,o,l,c){tt=i;var h=0;do{if(pl&&(hl=null),ic=0,pl=!1,25<=h)throw Error(r(301));if(h+=1,Nn=qt=null,i.updateQueue!=null){var g=i.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}D.H=OC,g=o(l,c)}while(pl);return g}function r9(){var i=D.H,o=i.useState()[0];return o=typeof o.then=="function"?oc(o):o,i=i.useState()[0],(qt!==null?qt.memoizedState:null)!==i&&(tt.flags|=1024),o}function sv(){var i=up!==0;return up=0,i}function lv(i,o,l){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~l}function uv(i){if(lp){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}lp=!1}fo=0,Nn=qt=tt=null,pl=!1,ic=up=0,hl=null}function sr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nn===null?tt.memoizedState=Nn=i:Nn=Nn.next=i,Nn}function Tn(){if(qt===null){var i=tt.alternate;i=i!==null?i.memoizedState:null}else i=qt.next;var o=Nn===null?tt.memoizedState:Nn.next;if(o!==null)Nn=o,qt=i;else{if(i===null)throw tt.alternate===null?Error(r(467)):Error(r(310));qt=i,i={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},Nn===null?tt.memoizedState=Nn=i:Nn=Nn.next=i}return Nn}function cp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oc(i){var o=ic;return ic+=1,hl===null&&(hl=[]),i=LT(hl,i,o),o=tt,(Nn===null?o.memoizedState:Nn.next)===null&&(o=o.alternate,D.H=o===null||o.memoizedState===null?kC:xv),i}function fp(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return oc(i);if(i.$$typeof===T)return Gn(i)}throw Error(r(438,String(i)))}function cv(i){var o=null,l=tt.updateQueue;if(l!==null&&(o=l.memoCache),o==null){var c=tt.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(o={data:c.data.map(function(h){return h.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),l===null&&(l=cp(),tt.updateQueue=l),l.memoCache=o,l=o.data[o.index],l===void 0)for(l=o.data[o.index]=Array(i),c=0;c<i;c++)l[c]=G;return o.index++,l}function po(i,o){return typeof o=="function"?o(i):o}function dp(i){var o=Tn();return fv(o,qt,i)}function fv(i,o,l){var c=i.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var h=i.baseQueue,g=c.pending;if(g!==null){if(h!==null){var x=h.next;h.next=g.next,g.next=x}o.baseQueue=h=g,c.pending=null}if(g=i.baseState,h===null)i.memoizedState=g;else{o=h.next;var R=x=null,V=null,J=o,oe=!1;do{var ce=J.lane&-536870913;if(ce!==J.lane?(ct&ce)===ce:(fo&ce)===ce){var ee=J.revertLane;if(ee===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ce===ll&&(oe=!0);else if((fo&ee)===ee){J=J.next,ee===ll&&(oe=!0);continue}else ce={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},V===null?(R=V=ce,x=g):V=V.next=ce,tt.lanes|=ee,Jo|=ee;ce=J.action,Za&&l(g,ce),g=J.hasEagerState?J.eagerState:l(g,ce)}else ee={lane:ce,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},V===null?(R=V=ee,x=g):V=V.next=ee,tt.lanes|=ce,Jo|=ce;J=J.next}while(J!==null&&J!==o);if(V===null?x=g:V.next=R,!Dr(g,i.memoizedState)&&(In=!0,oe&&(l=ul,l!==null)))throw l;i.memoizedState=g,i.baseState=x,i.baseQueue=V,c.lastRenderedState=g}return h===null&&(c.lanes=0),[i.memoizedState,c.dispatch]}function dv(i){var o=Tn(),l=o.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=i;var c=l.dispatch,h=l.pending,g=o.memoizedState;if(h!==null){l.pending=null;var x=h=h.next;do g=i(g,x.action),x=x.next;while(x!==h);Dr(g,o.memoizedState)||(In=!0),o.memoizedState=g,o.baseQueue===null&&(o.baseState=g),l.lastRenderedState=g}return[g,c]}function XT(i,o,l){var c=tt,h=Tn(),g=pt;if(g){if(l===void 0)throw Error(r(407));l=l()}else l=o();var x=!Dr((qt||h).memoizedState,l);if(x&&(h.memoizedState=l,In=!0),h=h.queue,mv(WT.bind(null,c,h,i),[i]),h.getSnapshot!==o||x||Nn!==null&&Nn.memoizedState.tag&1){if(c.flags|=2048,ml(9,{destroy:void 0},KT.bind(null,c,h,l,o),null),Zt===null)throw Error(r(349));g||(fo&127)!==0||ZT(c,o,l)}return l}function ZT(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=tt.updateQueue,o===null?(o=cp(),tt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function KT(i,o,l,c){o.value=l,o.getSnapshot=c,QT(o)&&JT(i)}function WT(i,o,l){return l(function(){QT(o)&&JT(i)})}function QT(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!Dr(i,l)}catch{return!0}}function JT(i){var o=Ua(i,2);o!==null&&xr(o,i,2)}function pv(i){var o=sr();if(typeof i=="function"){var l=i;if(i=l(),Za){Pn(!0);try{l()}finally{Pn(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:po,lastRenderedState:i},o}function eC(i,o,l,c){return i.baseState=l,fv(i,qt,typeof c=="function"?c:po)}function i9(i,o,l,c,h){if(mp(i))throw Error(r(485));if(i=o.action,i!==null){var g={payload:h,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};D.T!==null?l(!0):g.isTransition=!1,c(g),l=o.pending,l===null?(g.next=o.pending=g,tC(o,g)):(g.next=l.next,o.pending=l.next=g)}}function tC(i,o){var l=o.action,c=o.payload,h=i.state;if(o.isTransition){var g=D.T,x={};D.T=x;try{var R=l(h,c),V=D.S;V!==null&&V(x,R),nC(i,o,R)}catch(J){hv(i,o,J)}finally{g!==null&&x.types!==null&&(g.types=x.types),D.T=g}}else try{g=l(h,c),nC(i,o,g)}catch(J){hv(i,o,J)}}function nC(i,o,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){rC(i,o,c)},function(c){return hv(i,o,c)}):rC(i,o,l)}function rC(i,o,l){o.status="fulfilled",o.value=l,iC(o),i.state=l,o=i.pending,o!==null&&(l=o.next,l===o?i.pending=null:(l=l.next,o.next=l,tC(i,l)))}function hv(i,o,l){var c=i.pending;if(i.pending=null,c!==null){c=c.next;do o.status="rejected",o.reason=l,iC(o),o=o.next;while(o!==c)}i.action=null}function iC(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function oC(i,o){return o}function aC(i,o){if(pt){var l=Zt.formState;if(l!==null){e:{var c=tt;if(pt){if(tn){t:{for(var h=tn,g=oi;h.nodeType!==8;){if(!g){h=null;break t}if(h=si(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){tn=si(h.nextSibling),c=h.data==="F!";break e}}Fo(c)}c=!1}c&&(o=l[0])}}return l=sr(),l.memoizedState=l.baseState=o,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oC,lastRenderedState:o},l.queue=c,l=TC.bind(null,tt,c),c.dispatch=l,c=pv(!1),g=Sv.bind(null,tt,!1,c.queue),c=sr(),h={state:o,dispatch:null,action:i,pending:null},c.queue=h,l=i9.bind(null,tt,h,g,l),h.dispatch=l,c.memoizedState=i,[o,l,!1]}function sC(i){var o=Tn();return lC(o,qt,i)}function lC(i,o,l){if(o=fv(i,o,oC)[0],i=dp(po)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var c=oc(o)}catch(x){throw x===cl?np:x}else c=o;o=Tn();var h=o.queue,g=h.dispatch;return l!==o.memoizedState&&(tt.flags|=2048,ml(9,{destroy:void 0},o9.bind(null,h,l),null)),[c,g,i]}function o9(i,o){i.action=o}function uC(i){var o=Tn(),l=qt;if(l!==null)return lC(o,l,i);Tn(),o=o.memoizedState,l=Tn();var c=l.queue.dispatch;return l.memoizedState=i,[o,c,!1]}function ml(i,o,l,c){return i={tag:i,create:l,deps:c,inst:o,next:null},o=tt.updateQueue,o===null&&(o=cp(),tt.updateQueue=o),l=o.lastEffect,l===null?o.lastEffect=i.next=i:(c=l.next,l.next=i,i.next=c,o.lastEffect=i),i}function cC(){return Tn().memoizedState}function pp(i,o,l,c){var h=sr();tt.flags|=i,h.memoizedState=ml(1|o,{destroy:void 0},l,c===void 0?null:c)}function hp(i,o,l,c){var h=Tn();c=c===void 0?null:c;var g=h.memoizedState.inst;qt!==null&&c!==null&&ov(c,qt.memoizedState.deps)?h.memoizedState=ml(o,g,l,c):(tt.flags|=i,h.memoizedState=ml(1|o,g,l,c))}function fC(i,o){pp(8390656,8,i,o)}function mv(i,o){hp(2048,8,i,o)}function a9(i){tt.flags|=4;var o=tt.updateQueue;if(o===null)o=cp(),tt.updateQueue=o,o.events=[i];else{var l=o.events;l===null?o.events=[i]:l.push(i)}}function dC(i){var o=Tn().memoizedState;return a9({ref:o,nextImpl:i}),function(){if((Nt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function pC(i,o){return hp(4,2,i,o)}function hC(i,o){return hp(4,4,i,o)}function mC(i,o){if(typeof o=="function"){i=i();var l=o(i);return function(){typeof l=="function"?l():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function gC(i,o,l){l=l!=null?l.concat([i]):null,hp(4,4,mC.bind(null,o,i),l)}function gv(){}function yC(i,o){var l=Tn();o=o===void 0?null:o;var c=l.memoizedState;return o!==null&&ov(o,c[1])?c[0]:(l.memoizedState=[i,o],i)}function vC(i,o){var l=Tn();o=o===void 0?null:o;var c=l.memoizedState;if(o!==null&&ov(o,c[1]))return c[0];if(c=i(),Za){Pn(!0);try{i()}finally{Pn(!1)}}return l.memoizedState=[c,o],c}function yv(i,o,l){return l===void 0||(fo&1073741824)!==0&&(ct&261930)===0?i.memoizedState=o:(i.memoizedState=l,i=b2(),tt.lanes|=i,Jo|=i,l)}function bC(i,o,l,c){return Dr(l,o)?l:dl.current!==null?(i=yv(i,l,c),Dr(i,o)||(In=!0),i):(fo&42)===0||(fo&1073741824)!==0&&(ct&261930)===0?(In=!0,i.memoizedState=l):(i=b2(),tt.lanes|=i,Jo|=i,o)}function SC(i,o,l,c,h){var g=Y.p;Y.p=g!==0&&8>g?g:8;var x=D.T,R={};D.T=R,Sv(i,!1,o,l);try{var V=h(),J=D.S;if(J!==null&&J(R,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var oe=t9(V,c);ac(i,o,oe,Ur(i))}else ac(i,o,c,Ur(i))}catch(ce){ac(i,o,{then:function(){},status:"rejected",reason:ce},Ur())}finally{Y.p=g,x!==null&&R.types!==null&&(x.types=R.types),D.T=x}}function s9(){}function vv(i,o,l,c){if(i.tag!==5)throw Error(r(476));var h=xC(i).queue;SC(i,h,o,re,l===null?s9:function(){return EC(i),l(c)})}function xC(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:po,lastRenderedState:re},next:null};var l={};return o.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:po,lastRenderedState:l},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function EC(i){var o=xC(i);o.next===null&&(o=i.alternate.memoizedState),ac(i,o.next.queue,{},Ur())}function bv(){return Gn(wc)}function wC(){return Tn().memoizedState}function _C(){return Tn().memoizedState}function l9(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var l=Ur();i=Yo(l);var c=Xo(o,i,l);c!==null&&(xr(c,o,l),tc(c,o,l)),o={cache:Xy()},i.payload=o;return}o=o.return}}function u9(i,o,l){var c=Ur();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mp(i)?CC(o,l):(l=Ly(i,o,l,c),l!==null&&(xr(l,i,c),AC(l,o,c)))}function TC(i,o,l){var c=Ur();ac(i,o,l,c)}function ac(i,o,l,c){var h={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(mp(i))CC(o,h);else{var g=i.alternate;if(i.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null))try{var x=o.lastRenderedState,R=g(x,l);if(h.hasEagerState=!0,h.eagerState=R,Dr(R,x))return Zd(i,o,h,0),Zt===null&&Xd(),!1}catch{}if(l=Ly(i,o,h,c),l!==null)return xr(l,i,c),AC(l,o,c),!0}return!1}function Sv(i,o,l,c){if(c={lane:2,revertLane:Qv(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},mp(i)){if(o)throw Error(r(479))}else o=Ly(i,l,c,2),o!==null&&xr(o,i,2)}function mp(i){var o=i.alternate;return i===tt||o!==null&&o===tt}function CC(i,o){pl=lp=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function AC(i,o,l){if((l&4194048)!==0){var c=o.lanes;c&=i.pendingLanes,l|=c,o.lanes=l,I_(i,l)}}var sc={readContext:Gn,use:fp,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useLayoutEffect:vn,useInsertionEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useSyncExternalStore:vn,useId:vn,useHostTransitionStatus:vn,useFormState:vn,useActionState:vn,useOptimistic:vn,useMemoCache:vn,useCacheRefresh:vn};sc.useEffectEvent=vn;var kC={readContext:Gn,use:fp,useCallback:function(i,o){return sr().memoizedState=[i,o===void 0?null:o],i},useContext:Gn,useEffect:fC,useImperativeHandle:function(i,o,l){l=l!=null?l.concat([i]):null,pp(4194308,4,mC.bind(null,o,i),l)},useLayoutEffect:function(i,o){return pp(4194308,4,i,o)},useInsertionEffect:function(i,o){pp(4,2,i,o)},useMemo:function(i,o){var l=sr();o=o===void 0?null:o;var c=i();if(Za){Pn(!0);try{i()}finally{Pn(!1)}}return l.memoizedState=[c,o],c},useReducer:function(i,o,l){var c=sr();if(l!==void 0){var h=l(o);if(Za){Pn(!0);try{l(o)}finally{Pn(!1)}}}else h=o;return c.memoizedState=c.baseState=h,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:h},c.queue=i,i=i.dispatch=u9.bind(null,tt,i),[c.memoizedState,i]},useRef:function(i){var o=sr();return i={current:i},o.memoizedState=i},useState:function(i){i=pv(i);var o=i.queue,l=TC.bind(null,tt,o);return o.dispatch=l,[i.memoizedState,l]},useDebugValue:gv,useDeferredValue:function(i,o){var l=sr();return yv(l,i,o)},useTransition:function(){var i=pv(!1);return i=SC.bind(null,tt,i.queue,!0,!1),sr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,l){var c=tt,h=sr();if(pt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=o(),Zt===null)throw Error(r(349));(ct&127)!==0||ZT(c,o,l)}h.memoizedState=l;var g={value:l,getSnapshot:o};return h.queue=g,fC(WT.bind(null,c,g,i),[i]),c.flags|=2048,ml(9,{destroy:void 0},KT.bind(null,c,g,l,o),null),l},useId:function(){var i=sr(),o=Zt.identifierPrefix;if(pt){var l=$i,c=Pi;l=(c&~(1<<32-gt(c)-1)).toString(32)+l,o="_"+o+"R_"+l,l=up++,0<l&&(o+="H"+l.toString(32)),o+="_"}else l=n9++,o="_"+o+"r_"+l.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:bv,useFormState:aC,useActionState:aC,useOptimistic:function(i){var o=sr();o.memoizedState=o.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=l,o=Sv.bind(null,tt,!0,l),l.dispatch=o,[i,o]},useMemoCache:cv,useCacheRefresh:function(){return sr().memoizedState=l9.bind(null,tt)},useEffectEvent:function(i){var o=sr(),l={impl:i};return o.memoizedState=l,function(){if((Nt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},xv={readContext:Gn,use:fp,useCallback:yC,useContext:Gn,useEffect:mv,useImperativeHandle:gC,useInsertionEffect:pC,useLayoutEffect:hC,useMemo:vC,useReducer:dp,useRef:cC,useState:function(){return dp(po)},useDebugValue:gv,useDeferredValue:function(i,o){var l=Tn();return bC(l,qt.memoizedState,i,o)},useTransition:function(){var i=dp(po)[0],o=Tn().memoizedState;return[typeof i=="boolean"?i:oc(i),o]},useSyncExternalStore:XT,useId:wC,useHostTransitionStatus:bv,useFormState:sC,useActionState:sC,useOptimistic:function(i,o){var l=Tn();return eC(l,qt,i,o)},useMemoCache:cv,useCacheRefresh:_C};xv.useEffectEvent=dC;var OC={readContext:Gn,use:fp,useCallback:yC,useContext:Gn,useEffect:mv,useImperativeHandle:gC,useInsertionEffect:pC,useLayoutEffect:hC,useMemo:vC,useReducer:dv,useRef:cC,useState:function(){return dv(po)},useDebugValue:gv,useDeferredValue:function(i,o){var l=Tn();return qt===null?yv(l,i,o):bC(l,qt.memoizedState,i,o)},useTransition:function(){var i=dv(po)[0],o=Tn().memoizedState;return[typeof i=="boolean"?i:oc(i),o]},useSyncExternalStore:XT,useId:wC,useHostTransitionStatus:bv,useFormState:uC,useActionState:uC,useOptimistic:function(i,o){var l=Tn();return qt!==null?eC(l,qt,i,o):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:cv,useCacheRefresh:_C};OC.useEffectEvent=dC;function Ev(i,o,l,c){o=i.memoizedState,l=l(c,o),l=l==null?o:y({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var wv={enqueueSetState:function(i,o,l){i=i._reactInternals;var c=Ur(),h=Yo(c);h.payload=o,l!=null&&(h.callback=l),o=Xo(i,h,c),o!==null&&(xr(o,i,c),tc(o,i,c))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var c=Ur(),h=Yo(c);h.tag=1,h.payload=o,l!=null&&(h.callback=l),o=Xo(i,h,c),o!==null&&(xr(o,i,c),tc(o,i,c))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Ur(),c=Yo(l);c.tag=2,o!=null&&(c.callback=o),o=Xo(i,c,l),o!==null&&(xr(o,i,l),tc(o,i,l))}};function RC(i,o,l,c,h,g,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,g,x):o.prototype&&o.prototype.isPureReactComponent?!Yu(l,c)||!Yu(h,g):!0}function NC(i,o,l,c){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,c),o.state!==i&&wv.enqueueReplaceState(o,o.state,null)}function Ka(i,o){var l=o;if("ref"in o){l={};for(var c in o)c!=="ref"&&(l[c]=o[c])}if(i=i.defaultProps){l===o&&(l=y({},l));for(var h in i)l[h]===void 0&&(l[h]=i[h])}return l}function IC(i){Yd(i)}function MC(i){console.error(i)}function DC(i){Yd(i)}function gp(i,o){try{var l=i.onUncaughtError;l(o.value,{componentStack:o.stack})}catch(c){setTimeout(function(){throw c})}}function BC(i,o,l){try{var c=i.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function _v(i,o,l){return l=Yo(l),l.tag=3,l.payload={element:null},l.callback=function(){gp(i,o)},l}function zC(i){return i=Yo(i),i.tag=3,i}function LC(i,o,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;i.payload=function(){return h(g)},i.callback=function(){BC(o,l,c)}}var x=l.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){BC(o,l,c),typeof h!="function"&&(ea===null?ea=new Set([this]):ea.add(this));var R=c.stack;this.componentDidCatch(c.value,{componentStack:R!==null?R:""})})}function c9(i,o,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(o=l.alternate,o!==null&&sl(o,l,h,!0),l=zr.current,l!==null){switch(l.tag){case 31:case 13:return ai===null?kp():l.alternate===null&&bn===0&&(bn=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===rp?l.flags|=16384:(o=l.updateQueue,o===null?l.updateQueue=new Set([c]):o.add(c),Zv(i,c,h)),!1;case 22:return l.flags|=65536,c===rp?l.flags|=16384:(o=l.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=o):(l=o.retryQueue,l===null?o.retryQueue=new Set([c]):l.add(c)),Zv(i,c,h)),!1}throw Error(r(435,l.tag))}return Zv(i,c,h),kp(),!1}if(pt)return o=zr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=h,c!==Vy&&(i=Error(r(422),{cause:c}),Ku(ni(i,l)))):(c!==Vy&&(o=Error(r(423),{cause:c}),Ku(ni(o,l))),i=i.current.alternate,i.flags|=65536,h&=-h,i.lanes|=h,c=ni(c,l),h=_v(i.stateNode,c,h),ev(i,h),bn!==4&&(bn=2)),!1;var g=Error(r(520),{cause:c});if(g=ni(g,l),mc===null?mc=[g]:mc.push(g),bn!==4&&(bn=2),o===null)return!0;c=ni(c,l),l=o;do{switch(l.tag){case 3:return l.flags|=65536,i=h&-h,l.lanes|=i,i=_v(l.stateNode,c,i),ev(l,i),!1;case 1:if(o=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(ea===null||!ea.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=zC(h),LC(h,i,l,c),ev(l,h),!1}l=l.return}while(l!==null);return!1}var Tv=Error(r(461)),In=!1;function Yn(i,o,l,c){o.child=i===null?jT(o,null,l,c):Xa(o,i.child,l,c)}function PC(i,o,l,c,h){l=l.render;var g=o.ref;if("ref"in c){var x={};for(var R in c)R!=="ref"&&(x[R]=c[R])}else x=c;return Fa(o),c=av(i,o,l,x,g,h),R=sv(),i!==null&&!In?(lv(i,o,h),ho(i,o,h)):(pt&&R&&jy(o),o.flags|=1,Yn(i,o,c,h),o.child)}function $C(i,o,l,c,h){if(i===null){var g=l.type;return typeof g=="function"&&!Py(g)&&g.defaultProps===void 0&&l.compare===null?(o.tag=15,o.type=g,UC(i,o,g,c,h)):(i=Wd(l.type,null,c,o,o.mode,h),i.ref=o.ref,i.return=o,o.child=i)}if(g=i.child,!Mv(i,h)){var x=g.memoizedProps;if(l=l.compare,l=l!==null?l:Yu,l(x,c)&&i.ref===o.ref)return ho(i,o,h)}return o.flags|=1,i=so(g,c),i.ref=o.ref,i.return=o,o.child=i}function UC(i,o,l,c,h){if(i!==null){var g=i.memoizedProps;if(Yu(g,c)&&i.ref===o.ref)if(In=!1,o.pendingProps=c=g,Mv(i,h))(i.flags&131072)!==0&&(In=!0);else return o.lanes=i.lanes,ho(i,o,h)}return Cv(i,o,l,c,h)}function jC(i,o,l,c){var h=c.children,g=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((o.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,i!==null){for(c=o.child=i.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~g}else c=0,o.child=null;return HC(i,o,g,l,c)}if((l&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&tp(o,g!==null?g.cachePool:null),g!==null?FT(o,g):nv(),qT(o);else return c=o.lanes=536870912,HC(i,o,g!==null?g.baseLanes|l:l,l,c)}else g!==null?(tp(o,g.cachePool),FT(o,g),Ko(),o.memoizedState=null):(i!==null&&tp(o,null),nv(),Ko());return Yn(i,o,h,l),o.child}function lc(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function HC(i,o,l,c,h){var g=Ky();return g=g===null?null:{parent:Rn._currentValue,pool:g},o.memoizedState={baseLanes:l,cachePool:g},i!==null&&tp(o,null),nv(),qT(o),i!==null&&sl(i,o,c,!0),o.childLanes=h,null}function yp(i,o){return o=bp({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function VC(i,o,l){return Xa(o,i.child,null,l),i=yp(o,o.pendingProps),i.flags|=2,Lr(o),o.memoizedState=null,i}function f9(i,o,l){var c=o.pendingProps,h=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(pt){if(c.mode==="hidden")return i=yp(o,c),o.lanes=536870912,lc(null,i);if(iv(o),(i=tn)?(i=tA(i,oi),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Ho!==null?{id:Pi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},l=CT(i),l.return=o,o.child=l,qn=o,tn=null)):i=null,i===null)throw Fo(o);return o.lanes=536870912,null}return yp(o,c)}var g=i.memoizedState;if(g!==null){var x=g.dehydrated;if(iv(o),h)if(o.flags&256)o.flags&=-257,o=VC(i,o,l);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(In||sl(i,o,l,!1),h=(l&i.childLanes)!==0,In||h){if(c=Zt,c!==null&&(x=M_(c,l),x!==0&&x!==g.retryLane))throw g.retryLane=x,Ua(i,x),xr(c,i,x),Tv;kp(),o=VC(i,o,l)}else i=g.treeContext,tn=si(x.nextSibling),qn=o,pt=!0,Vo=null,oi=!1,i!==null&&OT(o,i),o=yp(o,c),o.flags|=4096;return o}return i=so(i.child,{mode:c.mode,children:c.children}),i.ref=o.ref,o.child=i,i.return=o,i}function vp(i,o){var l=o.ref;if(l===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(i===null||i.ref!==l)&&(o.flags|=4194816)}}function Cv(i,o,l,c,h){return Fa(o),l=av(i,o,l,c,void 0,h),c=sv(),i!==null&&!In?(lv(i,o,h),ho(i,o,h)):(pt&&c&&jy(o),o.flags|=1,Yn(i,o,l,h),o.child)}function FC(i,o,l,c,h,g){return Fa(o),o.updateQueue=null,l=YT(o,c,l,h),GT(i),c=sv(),i!==null&&!In?(lv(i,o,g),ho(i,o,g)):(pt&&c&&jy(o),o.flags|=1,Yn(i,o,l,g),o.child)}function qC(i,o,l,c,h){if(Fa(o),o.stateNode===null){var g=rl,x=l.contextType;typeof x=="object"&&x!==null&&(g=Gn(x)),g=new l(c,g),o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=wv,o.stateNode=g,g._reactInternals=o,g=o.stateNode,g.props=c,g.state=o.memoizedState,g.refs={},Qy(o),x=l.contextType,g.context=typeof x=="object"&&x!==null?Gn(x):rl,g.state=o.memoizedState,x=l.getDerivedStateFromProps,typeof x=="function"&&(Ev(o,l,x,c),g.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(x=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&wv.enqueueReplaceState(g,g.state,null),rc(o,c,g,h),nc(),g.state=o.memoizedState),typeof g.componentDidMount=="function"&&(o.flags|=4194308),c=!0}else if(i===null){g=o.stateNode;var R=o.memoizedProps,V=Ka(l,R);g.props=V;var J=g.context,oe=l.contextType;x=rl,typeof oe=="object"&&oe!==null&&(x=Gn(oe));var ce=l.getDerivedStateFromProps;oe=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",R=o.pendingProps!==R,oe||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(R||J!==x)&&NC(o,g,c,x),Go=!1;var ee=o.memoizedState;g.state=ee,rc(o,c,g,h),nc(),J=o.memoizedState,R||ee!==J||Go?(typeof ce=="function"&&(Ev(o,l,ce,c),J=o.memoizedState),(V=Go||RC(o,l,V,c,ee,J,x))?(oe||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(o.flags|=4194308)):(typeof g.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=J),g.props=c,g.state=J,g.context=x,c=V):(typeof g.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{g=o.stateNode,Jy(i,o),x=o.memoizedProps,oe=Ka(l,x),g.props=oe,ce=o.pendingProps,ee=g.context,J=l.contextType,V=rl,typeof J=="object"&&J!==null&&(V=Gn(J)),R=l.getDerivedStateFromProps,(J=typeof R=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==ce||ee!==V)&&NC(o,g,c,V),Go=!1,ee=o.memoizedState,g.state=ee,rc(o,c,g,h),nc();var ne=o.memoizedState;x!==ce||ee!==ne||Go||i!==null&&i.dependencies!==null&&Jd(i.dependencies)?(typeof R=="function"&&(Ev(o,l,R,c),ne=o.memoizedState),(oe=Go||RC(o,l,oe,c,ee,ne,V)||i!==null&&i.dependencies!==null&&Jd(i.dependencies))?(J||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,ne,V),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,ne,V)),typeof g.componentDidUpdate=="function"&&(o.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===i.memoizedProps&&ee===i.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&ee===i.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=ne),g.props=c,g.state=ne,g.context=V,c=oe):(typeof g.componentDidUpdate!="function"||x===i.memoizedProps&&ee===i.memoizedState||(o.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&ee===i.memoizedState||(o.flags|=1024),c=!1)}return g=c,vp(i,o),c=(o.flags&128)!==0,g||c?(g=o.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:g.render(),o.flags|=1,i!==null&&c?(o.child=Xa(o,i.child,null,h),o.child=Xa(o,null,l,h)):Yn(i,o,l,h),o.memoizedState=g.state,i=o.child):i=ho(i,o,h),i}function GC(i,o,l,c){return Ha(),o.flags|=256,Yn(i,o,l,c),o.child}var Av={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kv(i){return{baseLanes:i,cachePool:BT()}}function Ov(i,o,l){return i=i!==null?i.childLanes&~l:0,o&&(i|=$r),i}function YC(i,o,l){var c=o.pendingProps,h=!1,g=(o.flags&128)!==0,x;if((x=g)||(x=i!==null&&i.memoizedState===null?!1:(_n.current&2)!==0),x&&(h=!0,o.flags&=-129),x=(o.flags&32)!==0,o.flags&=-33,i===null){if(pt){if(h?Zo(o):Ko(),(i=tn)?(i=tA(i,oi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Ho!==null?{id:Pi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},l=CT(i),l.return=o,o.child=l,qn=o,tn=null)):i=null,i===null)throw Fo(o);return f0(i)?o.lanes=32:o.lanes=536870912,null}var R=c.children;return c=c.fallback,h?(Ko(),h=o.mode,R=bp({mode:"hidden",children:R},h),c=ja(c,h,l,null),R.return=o,c.return=o,R.sibling=c,o.child=R,c=o.child,c.memoizedState=kv(l),c.childLanes=Ov(i,x,l),o.memoizedState=Av,lc(null,c)):(Zo(o),Rv(o,R))}var V=i.memoizedState;if(V!==null&&(R=V.dehydrated,R!==null)){if(g)o.flags&256?(Zo(o),o.flags&=-257,o=Nv(i,o,l)):o.memoizedState!==null?(Ko(),o.child=i.child,o.flags|=128,o=null):(Ko(),R=c.fallback,h=o.mode,c=bp({mode:"visible",children:c.children},h),R=ja(R,h,l,null),R.flags|=2,c.return=o,R.return=o,c.sibling=R,o.child=c,Xa(o,i.child,null,l),c=o.child,c.memoizedState=kv(l),c.childLanes=Ov(i,x,l),o.memoizedState=Av,o=lc(null,c));else if(Zo(o),f0(R)){if(x=R.nextSibling&&R.nextSibling.dataset,x)var J=x.dgst;x=J,c=Error(r(419)),c.stack="",c.digest=x,Ku({value:c,source:null,stack:null}),o=Nv(i,o,l)}else if(In||sl(i,o,l,!1),x=(l&i.childLanes)!==0,In||x){if(x=Zt,x!==null&&(c=M_(x,l),c!==0&&c!==V.retryLane))throw V.retryLane=c,Ua(i,c),xr(x,i,c),Tv;c0(R)||kp(),o=Nv(i,o,l)}else c0(R)?(o.flags|=192,o.child=i.child,o=null):(i=V.treeContext,tn=si(R.nextSibling),qn=o,pt=!0,Vo=null,oi=!1,i!==null&&OT(o,i),o=Rv(o,c.children),o.flags|=4096);return o}return h?(Ko(),R=c.fallback,h=o.mode,V=i.child,J=V.sibling,c=so(V,{mode:"hidden",children:c.children}),c.subtreeFlags=V.subtreeFlags&65011712,J!==null?R=so(J,R):(R=ja(R,h,l,null),R.flags|=2),R.return=o,c.return=o,c.sibling=R,o.child=c,lc(null,c),c=o.child,R=i.child.memoizedState,R===null?R=kv(l):(h=R.cachePool,h!==null?(V=Rn._currentValue,h=h.parent!==V?{parent:V,pool:V}:h):h=BT(),R={baseLanes:R.baseLanes|l,cachePool:h}),c.memoizedState=R,c.childLanes=Ov(i,x,l),o.memoizedState=Av,lc(i.child,c)):(Zo(o),l=i.child,i=l.sibling,l=so(l,{mode:"visible",children:c.children}),l.return=o,l.sibling=null,i!==null&&(x=o.deletions,x===null?(o.deletions=[i],o.flags|=16):x.push(i)),o.child=l,o.memoizedState=null,l)}function Rv(i,o){return o=bp({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function bp(i,o){return i=Br(22,i,null,o),i.lanes=0,i}function Nv(i,o,l){return Xa(o,i.child,null,l),i=Rv(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function XC(i,o,l){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o),Gy(i.return,o,l)}function Iv(i,o,l,c,h,g){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h,treeForkCount:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=l,x.tailMode=h,x.treeForkCount=g)}function ZC(i,o,l){var c=o.pendingProps,h=c.revealOrder,g=c.tail;c=c.children;var x=_n.current,R=(x&2)!==0;if(R?(x=x&1|2,o.flags|=128):x&=1,M(_n,x),Yn(i,o,c,l),c=pt?Zu:0,!R&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&XC(i,l,o);else if(i.tag===19)XC(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(h){case"forwards":for(l=o.child,h=null;l!==null;)i=l.alternate,i!==null&&sp(i)===null&&(h=l),l=l.sibling;l=h,l===null?(h=o.child,o.child=null):(h=l.sibling,l.sibling=null),Iv(o,!1,h,l,g,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=o.child,o.child=null;h!==null;){if(i=h.alternate,i!==null&&sp(i)===null){o.child=h;break}i=h.sibling,h.sibling=l,l=h,h=i}Iv(o,!0,l,null,g,c);break;case"together":Iv(o,!1,null,null,void 0,c);break;default:o.memoizedState=null}return o.child}function ho(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Jo|=o.lanes,(l&o.childLanes)===0)if(i!==null){if(sl(i,o,l,!1),(l&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,l=so(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=so(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function Mv(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Jd(i)))}function d9(i,o,l){switch(o.tag){case 3:$e(o,o.stateNode.containerInfo),qo(o,Rn,i.memoizedState.cache),Ha();break;case 27:case 5:Me(o);break;case 4:$e(o,o.stateNode.containerInfo);break;case 10:qo(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,iv(o),null;break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(Zo(o),o.flags|=128,null):(l&o.child.childLanes)!==0?YC(i,o,l):(Zo(o),i=ho(i,o,l),i!==null?i.sibling:null);Zo(o);break;case 19:var h=(i.flags&128)!==0;if(c=(l&o.childLanes)!==0,c||(sl(i,o,l,!1),c=(l&o.childLanes)!==0),h){if(c)return ZC(i,o,l);o.flags|=128}if(h=o.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),M(_n,_n.current),c)break;return null;case 22:return o.lanes=0,jC(i,o,l,o.pendingProps);case 24:qo(o,Rn,i.memoizedState.cache)}return ho(i,o,l)}function KC(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps)In=!0;else{if(!Mv(i,l)&&(o.flags&128)===0)return In=!1,d9(i,o,l);In=(i.flags&131072)!==0}else In=!1,pt&&(o.flags&1048576)!==0&&kT(o,Zu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var c=o.pendingProps;if(i=Ga(o.elementType),o.type=i,typeof i=="function")Py(i)?(c=Ka(i,c),o.tag=1,o=qC(null,o,i,c,l)):(o.tag=0,o=Cv(null,o,i,c,l));else{if(i!=null){var h=i.$$typeof;if(h===C){o.tag=11,o=PC(null,o,i,c,l);break e}else if(h===z){o.tag=14,o=$C(null,o,i,c,l);break e}}throw o=$(i)||i,Error(r(306,o,""))}}return o;case 0:return Cv(i,o,o.type,o.pendingProps,l);case 1:return c=o.type,h=Ka(c,o.pendingProps),qC(i,o,c,h,l);case 3:e:{if($e(o,o.stateNode.containerInfo),i===null)throw Error(r(387));c=o.pendingProps;var g=o.memoizedState;h=g.element,Jy(i,o),rc(o,c,null,l);var x=o.memoizedState;if(c=x.cache,qo(o,Rn,c),c!==g.cache&&Yy(o,[Rn],l,!0),nc(),c=x.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:x.cache},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){o=GC(i,o,c,l);break e}else if(c!==h){h=ni(Error(r(424)),o),Ku(h),o=GC(i,o,c,l);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,tn=si(i.firstChild),qn=o,pt=!0,Vo=null,oi=!0,l=jT(o,null,c,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ha(),c===h){o=ho(i,o,l);break e}Yn(i,o,c,l)}o=o.child}return o;case 26:return vp(i,o),i===null?(l=sA(o.type,null,o.pendingProps,null))?o.memoizedState=l:pt||(l=o.type,i=o.pendingProps,c=Bp(ye.current).createElement(l),c[Fn]=o,c[mr]=i,Xn(c,l,i),$n(c),o.stateNode=c):o.memoizedState=sA(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Me(o),i===null&&pt&&(c=o.stateNode=iA(o.type,o.pendingProps,ye.current),qn=o,oi=!0,h=tn,ia(o.type)?(d0=h,tn=si(c.firstChild)):tn=h),Yn(i,o,o.pendingProps.children,l),vp(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&pt&&((h=c=tn)&&(c=H9(c,o.type,o.pendingProps,oi),c!==null?(o.stateNode=c,qn=o,tn=si(c.firstChild),oi=!1,h=!0):h=!1),h||Fo(o)),Me(o),h=o.type,g=o.pendingProps,x=i!==null?i.memoizedProps:null,c=g.children,s0(h,g)?c=null:x!==null&&s0(h,x)&&(o.flags|=32),o.memoizedState!==null&&(h=av(i,o,r9,null,null,l),wc._currentValue=h),vp(i,o),Yn(i,o,c,l),o.child;case 6:return i===null&&pt&&((i=l=tn)&&(l=V9(l,o.pendingProps,oi),l!==null?(o.stateNode=l,qn=o,tn=null,i=!0):i=!1),i||Fo(o)),null;case 13:return YC(i,o,l);case 4:return $e(o,o.stateNode.containerInfo),c=o.pendingProps,i===null?o.child=Xa(o,null,c,l):Yn(i,o,c,l),o.child;case 11:return PC(i,o,o.type,o.pendingProps,l);case 7:return Yn(i,o,o.pendingProps,l),o.child;case 8:return Yn(i,o,o.pendingProps.children,l),o.child;case 12:return Yn(i,o,o.pendingProps.children,l),o.child;case 10:return c=o.pendingProps,qo(o,o.type,c.value),Yn(i,o,c.children,l),o.child;case 9:return h=o.type._context,c=o.pendingProps.children,Fa(o),h=Gn(h),c=c(h),o.flags|=1,Yn(i,o,c,l),o.child;case 14:return $C(i,o,o.type,o.pendingProps,l);case 15:return UC(i,o,o.type,o.pendingProps,l);case 19:return ZC(i,o,l);case 31:return f9(i,o,l);case 22:return jC(i,o,l,o.pendingProps);case 24:return Fa(o),c=Gn(Rn),i===null?(h=Ky(),h===null&&(h=Zt,g=Xy(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),o.memoizedState={parent:c,cache:h},Qy(o),qo(o,Rn,h)):((i.lanes&l)!==0&&(Jy(i,o),rc(o,null,null,l),nc()),h=i.memoizedState,g=o.memoizedState,h.parent!==c?(h={parent:c,cache:c},o.memoizedState=h,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=h),qo(o,Rn,c)):(c=g.cache,qo(o,Rn,c),c!==h.cache&&Yy(o,[Rn],l,!0))),Yn(i,o,o.pendingProps.children,l),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function mo(i){i.flags|=4}function Dv(i,o,l,c,h){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(h&335544128)===h)if(i.stateNode.complete)i.flags|=8192;else if(w2())i.flags|=8192;else throw Ya=rp,Wy}else i.flags&=-16777217}function WC(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!dA(o))if(w2())i.flags|=8192;else throw Ya=rp,Wy}function Sp(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?et():536870912,i.lanes|=o,bl|=o)}function uc(i,o){if(!pt)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function nn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,c=0;if(o)for(var h=i.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=i,h=h.sibling;else for(h=i.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=i,h=h.sibling;return i.subtreeFlags|=c,i.childLanes=l,o}function p9(i,o,l){var c=o.pendingProps;switch(Hy(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nn(o),null;case 1:return nn(o),null;case 3:return l=o.stateNode,c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),co(Rn),Ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(al(o)?mo(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Fy())),nn(o),null;case 26:var h=o.type,g=o.memoizedState;return i===null?(mo(o),g!==null?(nn(o),WC(o,g)):(nn(o),Dv(o,h,null,c,l))):g?g!==i.memoizedState?(mo(o),nn(o),WC(o,g)):(nn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==c&&mo(o),nn(o),Dv(o,h,i,c,l)),null;case 27:if(Ue(o),l=ye.current,h=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&mo(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return nn(o),null}i=fe.current,al(o)?RT(o):(i=iA(h,c,l),o.stateNode=i,mo(o))}return nn(o),null;case 5:if(Ue(o),h=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&mo(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return nn(o),null}if(g=fe.current,al(o))RT(o);else{var x=Bp(ye.current);switch(g){case 1:g=x.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=x.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=x.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=x.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=x.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?x.createElement("select",{is:c.is}):x.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?x.createElement(h,{is:c.is}):x.createElement(h)}}g[Fn]=o,g[mr]=c;e:for(x=o.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===o)break e;for(;x.sibling===null;){if(x.return===null||x.return===o)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}o.stateNode=g;e:switch(Xn(g,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&mo(o)}}return nn(o),Dv(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,l),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==c&&mo(o);else{if(typeof c!="string"&&o.stateNode===null)throw Error(r(166));if(i=ye.current,al(o)){if(i=o.stateNode,l=o.memoizedProps,c=null,h=qn,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}i[Fn]=o,i=!!(i.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||Y2(i.nodeValue,l)),i||Fo(o,!0)}else i=Bp(i).createTextNode(c),i[Fn]=o,o.stateNode=i}return nn(o),null;case 31:if(l=o.memoizedState,i===null||i.memoizedState!==null){if(c=al(o),l!==null){if(i===null){if(!c)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Fn]=o}else Ha(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;nn(o),i=!1}else l=Fy(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return o.flags&256?(Lr(o),o):(Lr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return nn(o),null;case 13:if(c=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(h=al(o),c!==null&&c.dehydrated!==null){if(i===null){if(!h)throw Error(r(318));if(h=o.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[Fn]=o}else Ha(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;nn(o),h=!1}else h=Fy(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=h),h=!0;if(!h)return o.flags&256?(Lr(o),o):(Lr(o),null)}return Lr(o),(o.flags&128)!==0?(o.lanes=l,o):(l=c!==null,i=i!==null&&i.memoizedState!==null,l&&(c=o.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)),l!==i&&l&&(o.child.flags|=8192),Sp(o,o.updateQueue),nn(o),null);case 4:return Ae(),i===null&&n0(o.stateNode.containerInfo),nn(o),null;case 10:return co(o.type),nn(o),null;case 19:if(W(_n),c=o.memoizedState,c===null)return nn(o),null;if(h=(o.flags&128)!==0,g=c.rendering,g===null)if(h)uc(c,!1);else{if(bn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(g=sp(i),g!==null){for(o.flags|=128,uc(c,!1),i=g.updateQueue,o.updateQueue=i,Sp(o,i),o.subtreeFlags=0,i=l,l=o.child;l!==null;)TT(l,i),l=l.sibling;return M(_n,_n.current&1|2),pt&&lo(o,c.treeForkCount),o.child}i=i.sibling}c.tail!==null&&We()>Tp&&(o.flags|=128,h=!0,uc(c,!1),o.lanes=4194304)}else{if(!h)if(i=sp(g),i!==null){if(o.flags|=128,h=!0,i=i.updateQueue,o.updateQueue=i,Sp(o,i),uc(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!pt)return nn(o),null}else 2*We()-c.renderingStartTime>Tp&&l!==536870912&&(o.flags|=128,h=!0,uc(c,!1),o.lanes=4194304);c.isBackwards?(g.sibling=o.child,o.child=g):(i=c.last,i!==null?i.sibling=g:o.child=g,c.last=g)}return c.tail!==null?(i=c.tail,c.rendering=i,c.tail=i.sibling,c.renderingStartTime=We(),i.sibling=null,l=_n.current,M(_n,h?l&1|2:l&1),pt&&lo(o,c.treeForkCount),i):(nn(o),null);case 22:case 23:return Lr(o),rv(),c=o.memoizedState!==null,i!==null?i.memoizedState!==null!==c&&(o.flags|=8192):c&&(o.flags|=8192),c?(l&536870912)!==0&&(o.flags&128)===0&&(nn(o),o.subtreeFlags&6&&(o.flags|=8192)):nn(o),l=o.updateQueue,l!==null&&Sp(o,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==l&&(o.flags|=2048),i!==null&&W(qa),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),co(Rn),nn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function h9(i,o){switch(Hy(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return co(Rn),Ae(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Ue(o),null;case 31:if(o.memoizedState!==null){if(Lr(o),o.alternate===null)throw Error(r(340));Ha()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Lr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Ha()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return W(_n),null;case 4:return Ae(),null;case 10:return co(o.type),null;case 22:case 23:return Lr(o),rv(),i!==null&&W(qa),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return co(Rn),null;case 25:return null;default:return null}}function QC(i,o){switch(Hy(o),o.tag){case 3:co(Rn),Ae();break;case 26:case 27:case 5:Ue(o);break;case 4:Ae();break;case 31:o.memoizedState!==null&&Lr(o);break;case 13:Lr(o);break;case 19:W(_n);break;case 10:co(o.type);break;case 22:case 23:Lr(o),rv(),i!==null&&W(qa);break;case 24:co(Rn)}}function cc(i,o){try{var l=o.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&i)===i){c=void 0;var g=l.create,x=l.inst;c=g(),x.destroy=c}l=l.next}while(l!==h)}}catch(R){jt(o,o.return,R)}}function Wo(i,o,l){try{var c=o.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&i)===i){var x=c.inst,R=x.destroy;if(R!==void 0){x.destroy=void 0,h=o;var V=l,J=R;try{J()}catch(oe){jt(h,V,oe)}}}c=c.next}while(c!==g)}}catch(oe){jt(o,o.return,oe)}}function JC(i){var o=i.updateQueue;if(o!==null){var l=i.stateNode;try{VT(o,l)}catch(c){jt(i,i.return,c)}}}function e2(i,o,l){l.props=Ka(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(c){jt(i,o,c)}}function fc(i,o){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:c=i.stateNode;break;default:c=i.stateNode}typeof l=="function"?i.refCleanup=l(c):l.current=c}}catch(h){jt(i,o,h)}}function Ui(i,o){var l=i.ref,c=i.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){jt(i,o,h)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){jt(i,o,h)}else l.current=null}function t2(i){var o=i.type,l=i.memoizedProps,c=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){jt(i,i.return,h)}}function Bv(i,o,l){try{var c=i.stateNode;z9(c,i.type,l,o),c[mr]=o}catch(h){jt(i,i.return,h)}}function n2(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ia(i.type)||i.tag===4}function zv(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||n2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ia(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Lv(i,o,l){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,o):(o=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,o.appendChild(i),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=oo));else if(c!==4&&(c===27&&ia(i.type)&&(l=i.stateNode,o=null),i=i.child,i!==null))for(Lv(i,o,l),i=i.sibling;i!==null;)Lv(i,o,l),i=i.sibling}function xp(i,o,l){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(c!==4&&(c===27&&ia(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(xp(i,o,l),i=i.sibling;i!==null;)xp(i,o,l),i=i.sibling}function r2(i){var o=i.stateNode,l=i.memoizedProps;try{for(var c=i.type,h=o.attributes;h.length;)o.removeAttributeNode(h[0]);Xn(o,c,l),o[Fn]=i,o[mr]=l}catch(g){jt(i,i.return,g)}}var go=!1,Mn=!1,Pv=!1,i2=typeof WeakSet=="function"?WeakSet:Set,Un=null;function m9(i,o){if(i=i.containerInfo,o0=Hp,i=gT(i),Ny(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{l.nodeType,g.nodeType}catch{l=null;break e}var x=0,R=-1,V=-1,J=0,oe=0,ce=i,ee=null;t:for(;;){for(var ne;ce!==l||h!==0&&ce.nodeType!==3||(R=x+h),ce!==g||c!==0&&ce.nodeType!==3||(V=x+c),ce.nodeType===3&&(x+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)ee=ce,ce=ne;for(;;){if(ce===i)break t;if(ee===l&&++J===h&&(R=x),ee===g&&++oe===c&&(V=x),(ne=ce.nextSibling)!==null)break;ce=ee,ee=ce.parentNode}ce=ne}l=R===-1||V===-1?null:{start:R,end:V}}else l=null}l=l||{start:0,end:0}}else l=null;for(a0={focusedElem:i,selectionRange:l},Hp=!1,Un=o;Un!==null;)if(o=Un,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Un=i;else for(;Un!==null;){switch(o=Un,g=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)h=i[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&g!==null){i=void 0,l=o,h=g.memoizedProps,g=g.memoizedState,c=l.stateNode;try{var _e=Ka(l.type,h);i=c.getSnapshotBeforeUpdate(_e,g),c.__reactInternalSnapshotBeforeUpdate=i}catch(He){jt(l,l.return,He)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,l=i.nodeType,l===9)u0(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":u0(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,Un=i;break}Un=o.return}}function o2(i,o,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:vo(i,l),c&4&&cc(5,l);break;case 1:if(vo(i,l),c&4)if(i=l.stateNode,o===null)try{i.componentDidMount()}catch(x){jt(l,l.return,x)}else{var h=Ka(l.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(h,o,i.__reactInternalSnapshotBeforeUpdate)}catch(x){jt(l,l.return,x)}}c&64&&JC(l),c&512&&fc(l,l.return);break;case 3:if(vo(i,l),c&64&&(i=l.updateQueue,i!==null)){if(o=null,l.child!==null)switch(l.child.tag){case 27:case 5:o=l.child.stateNode;break;case 1:o=l.child.stateNode}try{VT(i,o)}catch(x){jt(l,l.return,x)}}break;case 27:o===null&&c&4&&r2(l);case 26:case 5:vo(i,l),o===null&&c&4&&t2(l),c&512&&fc(l,l.return);break;case 12:vo(i,l);break;case 31:vo(i,l),c&4&&l2(i,l);break;case 13:vo(i,l),c&4&&u2(i,l),c&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=_9.bind(null,l),F9(i,l))));break;case 22:if(c=l.memoizedState!==null||go,!c){o=o!==null&&o.memoizedState!==null||Mn,h=go;var g=Mn;go=c,(Mn=o)&&!g?bo(i,l,(l.subtreeFlags&8772)!==0):vo(i,l),go=h,Mn=g}break;case 30:break;default:vo(i,l)}}function a2(i){var o=i.alternate;o!==null&&(i.alternate=null,a2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&hy(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var sn=null,yr=!1;function yo(i,o,l){for(l=l.child;l!==null;)s2(i,o,l),l=l.sibling}function s2(i,o,l){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Bt,l)}catch{}switch(l.tag){case 26:Mn||Ui(l,o),yo(i,o,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Mn||Ui(l,o);var c=sn,h=yr;ia(l.type)&&(sn=l.stateNode,yr=!1),yo(i,o,l),Sc(l.stateNode),sn=c,yr=h;break;case 5:Mn||Ui(l,o);case 6:if(c=sn,h=yr,sn=null,yo(i,o,l),sn=c,yr=h,sn!==null)if(yr)try{(sn.nodeType===9?sn.body:sn.nodeName==="HTML"?sn.ownerDocument.body:sn).removeChild(l.stateNode)}catch(g){jt(l,o,g)}else try{sn.removeChild(l.stateNode)}catch(g){jt(l,o,g)}break;case 18:sn!==null&&(yr?(i=sn,J2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),Al(i)):J2(sn,l.stateNode));break;case 4:c=sn,h=yr,sn=l.stateNode.containerInfo,yr=!0,yo(i,o,l),sn=c,yr=h;break;case 0:case 11:case 14:case 15:Wo(2,l,o),Mn||Wo(4,l,o),yo(i,o,l);break;case 1:Mn||(Ui(l,o),c=l.stateNode,typeof c.componentWillUnmount=="function"&&e2(l,o,c)),yo(i,o,l);break;case 21:yo(i,o,l);break;case 22:Mn=(c=Mn)||l.memoizedState!==null,yo(i,o,l),Mn=c;break;default:yo(i,o,l)}}function l2(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Al(i)}catch(l){jt(o,o.return,l)}}}function u2(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Al(i)}catch(l){jt(o,o.return,l)}}function g9(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new i2),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new i2),o;default:throw Error(r(435,i.tag))}}function Ep(i,o){var l=g9(i);o.forEach(function(c){if(!l.has(c)){l.add(c);var h=T9.bind(null,i,c);c.then(h,h)}})}function vr(i,o){var l=o.deletions;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c],g=i,x=o,R=x;e:for(;R!==null;){switch(R.tag){case 27:if(ia(R.type)){sn=R.stateNode,yr=!1;break e}break;case 5:sn=R.stateNode,yr=!1;break e;case 3:case 4:sn=R.stateNode.containerInfo,yr=!0;break e}R=R.return}if(sn===null)throw Error(r(160));s2(g,x,h),sn=null,yr=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)c2(o,i),o=o.sibling}var vi=null;function c2(i,o){var l=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:vr(o,i),br(i),c&4&&(Wo(3,i,i.return),cc(3,i),Wo(5,i,i.return));break;case 1:vr(o,i),br(i),c&512&&(Mn||l===null||Ui(l,l.return)),c&64&&go&&(i=i.updateQueue,i!==null&&(c=i.callbacks,c!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var h=vi;if(vr(o,i),br(i),c&512&&(Mn||l===null||Ui(l,l.return)),c&4){var g=l!==null?l.memoizedState:null;if(c=i.memoizedState,l===null)if(c===null)if(i.stateNode===null){e:{c=i.type,l=i.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[Pu]||g[Fn]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),Xn(g,c,l),g[Fn]=i,$n(g),c=g;break e;case"link":var x=cA("link","href",h).get(c+(l.href||""));if(x){for(var R=0;R<x.length;R++)if(g=x[R],g.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&g.getAttribute("rel")===(l.rel==null?null:l.rel)&&g.getAttribute("title")===(l.title==null?null:l.title)&&g.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){x.splice(R,1);break t}}g=h.createElement(c),Xn(g,c,l),h.head.appendChild(g);break;case"meta":if(x=cA("meta","content",h).get(c+(l.content||""))){for(R=0;R<x.length;R++)if(g=x[R],g.getAttribute("content")===(l.content==null?null:""+l.content)&&g.getAttribute("name")===(l.name==null?null:l.name)&&g.getAttribute("property")===(l.property==null?null:l.property)&&g.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&g.getAttribute("charset")===(l.charSet==null?null:l.charSet)){x.splice(R,1);break t}}g=h.createElement(c),Xn(g,c,l),h.head.appendChild(g);break;default:throw Error(r(468,c))}g[Fn]=i,$n(g),c=g}i.stateNode=c}else fA(h,i.type,i.stateNode);else i.stateNode=uA(h,c,i.memoizedProps);else g!==c?(g===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):g.count--,c===null?fA(h,i.type,i.stateNode):uA(h,c,i.memoizedProps)):c===null&&i.stateNode!==null&&Bv(i,i.memoizedProps,l.memoizedProps)}break;case 27:vr(o,i),br(i),c&512&&(Mn||l===null||Ui(l,l.return)),l!==null&&c&4&&Bv(i,i.memoizedProps,l.memoizedProps);break;case 5:if(vr(o,i),br(i),c&512&&(Mn||l===null||Ui(l,l.return)),i.flags&32){h=i.stateNode;try{Ks(h,"")}catch(_e){jt(i,i.return,_e)}}c&4&&i.stateNode!=null&&(h=i.memoizedProps,Bv(i,h,l!==null?l.memoizedProps:h)),c&1024&&(Pv=!0);break;case 6:if(vr(o,i),br(i),c&4){if(i.stateNode===null)throw Error(r(162));c=i.memoizedProps,l=i.stateNode;try{l.nodeValue=c}catch(_e){jt(i,i.return,_e)}}break;case 3:if(Pp=null,h=vi,vi=zp(o.containerInfo),vr(o,i),vi=h,br(i),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Al(o.containerInfo)}catch(_e){jt(i,i.return,_e)}Pv&&(Pv=!1,f2(i));break;case 4:c=vi,vi=zp(i.stateNode.containerInfo),vr(o,i),br(i),vi=c;break;case 12:vr(o,i),br(i);break;case 31:vr(o,i),br(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Ep(i,c)));break;case 13:vr(o,i),br(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(_p=We()),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Ep(i,c)));break;case 22:h=i.memoizedState!==null;var V=l!==null&&l.memoizedState!==null,J=go,oe=Mn;if(go=J||h,Mn=oe||V,vr(o,i),Mn=oe,go=J,br(i),c&8192)e:for(o=i.stateNode,o._visibility=h?o._visibility&-2:o._visibility|1,h&&(l===null||V||go||Mn||Wa(i)),l=null,o=i;;){if(o.tag===5||o.tag===26){if(l===null){V=l=o;try{if(g=V.stateNode,h)x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{R=V.stateNode;var ce=V.memoizedProps.style,ee=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;R.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(_e){jt(V,V.return,_e)}}}else if(o.tag===6){if(l===null){V=o;try{V.stateNode.nodeValue=h?"":V.memoizedProps}catch(_e){jt(V,V.return,_e)}}}else if(o.tag===18){if(l===null){V=o;try{var ne=V.stateNode;h?eA(ne,!0):eA(V.stateNode,!1)}catch(_e){jt(V,V.return,_e)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;l===o&&(l=null),o=o.return}l===o&&(l=null),o.sibling.return=o.return,o=o.sibling}c&4&&(c=i.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,Ep(i,l))));break;case 19:vr(o,i),br(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Ep(i,c)));break;case 30:break;case 21:break;default:vr(o,i),br(i)}}function br(i){var o=i.flags;if(o&2){try{for(var l,c=i.return;c!==null;){if(n2(c)){l=c;break}c=c.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var h=l.stateNode,g=zv(i);xp(i,g,h);break;case 5:var x=l.stateNode;l.flags&32&&(Ks(x,""),l.flags&=-33);var R=zv(i);xp(i,R,x);break;case 3:case 4:var V=l.stateNode.containerInfo,J=zv(i);Lv(i,J,V);break;default:throw Error(r(161))}}catch(oe){jt(i,i.return,oe)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function f2(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;f2(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function vo(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)o2(i,o.alternate,o),o=o.sibling}function Wa(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Wo(4,o,o.return),Wa(o);break;case 1:Ui(o,o.return);var l=o.stateNode;typeof l.componentWillUnmount=="function"&&e2(o,o.return,l),Wa(o);break;case 27:Sc(o.stateNode);case 26:case 5:Ui(o,o.return),Wa(o);break;case 22:o.memoizedState===null&&Wa(o);break;case 30:Wa(o);break;default:Wa(o)}i=i.sibling}}function bo(i,o,l){for(l=l&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var c=o.alternate,h=i,g=o,x=g.flags;switch(g.tag){case 0:case 11:case 15:bo(h,g,l),cc(4,g);break;case 1:if(bo(h,g,l),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(J){jt(c,c.return,J)}if(c=g,h=c.updateQueue,h!==null){var R=c.stateNode;try{var V=h.shared.hiddenCallbacks;if(V!==null)for(h.shared.hiddenCallbacks=null,h=0;h<V.length;h++)HT(V[h],R)}catch(J){jt(c,c.return,J)}}l&&x&64&&JC(g),fc(g,g.return);break;case 27:r2(g);case 26:case 5:bo(h,g,l),l&&c===null&&x&4&&t2(g),fc(g,g.return);break;case 12:bo(h,g,l);break;case 31:bo(h,g,l),l&&x&4&&l2(h,g);break;case 13:bo(h,g,l),l&&x&4&&u2(h,g);break;case 22:g.memoizedState===null&&bo(h,g,l),fc(g,g.return);break;case 30:break;default:bo(h,g,l)}o=o.sibling}}function $v(i,o){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&Wu(l))}function Uv(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Wu(i))}function bi(i,o,l,c){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)d2(i,o,l,c),o=o.sibling}function d2(i,o,l,c){var h=o.flags;switch(o.tag){case 0:case 11:case 15:bi(i,o,l,c),h&2048&&cc(9,o);break;case 1:bi(i,o,l,c);break;case 3:bi(i,o,l,c),h&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Wu(i)));break;case 12:if(h&2048){bi(i,o,l,c),i=o.stateNode;try{var g=o.memoizedProps,x=g.id,R=g.onPostCommit;typeof R=="function"&&R(x,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(V){jt(o,o.return,V)}}else bi(i,o,l,c);break;case 31:bi(i,o,l,c);break;case 13:bi(i,o,l,c);break;case 23:break;case 22:g=o.stateNode,x=o.alternate,o.memoizedState!==null?g._visibility&2?bi(i,o,l,c):dc(i,o):g._visibility&2?bi(i,o,l,c):(g._visibility|=2,gl(i,o,l,c,(o.subtreeFlags&10256)!==0||!1)),h&2048&&$v(x,o);break;case 24:bi(i,o,l,c),h&2048&&Uv(o.alternate,o);break;default:bi(i,o,l,c)}}function gl(i,o,l,c,h){for(h=h&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var g=i,x=o,R=l,V=c,J=x.flags;switch(x.tag){case 0:case 11:case 15:gl(g,x,R,V,h),cc(8,x);break;case 23:break;case 22:var oe=x.stateNode;x.memoizedState!==null?oe._visibility&2?gl(g,x,R,V,h):dc(g,x):(oe._visibility|=2,gl(g,x,R,V,h)),h&&J&2048&&$v(x.alternate,x);break;case 24:gl(g,x,R,V,h),h&&J&2048&&Uv(x.alternate,x);break;default:gl(g,x,R,V,h)}o=o.sibling}}function dc(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var l=i,c=o,h=c.flags;switch(c.tag){case 22:dc(l,c),h&2048&&$v(c.alternate,c);break;case 24:dc(l,c),h&2048&&Uv(c.alternate,c);break;default:dc(l,c)}o=o.sibling}}var pc=8192;function yl(i,o,l){if(i.subtreeFlags&pc)for(i=i.child;i!==null;)p2(i,o,l),i=i.sibling}function p2(i,o,l){switch(i.tag){case 26:yl(i,o,l),i.flags&pc&&i.memoizedState!==null&&n7(l,vi,i.memoizedState,i.memoizedProps);break;case 5:yl(i,o,l);break;case 3:case 4:var c=vi;vi=zp(i.stateNode.containerInfo),yl(i,o,l),vi=c;break;case 22:i.memoizedState===null&&(c=i.alternate,c!==null&&c.memoizedState!==null?(c=pc,pc=16777216,yl(i,o,l),pc=c):yl(i,o,l));break;default:yl(i,o,l)}}function h2(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function hc(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];Un=c,g2(c,i)}h2(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)m2(i),i=i.sibling}function m2(i){switch(i.tag){case 0:case 11:case 15:hc(i),i.flags&2048&&Wo(9,i,i.return);break;case 3:hc(i);break;case 12:hc(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,wp(i)):hc(i);break;default:hc(i)}}function wp(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];Un=c,g2(c,i)}h2(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Wo(8,o,o.return),wp(o);break;case 22:l=o.stateNode,l._visibility&2&&(l._visibility&=-3,wp(o));break;default:wp(o)}i=i.sibling}}function g2(i,o){for(;Un!==null;){var l=Un;switch(l.tag){case 0:case 11:case 15:Wo(8,l,o);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Wu(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,Un=c;else e:for(l=i;Un!==null;){c=Un;var h=c.sibling,g=c.return;if(a2(c),c===l){Un=null;break e}if(h!==null){h.return=g,Un=h;break e}Un=g}}}var y9={getCacheForType:function(i){var o=Gn(Rn),l=o.data.get(i);return l===void 0&&(l=i(),o.data.set(i,l)),l},cacheSignal:function(){return Gn(Rn).controller.signal}},v9=typeof WeakMap=="function"?WeakMap:Map,Nt=0,Zt=null,at=null,ct=0,Ut=0,Pr=null,Qo=!1,vl=!1,jv=!1,So=0,bn=0,Jo=0,Qa=0,Hv=0,$r=0,bl=0,mc=null,Sr=null,Vv=!1,_p=0,y2=0,Tp=1/0,Cp=null,ea=null,zn=0,ta=null,Sl=null,xo=0,Fv=0,qv=null,v2=null,gc=0,Gv=null;function Ur(){return(Nt&2)!==0&&ct!==0?ct&-ct:D.T!==null?Qv():D_()}function b2(){if($r===0)if((ct&536870912)===0||pt){var i=no;no<<=1,(no&3932160)===0&&(no=262144),$r=i}else $r=536870912;return i=zr.current,i!==null&&(i.flags|=32),$r}function xr(i,o,l){(i===Zt&&(Ut===2||Ut===9)||i.cancelPendingCommit!==null)&&(xl(i,0),na(i,ct,$r,!1)),Lu(i,l),((Nt&2)===0||i!==Zt)&&(i===Zt&&((Nt&2)===0&&(Qa|=l),bn===4&&na(i,ct,$r,!1)),ji(i))}function S2(i,o,l){if((Nt&6)!==0)throw Error(r(327));var c=!l&&(o&127)===0&&(o&i.expiredLanes)===0||Ba(i,o),h=c?x9(i,o):Xv(i,o,!0),g=c;do{if(h===0){vl&&!c&&na(i,o,0,!1);break}else{if(l=i.current.alternate,g&&!b9(l)){h=Xv(i,o,!1),g=!1;continue}if(h===2){if(g=o,i.errorRecoveryDisabledLanes&g)var x=0;else x=i.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){o=x;e:{var R=i;h=mc;var V=R.current.memoizedState.isDehydrated;if(V&&(xl(R,x).flags|=256),x=Xv(R,x,!1),x!==2){if(jv&&!V){R.errorRecoveryDisabledLanes|=g,Qa|=g,h=4;break e}g=Sr,Sr=h,g!==null&&(Sr===null?Sr=g:Sr.push.apply(Sr,g))}h=x}if(g=!1,h!==2)continue}}if(h===1){xl(i,0),na(i,o,0,!0);break}e:{switch(c=i,g=h,g){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:na(c,o,$r,!Qo);break e;case 2:Sr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(h=_p+300-We(),10<h)){if(na(c,o,$r,!Qo),Vs(c,0,!0)!==0)break e;xo=o,c.timeoutHandle=W2(x2.bind(null,c,l,Sr,Cp,Vv,o,$r,Qa,bl,Qo,g,"Throttled",-0,0),h);break e}x2(c,l,Sr,Cp,Vv,o,$r,Qa,bl,Qo,g,null,-0,0)}}break}while(!0);ji(i)}function x2(i,o,l,c,h,g,x,R,V,J,oe,ce,ee,ne){if(i.timeoutHandle=-1,ce=o.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oo},p2(o,g,ce);var _e=(g&62914560)===g?_p-We():(g&4194048)===g?y2-We():0;if(_e=r7(ce,_e),_e!==null){xo=g,i.cancelPendingCommit=_e(O2.bind(null,i,o,g,l,c,h,x,R,V,oe,ce,null,ee,ne)),na(i,g,x,!J);return}}O2(i,o,g,l,c,h,x,R,V)}function b9(i){for(var o=i;;){var l=o.tag;if((l===0||l===11||l===15)&&o.flags&16384&&(l=o.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var h=l[c],g=h.getSnapshot;h=h.value;try{if(!Dr(g(),h))return!1}catch{return!1}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function na(i,o,l,c){o&=~Hv,o&=~Qa,i.suspendedLanes|=o,i.pingedLanes&=~o,c&&(i.warmLanes|=o),c=i.expirationTimes;for(var h=o;0<h;){var g=31-gt(h),x=1<<g;c[g]=-1,h&=~x}l!==0&&N_(i,l,o)}function Ap(){return(Nt&6)===0?(yc(0),!1):!0}function Yv(){if(at!==null){if(Ut===0)var i=at.return;else i=at,uo=Va=null,uv(i),fl=null,Ju=0,i=at;for(;i!==null;)QC(i.alternate,i),i=i.return;at=null}}function xl(i,o){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,$9(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xo=0,Yv(),Zt=i,at=l=so(i.current,null),ct=o,Ut=0,Pr=null,Qo=!1,vl=Ba(i,o),jv=!1,bl=$r=Hv=Qa=Jo=bn=0,Sr=mc=null,Vv=!1,(o&8)!==0&&(o|=o&32);var c=i.entangledLanes;if(c!==0)for(i=i.entanglements,c&=o;0<c;){var h=31-gt(c),g=1<<h;o|=i[h],c&=~g}return So=o,Xd(),l}function E2(i,o){tt=null,D.H=sc,o===cl||o===np?(o=PT(),Ut=3):o===Wy?(o=PT(),Ut=4):Ut=o===Tv?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Pr=o,at===null&&(bn=1,gp(i,ni(o,i.current)))}function w2(){var i=zr.current;return i===null?!0:(ct&4194048)===ct?ai===null:(ct&62914560)===ct||(ct&536870912)!==0?i===ai:!1}function _2(){var i=D.H;return D.H=sc,i===null?sc:i}function T2(){var i=D.A;return D.A=y9,i}function kp(){bn=4,Qo||(ct&4194048)!==ct&&zr.current!==null||(vl=!0),(Jo&134217727)===0&&(Qa&134217727)===0||Zt===null||na(Zt,ct,$r,!1)}function Xv(i,o,l){var c=Nt;Nt|=2;var h=_2(),g=T2();(Zt!==i||ct!==o)&&(Cp=null,xl(i,o)),o=!1;var x=bn;e:do try{if(Ut!==0&&at!==null){var R=at,V=Pr;switch(Ut){case 8:Yv(),x=6;break e;case 3:case 2:case 9:case 6:zr.current===null&&(o=!0);var J=Ut;if(Ut=0,Pr=null,El(i,R,V,J),l&&vl){x=0;break e}break;default:J=Ut,Ut=0,Pr=null,El(i,R,V,J)}}S9(),x=bn;break}catch(oe){E2(i,oe)}while(!0);return o&&i.shellSuspendCounter++,uo=Va=null,Nt=c,D.H=h,D.A=g,at===null&&(Zt=null,ct=0,Xd()),x}function S9(){for(;at!==null;)C2(at)}function x9(i,o){var l=Nt;Nt|=2;var c=_2(),h=T2();Zt!==i||ct!==o?(Cp=null,Tp=We()+500,xl(i,o)):vl=Ba(i,o);e:do try{if(Ut!==0&&at!==null){o=at;var g=Pr;t:switch(Ut){case 1:Ut=0,Pr=null,El(i,o,g,1);break;case 2:case 9:if(zT(g)){Ut=0,Pr=null,A2(o);break}o=function(){Ut!==2&&Ut!==9||Zt!==i||(Ut=7),ji(i)},g.then(o,o);break e;case 3:Ut=7;break e;case 4:Ut=5;break e;case 7:zT(g)?(Ut=0,Pr=null,A2(o)):(Ut=0,Pr=null,El(i,o,g,7));break;case 5:var x=null;switch(at.tag){case 26:x=at.memoizedState;case 5:case 27:var R=at;if(x?dA(x):R.stateNode.complete){Ut=0,Pr=null;var V=R.sibling;if(V!==null)at=V;else{var J=R.return;J!==null?(at=J,Op(J)):at=null}break t}}Ut=0,Pr=null,El(i,o,g,5);break;case 6:Ut=0,Pr=null,El(i,o,g,6);break;case 8:Yv(),bn=6;break e;default:throw Error(r(462))}}E9();break}catch(oe){E2(i,oe)}while(!0);return uo=Va=null,D.H=c,D.A=h,Nt=l,at!==null?0:(Zt=null,ct=0,Xd(),bn)}function E9(){for(;at!==null&&!ke();)C2(at)}function C2(i){var o=KC(i.alternate,i,So);i.memoizedProps=i.pendingProps,o===null?Op(i):at=o}function A2(i){var o=i,l=o.alternate;switch(o.tag){case 15:case 0:o=FC(l,o,o.pendingProps,o.type,void 0,ct);break;case 11:o=FC(l,o,o.pendingProps,o.type.render,o.ref,ct);break;case 5:uv(o);default:QC(l,o),o=at=TT(o,So),o=KC(l,o,So)}i.memoizedProps=i.pendingProps,o===null?Op(i):at=o}function El(i,o,l,c){uo=Va=null,uv(o),fl=null,Ju=0;var h=o.return;try{if(c9(i,h,o,l,ct)){bn=1,gp(i,ni(l,i.current)),at=null;return}}catch(g){if(h!==null)throw at=h,g;bn=1,gp(i,ni(l,i.current)),at=null;return}o.flags&32768?(pt||c===1?i=!0:vl||(ct&536870912)!==0?i=!1:(Qo=i=!0,(c===2||c===9||c===3||c===6)&&(c=zr.current,c!==null&&c.tag===13&&(c.flags|=16384))),k2(o,i)):Op(o)}function Op(i){var o=i;do{if((o.flags&32768)!==0){k2(o,Qo);return}i=o.return;var l=p9(o.alternate,o,So);if(l!==null){at=l;return}if(o=o.sibling,o!==null){at=o;return}at=o=i}while(o!==null);bn===0&&(bn=5)}function k2(i,o){do{var l=h9(i.alternate,i);if(l!==null){l.flags&=32767,at=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!o&&(i=i.sibling,i!==null)){at=i;return}at=i=l}while(i!==null);bn=6,at=null}function O2(i,o,l,c,h,g,x,R,V){i.cancelPendingCommit=null;do Rp();while(zn!==0);if((Nt&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(g=o.lanes|o.childLanes,g|=zy,tj(i,l,g,x,R,V),i===Zt&&(at=Zt=null,ct=0),Sl=o,ta=i,xo=l,Fv=g,qv=h,v2=c,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,C9(xe,function(){return D2(),null})):(i.callbackNode=null,i.callbackPriority=0),c=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||c){c=D.T,D.T=null,h=Y.p,Y.p=2,x=Nt,Nt|=4;try{m9(i,o,l)}finally{Nt=x,Y.p=h,D.T=c}}zn=1,R2(),N2(),I2()}}function R2(){if(zn===1){zn=0;var i=ta,o=Sl,l=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var c=Y.p;Y.p=2;var h=Nt;Nt|=4;try{c2(o,i);var g=a0,x=gT(i.containerInfo),R=g.focusedElem,V=g.selectionRange;if(x!==R&&R&&R.ownerDocument&&mT(R.ownerDocument.documentElement,R)){if(V!==null&&Ny(R)){var J=V.start,oe=V.end;if(oe===void 0&&(oe=J),"selectionStart"in R)R.selectionStart=J,R.selectionEnd=Math.min(oe,R.value.length);else{var ce=R.ownerDocument||document,ee=ce&&ce.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),_e=R.textContent.length,He=Math.min(V.start,_e),Yt=V.end===void 0?He:Math.min(V.end,_e);!ne.extend&&He>Yt&&(x=Yt,Yt=He,He=x);var Z=hT(R,He),q=hT(R,Yt);if(Z&&q&&(ne.rangeCount!==1||ne.anchorNode!==Z.node||ne.anchorOffset!==Z.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var Q=ce.createRange();Q.setStart(Z.node,Z.offset),ne.removeAllRanges(),He>Yt?(ne.addRange(Q),ne.extend(q.node,q.offset)):(Q.setEnd(q.node,q.offset),ne.addRange(Q))}}}}for(ce=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ce.length;R++){var le=ce[R];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Hp=!!o0,a0=o0=null}finally{Nt=h,Y.p=c,D.T=l}}i.current=o,zn=2}}function N2(){if(zn===2){zn=0;var i=ta,o=Sl,l=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var c=Y.p;Y.p=2;var h=Nt;Nt|=4;try{o2(i,o.alternate,o)}finally{Nt=h,Y.p=c,D.T=l}}zn=3}}function I2(){if(zn===4||zn===3){zn=0,Bn();var i=ta,o=Sl,l=xo,c=v2;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?zn=5:(zn=0,Sl=ta=null,M2(i,i.pendingLanes));var h=i.pendingLanes;if(h===0&&(ea=null),dy(l),o=o.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Bt,o,void 0,(o.current.flags&128)===128)}catch{}if(c!==null){o=D.T,h=Y.p,Y.p=2,D.T=null;try{for(var g=i.onRecoverableError,x=0;x<c.length;x++){var R=c[x];g(R.value,{componentStack:R.stack})}}finally{D.T=o,Y.p=h}}(xo&3)!==0&&Rp(),ji(i),h=i.pendingLanes,(l&261930)!==0&&(h&42)!==0?i===Gv?gc++:(gc=0,Gv=i):gc=0,yc(0)}}function M2(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Wu(o)))}function Rp(){return R2(),N2(),I2(),D2()}function D2(){if(zn!==5)return!1;var i=ta,o=Fv;Fv=0;var l=dy(xo),c=D.T,h=Y.p;try{Y.p=32>l?32:l,D.T=null,l=qv,qv=null;var g=ta,x=xo;if(zn=0,Sl=ta=null,xo=0,(Nt&6)!==0)throw Error(r(331));var R=Nt;if(Nt|=4,m2(g.current),d2(g,g.current,x,l),Nt=R,yc(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Bt,g)}catch{}return!0}finally{Y.p=h,D.T=c,M2(i,o)}}function B2(i,o,l){o=ni(l,o),o=_v(i.stateNode,o,2),i=Xo(i,o,2),i!==null&&(Lu(i,2),ji(i))}function jt(i,o,l){if(i.tag===3)B2(i,i,l);else for(;o!==null;){if(o.tag===3){B2(o,i,l);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ea===null||!ea.has(c))){i=ni(l,i),l=zC(2),c=Xo(o,l,2),c!==null&&(LC(l,c,o,i),Lu(c,2),ji(c));break}}o=o.return}}function Zv(i,o,l){var c=i.pingCache;if(c===null){c=i.pingCache=new v9;var h=new Set;c.set(o,h)}else h=c.get(o),h===void 0&&(h=new Set,c.set(o,h));h.has(l)||(jv=!0,h.add(l),i=w9.bind(null,i,o,l),o.then(i,i))}function w9(i,o,l){var c=i.pingCache;c!==null&&c.delete(o),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,Zt===i&&(ct&l)===l&&(bn===4||bn===3&&(ct&62914560)===ct&&300>We()-_p?(Nt&2)===0&&xl(i,0):Hv|=l,bl===ct&&(bl=0)),ji(i)}function z2(i,o){o===0&&(o=et()),i=Ua(i,o),i!==null&&(Lu(i,o),ji(i))}function _9(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),z2(i,l)}function T9(i,o){var l=0;switch(i.tag){case 31:case 13:var c=i.stateNode,h=i.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=i.stateNode;break;case 22:c=i.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(o),z2(i,l)}function C9(i,o){return mt(i,o)}var Np=null,wl=null,Kv=!1,Ip=!1,Wv=!1,ra=0;function ji(i){i!==wl&&i.next===null&&(wl===null?Np=wl=i:wl=wl.next=i),Ip=!0,Kv||(Kv=!0,k9())}function yc(i,o){if(!Wv&&Ip){Wv=!0;do for(var l=!1,c=Np;c!==null;){if(i!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var x=c.suspendedLanes,R=c.pingedLanes;g=(1<<31-gt(42|i)+1)-1,g&=h&~(x&~R),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,U2(c,g))}else g=ct,g=Vs(c,c===Zt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Ba(c,g)||(l=!0,U2(c,g));c=c.next}while(l);Wv=!1}}function A9(){L2()}function L2(){Ip=Kv=!1;var i=0;ra!==0&&P9()&&(i=ra);for(var o=We(),l=null,c=Np;c!==null;){var h=c.next,g=P2(c,o);g===0?(c.next=null,l===null?Np=h:l.next=h,h===null&&(wl=l)):(l=c,(i!==0||(g&3)!==0)&&(Ip=!0)),c=h}zn!==0&&zn!==5||yc(i),ra!==0&&(ra=0)}function P2(i,o){for(var l=i.suspendedLanes,c=i.pingedLanes,h=i.expirationTimes,g=i.pendingLanes&-62914561;0<g;){var x=31-gt(g),R=1<<x,V=h[x];V===-1?((R&l)===0||(R&c)!==0)&&(h[x]=cy(R,o)):V<=o&&(i.expiredLanes|=R),g&=~R}if(o=Zt,l=ct,l=Vs(i,i===o?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c=i.callbackNode,l===0||i===o&&(Ut===2||Ut===9)||i.cancelPendingCommit!==null)return c!==null&&c!==null&&ot(c),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||Ba(i,l)){if(o=l&-l,o===i.callbackPriority)return o;switch(c!==null&&ot(c),dy(l)){case 2:case 8:l=se;break;case 32:l=xe;break;case 268435456:l=Ze;break;default:l=xe}return c=$2.bind(null,i),l=mt(l,c),i.callbackPriority=o,i.callbackNode=l,o}return c!==null&&c!==null&&ot(c),i.callbackPriority=2,i.callbackNode=null,2}function $2(i,o){if(zn!==0&&zn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Rp()&&i.callbackNode!==l)return null;var c=ct;return c=Vs(i,i===Zt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c===0?null:(S2(i,c,o),P2(i,We()),i.callbackNode!=null&&i.callbackNode===l?$2.bind(null,i):null)}function U2(i,o){if(Rp())return null;S2(i,o,!0)}function k9(){U9(function(){(Nt&6)!==0?mt(te,A9):L2()})}function Qv(){if(ra===0){var i=ll;i===0&&(i=Mr,Mr<<=1,(Mr&261888)===0&&(Mr=256)),ra=i}return ra}function j2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ud(""+i)}function H2(i,o){var l=o.ownerDocument.createElement("input");return l.name=o.name,l.value=o.value,i.id&&l.setAttribute("form",i.id),o.parentNode.insertBefore(l,o),i=new FormData(i),l.parentNode.removeChild(l),i}function O9(i,o,l,c,h){if(o==="submit"&&l&&l.stateNode===h){var g=j2((h[mr]||null).action),x=c.submitter;x&&(o=(o=x[mr]||null)?j2(o.formAction):x.getAttribute("formAction"),o!==null&&(g=o,x=null));var R=new Fd("action","action",null,c,h);i.push({event:R,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(ra!==0){var V=x?H2(h,x):new FormData(h);vv(l,{pending:!0,data:V,method:h.method,action:g},null,V)}}else typeof g=="function"&&(R.preventDefault(),V=x?H2(h,x):new FormData(h),vv(l,{pending:!0,data:V,method:h.method,action:g},g,V))},currentTarget:h}]})}}for(var Jv=0;Jv<By.length;Jv++){var e0=By[Jv],R9=e0.toLowerCase(),N9=e0[0].toUpperCase()+e0.slice(1);yi(R9,"on"+N9)}yi(bT,"onAnimationEnd"),yi(ST,"onAnimationIteration"),yi(xT,"onAnimationStart"),yi("dblclick","onDoubleClick"),yi("focusin","onFocus"),yi("focusout","onBlur"),yi(Yj,"onTransitionRun"),yi(Xj,"onTransitionStart"),yi(Zj,"onTransitionCancel"),yi(ET,"onTransitionEnd"),Xs("onMouseEnter",["mouseout","mouseover"]),Xs("onMouseLeave",["mouseout","mouseover"]),Xs("onPointerEnter",["pointerout","pointerover"]),Xs("onPointerLeave",["pointerout","pointerover"]),za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),za("onBeforeInput",["compositionend","keypress","textInput","paste"]),za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vc="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(" "),I9=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vc));function V2(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var c=i[l],h=c.event;c=c.listeners;e:{var g=void 0;if(o)for(var x=c.length-1;0<=x;x--){var R=c[x],V=R.instance,J=R.currentTarget;if(R=R.listener,V!==g&&h.isPropagationStopped())break e;g=R,h.currentTarget=J;try{g(h)}catch(oe){Yd(oe)}h.currentTarget=null,g=V}else for(x=0;x<c.length;x++){if(R=c[x],V=R.instance,J=R.currentTarget,R=R.listener,V!==g&&h.isPropagationStopped())break e;g=R,h.currentTarget=J;try{g(h)}catch(oe){Yd(oe)}h.currentTarget=null,g=V}}}}function st(i,o){var l=o[py];l===void 0&&(l=o[py]=new Set);var c=i+"__bubble";l.has(c)||(F2(o,i,2,!1),l.add(c))}function t0(i,o,l){var c=0;o&&(c|=4),F2(l,i,c,o)}var Mp="_reactListening"+Math.random().toString(36).slice(2);function n0(i){if(!i[Mp]){i[Mp]=!0,L_.forEach(function(l){l!=="selectionchange"&&(I9.has(l)||t0(l,!1,i),t0(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Mp]||(o[Mp]=!0,t0("selectionchange",!1,o))}}function F2(i,o,l,c){switch(bA(o)){case 2:var h=a7;break;case 8:h=s7;break;default:h=y0}l=h.bind(null,o,l,i),h=void 0,!Ey||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(h=!0),c?h!==void 0?i.addEventListener(o,l,{capture:!0,passive:h}):i.addEventListener(o,l,!0):h!==void 0?i.addEventListener(o,l,{passive:h}):i.addEventListener(o,l,!1)}function r0(i,o,l,c,h){var g=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var R=c.stateNode.containerInfo;if(R===h)break;if(x===4)for(x=c.return;x!==null;){var V=x.tag;if((V===3||V===4)&&x.stateNode.containerInfo===h)return;x=x.return}for(;R!==null;){if(x=qs(R),x===null)return;if(V=x.tag,V===5||V===6||V===26||V===27){c=g=x;continue e}R=R.parentNode}}c=c.return}Z_(function(){var J=g,oe=Sy(l),ce=[];e:{var ee=wT.get(i);if(ee!==void 0){var ne=Fd,_e=i;switch(i){case"keypress":if(Hd(l)===0)break e;case"keydown":case"keyup":ne=Tj;break;case"focusin":_e="focus",ne=Cy;break;case"focusout":_e="blur",ne=Cy;break;case"beforeblur":case"afterblur":ne=Cy;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=pj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=kj;break;case bT:case ST:case xT:ne=gj;break;case ET:ne=Rj;break;case"scroll":case"scrollend":ne=fj;break;case"wheel":ne=Ij;break;case"copy":case"cut":case"paste":ne=vj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=eT;break;case"toggle":case"beforetoggle":ne=Dj}var He=(o&4)!==0,Yt=!He&&(i==="scroll"||i==="scrollend"),Z=He?ee!==null?ee+"Capture":null:ee;He=[];for(var q=J,Q;q!==null;){var le=q;if(Q=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Q===null||Z===null||(le=Uu(q,Z),le!=null&&He.push(bc(q,le,Q))),Yt)break;q=q.return}0<He.length&&(ee=new ne(ee,_e,null,l,oe),ce.push({event:ee,listeners:He}))}}if((o&7)===0){e:{if(ee=i==="mouseover"||i==="pointerover",ne=i==="mouseout"||i==="pointerout",ee&&l!==by&&(_e=l.relatedTarget||l.fromElement)&&(qs(_e)||_e[Fs]))break e;if((ne||ee)&&(ee=oe.window===oe?oe:(ee=oe.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(_e=l.relatedTarget||l.toElement,ne=J,_e=_e?qs(_e):null,_e!==null&&(Yt=s(_e),He=_e.tag,_e!==Yt||He!==5&&He!==27&&He!==6)&&(_e=null)):(ne=null,_e=J),ne!==_e)){if(He=Q_,le="onMouseLeave",Z="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(He=eT,le="onPointerLeave",Z="onPointerEnter",q="pointer"),Yt=ne==null?ee:$u(ne),Q=_e==null?ee:$u(_e),ee=new He(le,q+"leave",ne,l,oe),ee.target=Yt,ee.relatedTarget=Q,le=null,qs(oe)===J&&(He=new He(Z,q+"enter",_e,l,oe),He.target=Q,He.relatedTarget=Yt,le=He),Yt=le,ne&&_e)t:{for(He=M9,Z=ne,q=_e,Q=0,le=Z;le;le=He(le))Q++;le=0;for(var Pe=q;Pe;Pe=He(Pe))le++;for(;0<Q-le;)Z=He(Z),Q--;for(;0<le-Q;)q=He(q),le--;for(;Q--;){if(Z===q||q!==null&&Z===q.alternate){He=Z;break t}Z=He(Z),q=He(q)}He=null}else He=null;ne!==null&&q2(ce,ee,ne,He,!1),_e!==null&&Yt!==null&&q2(ce,Yt,_e,He,!0)}}e:{if(ee=J?$u(J):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var St=lT;else if(aT(ee))if(uT)St=Fj;else{St=Hj;var Ne=jj}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&vy(J.elementType)&&(St=lT):St=Vj;if(St&&(St=St(i,J))){sT(ce,St,l,oe);break e}Ne&&Ne(i,ee,J),i==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&yy(ee,"number",ee.value)}switch(Ne=J?$u(J):window,i){case"focusin":(aT(Ne)||Ne.contentEditable==="true")&&(el=Ne,Iy=J,Xu=null);break;case"focusout":Xu=Iy=el=null;break;case"mousedown":My=!0;break;case"contextmenu":case"mouseup":case"dragend":My=!1,yT(ce,l,oe);break;case"selectionchange":if(Gj)break;case"keydown":case"keyup":yT(ce,l,oe)}var it;if(ky)e:{switch(i){case"compositionstart":var ft="onCompositionStart";break e;case"compositionend":ft="onCompositionEnd";break e;case"compositionupdate":ft="onCompositionUpdate";break e}ft=void 0}else Js?iT(i,l)&&(ft="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ft="onCompositionStart");ft&&(tT&&l.locale!=="ko"&&(Js||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&Js&&(it=K_()):(jo=oe,wy="value"in jo?jo.value:jo.textContent,Js=!0)),Ne=Dp(J,ft),0<Ne.length&&(ft=new J_(ft,i,null,l,oe),ce.push({event:ft,listeners:Ne}),it?ft.data=it:(it=oT(l),it!==null&&(ft.data=it)))),(it=zj?Lj(i,l):Pj(i,l))&&(ft=Dp(J,"onBeforeInput"),0<ft.length&&(Ne=new J_("onBeforeInput","beforeinput",null,l,oe),ce.push({event:Ne,listeners:ft}),Ne.data=it)),O9(ce,i,J,l,oe)}V2(ce,o)})}function bc(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Dp(i,o){for(var l=o+"Capture",c=[];i!==null;){var h=i,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Uu(i,l),h!=null&&c.unshift(bc(i,h,g)),h=Uu(i,o),h!=null&&c.push(bc(i,h,g))),i.tag===3)return c;i=i.return}return[]}function M9(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function q2(i,o,l,c,h){for(var g=o._reactName,x=[];l!==null&&l!==c;){var R=l,V=R.alternate,J=R.stateNode;if(R=R.tag,V!==null&&V===c)break;R!==5&&R!==26&&R!==27||J===null||(V=J,h?(J=Uu(l,g),J!=null&&x.unshift(bc(l,J,V))):h||(J=Uu(l,g),J!=null&&x.push(bc(l,J,V)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var D9=/\r\n?/g,B9=/\u0000|\uFFFD/g;function G2(i){return(typeof i=="string"?i:""+i).replace(D9,`
9
+ `).replace(B9,"")}function Y2(i,o){return o=G2(o),G2(i)===o}function Gt(i,o,l,c,h,g){switch(l){case"children":typeof c=="string"?o==="body"||o==="textarea"&&c===""||Ks(i,c):(typeof c=="number"||typeof c=="bigint")&&o!=="body"&&Ks(i,""+c);break;case"className":Pd(i,"class",c);break;case"tabIndex":Pd(i,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Pd(i,l,c);break;case"style":Y_(i,c,g);break;case"data":if(o!=="object"){Pd(i,"data",c);break}case"src":case"href":if(c===""&&(o!=="a"||l!=="href")){i.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(l);break}c=Ud(""+c),i.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){i.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(l==="formAction"?(o!=="input"&&Gt(i,o,"name",h.name,h,null),Gt(i,o,"formEncType",h.formEncType,h,null),Gt(i,o,"formMethod",h.formMethod,h,null),Gt(i,o,"formTarget",h.formTarget,h,null)):(Gt(i,o,"encType",h.encType,h,null),Gt(i,o,"method",h.method,h,null),Gt(i,o,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(l);break}c=Ud(""+c),i.setAttribute(l,c);break;case"onClick":c!=null&&(i.onclick=oo);break;case"onScroll":c!=null&&st("scroll",i);break;case"onScrollEnd":c!=null&&st("scrollend",i);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));i.innerHTML=l}}break;case"multiple":i.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":i.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){i.removeAttribute("xlink:href");break}l=Ud(""+c),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,""+c):i.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":c===!0?i.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,c):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?i.setAttribute(l,c):i.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?i.removeAttribute(l):i.setAttribute(l,c);break;case"popover":st("beforetoggle",i),st("toggle",i),Ld(i,"popover",c);break;case"xlinkActuate":io(i,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":io(i,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":io(i,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":io(i,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":io(i,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":io(i,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":io(i,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":io(i,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":io(i,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ld(i,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=uj.get(l)||l,Ld(i,l,c))}}function i0(i,o,l,c,h,g){switch(l){case"style":Y_(i,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));i.innerHTML=l}}break;case"children":typeof c=="string"?Ks(i,c):(typeof c=="number"||typeof c=="bigint")&&Ks(i,""+c);break;case"onScroll":c!=null&&st("scroll",i);break;case"onScrollEnd":c!=null&&st("scrollend",i);break;case"onClick":c!=null&&(i.onclick=oo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!P_.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),o=l.slice(2,h?l.length-7:void 0),g=i[mr]||null,g=g!=null?g[l]:null,typeof g=="function"&&i.removeEventListener(o,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(o,c,h);break e}l in i?i[l]=c:c===!0?i.setAttribute(l,""):Ld(i,l,c)}}}function Xn(i,o,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",i),st("load",i);var c=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var x=l[g];if(x!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Gt(i,o,g,x,l,null)}}h&&Gt(i,o,"srcSet",l.srcSet,l,null),c&&Gt(i,o,"src",l.src,l,null);return;case"input":st("invalid",i);var R=g=x=h=null,V=null,J=null;for(c in l)if(l.hasOwnProperty(c)){var oe=l[c];if(oe!=null)switch(c){case"name":h=oe;break;case"type":x=oe;break;case"checked":V=oe;break;case"defaultChecked":J=oe;break;case"value":g=oe;break;case"defaultValue":R=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,o));break;default:Gt(i,o,c,oe,l,null)}}V_(i,g,R,V,J,x,h,!1);return;case"select":st("invalid",i),c=x=g=null;for(h in l)if(l.hasOwnProperty(h)&&(R=l[h],R!=null))switch(h){case"value":g=R;break;case"defaultValue":x=R;break;case"multiple":c=R;default:Gt(i,o,h,R,l,null)}o=g,l=x,i.multiple=!!c,o!=null?Zs(i,!!c,o,!1):l!=null&&Zs(i,!!c,l,!0);return;case"textarea":st("invalid",i),g=h=c=null;for(x in l)if(l.hasOwnProperty(x)&&(R=l[x],R!=null))switch(x){case"value":c=R;break;case"defaultValue":h=R;break;case"children":g=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:Gt(i,o,x,R,l,null)}q_(i,c,h,g);return;case"option":for(V in l)l.hasOwnProperty(V)&&(c=l[V],c!=null)&&(V==="selected"?i.selected=c&&typeof c!="function"&&typeof c!="symbol":Gt(i,o,V,c,l,null));return;case"dialog":st("beforetoggle",i),st("toggle",i),st("cancel",i),st("close",i);break;case"iframe":case"object":st("load",i);break;case"video":case"audio":for(c=0;c<vc.length;c++)st(vc[c],i);break;case"image":st("error",i),st("load",i);break;case"details":st("toggle",i);break;case"embed":case"source":case"link":st("error",i),st("load",i);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 l)if(l.hasOwnProperty(J)&&(c=l[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Gt(i,o,J,c,l,null)}return;default:if(vy(o)){for(oe in l)l.hasOwnProperty(oe)&&(c=l[oe],c!==void 0&&i0(i,o,oe,c,l,void 0));return}}for(R in l)l.hasOwnProperty(R)&&(c=l[R],c!=null&&Gt(i,o,R,c,l,null))}function z9(i,o,l,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,x=null,R=null,V=null,J=null,oe=null;for(ne in l){var ce=l[ne];if(l.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":V=ce;default:c.hasOwnProperty(ne)||Gt(i,o,ne,null,c,ce)}}for(var ee in c){var ne=c[ee];if(ce=l[ee],c.hasOwnProperty(ee)&&(ne!=null||ce!=null))switch(ee){case"type":g=ne;break;case"name":h=ne;break;case"checked":J=ne;break;case"defaultChecked":oe=ne;break;case"value":x=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,o));break;default:ne!==ce&&Gt(i,o,ee,ne,c,ce)}}gy(i,x,R,V,J,oe,g,h);return;case"select":ne=x=R=ee=null;for(g in l)if(V=l[g],l.hasOwnProperty(g)&&V!=null)switch(g){case"value":break;case"multiple":ne=V;default:c.hasOwnProperty(g)||Gt(i,o,g,null,c,V)}for(h in c)if(g=c[h],V=l[h],c.hasOwnProperty(h)&&(g!=null||V!=null))switch(h){case"value":ee=g;break;case"defaultValue":R=g;break;case"multiple":x=g;default:g!==V&&Gt(i,o,h,g,c,V)}o=R,l=x,c=ne,ee!=null?Zs(i,!!l,ee,!1):!!c!=!!l&&(o!=null?Zs(i,!!l,o,!0):Zs(i,!!l,l?[]:"",!1));return;case"textarea":ne=ee=null;for(R in l)if(h=l[R],l.hasOwnProperty(R)&&h!=null&&!c.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Gt(i,o,R,null,c,h)}for(x in c)if(h=c[x],g=l[x],c.hasOwnProperty(x)&&(h!=null||g!=null))switch(x){case"value":ee=h;break;case"defaultValue":ne=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==g&&Gt(i,o,x,h,c,g)}F_(i,ee,ne);return;case"option":for(var _e in l)ee=l[_e],l.hasOwnProperty(_e)&&ee!=null&&!c.hasOwnProperty(_e)&&(_e==="selected"?i.selected=!1:Gt(i,o,_e,null,c,ee));for(V in c)ee=c[V],ne=l[V],c.hasOwnProperty(V)&&ee!==ne&&(ee!=null||ne!=null)&&(V==="selected"?i.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":Gt(i,o,V,ee,c,ne));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 He in l)ee=l[He],l.hasOwnProperty(He)&&ee!=null&&!c.hasOwnProperty(He)&&Gt(i,o,He,null,c,ee);for(J in c)if(ee=c[J],ne=l[J],c.hasOwnProperty(J)&&ee!==ne&&(ee!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,o));break;default:Gt(i,o,J,ee,c,ne)}return;default:if(vy(o)){for(var Yt in l)ee=l[Yt],l.hasOwnProperty(Yt)&&ee!==void 0&&!c.hasOwnProperty(Yt)&&i0(i,o,Yt,void 0,c,ee);for(oe in c)ee=c[oe],ne=l[oe],!c.hasOwnProperty(oe)||ee===ne||ee===void 0&&ne===void 0||i0(i,o,oe,ee,c,ne);return}}for(var Z in l)ee=l[Z],l.hasOwnProperty(Z)&&ee!=null&&!c.hasOwnProperty(Z)&&Gt(i,o,Z,null,c,ee);for(ce in c)ee=c[ce],ne=l[ce],!c.hasOwnProperty(ce)||ee===ne||ee==null&&ne==null||Gt(i,o,ce,ee,c,ne)}function X2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function L9(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var h=l[c],g=h.transferSize,x=h.initiatorType,R=h.duration;if(g&&R&&X2(x)){for(x=0,R=h.responseEnd,c+=1;c<l.length;c++){var V=l[c],J=V.startTime;if(J>R)break;var oe=V.transferSize,ce=V.initiatorType;oe&&X2(ce)&&(V=V.responseEnd,x+=oe*(V<R?1:(R-J)/(V-J)))}if(--c,o+=8*(g+x)/(h.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var o0=null,a0=null;function Bp(i){return i.nodeType===9?i:i.ownerDocument}function Z2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function K2(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function s0(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var l0=null;function P9(){var i=window.event;return i&&i.type==="popstate"?i===l0?!1:(l0=i,!0):(l0=null,!1)}var W2=typeof setTimeout=="function"?setTimeout:void 0,$9=typeof clearTimeout=="function"?clearTimeout:void 0,Q2=typeof Promise=="function"?Promise:void 0,U9=typeof queueMicrotask=="function"?queueMicrotask:typeof Q2<"u"?function(i){return Q2.resolve(null).then(i).catch(j9)}:W2;function j9(i){setTimeout(function(){throw i})}function ia(i){return i==="head"}function J2(i,o){var l=o,c=0;do{var h=l.nextSibling;if(i.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(c===0){i.removeChild(h),Al(o);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Sc(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Sc(l);for(var g=l.firstChild;g;){var x=g.nextSibling,R=g.nodeName;g[Pu]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=x}}else l==="body"&&Sc(i.ownerDocument.body);l=h}while(l);Al(o)}function eA(i,o){var l=i;i=0;do{var c=l.nextSibling;if(l.nodeType===1?o?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(o?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=c}while(l)}function u0(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var l=o;switch(o=o.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":u0(l),hy(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function H9(i,o,l,c){for(;i.nodeType===1;){var h=l;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!c&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(c){if(!i[Pu])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(g=i.getAttribute("rel"),g==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(g!==h.rel||i.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||i.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||i.getAttribute("title")!==(h.title==null?null:h.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(g=i.getAttribute("src"),(g!==(h.src==null?null:h.src)||i.getAttribute("type")!==(h.type==null?null:h.type)||i.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&i.getAttribute("name")===g)return i}else return i;if(i=si(i.nextSibling),i===null)break}return null}function V9(i,o,l){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=si(i.nextSibling),i===null))return null;return i}function tA(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=si(i.nextSibling),i===null))return null;return i}function c0(i){return i.data==="$?"||i.data==="$~"}function f0(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function F9(i,o){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||l.readyState!=="loading")o();else{var c=function(){o(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),i._reactRetry=c}}function si(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var d0=null;function nA(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(o===0)return si(i.nextSibling);o--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||o++}i=i.nextSibling}return null}function rA(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(o===0)return i;o--}else l!=="/$"&&l!=="/&"||o++}i=i.previousSibling}return null}function iA(i,o,l){switch(o=Bp(l),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Sc(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);hy(i)}var li=new Map,oA=new Set;function zp(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Eo=Y.d;Y.d={f:q9,r:G9,D:Y9,C:X9,L:Z9,m:K9,X:Q9,S:W9,M:J9};function q9(){var i=Eo.f(),o=Ap();return i||o}function G9(i){var o=Gs(i);o!==null&&o.tag===5&&o.type==="form"?EC(o):Eo.r(i)}var _l=typeof document>"u"?null:document;function aA(i,o,l){var c=_l;if(c&&typeof o=="string"&&o){var h=ei(o);h='link[rel="'+i+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),oA.has(h)||(oA.add(h),i={rel:i,crossOrigin:l,href:o},c.querySelector(h)===null&&(o=c.createElement("link"),Xn(o,"link",i),$n(o),c.head.appendChild(o)))}}function Y9(i){Eo.D(i),aA("dns-prefetch",i,null)}function X9(i,o){Eo.C(i,o),aA("preconnect",i,o)}function Z9(i,o,l){Eo.L(i,o,l);var c=_l;if(c&&i&&o){var h='link[rel="preload"][as="'+ei(o)+'"]';o==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+ei(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+ei(l.imageSizes)+'"]')):h+='[href="'+ei(i)+'"]';var g=h;switch(o){case"style":g=Tl(i);break;case"script":g=Cl(i)}li.has(g)||(i=y({rel:"preload",href:o==="image"&&l&&l.imageSrcSet?void 0:i,as:o},l),li.set(g,i),c.querySelector(h)!==null||o==="style"&&c.querySelector(xc(g))||o==="script"&&c.querySelector(Ec(g))||(o=c.createElement("link"),Xn(o,"link",i),$n(o),c.head.appendChild(o)))}}function K9(i,o){Eo.m(i,o);var l=_l;if(l&&i){var c=o&&typeof o.as=="string"?o.as:"script",h='link[rel="modulepreload"][as="'+ei(c)+'"][href="'+ei(i)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Cl(i)}if(!li.has(g)&&(i=y({rel:"modulepreload",href:i},o),li.set(g,i),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ec(g)))return}c=l.createElement("link"),Xn(c,"link",i),$n(c),l.head.appendChild(c)}}}function W9(i,o,l){Eo.S(i,o,l);var c=_l;if(c&&i){var h=Ys(c).hoistableStyles,g=Tl(i);o=o||"default";var x=h.get(g);if(!x){var R={loading:0,preload:null};if(x=c.querySelector(xc(g)))R.loading=5;else{i=y({rel:"stylesheet",href:i,"data-precedence":o},l),(l=li.get(g))&&p0(i,l);var V=x=c.createElement("link");$n(V),Xn(V,"link",i),V._p=new Promise(function(J,oe){V.onload=J,V.onerror=oe}),V.addEventListener("load",function(){R.loading|=1}),V.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Lp(x,o,c)}x={type:"stylesheet",instance:x,count:1,state:R},h.set(g,x)}}}function Q9(i,o){Eo.X(i,o);var l=_l;if(l&&i){var c=Ys(l).hoistableScripts,h=Cl(i),g=c.get(h);g||(g=l.querySelector(Ec(h)),g||(i=y({src:i,async:!0},o),(o=li.get(h))&&h0(i,o),g=l.createElement("script"),$n(g),Xn(g,"link",i),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function J9(i,o){Eo.M(i,o);var l=_l;if(l&&i){var c=Ys(l).hoistableScripts,h=Cl(i),g=c.get(h);g||(g=l.querySelector(Ec(h)),g||(i=y({src:i,async:!0,type:"module"},o),(o=li.get(h))&&h0(i,o),g=l.createElement("script"),$n(g),Xn(g,"link",i),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function sA(i,o,l,c){var h=(h=ye.current)?zp(h):null;if(!h)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(o=Tl(l.href),l=Ys(h).hoistableStyles,c=l.get(o),c||(c={type:"style",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=Tl(l.href);var g=Ys(h).hoistableStyles,x=g.get(i);if(x||(h=h.ownerDocument||h,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(i,x),(g=h.querySelector(xc(i)))&&!g._p&&(x.instance=g,x.state.loading=5),li.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},li.set(i,l),g||e7(h,i,l,x.state))),o&&c===null)throw Error(r(528,""));return x}if(o&&c!==null)throw Error(r(529,""));return null;case"script":return o=l.async,l=l.src,typeof l=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Cl(l),l=Ys(h).hoistableScripts,c=l.get(o),c||(c={type:"script",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Tl(i){return'href="'+ei(i)+'"'}function xc(i){return'link[rel="stylesheet"]['+i+"]"}function lA(i){return y({},i,{"data-precedence":i.precedence,precedence:null})}function e7(i,o,l,c){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=i.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),Xn(o,"link",l),$n(o),i.head.appendChild(o))}function Cl(i){return'[src="'+ei(i)+'"]'}function Ec(i){return"script[async]"+i}function uA(i,o,l){if(o.count++,o.instance===null)switch(o.type){case"style":var c=i.querySelector('style[data-href~="'+ei(l.href)+'"]');if(c)return o.instance=c,$n(c),c;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(i.ownerDocument||i).createElement("style"),$n(c),Xn(c,"style",h),Lp(c,l.precedence,i),o.instance=c;case"stylesheet":h=Tl(l.href);var g=i.querySelector(xc(h));if(g)return o.state.loading|=4,o.instance=g,$n(g),g;c=lA(l),(h=li.get(h))&&p0(c,h),g=(i.ownerDocument||i).createElement("link"),$n(g);var x=g;return x._p=new Promise(function(R,V){x.onload=R,x.onerror=V}),Xn(g,"link",c),o.state.loading|=4,Lp(g,l.precedence,i),o.instance=g;case"script":return g=Cl(l.src),(h=i.querySelector(Ec(g)))?(o.instance=h,$n(h),h):(c=l,(h=li.get(g))&&(c=y({},l),h0(c,h)),i=i.ownerDocument||i,h=i.createElement("script"),$n(h),Xn(h,"link",c),i.head.appendChild(h),o.instance=h);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(c=o.instance,o.state.loading|=4,Lp(c,l.precedence,i));return o.instance}function Lp(i,o,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,x=0;x<c.length;x++){var R=c[x];if(R.dataset.precedence===o)g=R;else if(g!==h)break}g?g.parentNode.insertBefore(i,g.nextSibling):(o=l.nodeType===9?l.head:l,o.insertBefore(i,o.firstChild))}function p0(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function h0(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var Pp=null;function cA(i,o,l){if(Pp===null){var c=new Map,h=Pp=new Map;h.set(l,c)}else h=Pp,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(i))return c;for(c.set(i,null),l=l.getElementsByTagName(i),h=0;h<l.length;h++){var g=l[h];if(!(g[Pu]||g[Fn]||i==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var x=g.getAttribute(o)||"";x=i+x;var R=c.get(x);R?R.push(g):c.set(x,[g])}}return c}function fA(i,o,l){i=i.ownerDocument||i,i.head.insertBefore(l,o==="title"?i.querySelector("head > title"):null)}function t7(i,o,l){if(l===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function dA(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function n7(i,o,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Tl(c.href),g=o.querySelector(xc(h));if(g){o=g._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=$p.bind(i),o.then(i,i)),l.state.loading|=4,l.instance=g,$n(g);return}g=o.ownerDocument||o,c=lA(c),(h=li.get(h))&&p0(c,h),g=g.createElement("link"),$n(g);var x=g;x._p=new Promise(function(R,V){x.onload=R,x.onerror=V}),Xn(g,"link",c),l.instance=g}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=$p.bind(i),o.addEventListener("load",l),o.addEventListener("error",l))}}var m0=0;function r7(i,o){return i.stylesheets&&i.count===0&&jp(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var c=setTimeout(function(){if(i.stylesheets&&jp(i,i.stylesheets),i.unsuspend){var g=i.unsuspend;i.unsuspend=null,g()}},6e4+o);0<i.imgBytes&&m0===0&&(m0=62500*L9());var h=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&jp(i,i.stylesheets),i.unsuspend)){var g=i.unsuspend;i.unsuspend=null,g()}},(i.imgBytes>m0?50:800)+o);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function $p(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jp(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Up=null;function jp(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Up=new Map,o.forEach(i7,i),Up=null,$p.call(i))}function i7(i,o){if(!(o.state.loading&4)){var l=Up.get(i);if(l)var c=l.get(null);else{l=new Map,Up.set(i,l);for(var h=i.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var x=h[g];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(l.set(x.dataset.precedence,x),c=x)}c&&l.set(null,c)}h=o.instance,x=h.getAttribute("data-precedence"),g=l.get(x)||c,g===c&&l.set(null,h),l.set(x,h),this.count++,c=$p.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(h,i.firstChild)),o.state.loading|=4}}var wc={$$typeof:T,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function o7(i,o,l,c,h,g,x,R,V){this.tag=1,this.containerInfo=i,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=Qr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qr(0),this.hiddenUpdates=Qr(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function pA(i,o,l,c,h,g,x,R,V,J,oe,ce){return i=new o7(i,o,l,x,V,J,oe,ce,R),o=1,g===!0&&(o|=24),g=Br(3,null,null,o),i.current=g,g.stateNode=i,o=Xy(),o.refCount++,i.pooledCache=o,o.refCount++,g.memoizedState={element:c,isDehydrated:l,cache:o},Qy(g),i}function hA(i){return i?(i=rl,i):rl}function mA(i,o,l,c,h,g){h=hA(h),c.context===null?c.context=h:c.pendingContext=h,c=Yo(o),c.payload={element:l},g=g===void 0?null:g,g!==null&&(c.callback=g),l=Xo(i,c,o),l!==null&&(xr(l,i,o),tc(l,i,o))}function gA(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function g0(i,o){gA(i,o),(i=i.alternate)&&gA(i,o)}function yA(i){if(i.tag===13||i.tag===31){var o=Ua(i,67108864);o!==null&&xr(o,i,67108864),g0(i,67108864)}}function vA(i){if(i.tag===13||i.tag===31){var o=Ur();o=fy(o);var l=Ua(i,o);l!==null&&xr(l,i,o),g0(i,o)}}var Hp=!0;function a7(i,o,l,c){var h=D.T;D.T=null;var g=Y.p;try{Y.p=2,y0(i,o,l,c)}finally{Y.p=g,D.T=h}}function s7(i,o,l,c){var h=D.T;D.T=null;var g=Y.p;try{Y.p=8,y0(i,o,l,c)}finally{Y.p=g,D.T=h}}function y0(i,o,l,c){if(Hp){var h=v0(c);if(h===null)r0(i,o,c,Vp,l),SA(i,c);else if(u7(h,i,o,l,c))c.stopPropagation();else if(SA(i,c),o&4&&-1<l7.indexOf(i)){for(;h!==null;){var g=Gs(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=ro(g.pendingLanes);if(x!==0){var R=g;for(R.pendingLanes|=2,R.entangledLanes|=2;x;){var V=1<<31-gt(x);R.entanglements[1]|=V,x&=~V}ji(g),(Nt&6)===0&&(Tp=We()+500,yc(0))}}break;case 31:case 13:R=Ua(g,2),R!==null&&xr(R,g,2),Ap(),g0(g,2)}if(g=v0(c),g===null&&r0(i,o,c,Vp,l),g===h)break;h=g}h!==null&&c.stopPropagation()}else r0(i,o,c,null,l)}}function v0(i){return i=Sy(i),b0(i)}var Vp=null;function b0(i){if(Vp=null,i=qs(i),i!==null){var o=s(i);if(o===null)i=null;else{var l=o.tag;if(l===13){if(i=u(o),i!==null)return i;i=null}else if(l===31){if(i=f(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Vp=i,null}function bA(i){switch(i){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(tr()){case te:return 2;case se:return 8;case xe:case Re:return 32;case Ze:return 268435456;default:return 32}default:return 32}}var S0=!1,oa=null,aa=null,sa=null,_c=new Map,Tc=new Map,la=[],l7="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 SA(i,o){switch(i){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":sa=null;break;case"pointerover":case"pointerout":_c.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tc.delete(o.pointerId)}}function Cc(i,o,l,c,h,g){return i===null||i.nativeEvent!==g?(i={blockedOn:o,domEventName:l,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},o!==null&&(o=Gs(o),o!==null&&yA(o)),i):(i.eventSystemFlags|=c,o=i.targetContainers,h!==null&&o.indexOf(h)===-1&&o.push(h),i)}function u7(i,o,l,c,h){switch(o){case"focusin":return oa=Cc(oa,i,o,l,c,h),!0;case"dragenter":return aa=Cc(aa,i,o,l,c,h),!0;case"mouseover":return sa=Cc(sa,i,o,l,c,h),!0;case"pointerover":var g=h.pointerId;return _c.set(g,Cc(_c.get(g)||null,i,o,l,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Tc.set(g,Cc(Tc.get(g)||null,i,o,l,c,h)),!0}return!1}function xA(i){var o=qs(i.target);if(o!==null){var l=s(o);if(l!==null){if(o=l.tag,o===13){if(o=u(l),o!==null){i.blockedOn=o,B_(i.priority,function(){vA(l)});return}}else if(o===31){if(o=f(l),o!==null){i.blockedOn=o,B_(i.priority,function(){vA(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Fp(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=v0(i.nativeEvent);if(l===null){l=i.nativeEvent;var c=new l.constructor(l.type,l);by=c,l.target.dispatchEvent(c),by=null}else return o=Gs(l),o!==null&&yA(o),i.blockedOn=l,!1;o.shift()}return!0}function EA(i,o,l){Fp(i)&&l.delete(o)}function c7(){S0=!1,oa!==null&&Fp(oa)&&(oa=null),aa!==null&&Fp(aa)&&(aa=null),sa!==null&&Fp(sa)&&(sa=null),_c.forEach(EA),Tc.forEach(EA)}function qp(i,o){i.blockedOn===o&&(i.blockedOn=null,S0||(S0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,c7)))}var Gp=null;function wA(i){Gp!==i&&(Gp=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gp===i&&(Gp=null);for(var o=0;o<i.length;o+=3){var l=i[o],c=i[o+1],h=i[o+2];if(typeof c!="function"){if(b0(c||l)===null)continue;break}var g=Gs(l);g!==null&&(i.splice(o,3),o-=3,vv(g,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function Al(i){function o(V){return qp(V,i)}oa!==null&&qp(oa,i),aa!==null&&qp(aa,i),sa!==null&&qp(sa,i),_c.forEach(o),Tc.forEach(o);for(var l=0;l<la.length;l++){var c=la[l];c.blockedOn===i&&(c.blockedOn=null)}for(;0<la.length&&(l=la[0],l.blockedOn===null);)xA(l),l.blockedOn===null&&la.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],g=l[c+1],x=h[mr]||null;if(typeof g=="function")x||wA(l);else if(x){var R=null;if(g&&g.hasAttribute("formAction")){if(h=g,x=g[mr]||null)R=x.formAction;else if(b0(h)!==null)continue}else R=x.action;typeof R=="function"?l[c+1]=R:(l.splice(c,3),c-=3),wA(l)}}}function _A(){function i(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return h=x})},focusReset:"manual",scroll:"manual"})}function o(){h!==null&&(h(),h=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),h!==null&&(h(),h=null)}}}function x0(i){this._internalRoot=i}Yp.prototype.render=x0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var l=o.current,c=Ur();mA(l,c,i,o,null,null)},Yp.prototype.unmount=x0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;mA(i.current,2,null,i,null,null),Ap(),o[Fs]=null}};function Yp(i){this._internalRoot=i}Yp.prototype.unstable_scheduleHydration=function(i){if(i){var o=D_();i={blockedOn:null,target:i,priority:o};for(var l=0;l<la.length&&o!==0&&o<la[l].priority;l++);la.splice(l,0,i),l===0&&xA(i)}};var TA=t.version;if(TA!=="19.2.4")throw Error(r(527,TA,"19.2.4"));Y.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=p(o),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var f7={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Bt=Xp.inject(f7),$t=Xp}catch{}}return Ol.createRoot=function(i,o){if(!a(i))throw Error(r(299));var l=!1,c="",h=IC,g=MC,x=DC;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(g=o.onCaughtError),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),o=pA(i,1,!1,null,null,l,c,null,h,g,x,_A),i[Fs]=o.current,n0(i),new x0(o)},Ol.hydrateRoot=function(i,o,l){if(!a(i))throw Error(r(299));var c=!1,h="",g=IC,x=MC,R=DC,V=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(x=l.onCaughtError),l.onRecoverableError!==void 0&&(R=l.onRecoverableError),l.formState!==void 0&&(V=l.formState)),o=pA(i,1,!0,o,l??null,c,h,V,g,x,R,_A),o.context=hA(null),l=o.current,c=Ur(),c=fy(c),h=Yo(c),h.callback=null,Xo(l,h,c),l=c,o.current.lanes=l,Lu(o,l),ji(o),i[Fs]=o.current,n0(i),new Yp(o)},Ol.version="19.2.4",Ol}var I0;function DA(){if(I0)return Kp.exports;I0=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(t){console.error(t)}}return e(),Kp.exports=MA(),Kp.exports}var BA=DA();function zA(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function LA(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var PA=(function(){function e(n){var r=this;this._insertTag=function(a){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(LA(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var s=zA(a);try{s.insertRule(r,s.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Kn="-ms-",kc="-moz-",Et="-webkit-",M0="comm",nh="rule",rh="decl",$A="@import",D0="@keyframes",UA="@layer",jA=Math.abs,Oc=String.fromCharCode,HA=Object.assign;function VA(e,t){return jn(e,0)^45?(((t<<2^jn(e,0))<<2^jn(e,1))<<2^jn(e,2))<<2^jn(e,3):0}function B0(e){return e.trim()}function FA(e,t){return(e=t.exec(e))?e[0]:e}function wt(e,t,n){return e.replace(t,n)}function ih(e,t){return e.indexOf(t)}function jn(e,t){return e.charCodeAt(t)|0}function Rl(e,t,n){return e.slice(t,n)}function Si(e){return e.length}function oh(e){return e.length}function Rc(e,t){return t.push(e),e}function qA(e,t){return e.map(t).join("")}var Nc=1,Ja=1,z0=0,lr=0,Cn=0,es="";function Ic(e,t,n,r,a,s,u){return{value:e,root:t,parent:n,type:r,props:a,children:s,line:Nc,column:Ja,length:u,return:""}}function Nl(e,t){return HA(Ic("",null,null,"",null,null,0),e,{length:-e.length},t)}function GA(){return Cn}function YA(){return Cn=lr>0?jn(es,--lr):0,Ja--,Cn===10&&(Ja=1,Nc--),Cn}function Er(){return Cn=lr<z0?jn(es,lr++):0,Ja++,Cn===10&&(Ja=1,Nc++),Cn}function xi(){return jn(es,lr)}function Mc(){return lr}function Il(e,t){return Rl(es,e,t)}function Ml(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function L0(e){return Nc=Ja=1,z0=Si(es=e),lr=0,[]}function P0(e){return es="",e}function Dc(e){return B0(Il(lr-1,ah(e===91?e+2:e===40?e+1:e)))}function XA(e){for(;(Cn=xi())&&Cn<33;)Er();return Ml(e)>2||Ml(Cn)>3?"":" "}function ZA(e,t){for(;--t&&Er()&&!(Cn<48||Cn>102||Cn>57&&Cn<65||Cn>70&&Cn<97););return Il(e,Mc()+(t<6&&xi()==32&&Er()==32))}function ah(e){for(;Er();)switch(Cn){case e:return lr;case 34:case 39:e!==34&&e!==39&&ah(Cn);break;case 40:e===41&&ah(e);break;case 92:Er();break}return lr}function KA(e,t){for(;Er()&&e+Cn!==57;)if(e+Cn===84&&xi()===47)break;return"/*"+Il(t,lr-1)+"*"+Oc(e===47?e:Er())}function WA(e){for(;!Ml(xi());)Er();return Il(e,lr)}function QA(e){return P0(Bc("",null,null,null,[""],e=L0(e),0,[0],e))}function Bc(e,t,n,r,a,s,u,f,d){for(var p=0,m=0,y=u,b=0,v=0,E=0,S=1,w=1,_=1,O=0,T="",C=a,N=s,k=r,z=T;w;)switch(E=O,O=Er()){case 40:if(E!=108&&jn(z,y-1)==58){ih(z+=wt(Dc(O),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:z+=Dc(O);break;case 9:case 10:case 13:case 32:z+=XA(E);break;case 92:z+=ZA(Mc()-1,7);continue;case 47:switch(xi()){case 42:case 47:Rc(JA(KA(Er(),Mc()),t,n),d);break;default:z+="/"}break;case 123*S:f[p++]=Si(z)*_;case 125*S:case 59:case 0:switch(O){case 0:case 125:w=0;case 59+m:_==-1&&(z=wt(z,/\f/g,"")),v>0&&Si(z)-y&&Rc(v>32?U0(z+";",r,n,y-1):U0(wt(z," ","")+";",r,n,y-2),d);break;case 59:z+=";";default:if(Rc(k=$0(z,t,n,p,m,a,f,T,C=[],N=[],y),s),O===123)if(m===0)Bc(z,t,k,k,C,s,y,f,N);else switch(b===99&&jn(z,3)===110?100:b){case 100:case 108:case 109:case 115:Bc(e,k,k,r&&Rc($0(e,k,k,0,0,a,f,T,a,C=[],y),N),a,N,y,f,r?C:N);break;default:Bc(z,k,k,k,[""],N,0,f,N)}}p=m=v=0,S=_=1,T=z="",y=u;break;case 58:y=1+Si(z),v=E;default:if(S<1){if(O==123)--S;else if(O==125&&S++==0&&YA()==125)continue}switch(z+=Oc(O),O*S){case 38:_=m>0?1:(z+="\f",-1);break;case 44:f[p++]=(Si(z)-1)*_,_=1;break;case 64:xi()===45&&(z+=Dc(Er())),b=xi(),m=y=Si(T=z+=WA(Mc())),O++;break;case 45:E===45&&Si(z)==2&&(S=0)}}return s}function $0(e,t,n,r,a,s,u,f,d,p,m){for(var y=a-1,b=a===0?s:[""],v=oh(b),E=0,S=0,w=0;E<r;++E)for(var _=0,O=Rl(e,y+1,y=jA(S=u[E])),T=e;_<v;++_)(T=B0(S>0?b[_]+" "+O:wt(O,/&\f/g,b[_])))&&(d[w++]=T);return Ic(e,t,n,a===0?nh:f,d,p,m)}function JA(e,t,n){return Ic(e,t,n,M0,Oc(GA()),Rl(e,2,-2),0)}function U0(e,t,n,r){return Ic(e,t,n,rh,Rl(e,0,r),Rl(e,r+1,-1),r)}function ts(e,t){for(var n="",r=oh(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function ek(e,t,n,r){switch(e.type){case UA:if(e.children.length)break;case $A:case rh:return e.return=e.return||e.value;case M0:return"";case D0:return e.return=e.value+"{"+ts(e.children,r)+"}";case nh:e.value=e.props.join(",")}return Si(n=ts(e.children,r))?e.return=e.value+"{"+n+"}":""}function tk(e){var t=oh(e);return function(n,r,a,s){for(var u="",f=0;f<t;f++)u+=e[f](n,r,a,s)||"";return u}}function nk(e){return function(t){t.root||(t=t.return)&&e(t)}}function j0(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var rk=function(t,n,r){for(var a=0,s=0;a=s,s=xi(),a===38&&s===12&&(n[r]=1),!Ml(s);)Er();return Il(t,lr)},ik=function(t,n){var r=-1,a=44;do switch(Ml(a)){case 0:a===38&&xi()===12&&(n[r]=1),t[r]+=rk(lr-1,n,r);break;case 2:t[r]+=Dc(a);break;case 4:if(a===44){t[++r]=xi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Oc(a)}while(a=Er());return t},ok=function(t,n){return P0(ik(L0(t),n))},H0=new WeakMap,ak=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!H0.get(r))&&!a){H0.set(t,!0);for(var s=[],u=ok(n,s),f=r.props,d=0,p=0;d<u.length;d++)for(var m=0;m<f.length;m++,p++)t.props[p]=s[d]?u[d].replace(/&\f/g,f[m]):f[m]+" "+u[d]}}},sk=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function V0(e,t){switch(VA(e,t)){case 5103:return Et+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Et+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Et+e+kc+e+Kn+e+e;case 6828:case 4268:return Et+e+Kn+e+e;case 6165:return Et+e+Kn+"flex-"+e+e;case 5187:return Et+e+wt(e,/(\w+).+(:[^]+)/,Et+"box-$1$2"+Kn+"flex-$1$2")+e;case 5443:return Et+e+Kn+"flex-item-"+wt(e,/flex-|-self/,"")+e;case 4675:return Et+e+Kn+"flex-line-pack"+wt(e,/align-content|flex-|-self/,"")+e;case 5548:return Et+e+Kn+wt(e,"shrink","negative")+e;case 5292:return Et+e+Kn+wt(e,"basis","preferred-size")+e;case 6060:return Et+"box-"+wt(e,"-grow","")+Et+e+Kn+wt(e,"grow","positive")+e;case 4554:return Et+wt(e,/([^-])(transform)/g,"$1"+Et+"$2")+e;case 6187:return wt(wt(wt(e,/(zoom-|grab)/,Et+"$1"),/(image-set)/,Et+"$1"),e,"")+e;case 5495:case 3959:return wt(e,/(image-set\([^]*)/,Et+"$1$`$1");case 4968:return wt(wt(e,/(.+:)(flex-)?(.*)/,Et+"box-pack:$3"+Kn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Et+e+e;case 4095:case 3583:case 4068:case 2532:return wt(e,/(.+)-inline(.+)/,Et+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Si(e)-1-t>6)switch(jn(e,t+1)){case 109:if(jn(e,t+4)!==45)break;case 102:return wt(e,/(.+:)(.+)-([^]+)/,"$1"+Et+"$2-$3$1"+kc+(jn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ih(e,"stretch")?V0(wt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(jn(e,t+1)!==115)break;case 6444:switch(jn(e,Si(e)-3-(~ih(e,"!important")&&10))){case 107:return wt(e,":",":"+Et)+e;case 101:return wt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Et+(jn(e,14)===45?"inline-":"")+"box$3$1"+Et+"$2$3$1"+Kn+"$2box$3")+e}break;case 5936:switch(jn(e,t+11)){case 114:return Et+e+Kn+wt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Et+e+Kn+wt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Et+e+Kn+wt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Et+e+Kn+e+e}return e}var lk=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case rh:t.return=V0(t.value,t.length);break;case D0:return ts([Nl(t,{value:wt(t.value,"@","@"+Et)})],a);case nh:if(t.length)return qA(t.props,function(s){switch(FA(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ts([Nl(t,{props:[wt(s,/:(read-\w+)/,":"+kc+"$1")]})],a);case"::placeholder":return ts([Nl(t,{props:[wt(s,/:(plac\w+)/,":"+Et+"input-$1")]}),Nl(t,{props:[wt(s,/:(plac\w+)/,":"+kc+"$1")]}),Nl(t,{props:[wt(s,/:(plac\w+)/,Kn+"input-$1")]})],a)}return""})}},uk=[lk],F0=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var w=S.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var a=t.stylisPlugins||uk,s={},u,f=[];u=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var w=S.getAttribute("data-emotion").split(" "),_=1;_<w.length;_++)s[w[_]]=!0;f.push(S)});var d,p=[ak,sk];{var m,y=[ek,nk(function(S){m.insert(S)})],b=tk(p.concat(a,y)),v=function(w){return ts(QA(w),b)};d=function(w,_,O,T){m=O,v(w?w+"{"+_.styles+"}":_.styles),T&&(E.inserted[_.name]=!0)}}var E={key:n,sheet:new PA({key:n,container:u,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:d};return E.sheet.hydrate(f),E},I=eh();const nr=Ac(I),zc=CA({__proto__:null,default:nr},[I]);function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(null,arguments)}var sh={exports:{}},It={};var q0;function ck(){if(q0)return It;q0=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function T(N){if(typeof N=="object"&&N!==null){var k=N.$$typeof;switch(k){case t:switch(N=N.type,N){case d:case p:case r:case s:case a:case y:return N;default:switch(N=N&&N.$$typeof,N){case f:case m:case E:case v:case u:return N;default:return k}}case n:return k}}}function C(N){return T(N)===p}return It.AsyncMode=d,It.ConcurrentMode=p,It.ContextConsumer=f,It.ContextProvider=u,It.Element=t,It.ForwardRef=m,It.Fragment=r,It.Lazy=E,It.Memo=v,It.Portal=n,It.Profiler=s,It.StrictMode=a,It.Suspense=y,It.isAsyncMode=function(N){return C(N)||T(N)===d},It.isConcurrentMode=C,It.isContextConsumer=function(N){return T(N)===f},It.isContextProvider=function(N){return T(N)===u},It.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===t},It.isForwardRef=function(N){return T(N)===m},It.isFragment=function(N){return T(N)===r},It.isLazy=function(N){return T(N)===E},It.isMemo=function(N){return T(N)===v},It.isPortal=function(N){return T(N)===n},It.isProfiler=function(N){return T(N)===s},It.isStrictMode=function(N){return T(N)===a},It.isSuspense=function(N){return T(N)===y},It.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===r||N===p||N===s||N===a||N===y||N===b||typeof N=="object"&&N!==null&&(N.$$typeof===E||N.$$typeof===v||N.$$typeof===u||N.$$typeof===f||N.$$typeof===m||N.$$typeof===w||N.$$typeof===_||N.$$typeof===O||N.$$typeof===S)},It.typeOf=T,It}var G0;function fk(){return G0||(G0=1,sh.exports=ck()),sh.exports}var lh,Y0;function dk(){if(Y0)return lh;Y0=1;var e=fk(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=a;function u(E){return e.isMemo(E)?a:s[E.$$typeof]||t}var f=Object.defineProperty,d=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,b=Object.prototype;function v(E,S,w){if(typeof S!="string"){if(b){var _=y(S);_&&_!==b&&v(E,_,w)}var O=d(S);p&&(O=O.concat(p(S)));for(var T=u(E),C=u(S),N=0;N<O.length;++N){var k=O[N];if(!n[k]&&!(w&&w[k])&&!(C&&C[k])&&!(T&&T[k])){var z=m(S,k);try{f(E,k,z)}catch{}}}}return E}return lh=v,lh}dk();var pk=!0;function X0(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(r+=a+" ")}),r}var uh=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||pk===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},ch=function(t,n,r){uh(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+a:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function hk(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},gk=/[A-Z]|^ms/g,yk=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Z0=function(t){return t.charCodeAt(1)===45},K0=function(t){return t!=null&&typeof t!="boolean"},fh=j0(function(e){return Z0(e)?e:e.replace(gk,"-$&").toLowerCase()}),W0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(yk,function(r,a,s){return Ei={name:a,styles:s,next:Ei},a})}return mk[t]!==1&&!Z0(t)&&typeof n=="number"&&n!==0?n+"px":n};function Dl(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return Ei={name:a.name,styles:a.styles,next:Ei},a.name;var s=n;if(s.styles!==void 0){var u=s.next;if(u!==void 0)for(;u!==void 0;)Ei={name:u.name,styles:u.styles,next:Ei},u=u.next;var f=s.styles+";";return f}return vk(e,t,n)}case"function":{if(e!==void 0){var d=Ei,p=n(e);return Ei=d,Dl(e,t,p)}break}}var m=n;if(t==null)return m;var y=t[m];return y!==void 0?y:m}function vk(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=Dl(e,t,n[a])+";";else for(var s in n){var u=n[s];if(typeof u!="object"){var f=u;t!=null&&t[f]!==void 0?r+=s+"{"+t[f]+"}":K0(f)&&(r+=fh(s)+":"+W0(s,f)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var d=0;d<u.length;d++)K0(u[d])&&(r+=fh(s)+":"+W0(s,u[d])+";");else{var p=Dl(e,t,u);switch(s){case"animation":case"animationName":{r+=fh(s)+":"+p+";";break}default:r+=s+"{"+p+"}"}}}return r}var Q0=/label:\s*([^\s;{]+)\s*(;|$)/g,Ei;function Bl(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,a="";Ei=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,a+=Dl(n,t,s);else{var u=s;a+=u[0]}for(var f=1;f<e.length;f++)if(a+=Dl(n,t,e[f]),r){var d=s;a+=d[f]}Q0.lastIndex=0;for(var p="",m;(m=Q0.exec(a))!==null;)p+="-"+m[1];var y=hk(a)+p;return{name:y,styles:a,next:Ei}}var bk=function(t){return t()},J0=zc.useInsertionEffect?zc.useInsertionEffect:!1,eb=J0||bk,tb=J0||I.useLayoutEffect,nb=I.createContext(typeof HTMLElement<"u"?F0({key:"css"}):null),Sk=nb.Provider,dh=function(t){return I.forwardRef(function(n,r){var a=I.useContext(nb);return t(n,a,r)})},zl=I.createContext({}),ph={}.hasOwnProperty,hh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",xk=function(t,n){var r={};for(var a in n)ph.call(n,a)&&(r[a]=n[a]);return r[hh]=t,r},Ek=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return uh(n,r,a),eb(function(){return ch(n,r,a)}),null},wk=dh(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[hh],s=[r],u="";typeof e.className=="string"?u=X0(t.registered,s,e.className):e.className!=null&&(u=e.className+" ");var f=Bl(s,void 0,I.useContext(zl));u+=t.key+"-"+f.name;var d={};for(var p in e)ph.call(e,p)&&p!=="css"&&p!==hh&&(d[p]=e[p]);return d.className=u,n&&(d.ref=n),I.createElement(I.Fragment,null,I.createElement(Ek,{cache:t,serialized:f,isStringTag:typeof a=="string"}),I.createElement(a,d))}),_k=wk,rb=function(t,n){var r=arguments;if(n==null||!ph.call(n,"css"))return I.createElement.apply(void 0,r);var a=r.length,s=new Array(a);s[0]=_k,s[1]=xk(t,n);for(var u=2;u<a;u++)s[u]=r[u];return I.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(rb||(rb={}));var Tk=dh(function(e,t){var n=e.styles,r=Bl([n],void 0,I.useContext(zl)),a=I.useRef();return tb(function(){var s=t.key+"-global",u=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),f=!1,d=document.querySelector('style[data-emotion="'+s+" "+r.name+'"]');return t.sheet.tags.length&&(u.before=t.sheet.tags[0]),d!==null&&(f=!0,d.setAttribute("data-emotion",s),u.hydrate([d])),a.current=[u,f],function(){u.flush()}},[t]),tb(function(){var s=a.current,u=s[0],f=s[1];if(f){s[1]=!1;return}if(r.next!==void 0&&ch(t,r.next,!0),u.tags.length){var d=u.tags[u.tags.length-1].nextElementSibling;u.before=d,u.flush()}t.insert("",r,u,!1)},[t,r.name]),null});function mh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bl(t)}function Ll(){var e=mh.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const Pl={black:"#000",white:"#fff"},ns={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},rs={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},is={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},os={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},as={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},$l={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Ck={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Hi(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const ui="$$material";var Ak=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,kk=j0(function(e){return Ak.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ok=kk,Rk=function(t){return t!=="theme"},ib=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ok:Rk},ob=function(t,n,r){var a;if(n){var s=n.shouldForwardProp;a=t.__emotion_forwardProp&&s?function(u){return t.__emotion_forwardProp(u)&&s(u)}:s}return typeof a!="function"&&r&&(a=t.__emotion_forwardProp),a},Nk=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return uh(n,r,a),eb(function(){return ch(n,r,a)}),null},Ik=function e(t,n){var r=t.__emotion_real===t,a=r&&t.__emotion_base||t,s,u;n!==void 0&&(s=n.label,u=n.target);var f=ob(t,n,r),d=f||ib(a),p=!d("as");return function(){var m=arguments,y=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&y.push("label:"+s+";"),m[0]==null||m[0].raw===void 0)y.push.apply(y,m);else{var b=m[0];y.push(b[0]);for(var v=m.length,E=1;E<v;E++)y.push(m[E],b[E])}var S=dh(function(w,_,O){var T=p&&w.as||a,C="",N=[],k=w;if(w.theme==null){k={};for(var z in w)k[z]=w[z];k.theme=I.useContext(zl)}typeof w.className=="string"?C=X0(_.registered,N,w.className):w.className!=null&&(C=w.className+" ");var H=Bl(y.concat(N),_.registered,k);C+=_.key+"-"+H.name,u!==void 0&&(C+=" "+u);var j=p&&f===void 0?ib(T):d,G={};for(var F in w)p&&F==="as"||j(F)&&(G[F]=w[F]);return G.className=C,O&&(G.ref=O),I.createElement(I.Fragment,null,I.createElement(Nk,{cache:_,serialized:H,isStringTag:typeof T=="string"}),I.createElement(T,G))});return S.displayName=s!==void 0?s:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=a,S.__emotion_styles=y,S.__emotion_forwardProp=f,Object.defineProperty(S,"toString",{value:function(){return"."+u}}),S.withComponent=function(w,_){var O=e(w,Lc({},n,_,{shouldForwardProp:ob(S,_,!0)}));return O.apply(void 0,y)},S}},Mk=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],gh=Ik.bind(null);Mk.forEach(function(e){gh[e]=gh(e)});function Dk(e){return e==null||Object.keys(e).length===0}function ab(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?a=>t(Dk(a)?n:a):t;return L.jsx(Tk,{styles:r})}function sb(e,t){return gh(e,t)}function Bk(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const lb=[];function wo(e){return lb[0]=e,Bl(lb)}var yh={exports:{}},Ht={};var ub;function zk(){if(ub)return Ht;ub=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function E(S){if(typeof S=="object"&&S!==null){var w=S.$$typeof;switch(w){case e:switch(S=S.type,S){case n:case a:case r:case d:case p:case b:return S;default:switch(S=S&&S.$$typeof,S){case u:case f:case y:case m:return S;case s:return S;default:return w}}case t:return w}}}return Ht.ContextConsumer=s,Ht.ContextProvider=u,Ht.Element=e,Ht.ForwardRef=f,Ht.Fragment=n,Ht.Lazy=y,Ht.Memo=m,Ht.Portal=t,Ht.Profiler=a,Ht.StrictMode=r,Ht.Suspense=d,Ht.SuspenseList=p,Ht.isContextConsumer=function(S){return E(S)===s},Ht.isContextProvider=function(S){return E(S)===u},Ht.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},Ht.isForwardRef=function(S){return E(S)===f},Ht.isFragment=function(S){return E(S)===n},Ht.isLazy=function(S){return E(S)===y},Ht.isMemo=function(S){return E(S)===m},Ht.isPortal=function(S){return E(S)===t},Ht.isProfiler=function(S){return E(S)===a},Ht.isStrictMode=function(S){return E(S)===r},Ht.isSuspense=function(S){return E(S)===d},Ht.isSuspenseList=function(S){return E(S)===p},Ht.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===a||S===r||S===d||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===y||S.$$typeof===m||S.$$typeof===u||S.$$typeof===s||S.$$typeof===f||S.$$typeof===v||S.getModuleId!==void 0)},Ht.typeOf=E,Ht}var cb;function Lk(){return cb||(cb=1,yh.exports=zk()),yh.exports}var fb=Lk();function wi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function db(e){if(I.isValidElement(e)||fb.isValidElementType(e)||!wi(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=db(e[n])}),t}function Ln(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return wi(e)&&wi(t)&&Object.keys(t).forEach(a=>{I.isValidElement(t[a])||fb.isValidElementType(t[a])?r[a]=t[a]:wi(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&wi(e[a])?r[a]=Ln(e[a],t[a],n):n.clone?r[a]=wi(t[a])?db(t[a]):t[a]:r[a]=t[a]}),r}const Pk=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function $k(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...a}=e,s=Pk(t),u=Object.keys(s);function f(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n})`}function d(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-r/100}${n})`}function p(b,v){const E=u.indexOf(v);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n}) and (max-width:${(E!==-1&&typeof t[u[E]]=="number"?t[u[E]]:v)-r/100}${n})`}function m(b){return u.indexOf(b)+1<u.length?p(b,u[u.indexOf(b)+1]):f(b)}function y(b){const v=u.indexOf(b);return v===0?f(u[1]):v===u.length-1?d(u[v]):p(b,u[u.indexOf(b)+1]).replace("@media","@media not all and")}return{keys:u,values:s,up:f,down:d,between:p,only:m,not:y,unit:n,...a}}function pb(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return n.length?n.reduce((r,a)=>{const s=t[a];return delete r[a],r[a]=s,r},{...t}):t}function Uk(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function jk(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,a]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(a).up(s)}function Hk(e){const t=(s,u)=>s.replace("@media",u?`@container ${u}`:"@container");function n(s,u){s.up=(...f)=>t(e.breakpoints.up(...f),u),s.down=(...f)=>t(e.breakpoints.down(...f),u),s.between=(...f)=>t(e.breakpoints.between(...f),u),s.only=(...f)=>t(e.breakpoints.only(...f),u),s.not=(...f)=>{const d=t(e.breakpoints.not(...f),u);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const r={},a=s=>(n(r,s),r);return n(a),{...e,containerQueries:a}}const Vk={borderRadius:4};function Ul(e,t){return t?Ln(e,t,{clone:!1}):e}const Pc={xs:0,sm:600,md:900,lg:1200,xl:1536},hb={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Pc[e]}px)`},Fk={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Pc[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ci(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||hb;return t.reduce((u,f,d)=>(u[s.up(s.keys[d])]=n(t[d]),u),{})}if(typeof t=="object"){const s=r.breakpoints||hb;return Object.keys(t).reduce((u,f)=>{if(Uk(s.keys,f)){const d=jk(r.containerQueries?r:Fk,f);d&&(u[d]=n(t[f],f))}else if(Object.keys(s.values||Pc).includes(f)){const d=s.up(f);u[d]=n(t[f],f)}else{const d=f;u[d]=t[d]}return u},{})}return n(t)}function mb(e={}){return e.keys?.reduce((n,r)=>{const a=e.up(r);return n[a]={},n},{})||{}}function vh(e,t){return e.reduce((n,r)=>{const a=n[r];return(!a||Object.keys(a).length===0)&&delete n[r],n},t)}function qk(e,...t){const n=mb(e),r=[n,...t].reduce((a,s)=>Ln(a,s),{});return vh(Object.keys(n),r)}function Gk(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((a,s)=>{s<e.length&&(n[a]=!0)}):r.forEach(a=>{e[a]!=null&&(n[a]=!0)}),n}function bh({values:e,breakpoints:t,base:n}){const r=n||Gk(e,t),a=Object.keys(r);if(a.length===0)return e;let s;return a.reduce((u,f,d)=>(Array.isArray(e)?(u[f]=e[d]!=null?e[d]:e[s],s=d):typeof e=="object"?(u[f]=e[f]!=null?e[f]:e[s],s=f):u[f]=e,u),{})}function Ce(e){if(typeof e!="string")throw new Error(Hi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _i(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function $c(e,t,n,r=n){let a;return typeof e=="function"?a=e(n):Array.isArray(e)?a=e[n]||r:a=_i(e,n)||r,t&&(a=t(a,r,e)),a}function Sn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:a}=e,s=u=>{if(u[t]==null)return null;const f=u[t],d=u.theme,p=_i(d,r)||{};return ci(u,f,y=>{let b=$c(p,a,y);return y===b&&typeof y=="string"&&(b=$c(p,a,`${t}${y==="default"?"":Ce(y)}`,y)),n===!1?b:{[n]:b}})};return s.propTypes={},s.filterProps=[t],s}function Yk(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Xk={m:"margin",p:"padding"},Zk={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},gb={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Kk=Yk(e=>{if(e.length>2)if(gb[e])e=gb[e];else return[e];const[t,n]=e.split(""),r=Xk[t],a=Zk[n]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),Sh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],xh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Sh,...xh];function jl(e,t,n,r){const a=_i(e,t,!0)??n;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const u=Math.abs(s),f=a[u];return s>=0?f:typeof f=="number"?-f:typeof f=="string"&&f.startsWith("var(")?`calc(-1 * ${f})`:`-${f}`}:typeof a=="function"?a:()=>{}}function Uc(e){return jl(e,"spacing",8)}function ca(e,t){return typeof t=="string"||t==null?t:e(t)}function Wk(e,t){return n=>e.reduce((r,a)=>(r[a]=ca(t,n),r),{})}function Qk(e,t,n,r){if(!t.includes(n))return null;const a=Kk(n),s=Wk(a,r),u=e[n];return ci(e,u,s)}function yb(e,t){const n=Uc(e.theme);return Object.keys(e).map(r=>Qk(e,t,r,n)).reduce(Ul,{})}function fn(e){return yb(e,Sh)}fn.propTypes={},fn.filterProps=Sh;function dn(e){return yb(e,xh)}dn.propTypes={},dn.filterProps=xh;function vb(e=8,t=Uc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const u=t(s);return typeof u=="number"?`${u}px`:u}).join(" ");return n.mui=!0,n}function jc(...e){const t=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),n=r=>Object.keys(r).reduce((a,s)=>t[s]?Ul(a,t[s](r)):a,{});return n.propTypes={},n.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),n}function jr(e){return typeof e!="number"?e:`${e}px solid`}function Hr(e,t){return Sn({prop:e,themeKey:"borders",transform:t})}const Jk=Hr("border",jr),eO=Hr("borderTop",jr),tO=Hr("borderRight",jr),nO=Hr("borderBottom",jr),rO=Hr("borderLeft",jr),iO=Hr("borderColor"),oO=Hr("borderTopColor"),aO=Hr("borderRightColor"),sO=Hr("borderBottomColor"),lO=Hr("borderLeftColor"),uO=Hr("outline",jr),cO=Hr("outlineColor"),Hc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=jl(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:ca(t,r)});return ci(e,e.borderRadius,n)}return null};Hc.propTypes={},Hc.filterProps=["borderRadius"],jc(Jk,eO,tO,nO,rO,iO,oO,aO,sO,lO,Hc,uO,cO);const Vc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=jl(e.theme,"spacing",8),n=r=>({gap:ca(t,r)});return ci(e,e.gap,n)}return null};Vc.propTypes={},Vc.filterProps=["gap"];const Fc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=jl(e.theme,"spacing",8),n=r=>({columnGap:ca(t,r)});return ci(e,e.columnGap,n)}return null};Fc.propTypes={},Fc.filterProps=["columnGap"];const qc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=jl(e.theme,"spacing",8),n=r=>({rowGap:ca(t,r)});return ci(e,e.rowGap,n)}return null};qc.propTypes={},qc.filterProps=["rowGap"];const fO=Sn({prop:"gridColumn"}),dO=Sn({prop:"gridRow"}),pO=Sn({prop:"gridAutoFlow"}),hO=Sn({prop:"gridAutoColumns"}),mO=Sn({prop:"gridAutoRows"}),gO=Sn({prop:"gridTemplateColumns"}),yO=Sn({prop:"gridTemplateRows"}),vO=Sn({prop:"gridTemplateAreas"}),bO=Sn({prop:"gridArea"});jc(Vc,Fc,qc,fO,dO,pO,hO,mO,gO,yO,vO,bO);function ss(e,t){return t==="grey"?t:e}const SO=Sn({prop:"color",themeKey:"palette",transform:ss}),xO=Sn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ss}),EO=Sn({prop:"backgroundColor",themeKey:"palette",transform:ss});jc(SO,xO,EO);function wr(e){return e<=1&&e!==0?`${e*100}%`:e}const wO=Sn({prop:"width",transform:wr}),Eh=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||Pc[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:wr(n)}};return ci(e,e.maxWidth,t)}return null};Eh.filterProps=["maxWidth"];const _O=Sn({prop:"minWidth",transform:wr}),TO=Sn({prop:"height",transform:wr}),CO=Sn({prop:"maxHeight",transform:wr}),AO=Sn({prop:"minHeight",transform:wr});Sn({prop:"size",cssProperty:"width",transform:wr}),Sn({prop:"size",cssProperty:"height",transform:wr});const kO=Sn({prop:"boxSizing"});jc(wO,Eh,_O,TO,CO,AO,kO);const Hl={border:{themeKey:"borders",transform:jr},borderTop:{themeKey:"borders",transform:jr},borderRight:{themeKey:"borders",transform:jr},borderBottom:{themeKey:"borders",transform:jr},borderLeft:{themeKey:"borders",transform:jr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:jr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Hc},color:{themeKey:"palette",transform:ss},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ss},backgroundColor:{themeKey:"palette",transform:ss},p:{style:dn},pt:{style:dn},pr:{style:dn},pb:{style:dn},pl:{style:dn},px:{style:dn},py:{style:dn},padding:{style:dn},paddingTop:{style:dn},paddingRight:{style:dn},paddingBottom:{style:dn},paddingLeft:{style:dn},paddingX:{style:dn},paddingY:{style:dn},paddingInline:{style:dn},paddingInlineStart:{style:dn},paddingInlineEnd:{style:dn},paddingBlock:{style:dn},paddingBlockStart:{style:dn},paddingBlockEnd:{style:dn},m:{style:fn},mt:{style:fn},mr:{style:fn},mb:{style:fn},ml:{style:fn},mx:{style:fn},my:{style:fn},margin:{style:fn},marginTop:{style:fn},marginRight:{style:fn},marginBottom:{style:fn},marginLeft:{style:fn},marginX:{style:fn},marginY:{style:fn},marginInline:{style:fn},marginInlineStart:{style:fn},marginInlineEnd:{style:fn},marginBlock:{style:fn},marginBlockStart:{style:fn},marginBlockEnd:{style:fn},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Vc},rowGap:{style:qc},columnGap:{style:Fc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wr},maxWidth:{style:Eh},minWidth:{transform:wr},height:{transform:wr},maxHeight:{transform:wr},minHeight:{transform:wr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function OO(...e){const t=e.reduce((r,a)=>r.concat(Object.keys(a)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function RO(e,t){return typeof e=="function"?e(t):e}function NO(){function e(n,r,a,s){const u={[n]:r,theme:a},f=s[n];if(!f)return{[n]:r};const{cssProperty:d=n,themeKey:p,transform:m,style:y}=f;if(r==null)return null;if(p==="typography"&&r==="inherit")return{[n]:r};const b=_i(a,p)||{};return y?y(u):ci(u,r,E=>{let S=$c(b,m,E);return E===S&&typeof E=="string"&&(S=$c(b,m,`${n}${E==="default"?"":Ce(E)}`,E)),d===!1?S:{[d]:S}})}function t(n){const{sx:r,theme:a={},nested:s}=n||{};if(!r)return null;const u=a.unstable_sxConfig??Hl;function f(d){let p=d;if(typeof d=="function")p=d(a);else if(typeof d!="object")return d;if(!p)return null;const m=mb(a.breakpoints),y=Object.keys(m);let b=m;return Object.keys(p).forEach(v=>{const E=RO(p[v],a);if(E!=null)if(typeof E=="object")if(u[v])b=Ul(b,e(v,E,a,u));else{const S=ci({theme:a},E,w=>({[v]:w}));OO(S,E)?b[v]=t({sx:E,theme:a,nested:!0}):b=Ul(b,S)}else b=Ul(b,e(v,E,a,u))}),!s&&a.modularCssLayers?{"@layer sx":pb(a,vh(y,b))}:pb(a,vh(y,b))}return Array.isArray(r)?r.map(f):f(r)}return t}const _o=NO();_o.filterProps=["sx"];function IO(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Gc(e={},...t){const{breakpoints:n={},palette:r={},spacing:a,shape:s={},...u}=e,f=$k(n),d=vb(a);let p=Ln({breakpoints:f,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:d,shape:{...Vk,...s}},u);return p=Hk(p),p.applyStyles=IO,p=t.reduce((m,y)=>Ln(m,y),p),p.unstable_sxConfig={...Hl,...u?.unstable_sxConfig},p.unstable_sx=function(y){return _o({sx:y,theme:this})},p}function MO(e){return Object.keys(e).length===0}function Yc(e=null){const t=I.useContext(zl);return!t||MO(t)?e:t}const DO=Gc();function Xc(e=DO){return Yc(e)}function wh(e){const t=wo(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function bb({styles:e,themeId:t,defaultTheme:n={}}){const r=Xc(n),a=t&&r[t]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(Array.isArray(s)?s=s.map(u=>wh(typeof u=="function"?u(a):u)):s=wh(s)),L.jsx(ab,{styles:s})}const BO=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Hl;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function _h(e){const{sx:t,...n}=e,{systemProps:r,otherProps:a}=BO(n);let s;return Array.isArray(t)?s=[r,...t]:typeof t=="function"?s=(...u)=>{const f=t(...u);return wi(f)?{...r,...f}:r}:s={...r,...t},{...a,sx:s}}const Sb=e=>e,xb=(()=>{let e=Sb;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Sb}}})();function Eb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Eb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ye(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Eb(e))&&(r&&(r+=" "),r+=t);return r}function zO(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:a}=e,s=sb("div",{shouldForwardProp:f=>f!=="theme"&&f!=="sx"&&f!=="as"})(_o);return I.forwardRef(function(d,p){const m=Xc(n),{className:y,component:b="div",...v}=_h(d);return L.jsx(s,{as:b,ref:p,className:Ye(y,a?a(r):r),theme:t&&m[t]||m,...v})})}const LO={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _t(e,t,n="Mui"){const r=LO[t];return r?`${n}-${r}`:`${xb.generate(e)}-${t}`}function Tt(e,t,n="Mui"){const r={};return t.forEach(a=>{r[a]=_t(e,a,n)}),r}function wb(e){const{variants:t,...n}=e,r={variants:t,style:wo(n),isProcessed:!0};return r.style===n||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=wo(a.style))}),r}const PO=Gc();function Th(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function fa(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function $O(e){return e?(t,n)=>n[e]:null}function UO(e,t,n){e.theme=HO(e.theme)?n:e.theme[t]||e.theme}function Zc(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(a=>Zc(e,a,n));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=n?fa(r.style,n):r.style;else{const{variants:s,...u}=r;a=n?fa(wo(u),n):u}return _b(e,r.variants,[a],n)}return r?.isProcessed?n?fa(wo(r.style),n):r.style:n?fa(wo(r),n):r}function _b(e,t,n=[],r=void 0){let a;e:for(let s=0;s<t.length;s+=1){const u=t[s];if(typeof u.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!u.props(a))continue}else for(const f in u.props)if(e[f]!==u.props[f]&&e.ownerState?.[f]!==u.props[f])continue e;typeof u.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?fa(wo(u.style(a)),r):u.style(a))):n.push(r?fa(wo(u.style),r):u.style)}return n}function Tb(e={}){const{themeId:t,defaultTheme:n=PO,rootShouldForwardProp:r=Th,slotShouldForwardProp:a=Th}=e;function s(f){UO(f,t,n)}return(f,d={})=>{Bk(f,k=>k.filter(z=>z!==_o));const{name:p,slot:m,skipVariantsResolver:y,skipSx:b,overridesResolver:v=$O(FO(m)),...E}=d,S=p&&p.startsWith("Mui")||m?"components":"custom",w=y!==void 0?y:m&&m!=="Root"&&m!=="root"||!1,_=b||!1;let O=Th;m==="Root"||m==="root"?O=r:m?O=a:VO(f)&&(O=void 0);const T=sb(f,{shouldForwardProp:O,label:jO(),...E}),C=k=>{if(k.__emotion_real===k)return k;if(typeof k=="function")return function(H){return Zc(H,k,H.theme.modularCssLayers?S:void 0)};if(wi(k)){const z=wb(k);return function(j){return z.variants?Zc(j,z,j.theme.modularCssLayers?S:void 0):j.theme.modularCssLayers?fa(z.style,S):z.style}}return k},N=(...k)=>{const z=[],H=k.map(C),j=[];if(z.push(s),p&&v&&j.push(function(X){const U=X.theme.components?.[p]?.styleOverrides;if(!U)return null;const D={};for(const Y in U)D[Y]=Zc(X,U[Y],X.theme.modularCssLayers?"theme":void 0);return v(X,D)}),p&&!w&&j.push(function(X){const U=X.theme?.components?.[p]?.variants;return U?_b(X,U,[],X.theme.modularCssLayers?"theme":void 0):null}),_||j.push(_o),Array.isArray(H[0])){const A=H.shift(),X=new Array(z.length).fill(""),$=new Array(j.length).fill("");let U;U=[...X,...A,...$],U.raw=[...X,...A.raw,...$],z.unshift(U)}const G=[...z,...H,...j],F=T(...G);return f.muiName&&(F.muiName=f.muiName),F};return T.withConfig&&(N.withConfig=T.withConfig),N}}function jO(e,t){return void 0}function HO(e){for(const t in e)return!1;return!0}function VO(e){return typeof e=="string"&&e.charCodeAt(0)>96}function FO(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const qO=Tb();function Vl(e,t,n=!1){const r={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const u=e[s],f=t[s];if(!f)r[s]=u||{};else if(!u)r[s]=f;else{r[s]={...f};for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d)){const p=d;r[s][p]=Vl(u[p],f[p],n)}}}else s==="className"&&n&&t.className?r.className=Ye(e?.className,t?.className):s==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[s]===void 0&&(r[s]=e[s])}return r}function Cb(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Vl(t.components[n].defaultProps,r)}function GO({props:e,name:t,defaultTheme:n,themeId:r}){let a=Xc(n);return r&&(a=a[r]||a),Cb({theme:a,name:t,props:e})}const Vr=typeof window<"u"?I.useLayoutEffect:I.useEffect;function YO(e,t,n,r,a){const[s,u]=I.useState(()=>a&&n?n(e).matches:r?r(e).matches:t);return Vr(()=>{if(!n)return;const f=n(e),d=()=>{u(f.matches)};return d(),f.addEventListener("change",d),()=>{f.removeEventListener("change",d)}},[e,n]),s}const Ab={...zc}.useSyncExternalStore;function XO(e,t,n,r,a){const s=I.useCallback(()=>t,[t]),u=I.useMemo(()=>{if(a&&n)return()=>n(e).matches;if(r!==null){const{matches:m}=r(e);return()=>m}return s},[s,e,r,a,n]),[f,d]=I.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const m=n(e);return[()=>m.matches,y=>(m.addEventListener("change",y),()=>{m.removeEventListener("change",y)})]},[s,n,e]);return Ab(d,f,u)}function kb(e={}){const{themeId:t}=e;return function(r,a={}){let s=Yc();s&&t&&(s=s[t]||s);const u=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:f=!1,matchMedia:d=u?window.matchMedia:null,ssrMatchMedia:p=null,noSsr:m=!1}=Cb({name:"MuiUseMediaQuery",props:a,theme:s});let y=typeof r=="function"?r(s):r;return y=y.replace(/^@media( ?)/m,""),y.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
10
+ `)),(Ab!==void 0?XO:YO)(y,f,d,p,m)}}kb();function ZO(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ch(e,t=0,n=1){return ZO(e,t,n)}function KO(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,a)=>a<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function To(e){if(e.type)return e;if(e.charAt(0)==="#")return To(KO(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Hi(9,e));let r=e.substring(t+1,e.length-1),a;if(n==="color"){if(r=r.split(" "),a=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(Hi(10,a))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:a}}const WO=e=>{const t=To(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Fl=(e,t)=>{try{return WO(e)}catch{return e}};function Kc(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((a,s)=>s<3?parseInt(a,10):a):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Ob(e){e=To(e);const{values:t}=e,n=t[0],r=t[1]/100,a=t[2]/100,s=r*Math.min(a,1-a),u=(p,m=(p+n/30)%12)=>a-s*Math.max(Math.min(m-3,9-m,1),-1);let f="rgb";const d=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(f+="a",d.push(t[3])),Kc({type:f,values:d})}function Ah(e){e=To(e);let t=e.type==="hsl"||e.type==="hsla"?To(Ob(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function QO(e,t){const n=Ah(e),r=Ah(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ql(e,t){return e=To(e),t=Ch(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Kc(e)}function da(e,t,n){try{return ql(e,t)}catch{return e}}function Wc(e,t){if(e=To(e),t=Ch(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Kc(e)}function zt(e,t,n){try{return Wc(e,t)}catch{return e}}function Qc(e,t){if(e=To(e),t=Ch(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Kc(e)}function Lt(e,t,n){try{return Qc(e,t)}catch{return e}}function JO(e,t=.15){return Ah(e)>.5?Wc(e,t):Qc(e,t)}function Jc(e,t,n){try{return JO(e,t)}catch{return e}}const Rb=I.createContext(null);function kh(){return I.useContext(Rb)}const eR=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function tR(e,t){return typeof t=="function"?t(e):{...e,...t}}function nR(e){const{children:t,theme:n}=e,r=kh(),a=I.useMemo(()=>{const s=r===null?{...n}:tR(r,n);return s!=null&&(s[eR]=r!==null),s},[n,r]);return L.jsx(Rb.Provider,{value:a,children:t})}const Nb=I.createContext();function rR({value:e,...t}){return L.jsx(Nb.Provider,{value:e??!0,...t})}const Oh=()=>I.useContext(Nb)??!1,Ib=I.createContext(void 0);function iR({value:e,children:t}){return L.jsx(Ib.Provider,{value:e,children:t})}function oR(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const a=t.components[n];return a.defaultProps?Vl(a.defaultProps,r,t.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?Vl(a,r,t.components.mergeClassNameAndStyle):r}function aR({props:e,name:t}){const n=I.useContext(Ib);return oR({props:e,name:t,theme:{components:n}})}let Mb=0;function sR(e){const[t,n]=I.useState(e),r=e||t;return I.useEffect(()=>{t==null&&(Mb+=1,n(`mui-${Mb}`))},[t]),r}const Db={...zc}.useId;function ls(e){if(Db!==void 0){const t=Db();return e??t}return sR(e)}function lR(e){const t=Yc(),n=ls()||"",{modularCssLayers:r}=e;let a="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!r||t!==null?a="":typeof r=="string"?a=r.replace(/mui(?!\.)/g,a):a=`@layer ${a};`,Vr(()=>{const s=document.querySelector("head");if(!s)return;const u=s.firstChild;if(a){if(u&&u.hasAttribute?.("data-mui-layer-order")&&u.getAttribute("data-mui-layer-order")===n)return;const f=document.createElement("style");f.setAttribute("data-mui-layer-order",n),f.textContent=a,s.prepend(f)}else s.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[a,n]),a?L.jsx(bb,{styles:a}):null}const Bb={};function zb(e,t,n,r=!1){return I.useMemo(()=>{const a=e&&t[e]||t;if(typeof n=="function"){const s=n(a),u=e?{...t,[e]:s}:s;return r?()=>u:u}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function Lb(e){const{children:t,theme:n,themeId:r}=e,a=Yc(Bb),s=kh()||Bb,u=zb(r,a,n),f=zb(r,s,n,!0),d=(r?u[r]:u).direction==="rtl",p=lR(u);return L.jsx(nR,{theme:f,children:L.jsx(zl.Provider,{value:u,children:L.jsx(rR,{value:d,children:L.jsxs(iR,{value:r?u[r].components:u.components,children:[p,t]})})})})}const Pb={theme:void 0};function uR(e){let t,n;return function(a){let s=t;return(s===void 0||a.theme!==n)&&(Pb.theme=a.theme,s=wb(e(Pb)),t=s,n=a.theme),s}}const Rh="mode",Nh="color-scheme",cR="data-color-scheme";function fR(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:a=Rh,colorSchemeStorageKey:s=Nh,attribute:u=cR,colorSchemeNode:f="document.documentElement",nonce:d}=e||{};let p="",m=u;if(u==="class"&&(m=".%s"),u==="data"&&(m="[data-%s]"),m.startsWith(".")){const b=m.substring(1);p+=`${f}.classList.remove('${b}'.replace('%s', light), '${b}'.replace('%s', dark));
11
+ ${f}.classList.add('${b}'.replace('%s', colorScheme));`}const y=m.match(/\[([^[\]]+)\]/);if(y){const[b,v]=y[1].split("=");v||(p+=`${f}.removeAttribute('${b}'.replace('%s', light));
12
+ ${f}.removeAttribute('${b}'.replace('%s', dark));`),p+=`
13
+ ${f}.setAttribute('${b}'.replace('%s', colorScheme), ${v?`${v}.replace('%s', colorScheme)`:'""'});`}else m!==".%s"&&(p+=`${f}.setAttribute('${m}', colorScheme);`);return L.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(function() {
14
+ try {
15
+ let colorScheme = '';
16
+ const mode = localStorage.getItem('${a}') || '${t}';
17
+ const dark = localStorage.getItem('${s}-dark') || '${r}';
18
+ const light = localStorage.getItem('${s}-light') || '${n}';
19
+ if (mode === 'system') {
20
+ // handle system mode
21
+ const mql = window.matchMedia('(prefers-color-scheme: dark)');
22
+ if (mql.matches) {
23
+ colorScheme = dark
24
+ } else {
25
+ colorScheme = light
26
+ }
27
+ }
28
+ if (mode === 'light') {
29
+ colorScheme = light;
30
+ }
31
+ if (mode === 'dark') {
32
+ colorScheme = dark;
33
+ }
34
+ if (colorScheme) {
35
+ ${p}
36
+ }
37
+ } catch(e){}})();`}},"mui-color-scheme-init")}function dR(){}const pR=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return dR;const r=a=>{const s=a.newValue;a.key===e&&n(s)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function Ih(){}function $b(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ub(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function hR(e){return Ub(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function mR(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Rh,colorSchemeStorageKey:u=Nh,storageWindow:f=typeof window>"u"?void 0:window,storageManager:d=pR,noSsr:p=!1}=e,m=a.join(","),y=a.length>1,b=I.useMemo(()=>d?.({key:s,storageWindow:f}),[d,s,f]),v=I.useMemo(()=>d?.({key:`${u}-light`,storageWindow:f}),[d,u,f]),E=I.useMemo(()=>d?.({key:`${u}-dark`,storageWindow:f}),[d,u,f]),[S,w]=I.useState(()=>{const H=b?.get(t)||t,j=v?.get(n)||n,G=E?.get(r)||r;return{mode:H,systemMode:$b(H),lightColorScheme:j,darkColorScheme:G}}),[_,O]=I.useState(p||!y);I.useEffect(()=>{O(!0)},[]);const T=hR(S),C=I.useCallback(H=>{w(j=>{if(H===j.mode)return j;const G=H??t;return b?.set(G),{...j,mode:G,systemMode:$b(G)}})},[b,t]),N=I.useCallback(H=>{H?typeof H=="string"?H&&!m.includes(H)?console.error(`\`${H}\` does not exist in \`theme.colorSchemes\`.`):w(j=>{const G={...j};return Ub(j,F=>{F==="light"&&(v?.set(H),G.lightColorScheme=H),F==="dark"&&(E?.set(H),G.darkColorScheme=H)}),G}):w(j=>{const G={...j},F=H.light===null?n:H.light,A=H.dark===null?r:H.dark;return F&&(m.includes(F)?(G.lightColorScheme=F,v?.set(F)):console.error(`\`${F}\` does not exist in \`theme.colorSchemes\`.`)),A&&(m.includes(A)?(G.darkColorScheme=A,E?.set(A)):console.error(`\`${A}\` does not exist in \`theme.colorSchemes\`.`)),G}):w(j=>(v?.set(n),E?.set(r),{...j,lightColorScheme:n,darkColorScheme:r}))},[m,v,E,n,r]),k=I.useCallback(H=>{S.mode==="system"&&w(j=>{const G=H?.matches?"dark":"light";return j.systemMode===G?j:{...j,systemMode:G}})},[S.mode]),z=I.useRef(k);return z.current=k,I.useEffect(()=>{if(typeof window.matchMedia!="function"||!y)return;const H=(...G)=>z.current(...G),j=window.matchMedia("(prefers-color-scheme: dark)");return j.addListener(H),H(j),()=>{j.removeListener(H)}},[y]),I.useEffect(()=>{if(y){const H=b?.subscribe(F=>{(!F||["light","dark","system"].includes(F))&&C(F||t)})||Ih,j=v?.subscribe(F=>{(!F||m.match(F))&&N({light:F})})||Ih,G=E?.subscribe(F=>{(!F||m.match(F))&&N({dark:F})})||Ih;return()=>{H(),j(),G()}}},[N,C,m,t,f,y,b,v,E]),{...S,mode:_?S.mode:void 0,systemMode:_?S.systemMode:void 0,colorScheme:_?T:void 0,setMode:C,setColorScheme:N}}const gR="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function yR(e){const{themeId:t,theme:n={},modeStorageKey:r=Rh,colorSchemeStorageKey:a=Nh,disableTransitionOnChange:s=!1,defaultColorScheme:u,resolveTheme:f}=e,d={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},p=I.createContext(void 0),m=()=>I.useContext(p)||d,y={},b={};function v(_){const{children:O,theme:T,modeStorageKey:C=r,colorSchemeStorageKey:N=a,disableTransitionOnChange:k=s,storageManager:z,storageWindow:H=typeof window>"u"?void 0:window,documentNode:j=typeof document>"u"?void 0:document,colorSchemeNode:G=typeof document>"u"?void 0:document.documentElement,disableNestedContext:F=!1,disableStyleSheetGeneration:A=!1,defaultMode:X="system",forceThemeRerender:$=!1,noSsr:U}=_,D=I.useRef(!1),Y=kh(),re=I.useContext(p),ae=!!re&&!F,B=I.useMemo(()=>T||(typeof n=="function"?n():n),[T]),P=B[t],W=P||B,{colorSchemes:M=y,components:fe=b,cssVarPrefix:ge}=W,ye=Object.keys(M).filter(te=>!!M[te]).join(","),Se=I.useMemo(()=>ye.split(","),[ye]),$e=typeof u=="string"?u:u.light,Ae=typeof u=="string"?u:u.dark,Me=M[$e]&&M[Ae]?X:M[W.defaultColorScheme]?.palette?.mode||W.palette?.mode,{mode:Ue,setMode:Xe,systemMode:Xt,lightColorScheme:Oe,darkColorScheme:Ge,colorScheme:Dt,setColorScheme:Rt}=mR({supportedColorSchemes:Se,defaultLightColorScheme:$e,defaultDarkColorScheme:Ae,modeStorageKey:C,colorSchemeStorageKey:N,defaultMode:Me,storageManager:z,storageWindow:H,noSsr:U});let ht=Ue,ut=Dt;ae&&(ht=re.mode,ut=re.colorScheme);let mt=ut||W.defaultColorScheme;W.vars&&!$&&(mt=W.defaultColorScheme);const ot=I.useMemo(()=>{const te=W.generateThemeVars?.()||W.vars,se={...W,components:fe,colorSchemes:M,cssVarPrefix:ge,vars:te};if(typeof se.generateSpacing=="function"&&(se.spacing=se.generateSpacing()),mt){const xe=M[mt];xe&&typeof xe=="object"&&Object.keys(xe).forEach(Re=>{xe[Re]&&typeof xe[Re]=="object"?se[Re]={...se[Re],...xe[Re]}:se[Re]=xe[Re]})}return f?f(se):se},[W,mt,fe,M,ge]),ke=W.colorSchemeSelector;Vr(()=>{if(ut&&G&&ke&&ke!=="media"){const te=ke;let se=ke;if(te==="class"&&(se=".%s"),te==="data"&&(se="[data-%s]"),te?.startsWith("data-")&&!te.includes("%s")&&(se=`[${te}="%s"]`),se.startsWith("."))G.classList.remove(...Se.map(xe=>se.substring(1).replace("%s",xe))),G.classList.add(se.substring(1).replace("%s",ut));else{const xe=se.replace("%s",ut).match(/\[([^\]]+)\]/);if(xe){const[Re,Ze]=xe[1].split("=");Ze||Se.forEach(je=>{G.removeAttribute(Re.replace(ut,je))}),G.setAttribute(Re,Ze?Ze.replace(/"|'/g,""):"")}else G.setAttribute(se,ut)}}},[ut,ke,G,Se]),I.useEffect(()=>{let te;if(k&&D.current&&j){const se=j.createElement("style");se.appendChild(j.createTextNode(gR)),j.head.appendChild(se),window.getComputedStyle(j.body),te=setTimeout(()=>{j.head.removeChild(se)},1)}return()=>{clearTimeout(te)}},[ut,k,j]),I.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const Bn=I.useMemo(()=>({allColorSchemes:Se,colorScheme:ut,darkColorScheme:Ge,lightColorScheme:Oe,mode:ht,setColorScheme:Rt,setMode:Xe,systemMode:Xt}),[Se,ut,Ge,Oe,ht,Rt,Xe,Xt,ot.colorSchemeSelector]);let We=!0;(A||W.cssVariables===!1||ae&&Y?.cssVarPrefix===ge)&&(We=!1);const tr=L.jsxs(I.Fragment,{children:[L.jsx(Lb,{themeId:P?t:void 0,theme:ot,children:O}),We&&L.jsx(ab,{styles:ot.generateStyleSheets?.()||[]})]});return ae?tr:L.jsx(p.Provider,{value:Bn,children:tr})}const E=typeof u=="string"?u:u.light,S=typeof u=="string"?u:u.dark;return{CssVarsProvider:v,useColorScheme:m,getInitColorSchemeScript:_=>fR({colorSchemeStorageKey:a,defaultLightColorScheme:E,defaultDarkColorScheme:S,modeStorageKey:r,..._})}}function vR(e=""){function t(...r){if(!r.length)return"";const a=r[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...r.slice(1))})`:`, ${a}`}return(r,...a)=>`var(--${e?`${e}-`:""}${r}${t(...a)})`}const jb=(e,t,n,r=[])=>{let a=e;t.forEach((s,u)=>{u===t.length-1?Array.isArray(a)?a[Number(s)]=n:a&&typeof a=="object"&&(a[s]=n):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})},bR=(e,t,n)=>{function r(a,s=[],u=[]){Object.entries(a).forEach(([f,d])=>{(!n||n&&!n([...s,f]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?r(d,[...s,f],Array.isArray(d)?[...u,f]:u):t([...s,f],d,u))})}r(e)},SR=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Mh(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},a={},s={},u={};return bR(e,(f,d,p)=>{if((typeof d=="string"||typeof d=="number")&&(!r||!r(f,d))){const m=`--${n?`${n}-`:""}${f.join("-")}`,y=SR(f,d);Object.assign(a,{[m]:y}),jb(s,f,`var(${m})`,p),jb(u,f,`var(${m}, ${y})`,p)}},f=>f[0]==="vars"),{css:a,vars:s,varsWithDefaults:u}}function xR(e,t={}){const{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:a,enableContrastVars:s}=t,{colorSchemes:u={},components:f,defaultColorScheme:d="light",...p}=e,{vars:m,css:y,varsWithDefaults:b}=Mh(p,t);let v=b;const E={},{[d]:S,...w}=u;if(Object.entries(w||{}).forEach(([C,N])=>{const{vars:k,css:z,varsWithDefaults:H}=Mh(N,t);v=Ln(v,H),E[C]={css:z,vars:k}}),S){const{css:C,vars:N,varsWithDefaults:k}=Mh(S,t);v=Ln(v,k),E[d]={css:C,vars:N}}function _(C,N){let k=a;if(a==="class"&&(k=".%s"),a==="data"&&(k="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(k=`[${a}="%s"]`),C){if(k==="media")return e.defaultColorScheme===C?":root":{[`@media (prefers-color-scheme: ${u[C]?.palette?.mode||C})`]:{":root":N}};if(k)return e.defaultColorScheme===C?`:root, ${k.replace("%s",String(C))}`:k.replace("%s",String(C))}return":root"}return{vars:v,generateThemeVars:()=>{let C={...m};return Object.entries(E).forEach(([,{vars:N}])=>{C=Ln(C,N)}),C},generateStyleSheets:()=>{const C=[],N=e.defaultColorScheme||"light";function k(j,G){Object.keys(G).length&&C.push(typeof j=="string"?{[j]:{...G}}:j)}k(n(void 0,{...y}),y);const{[N]:z,...H}=E;if(z){const{css:j}=z,G=u[N]?.palette?.mode,F=!r&&G?{colorScheme:G,...j}:{...j};k(n(N,{...F}),F)}return Object.entries(H).forEach(([j,{css:G}])=>{const F=u[j]?.palette?.mode,A=!r&&F?{colorScheme:F,...G}:{...G};k(n(j,{...A}),A)}),s&&C.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),C}}}function ER(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function Ct(e,t,n=void 0){const r={};for(const a in e){const s=e[a];let u="",f=!0;for(let d=0;d<s.length;d+=1){const p=s[d];p&&(u+=(f===!0?"":" ")+t(p),f=!1,n&&n[p]&&(u+=" "+n[p]))}r[a]=u}return r}function Dh(e,t){return I.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const wR=Gc(),_R=qO("div",{name:"MuiStack",slot:"Root"});function TR(e){return GO({props:e,name:"MuiStack",defaultTheme:wR})}function CR(e,t){const n=I.Children.toArray(e).filter(Boolean);return n.reduce((r,a,s)=>(r.push(a),s<n.length-1&&r.push(I.cloneElement(t,{key:`separator-${s}`})),r),[])}const AR=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],kR=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...ci({theme:t},bh({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=Uc(t),a=Object.keys(t.breakpoints.values).reduce((d,p)=>((typeof e.spacing=="object"&&e.spacing[p]!=null||typeof e.direction=="object"&&e.direction[p]!=null)&&(d[p]=!0),d),{}),s=bh({values:e.direction,base:a}),u=bh({values:e.spacing,base:a});typeof s=="object"&&Object.keys(s).forEach((d,p,m)=>{if(!s[d]){const b=p>0?s[m[p-1]]:"column";s[d]=b}}),n=Ln(n,ci({theme:t},u,(d,p)=>e.useFlexGap?{gap:ca(r,d)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${AR(p?s[p]:e.direction)}`]:ca(r,d)}}))}return n=qk(t.breakpoints,n),n};function OR(e={}){const{createStyledComponent:t=_R,useThemeProps:n=TR,componentName:r="MuiStack"}=e,a=()=>Ct({root:["root"]},d=>_t(r,d),{}),s=t(kR);return I.forwardRef(function(d,p){const m=n(d),y=_h(m),{component:b="div",direction:v="column",spacing:E=0,divider:S,children:w,className:_,useFlexGap:O=!1,...T}=y,C={direction:v,spacing:E,useFlexGap:O},N=a();return L.jsx(s,{as:b,ownerState:C,ref:p,className:Ye(N.root,_),...T,children:S?CR(w,S):w})})}function Hb(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Pl.white,default:Pl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Vb=Hb();function Fb(){return{text:{primary:Pl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Pl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Bh=Fb();function qb(e,t,n,r){const a=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Qc(e.main,a):t==="dark"&&(e.dark=Wc(e.main,s)))}function Gb(e,t,n,r,a){const s=a.light||a,u=a.dark||a*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(u*100).toFixed(0)}%)`))}function RR(e="light"){return e==="dark"?{main:is[200],light:is[50],dark:is[400]}:{main:is[700],light:is[400],dark:is[800]}}function NR(e="light"){return e==="dark"?{main:rs[200],light:rs[50],dark:rs[400]}:{main:rs[500],light:rs[300],dark:rs[700]}}function IR(e="light"){return e==="dark"?{main:ns[500],light:ns[300],dark:ns[700]}:{main:ns[700],light:ns[400],dark:ns[800]}}function MR(e="light"){return e==="dark"?{main:os[400],light:os[300],dark:os[700]}:{main:os[700],light:os[500],dark:os[900]}}function DR(e="light"){return e==="dark"?{main:as[400],light:as[300],dark:as[700]}:{main:as[800],light:as[500],dark:as[900]}}function BR(e="light"){return e==="dark"?{main:$l[400],light:$l[300],dark:$l[700]}:{main:"#ed6c02",light:$l[500],dark:$l[900]}}function zR(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function zh(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:a,...s}=e,u=e.primary||RR(t),f=e.secondary||NR(t),d=e.error||IR(t),p=e.info||MR(t),m=e.success||DR(t),y=e.warning||BR(t);function b(w){return a?zR(w):QO(w,Bh.text.primary)>=n?Bh.text.primary:Vb.text.primary}const v=({color:w,name:_,mainShade:O=500,lightShade:T=300,darkShade:C=700})=>{if(w={...w},!w.main&&w[O]&&(w.main=w[O]),!w.hasOwnProperty("main"))throw new Error(Hi(11,_?` (${_})`:"",O));if(typeof w.main!="string")throw new Error(Hi(12,_?` (${_})`:"",JSON.stringify(w.main)));return a?(Gb(a,w,"light",T,r),Gb(a,w,"dark",C,r)):(qb(w,"light",T,r),qb(w,"dark",C,r)),w.contrastText||(w.contrastText=b(w.main)),w};let E;return t==="light"?E=Hb():t==="dark"&&(E=Fb()),Ln({common:{...Pl},mode:t,primary:v({color:u,name:"primary"}),secondary:v({color:f,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:d,name:"error"}),warning:v({color:y,name:"warning"}),info:v({color:p,name:"info"}),success:v({color:m,name:"success"}),grey:Ck,contrastThreshold:n,getContrastText:b,augmentColor:v,tonalOffset:r,...E},s)}function LR(e){const t={};return Object.entries(e).forEach(r=>{const[a,s]=r;typeof s=="object"&&(t[a]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function PR(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function $R(e){return Math.round(e*1e5)/1e5}const Yb={textTransform:"uppercase"},Xb='"Roboto", "Helvetica", "Arial", sans-serif';function Zb(e,t){const{fontFamily:n=Xb,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:u=500,fontWeightBold:f=700,htmlFontSize:d=16,allVariants:p,pxToRem:m,...y}=typeof t=="function"?t(e):t,b=r/14,v=m||(w=>`${w/d*b}rem`),E=(w,_,O,T,C)=>({fontFamily:n,fontWeight:w,fontSize:v(_),lineHeight:O,...n===Xb?{letterSpacing:`${$R(T/_)}em`}:{},...C,...p}),S={h1:E(a,96,1.167,-1.5),h2:E(a,60,1.2,-.5),h3:E(s,48,1.167,0),h4:E(s,34,1.235,.25),h5:E(s,24,1.334,0),h6:E(u,20,1.6,.15),subtitle1:E(s,16,1.75,.15),subtitle2:E(u,14,1.57,.1),body1:E(s,16,1.5,.15),body2:E(s,14,1.43,.15),button:E(u,14,1.75,.4,Yb),caption:E(s,12,1.66,.4),overline:E(s,12,2.66,1,Yb),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ln({htmlFontSize:d,pxToRem:v,fontFamily:n,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:u,fontWeightBold:f,...S},y,{clone:!1})}const UR=.2,jR=.14,HR=.12;function rn(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${UR})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${jR})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${HR})`].join(",")}const VR=["none",rn(0,2,1,-1,0,1,1,0,0,1,3,0),rn(0,3,1,-2,0,2,2,0,0,1,5,0),rn(0,3,3,-2,0,3,4,0,0,1,8,0),rn(0,2,4,-1,0,4,5,0,0,1,10,0),rn(0,3,5,-1,0,5,8,0,0,1,14,0),rn(0,3,5,-1,0,6,10,0,0,1,18,0),rn(0,4,5,-2,0,7,10,1,0,2,16,1),rn(0,5,5,-3,0,8,10,1,0,3,14,2),rn(0,5,6,-3,0,9,12,1,0,3,16,2),rn(0,6,6,-3,0,10,14,1,0,4,18,3),rn(0,6,7,-4,0,11,15,1,0,4,20,3),rn(0,7,8,-4,0,12,17,2,0,5,22,4),rn(0,7,8,-4,0,13,19,2,0,5,24,4),rn(0,7,9,-4,0,14,21,2,0,5,26,4),rn(0,8,9,-5,0,15,22,2,0,6,28,5),rn(0,8,10,-5,0,16,24,2,0,6,30,5),rn(0,8,11,-5,0,17,26,2,0,6,32,5),rn(0,9,11,-5,0,18,28,2,0,7,34,6),rn(0,9,12,-6,0,19,29,2,0,7,36,6),rn(0,10,13,-6,0,20,31,3,0,8,38,7),rn(0,10,13,-6,0,21,33,3,0,8,40,7),rn(0,10,14,-6,0,22,35,3,0,8,42,7),rn(0,11,14,-7,0,23,36,3,0,9,44,8),rn(0,11,15,-7,0,24,38,3,0,9,46,8)],FR={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},qR={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Kb(e){return`${Math.round(e)}ms`}function GR(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function YR(e){const t={...FR,...e.easing},n={...qR,...e.duration};return{getAutoHeightDuration:GR,create:(a=["all"],s={})=>{const{duration:u=n.standard,easing:f=t.easeInOut,delay:d=0,...p}=s;return(Array.isArray(a)?a:[a]).map(m=>`${m} ${typeof u=="string"?u:Kb(u)} ${f} ${typeof d=="string"?d:Kb(d)}`).join(",")},...e,easing:t,duration:n}}const XR={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ZR(e){return wi(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Wb(e={}){const t={...e};function n(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[u,f]=a[s];!ZR(f)||u.startsWith("unstable_")?delete r[u]:wi(f)&&(r[u]={...f},n(r[u]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
38
+
39
+ const theme = ${JSON.stringify(t,null,2)};
40
+
41
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
42
+ theme.transitions = createTransitions(theme.transitions || {});
43
+
44
+ export default theme;`}function Qb(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const KR=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function WR(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:ql(t,KR(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Qb(n)})`:Qc(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Qb(n)})`:Wc(t,n)}})}function Lh(e={},...t){const{breakpoints:n,mixins:r={},spacing:a,palette:s={},transitions:u={},typography:f={},shape:d,colorSpace:p,...m}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Hi(20));const y=zh({...s,colorSpace:p}),b=Gc(e);let v=Ln(b,{mixins:PR(b.breakpoints,r),palette:y,shadows:VR.slice(),typography:Zb(y,f),transitions:YR(u),zIndex:{...XR}});return v=Ln(v,m),v=t.reduce((E,S)=>Ln(E,S),v),v.unstable_sxConfig={...Hl,...m?.unstable_sxConfig},v.unstable_sx=function(S){return _o({sx:S,theme:this})},v.toRuntimeSource=Wb,WR(v),v}function Ph(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const QR=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Ph(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Jb(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function eS(e){return e==="dark"?QR:[]}function JR(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:a,...s}=e,u=zh({...t,colorSpace:a});return{palette:u,opacity:{...Jb(u.mode),...n},overlays:r||eS(u.mode),...s}}function eN(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const tN=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],nN=e=>(t,n)=>{const r=e.rootSelector||":root",a=e.colorSchemeSelector;let s=a;if(a==="class"&&(s=".%s"),a==="data"&&(s="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(s=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return tN(e.cssVarPrefix).forEach(f=>{u[f]=n[f],delete n[f]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:u}}:s?{[s.replace("%s",t)]:u,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...u}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function rN(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function ie(e,t,n){!e[t]&&n&&(e[t]=n)}function Gl(e){return typeof e!="string"||!e.startsWith("hsl")?e:Ob(e)}function Vi(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Fl(Gl(e[t])))}function iN(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ti=e=>{try{return e()}catch{}},oN=(e="mui")=>vR(e);function $h(e,t,n,r,a){if(!n)return;n=n===!0?{}:n;const s=a==="dark"?"dark":"light";if(!r){t[a]=JR({...n,palette:{mode:s,...n?.palette},colorSpace:e});return}const{palette:u,...f}=Lh({...r,palette:{mode:s,...n?.palette},colorSpace:e});return t[a]={...n,palette:u,opacity:{...Jb(s),...n?.opacity},overlays:n?.overlays||eS(s)},f}function aN(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",nativeColor:u=!1,shouldSkipGeneratingVar:f=eN,colorSchemeSelector:d=n.light&&n.dark?"media":void 0,rootSelector:p=":root",...m}=e,y=Object.keys(n)[0],b=r||(n.light&&y!=="light"?"light":y),v=oN(s),{[b]:E,light:S,dark:w,..._}=n,O={..._};let T=E;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(T=!0),!T)throw new Error(Hi(21,b));let C;u&&(C="oklch");const N=$h(C,O,T,m,b);S&&!O.light&&$h(C,O,S,void 0,"light"),w&&!O.dark&&$h(C,O,w,void 0,"dark");let k={defaultColorScheme:b,...N,cssVarPrefix:s,colorSchemeSelector:d,rootSelector:p,getCssVar:v,colorSchemes:O,font:{...LR(N.typography),...N.font},spacing:iN(m.spacing)};Object.keys(k.colorSchemes).forEach(F=>{const A=k.colorSchemes[F].palette,X=U=>{const D=U.split("-"),Y=D[1],re=D[2];return v(U,A[Y][re])};A.mode==="light"&&(ie(A.common,"background","#fff"),ie(A.common,"onBackground","#000")),A.mode==="dark"&&(ie(A.common,"background","#000"),ie(A.common,"onBackground","#fff"));function $(U,D,Y){if(C){let re;return U===da&&(re=`transparent ${((1-Y)*100).toFixed(0)}%`),U===zt&&(re=`#000 ${(Y*100).toFixed(0)}%`),U===Lt&&(re=`#fff ${(Y*100).toFixed(0)}%`),`color-mix(in ${C}, ${D}, ${re})`}return U(D,Y)}if(rN(A,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),A.mode==="light"){ie(A.Alert,"errorColor",$(zt,A.error.light,.6)),ie(A.Alert,"infoColor",$(zt,A.info.light,.6)),ie(A.Alert,"successColor",$(zt,A.success.light,.6)),ie(A.Alert,"warningColor",$(zt,A.warning.light,.6)),ie(A.Alert,"errorFilledBg",X("palette-error-main")),ie(A.Alert,"infoFilledBg",X("palette-info-main")),ie(A.Alert,"successFilledBg",X("palette-success-main")),ie(A.Alert,"warningFilledBg",X("palette-warning-main")),ie(A.Alert,"errorFilledColor",Ti(()=>A.getContrastText(A.error.main))),ie(A.Alert,"infoFilledColor",Ti(()=>A.getContrastText(A.info.main))),ie(A.Alert,"successFilledColor",Ti(()=>A.getContrastText(A.success.main))),ie(A.Alert,"warningFilledColor",Ti(()=>A.getContrastText(A.warning.main))),ie(A.Alert,"errorStandardBg",$(Lt,A.error.light,.9)),ie(A.Alert,"infoStandardBg",$(Lt,A.info.light,.9)),ie(A.Alert,"successStandardBg",$(Lt,A.success.light,.9)),ie(A.Alert,"warningStandardBg",$(Lt,A.warning.light,.9)),ie(A.Alert,"errorIconColor",X("palette-error-main")),ie(A.Alert,"infoIconColor",X("palette-info-main")),ie(A.Alert,"successIconColor",X("palette-success-main")),ie(A.Alert,"warningIconColor",X("palette-warning-main")),ie(A.AppBar,"defaultBg",X("palette-grey-100")),ie(A.Avatar,"defaultBg",X("palette-grey-400")),ie(A.Button,"inheritContainedBg",X("palette-grey-300")),ie(A.Button,"inheritContainedHoverBg",X("palette-grey-A100")),ie(A.Chip,"defaultBorder",X("palette-grey-400")),ie(A.Chip,"defaultAvatarColor",X("palette-grey-700")),ie(A.Chip,"defaultIconColor",X("palette-grey-700")),ie(A.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),ie(A.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),ie(A.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),ie(A.LinearProgress,"primaryBg",$(Lt,A.primary.main,.62)),ie(A.LinearProgress,"secondaryBg",$(Lt,A.secondary.main,.62)),ie(A.LinearProgress,"errorBg",$(Lt,A.error.main,.62)),ie(A.LinearProgress,"infoBg",$(Lt,A.info.main,.62)),ie(A.LinearProgress,"successBg",$(Lt,A.success.main,.62)),ie(A.LinearProgress,"warningBg",$(Lt,A.warning.main,.62)),ie(A.Skeleton,"bg",C?$(da,A.text.primary,.11):`rgba(${X("palette-text-primaryChannel")} / 0.11)`),ie(A.Slider,"primaryTrack",$(Lt,A.primary.main,.62)),ie(A.Slider,"secondaryTrack",$(Lt,A.secondary.main,.62)),ie(A.Slider,"errorTrack",$(Lt,A.error.main,.62)),ie(A.Slider,"infoTrack",$(Lt,A.info.main,.62)),ie(A.Slider,"successTrack",$(Lt,A.success.main,.62)),ie(A.Slider,"warningTrack",$(Lt,A.warning.main,.62));const U=C?$(zt,A.background.default,.6825):Jc(A.background.default,.8);ie(A.SnackbarContent,"bg",U),ie(A.SnackbarContent,"color",Ti(()=>C?Bh.text.primary:A.getContrastText(U))),ie(A.SpeedDialAction,"fabHoverBg",Jc(A.background.paper,.15)),ie(A.StepConnector,"border",X("palette-grey-400")),ie(A.StepContent,"border",X("palette-grey-400")),ie(A.Switch,"defaultColor",X("palette-common-white")),ie(A.Switch,"defaultDisabledColor",X("palette-grey-100")),ie(A.Switch,"primaryDisabledColor",$(Lt,A.primary.main,.62)),ie(A.Switch,"secondaryDisabledColor",$(Lt,A.secondary.main,.62)),ie(A.Switch,"errorDisabledColor",$(Lt,A.error.main,.62)),ie(A.Switch,"infoDisabledColor",$(Lt,A.info.main,.62)),ie(A.Switch,"successDisabledColor",$(Lt,A.success.main,.62)),ie(A.Switch,"warningDisabledColor",$(Lt,A.warning.main,.62)),ie(A.TableCell,"border",$(Lt,$(da,A.divider,1),.88)),ie(A.Tooltip,"bg",$(da,A.grey[700],.92))}if(A.mode==="dark"){ie(A.Alert,"errorColor",$(Lt,A.error.light,.6)),ie(A.Alert,"infoColor",$(Lt,A.info.light,.6)),ie(A.Alert,"successColor",$(Lt,A.success.light,.6)),ie(A.Alert,"warningColor",$(Lt,A.warning.light,.6)),ie(A.Alert,"errorFilledBg",X("palette-error-dark")),ie(A.Alert,"infoFilledBg",X("palette-info-dark")),ie(A.Alert,"successFilledBg",X("palette-success-dark")),ie(A.Alert,"warningFilledBg",X("palette-warning-dark")),ie(A.Alert,"errorFilledColor",Ti(()=>A.getContrastText(A.error.dark))),ie(A.Alert,"infoFilledColor",Ti(()=>A.getContrastText(A.info.dark))),ie(A.Alert,"successFilledColor",Ti(()=>A.getContrastText(A.success.dark))),ie(A.Alert,"warningFilledColor",Ti(()=>A.getContrastText(A.warning.dark))),ie(A.Alert,"errorStandardBg",$(zt,A.error.light,.9)),ie(A.Alert,"infoStandardBg",$(zt,A.info.light,.9)),ie(A.Alert,"successStandardBg",$(zt,A.success.light,.9)),ie(A.Alert,"warningStandardBg",$(zt,A.warning.light,.9)),ie(A.Alert,"errorIconColor",X("palette-error-main")),ie(A.Alert,"infoIconColor",X("palette-info-main")),ie(A.Alert,"successIconColor",X("palette-success-main")),ie(A.Alert,"warningIconColor",X("palette-warning-main")),ie(A.AppBar,"defaultBg",X("palette-grey-900")),ie(A.AppBar,"darkBg",X("palette-background-paper")),ie(A.AppBar,"darkColor",X("palette-text-primary")),ie(A.Avatar,"defaultBg",X("palette-grey-600")),ie(A.Button,"inheritContainedBg",X("palette-grey-800")),ie(A.Button,"inheritContainedHoverBg",X("palette-grey-700")),ie(A.Chip,"defaultBorder",X("palette-grey-700")),ie(A.Chip,"defaultAvatarColor",X("palette-grey-300")),ie(A.Chip,"defaultIconColor",X("palette-grey-300")),ie(A.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),ie(A.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),ie(A.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),ie(A.LinearProgress,"primaryBg",$(zt,A.primary.main,.5)),ie(A.LinearProgress,"secondaryBg",$(zt,A.secondary.main,.5)),ie(A.LinearProgress,"errorBg",$(zt,A.error.main,.5)),ie(A.LinearProgress,"infoBg",$(zt,A.info.main,.5)),ie(A.LinearProgress,"successBg",$(zt,A.success.main,.5)),ie(A.LinearProgress,"warningBg",$(zt,A.warning.main,.5)),ie(A.Skeleton,"bg",C?$(da,A.text.primary,.13):`rgba(${X("palette-text-primaryChannel")} / 0.13)`),ie(A.Slider,"primaryTrack",$(zt,A.primary.main,.5)),ie(A.Slider,"secondaryTrack",$(zt,A.secondary.main,.5)),ie(A.Slider,"errorTrack",$(zt,A.error.main,.5)),ie(A.Slider,"infoTrack",$(zt,A.info.main,.5)),ie(A.Slider,"successTrack",$(zt,A.success.main,.5)),ie(A.Slider,"warningTrack",$(zt,A.warning.main,.5));const U=C?$(Lt,A.background.default,.985):Jc(A.background.default,.98);ie(A.SnackbarContent,"bg",U),ie(A.SnackbarContent,"color",Ti(()=>C?Vb.text.primary:A.getContrastText(U))),ie(A.SpeedDialAction,"fabHoverBg",Jc(A.background.paper,.15)),ie(A.StepConnector,"border",X("palette-grey-600")),ie(A.StepContent,"border",X("palette-grey-600")),ie(A.Switch,"defaultColor",X("palette-grey-300")),ie(A.Switch,"defaultDisabledColor",X("palette-grey-600")),ie(A.Switch,"primaryDisabledColor",$(zt,A.primary.main,.55)),ie(A.Switch,"secondaryDisabledColor",$(zt,A.secondary.main,.55)),ie(A.Switch,"errorDisabledColor",$(zt,A.error.main,.55)),ie(A.Switch,"infoDisabledColor",$(zt,A.info.main,.55)),ie(A.Switch,"successDisabledColor",$(zt,A.success.main,.55)),ie(A.Switch,"warningDisabledColor",$(zt,A.warning.main,.55)),ie(A.TableCell,"border",$(zt,$(da,A.divider,1),.68)),ie(A.Tooltip,"bg",$(da,A.grey[700],.92))}Vi(A.background,"default"),Vi(A.background,"paper"),Vi(A.common,"background"),Vi(A.common,"onBackground"),Vi(A,"divider"),Object.keys(A).forEach(U=>{const D=A[U];U!=="tonalOffset"&&D&&typeof D=="object"&&(D.main&&ie(A[U],"mainChannel",Fl(Gl(D.main))),D.light&&ie(A[U],"lightChannel",Fl(Gl(D.light))),D.dark&&ie(A[U],"darkChannel",Fl(Gl(D.dark))),D.contrastText&&ie(A[U],"contrastTextChannel",Fl(Gl(D.contrastText))),U==="text"&&(Vi(A[U],"primary"),Vi(A[U],"secondary")),U==="action"&&(D.active&&Vi(A[U],"active"),D.selected&&Vi(A[U],"selected")))})}),k=t.reduce((F,A)=>Ln(F,A),k);const z={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:f,getSelector:nN(k),enableContrastVars:u},{vars:H,generateThemeVars:j,generateStyleSheets:G}=xR(k,z);return k.vars=H,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([F,A])=>{k[F]=A}),k.generateThemeVars=j,k.generateStyleSheets=G,k.generateSpacing=function(){return vb(m.spacing,Uc(this))},k.getColorSchemeSelector=ER(d),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=f,k.unstable_sxConfig={...Hl,...m?.unstable_sxConfig},k.unstable_sx=function(A){return _o({sx:A,theme:this})},k.toRuntimeSource=Wb,k}function tS(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:zh({...n===!0?{}:n.palette,mode:t})})}function ef(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:a=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...u}=e,f=s||"light",d=a?.[f],p={...a,...n?{[f]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Lh(e,...t);let m=n;"palette"in e||p[f]&&(p[f]!==!0?m=p[f].palette:f==="dark"&&(m={mode:"dark"}));const y=Lh({...e,palette:m},...t);return y.defaultColorScheme=f,y.colorSchemes=p,y.palette.mode==="light"&&(y.colorSchemes.light={...p.light!==!0&&p.light,palette:y.palette},tS(y,"dark",p.dark)),y.palette.mode==="dark"&&(y.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:y.palette},tS(y,"light",p.light)),y}return!n&&!("light"in p)&&f==="light"&&(p.light=!0),aN({...u,colorSchemes:p,defaultColorScheme:f,...typeof r!="boolean"&&r},...t)}const Uh=ef();function us(){const e=Xc(Uh);return e[ui]||e}function nS(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const fi=e=>nS(e)&&e!=="classes",Ee=Tb({themeId:ui,defaultTheme:Uh,rootShouldForwardProp:fi});function sN({theme:e,...t}){const n=ui in e?e[ui]:void 0;return L.jsx(Lb,{...t,themeId:n?ui:void 0,theme:n||e})}const tf={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:lN}=yR({themeId:ui,theme:()=>ef({cssVariables:!0}),colorSchemeStorageKey:tf.colorSchemeStorageKey,modeStorageKey:tf.modeStorageKey,defaultColorScheme:{light:tf.defaultLightColorScheme,dark:tf.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Zb(e.palette,e.typography)};return t.unstable_sx=function(r){return _o({sx:r,theme:this})},t}}),uN=lN;function cN({theme:e,...t}){const n=I.useMemo(()=>{if(typeof e=="function")return e;const r=ui in e?e[ui]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?L.jsx(sN,{theme:n,...t}):L.jsx(uN,{theme:e,...t})}function rS(...e){return e.reduce((t,n)=>n==null?t:function(...a){t.apply(this,a),n.apply(this,a)},()=>{})}function fN(e){return L.jsx(bb,{...e,defaultTheme:Uh,themeId:ui})}function jh(e){return function(n){return L.jsx(fN,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function dN(){return _h}const Mt=uR;function At(e){return aR(e)}function pN(e){return _t("MuiSvgIcon",e)}Tt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const hN=e=>{const{color:t,fontSize:n,classes:r}=e,a={root:["root",t!=="inherit"&&`color${Ce(t)}`,`fontSize${Ce(n)}`]};return Ct(a,pN,r)},mN=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ce(n.color)}`],t[`fontSize${Ce(n.fontSize)}`]]}})(Mt(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Hh=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:u="inherit",component:f="svg",fontSize:d="medium",htmlColor:p,inheritViewBox:m=!1,titleAccess:y,viewBox:b="0 0 24 24",...v}=r,E=I.isValidElement(a)&&a.type==="svg",S={...r,color:u,component:f,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:b,hasSvgAsChild:E},w={};m||(w.viewBox=b);const _=hN(S);return L.jsxs(mN,{as:f,className:Ye(_.root,s),focusable:"false",color:p,"aria-hidden":y?void 0:!0,role:y?"img":void 0,ref:n,...w,...v,...E&&a.props,ownerState:S,children:[E?a.props.children:a,y?L.jsx("title",{children:y}):null]})});Hh.muiName="SvgIcon";function rr(e,t){function n(r,a){return L.jsx(Hh,{"data-testid":void 0,ref:a,...r,children:e})}return n.muiName=Hh.muiName,I.memo(I.forwardRef(n))}function iS(e,t=166){let n;function r(...a){const s=()=>{e.apply(this,a)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function _r(e){return e&&e.ownerDocument||document}function Fi(e){return _r(e).defaultView||window}function oS(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Vh(e){const{controlled:t,default:n,name:r,state:a="value"}=e,{current:s}=I.useRef(t!==void 0),[u,f]=I.useState(n),d=s?t:u,p=I.useCallback(m=>{s||f(m)},[]);return[d,p]}function qi(e){const t=I.useRef(e);return Vr(()=>{t.current=e}),I.useRef((...n)=>(0,t.current)(...n)).current}function Hn(...e){const t=I.useRef(void 0),n=I.useCallback(r=>{const a=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const u=s,f=u(r);return typeof f=="function"?f:()=>{u(null)}}return s.current=r,()=>{s.current=null}});return()=>{a.forEach(s=>s?.())}},e);return I.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function gN(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function yN(e,t){if(!e)return t;function n(u,f){const d={};return Object.keys(f).forEach(p=>{gN(p,f[p])&&typeof u[p]=="function"&&(d[p]=(...m)=>{u[p](...m),f[p](...m)})}),d}if(typeof e=="function"||typeof t=="function")return u=>{const f=typeof t=="function"?t(u):t,d=typeof e=="function"?e({...u,...f}):e,p=Ye(u?.className,f?.className,d?.className),m=n(d,f);return{...f,...d,...m,...!!p&&{className:p},...f?.style&&d?.style&&{style:{...f.style,...d.style}},...f?.sx&&d?.sx&&{sx:[...Array.isArray(f.sx)?f.sx:[f.sx],...Array.isArray(d.sx)?d.sx:[d.sx]]}}};const r=t,a=n(e,r),s=Ye(r?.className,e?.className);return{...t,...e,...a,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function aS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Fh(e,t){return Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Fh(e,t)}function sS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fh(e,t)}var lS=R0();const nf=Ac(lS),uS={disabled:!1},rf=nr.createContext(null);var vN=function(t){return t.scrollTop},Yl="unmounted",pa="exited",ha="entering",cs="entered",qh="exiting",Ci=(function(e){sS(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var u=a,f=u&&!u.isMounting?r.enter:r.appear,d;return s.appearStatus=null,r.in?f?(d=pa,s.appearStatus=ha):d=cs:r.unmountOnExit||r.mountOnEnter?d=Yl:d=pa,s.state={status:d},s.nextCallback=null,s}t.getDerivedStateFromProps=function(a,s){var u=a.in;return u&&s.status===Yl?{status:pa}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var s=null;if(a!==this.props){var u=this.state.status;this.props.in?u!==ha&&u!==cs&&(s=ha):(u===ha||u===cs)&&(s=qh)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,s,u,f;return s=u=f=a,a!=null&&typeof a!="number"&&(s=a.exit,u=a.enter,f=a.appear!==void 0?a.appear:u),{exit:s,enter:u,appear:f}},n.updateStatus=function(a,s){if(a===void 0&&(a=!1),s!==null)if(this.cancelNextCallback(),s===ha){if(this.props.unmountOnExit||this.props.mountOnEnter){var u=this.props.nodeRef?this.props.nodeRef.current:nf.findDOMNode(this);u&&vN(u)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pa&&this.setState({status:Yl})},n.performEnter=function(a){var s=this,u=this.props.enter,f=this.context?this.context.isMounting:a,d=this.props.nodeRef?[f]:[nf.findDOMNode(this),f],p=d[0],m=d[1],y=this.getTimeouts(),b=f?y.appear:y.enter;if(!a&&!u||uS.disabled){this.safeSetState({status:cs},function(){s.props.onEntered(p)});return}this.props.onEnter(p,m),this.safeSetState({status:ha},function(){s.props.onEntering(p,m),s.onTransitionEnd(b,function(){s.safeSetState({status:cs},function(){s.props.onEntered(p,m)})})})},n.performExit=function(){var a=this,s=this.props.exit,u=this.getTimeouts(),f=this.props.nodeRef?void 0:nf.findDOMNode(this);if(!s||uS.disabled){this.safeSetState({status:pa},function(){a.props.onExited(f)});return}this.props.onExit(f),this.safeSetState({status:qh},function(){a.props.onExiting(f),a.onTransitionEnd(u.exit,function(){a.safeSetState({status:pa},function(){a.props.onExited(f)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,s){s=this.setNextCallback(s),this.setState(a,s)},n.setNextCallback=function(a){var s=this,u=!0;return this.nextCallback=function(f){u&&(u=!1,s.nextCallback=null,a(f))},this.nextCallback.cancel=function(){u=!1},this.nextCallback},n.onTransitionEnd=function(a,s){this.setNextCallback(s);var u=this.props.nodeRef?this.props.nodeRef.current:nf.findDOMNode(this),f=a==null&&!this.props.addEndListener;if(!u||f){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[u,this.nextCallback],p=d[0],m=d[1];this.props.addEndListener(p,m)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===Yl)return null;var s=this.props,u=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var f=aS(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return nr.createElement(rf.Provider,{value:null},typeof u=="function"?u(a,f):nr.cloneElement(nr.Children.only(u),f))},t})(nr.Component);Ci.contextType=rf,Ci.propTypes={};function fs(){}Ci.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:fs,onEntering:fs,onEntered:fs,onExit:fs,onExiting:fs,onExited:fs},Ci.UNMOUNTED=Yl,Ci.EXITED=pa,Ci.ENTERING=ha,Ci.ENTERED=cs,Ci.EXITING=qh;function bN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gh(e,t){var n=function(s){return t&&I.isValidElement(s)?t(s):s},r=Object.create(null);return e&&I.Children.map(e,function(a){return a}).forEach(function(a){r[a.key]=n(a)}),r}function SN(e,t){e=e||{},t=t||{};function n(m){return m in t?t[m]:e[m]}var r=Object.create(null),a=[];for(var s in e)s in t?a.length&&(r[s]=a,a=[]):a.push(s);var u,f={};for(var d in t){if(r[d])for(u=0;u<r[d].length;u++){var p=r[d][u];f[r[d][u]]=n(p)}f[d]=n(d)}for(u=0;u<a.length;u++)f[a[u]]=n(a[u]);return f}function ma(e,t,n){return n[t]!=null?n[t]:e.props[t]}function xN(e,t){return Gh(e.children,function(n){return I.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ma(n,"appear",e),enter:ma(n,"enter",e),exit:ma(n,"exit",e)})})}function EN(e,t,n){var r=Gh(e.children),a=SN(t,r);return Object.keys(a).forEach(function(s){var u=a[s];if(I.isValidElement(u)){var f=s in t,d=s in r,p=t[s],m=I.isValidElement(p)&&!p.props.in;d&&(!f||m)?a[s]=I.cloneElement(u,{onExited:n.bind(null,u),in:!0,exit:ma(u,"exit",e),enter:ma(u,"enter",e)}):!d&&f&&!m?a[s]=I.cloneElement(u,{in:!1}):d&&f&&I.isValidElement(p)&&(a[s]=I.cloneElement(u,{onExited:n.bind(null,u),in:p.props.in,exit:ma(u,"exit",e),enter:ma(u,"enter",e)}))}}),a}var wN=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},_N={component:"div",childFactory:function(t){return t}},Yh=(function(e){sS(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var u=s.handleExited.bind(bN(s));return s.state={contextValue:{isMounting:!0},handleExited:u,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(a,s){var u=s.children,f=s.handleExited,d=s.firstRender;return{children:d?xN(a,f):EN(a,u,f),firstRender:!1}},n.handleExited=function(a,s){var u=Gh(this.props.children);a.key in u||(a.props.onExited&&a.props.onExited(s),this.mounted&&this.setState(function(f){var d=Lc({},f.children);return delete d[a.key],{children:d}}))},n.render=function(){var a=this.props,s=a.component,u=a.childFactory,f=aS(a,["component","childFactory"]),d=this.state.contextValue,p=wN(this.state.children).map(u);return delete f.appear,delete f.enter,delete f.exit,s===null?nr.createElement(rf.Provider,{value:d},p):nr.createElement(rf.Provider,{value:d},nr.createElement(s,f,p))},t})(nr.Component);Yh.propTypes={},Yh.defaultProps=_N;const cS={};function fS(e,t){const n=I.useRef(cS);return n.current===cS&&(n.current=e(t)),n}const TN=[];function CN(e){I.useEffect(e,TN)}class of{static create(){return new of}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function ds(){const e=fS(of.create).current;return CN(e.disposeEffect),e}const dS=e=>e.scrollTop;function af(e,t){const{timeout:n,easing:r,style:a={}}=e;return{duration:a.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:a.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:a.transitionDelay}}function sf(e){return typeof e=="string"}function pS(e,t,n){return e===void 0||sf(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function hS(e,t,n){return typeof e=="function"?e(t,n):e}function mS(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function gS(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function yS(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:a,className:s}=e;if(!t){const v=Ye(n?.className,s,a?.className,r?.className),E={...n?.style,...a?.style,...r?.style},S={...n,...a,...r};return v.length>0&&(S.className=v),Object.keys(E).length>0&&(S.style=E),{props:S,internalRef:void 0}}const u=mS({...a,...r}),f=gS(r),d=gS(a),p=t(u),m=Ye(p?.className,n?.className,s,a?.className,r?.className),y={...p?.style,...n?.style,...a?.style,...r?.style},b={...p,...n,...d,...f};return m.length>0&&(b.className=m),Object.keys(y).length>0&&(b.style=y),{props:b,internalRef:p.ref}}function kt(e,t){const{className:n,elementType:r,ownerState:a,externalForwardedProps:s,internalForwardedProps:u,shouldForwardComponentProp:f=!1,...d}=t,{component:p,slots:m={[e]:void 0},slotProps:y={[e]:void 0},...b}=s,v=m[e]||r,E=hS(y[e],a),{props:{component:S,...w},internalRef:_}=yS({className:n,...d,externalForwardedProps:e==="root"?b:void 0,externalSlotProps:E}),O=Hn(_,E?.ref,t.ref),T=e==="root"?S||p:S,C=pS(v,{...e==="root"&&!p&&!m[e]&&u,...e!=="root"&&!m[e]&&u,...w,...T&&!f&&{as:T},...T&&f&&{component:T},ref:O},a);return[v,C]}function AN(e){return _t("MuiPaper",e)}Tt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const kN=e=>{const{square:t,elevation:n,variant:r,classes:a}=e,s={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Ct(s,AN,a)},ON=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Mt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Xh=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiPaper"}),a=us(),{className:s,component:u="div",elevation:f=1,square:d=!1,variant:p="elevation",...m}=r,y={...r,component:u,elevation:f,square:d,variant:p},b=kN(y);return L.jsx(ON,{as:u,ownerState:y,className:Ye(b.root,s),ref:n,...m,style:{...p==="elevation"&&{"--Paper-shadow":(a.vars||a).shadows[f],...a.vars&&{"--Paper-overlay":a.vars.overlays?.[f]},...!a.vars&&a.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${ql("#fff",Ph(f))}, ${ql("#fff",Ph(f))})`}},...m.style}})});function ps(e){try{return e.matches(":focus-visible")}catch{}return!1}class lf{static create(){return new lf}static use(){const t=fS(lf.create).current,[n,r]=I.useState(!1);return t.shouldMount=n,t.setShouldMount=r,I.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=NN(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function RN(){return lf.use()}function NN(){let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n}function IN(e){const{className:t,classes:n,pulsate:r=!1,rippleX:a,rippleY:s,rippleSize:u,in:f,onExited:d,timeout:p}=e,[m,y]=I.useState(!1),b=Ye(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:u,height:u,top:-(u/2)+s,left:-(u/2)+a},E=Ye(n.child,m&&n.childLeaving,r&&n.childPulsate);return!f&&!m&&y(!0),I.useEffect(()=>{if(!f&&d!=null){const S=setTimeout(d,p);return()=>{clearTimeout(S)}}},[d,f,p]),L.jsx("span",{className:b,style:v,children:L.jsx("span",{className:E})})}const Fr=Tt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Zh=550,MN=80,DN=Ll`
45
+ 0% {
46
+ transform: scale(0);
47
+ opacity: 0.1;
48
+ }
49
+
50
+ 100% {
51
+ transform: scale(1);
52
+ opacity: 0.3;
53
+ }
54
+ `,BN=Ll`
55
+ 0% {
56
+ opacity: 1;
57
+ }
58
+
59
+ 100% {
60
+ opacity: 0;
61
+ }
62
+ `,zN=Ll`
63
+ 0% {
64
+ transform: scale(1);
65
+ }
66
+
67
+ 50% {
68
+ transform: scale(0.92);
69
+ }
70
+
71
+ 100% {
72
+ transform: scale(1);
73
+ }
74
+ `,LN=Ee("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),PN=Ee(IN,{name:"MuiTouchRipple",slot:"Ripple"})`
75
+ opacity: 0;
76
+ position: absolute;
77
+
78
+ &.${Fr.rippleVisible} {
79
+ opacity: 0.3;
80
+ transform: scale(1);
81
+ animation-name: ${DN};
82
+ animation-duration: ${Zh}ms;
83
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
84
+ }
85
+
86
+ &.${Fr.ripplePulsate} {
87
+ animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
88
+ }
89
+
90
+ & .${Fr.child} {
91
+ opacity: 1;
92
+ display: block;
93
+ width: 100%;
94
+ height: 100%;
95
+ border-radius: 50%;
96
+ background-color: currentColor;
97
+ }
98
+
99
+ & .${Fr.childLeaving} {
100
+ opacity: 0;
101
+ animation-name: ${BN};
102
+ animation-duration: ${Zh}ms;
103
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
104
+ }
105
+
106
+ & .${Fr.childPulsate} {
107
+ position: absolute;
108
+ /* @noflip */
109
+ left: 0px;
110
+ top: 0;
111
+ animation-name: ${zN};
112
+ animation-duration: 2500ms;
113
+ animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
114
+ animation-iteration-count: infinite;
115
+ animation-delay: 200ms;
116
+ }
117
+ `,$N=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:s={},className:u,...f}=r,[d,p]=I.useState([]),m=I.useRef(0),y=I.useRef(null);I.useEffect(()=>{y.current&&(y.current(),y.current=null)},[d]);const b=I.useRef(!1),v=ds(),E=I.useRef(null),S=I.useRef(null),w=I.useCallback(C=>{const{pulsate:N,rippleX:k,rippleY:z,rippleSize:H,cb:j}=C;p(G=>[...G,L.jsx(PN,{classes:{ripple:Ye(s.ripple,Fr.ripple),rippleVisible:Ye(s.rippleVisible,Fr.rippleVisible),ripplePulsate:Ye(s.ripplePulsate,Fr.ripplePulsate),child:Ye(s.child,Fr.child),childLeaving:Ye(s.childLeaving,Fr.childLeaving),childPulsate:Ye(s.childPulsate,Fr.childPulsate)},timeout:Zh,pulsate:N,rippleX:k,rippleY:z,rippleSize:H},m.current)]),m.current+=1,y.current=j},[s]),_=I.useCallback((C={},N={},k=()=>{})=>{const{pulsate:z=!1,center:H=a||N.pulsate,fakeElement:j=!1}=N;if(C?.type==="mousedown"&&b.current){b.current=!1;return}C?.type==="touchstart"&&(b.current=!0);const G=j?null:S.current,F=G?G.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,X,$;if(H||C===void 0||C.clientX===0&&C.clientY===0||!C.clientX&&!C.touches)A=Math.round(F.width/2),X=Math.round(F.height/2);else{const{clientX:U,clientY:D}=C.touches&&C.touches.length>0?C.touches[0]:C;A=Math.round(U-F.left),X=Math.round(D-F.top)}if(H)$=Math.sqrt((2*F.width**2+F.height**2)/3),$%2===0&&($+=1);else{const U=Math.max(Math.abs((G?G.clientWidth:0)-A),A)*2+2,D=Math.max(Math.abs((G?G.clientHeight:0)-X),X)*2+2;$=Math.sqrt(U**2+D**2)}C?.touches?E.current===null&&(E.current=()=>{w({pulsate:z,rippleX:A,rippleY:X,rippleSize:$,cb:k})},v.start(MN,()=>{E.current&&(E.current(),E.current=null)})):w({pulsate:z,rippleX:A,rippleY:X,rippleSize:$,cb:k})},[a,w,v]),O=I.useCallback(()=>{_({},{pulsate:!0})},[_]),T=I.useCallback((C,N)=>{if(v.clear(),C?.type==="touchend"&&E.current){E.current(),E.current=null,v.start(0,()=>{T(C,N)});return}E.current=null,p(k=>k.length>0?k.slice(1):k),y.current=N},[v]);return I.useImperativeHandle(n,()=>({pulsate:O,start:_,stop:T}),[O,_,T]),L.jsx(LN,{className:Ye(Fr.root,s.root,u),ref:S,...f,children:L.jsx(Yh,{component:null,exit:!0,children:d})})});function UN(e){return _t("MuiButtonBase",e)}const jN=Tt("MuiButtonBase",["root","disabled","focusVisible"]),HN=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:a}=e,u=Ct({root:["root",t&&"disabled",n&&"focusVisible"]},UN,a);return n&&r&&(u.root+=` ${r}`),u},VN=Ee("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${jN.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),vS=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:s=!1,children:u,className:f,component:d="button",disabled:p=!1,disableRipple:m=!1,disableTouchRipple:y=!1,focusRipple:b=!1,focusVisibleClassName:v,LinkComponent:E="a",onBlur:S,onClick:w,onContextMenu:_,onDragLeave:O,onFocus:T,onFocusVisible:C,onKeyDown:N,onKeyUp:k,onMouseDown:z,onMouseLeave:H,onMouseUp:j,onTouchEnd:G,onTouchMove:F,onTouchStart:A,tabIndex:X=0,TouchRippleProps:$,touchRippleRef:U,type:D,...Y}=r,re=I.useRef(null),ae=RN(),B=Hn(ae.ref,U),[P,W]=I.useState(!1);p&&P&&W(!1),I.useImperativeHandle(a,()=>({focusVisible:()=>{W(!0),re.current.focus()}}),[]);const M=ae.shouldMount&&!m&&!p;I.useEffect(()=>{P&&b&&!m&&ae.pulsate()},[m,b,P,ae]);const fe=Gi(ae,"start",z,y),ge=Gi(ae,"stop",_,y),ye=Gi(ae,"stop",O,y),Se=Gi(ae,"stop",j,y),$e=Gi(ae,"stop",ke=>{P&&ke.preventDefault(),H&&H(ke)},y),Ae=Gi(ae,"start",A,y),Me=Gi(ae,"stop",G,y),Ue=Gi(ae,"stop",F,y),Xe=Gi(ae,"stop",ke=>{ps(ke.target)||W(!1),S&&S(ke)},!1),Xt=qi(ke=>{re.current||(re.current=ke.currentTarget),ps(ke.target)&&(W(!0),C&&C(ke)),T&&T(ke)}),Oe=()=>{const ke=re.current;return d&&d!=="button"&&!(ke.tagName==="A"&&ke.href)},Ge=qi(ke=>{b&&!ke.repeat&&P&&ke.key===" "&&ae.stop(ke,()=>{ae.start(ke)}),ke.target===ke.currentTarget&&Oe()&&ke.key===" "&&ke.preventDefault(),N&&N(ke),ke.target===ke.currentTarget&&Oe()&&ke.key==="Enter"&&!p&&(ke.preventDefault(),w&&w(ke))}),Dt=qi(ke=>{b&&ke.key===" "&&P&&!ke.defaultPrevented&&ae.stop(ke,()=>{ae.pulsate(ke)}),k&&k(ke),w&&ke.target===ke.currentTarget&&Oe()&&ke.key===" "&&!ke.defaultPrevented&&w(ke)});let Rt=d;Rt==="button"&&(Y.href||Y.to)&&(Rt=E);const ht={};if(Rt==="button"){const ke=!!Y.formAction;ht.type=D===void 0&&!ke?"button":D,ht.disabled=p}else!Y.href&&!Y.to&&(ht.role="button"),p&&(ht["aria-disabled"]=p);const ut=Hn(n,re),mt={...r,centerRipple:s,component:d,disabled:p,disableRipple:m,disableTouchRipple:y,focusRipple:b,tabIndex:X,focusVisible:P},ot=HN(mt);return L.jsxs(VN,{as:Rt,className:Ye(ot.root,f),ownerState:mt,onBlur:Xe,onClick:w,onContextMenu:ge,onFocus:Xt,onKeyDown:Ge,onKeyUp:Dt,onMouseDown:fe,onMouseLeave:$e,onMouseUp:Se,onDragLeave:ye,onTouchEnd:Me,onTouchMove:Ue,onTouchStart:Ae,ref:ut,tabIndex:p?-1:X,type:D,...ht,...Y,children:[u,M?L.jsx($N,{ref:B,center:s,...$}):null]})});function Gi(e,t,n,r=!1){return qi(a=>(n&&n(a),r||e[t](a),!0))}function FN(e){return typeof e.main=="string"}function qN(e,t=[]){if(!FN(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function ur(e=[]){return([,t])=>t&&qN(t,e)}function GN(e){return _t("MuiAlert",e)}const bS=Tt("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function YN(e){return _t("MuiCircularProgress",e)}Tt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const di=44,Kh=Ll`
118
+ 0% {
119
+ transform: rotate(0deg);
120
+ }
121
+
122
+ 100% {
123
+ transform: rotate(360deg);
124
+ }
125
+ `,Wh=Ll`
126
+ 0% {
127
+ stroke-dasharray: 1px, 200px;
128
+ stroke-dashoffset: 0;
129
+ }
130
+
131
+ 50% {
132
+ stroke-dasharray: 100px, 200px;
133
+ stroke-dashoffset: -15px;
134
+ }
135
+
136
+ 100% {
137
+ stroke-dasharray: 1px, 200px;
138
+ stroke-dashoffset: -126px;
139
+ }
140
+ `,XN=typeof Kh!="string"?mh`
141
+ animation: ${Kh} 1.4s linear infinite;
142
+ `:null,ZN=typeof Wh!="string"?mh`
143
+ animation: ${Wh} 1.4s ease-in-out infinite;
144
+ `:null,KN=e=>{const{classes:t,variant:n,color:r,disableShrink:a}=e,s={root:["root",n,`color${Ce(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Ce(n)}`,a&&"circleDisableShrink"]};return Ct(s,YN,t)},WN=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ce(n.color)}`]]}})(Mt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:XN||{animation:`${Kh} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ur()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),QN=Ee("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),JN=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ce(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Mt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:ZN||{animation:`${Wh} 1.4s ease-in-out infinite`}}]}))),e3=Ee("circle",{name:"MuiCircularProgress",slot:"Track"})(Mt(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),SS=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:u=!1,enableTrackSlot:f=!1,size:d=40,style:p,thickness:m=3.6,value:y=0,variant:b="indeterminate",...v}=r,E={...r,color:s,disableShrink:u,size:d,thickness:m,value:y,variant:b,enableTrackSlot:f},S=KN(E),w={},_={},O={};if(b==="determinate"){const T=2*Math.PI*((di-m)/2);w.strokeDasharray=T.toFixed(3),O["aria-valuenow"]=Math.round(y),w.strokeDashoffset=`${((100-y)/100*T).toFixed(3)}px`,_.transform="rotate(-90deg)"}return L.jsx(WN,{className:Ye(S.root,a),style:{width:d,height:d,..._,...p},ownerState:E,ref:n,role:"progressbar",...O,...v,children:L.jsxs(QN,{className:S.svg,ownerState:E,viewBox:`${di/2} ${di/2} ${di} ${di}`,children:[f?L.jsx(e3,{className:S.track,ownerState:E,cx:di,cy:di,r:(di-m)/2,fill:"none",strokeWidth:m,"aria-hidden":"true"}):null,L.jsx(JN,{className:S.circle,style:w,ownerState:E,cx:di,cy:di,r:(di-m)/2,fill:"none",strokeWidth:m})]})})});function t3(e){return _t("MuiIconButton",e)}const xS=Tt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),n3=e=>{const{classes:t,disabled:n,color:r,edge:a,size:s,loading:u}=e,f={root:["root",u&&"loading",n&&"disabled",r!=="default"&&`color${Ce(r)}`,a&&`edge${Ce(a)}`,`size${Ce(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ct(f,t3,t)},r3=Ee(vS,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${Ce(n.color)}`],n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})(Mt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Mt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ur()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ur()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${xS.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${xS.loading}`]:{color:"transparent"}}))),i3=Ee("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Co=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiIconButton"}),{edge:a=!1,children:s,className:u,color:f="default",disabled:d=!1,disableFocusRipple:p=!1,size:m="medium",id:y,loading:b=null,loadingIndicator:v,...E}=r,S=ls(y),w=v??L.jsx(SS,{"aria-labelledby":S,color:"inherit",size:16}),_={...r,edge:a,color:f,disabled:d,disableFocusRipple:p,loading:b,loadingIndicator:w,size:m},O=n3(_);return L.jsxs(r3,{id:b?S:y,className:Ye(O.root,u),centerRipple:!0,focusRipple:!p,disabled:d||b,ref:n,...E,ownerState:_,children:[typeof b=="boolean"&&L.jsx("span",{className:O.loadingWrapper,style:{display:"contents"},children:L.jsx(i3,{className:O.loadingIndicator,ownerState:_,children:b&&w})}),s]})}),o3=rr(L.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),a3=rr(L.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),s3=rr(L.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),l3=rr(L.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),u3=rr(L.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),c3=e=>{const{variant:t,color:n,severity:r,classes:a}=e,s={root:["root",`color${Ce(n||r)}`,`${t}${Ce(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Ct(s,GN,a)},f3=Ee(Xh,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color||n.severity)}`]]}})(Mt(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(ur(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${bS.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(ur(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${bS.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(ur(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),d3=Ee("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),p3=Ee("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),h3=Ee("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),m3={success:L.jsx(o3,{fontSize:"inherit"}),warning:L.jsx(a3,{fontSize:"inherit"}),error:L.jsx(s3,{fontSize:"inherit"}),info:L.jsx(l3,{fontSize:"inherit"})},g3=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiAlert"}),{action:a,children:s,className:u,closeText:f="Close",color:d,components:p={},componentsProps:m={},icon:y,iconMapping:b=m3,onClose:v,role:E="alert",severity:S="success",slotProps:w={},slots:_={},variant:O="standard",...T}=r,C={...r,color:d,severity:S,variant:O,colorSeverity:d||S},N=c3(C),k={slots:{closeButton:p.CloseButton,closeIcon:p.CloseIcon,..._},slotProps:{...m,...w}},[z,H]=kt("root",{ref:n,shouldForwardComponentProp:!0,className:Ye(N.root,u),elementType:f3,externalForwardedProps:{...k,...T},ownerState:C,additionalProps:{role:E,elevation:0}}),[j,G]=kt("icon",{className:N.icon,elementType:d3,externalForwardedProps:k,ownerState:C}),[F,A]=kt("message",{className:N.message,elementType:p3,externalForwardedProps:k,ownerState:C}),[X,$]=kt("action",{className:N.action,elementType:h3,externalForwardedProps:k,ownerState:C}),[U,D]=kt("closeButton",{elementType:Co,externalForwardedProps:k,ownerState:C}),[Y,re]=kt("closeIcon",{elementType:u3,externalForwardedProps:k,ownerState:C});return L.jsxs(z,{...H,children:[y!==!1?L.jsx(j,{...G,children:y||b[S]}):null,L.jsx(F,{...A,children:s}),a!=null?L.jsx(X,{...$,children:a}):null,a==null&&v?L.jsx(X,{...$,children:L.jsx(U,{size:"small","aria-label":f,title:f,color:"inherit",onClick:v,...D,children:L.jsx(Y,{fontSize:"small",...re})})}):null]})});function y3(e){return _t("MuiTypography",e)}Tt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const v3={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},b3=dN(),S3=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:a,variant:s,classes:u}=e,f={root:["root",s,e.align!=="inherit"&&`align${Ce(t)}`,n&&"gutterBottom",r&&"noWrap",a&&"paragraph"]};return Ct(f,y3,u)},x3=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Mt(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(ur()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${Ce(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),ES={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Tr=I.forwardRef(function(t,n){const{color:r,...a}=At({props:t,name:"MuiTypography"}),s=!v3[r],u=b3({...a,...s&&{color:r}}),{align:f="inherit",className:d,component:p,gutterBottom:m=!1,noWrap:y=!1,paragraph:b=!1,variant:v="body1",variantMapping:E=ES,...S}=u,w={...u,align:f,color:r,className:d,component:p,gutterBottom:m,noWrap:y,paragraph:b,variant:v,variantMapping:E},_=p||(b?"p":E[v]||ES[v])||"span",O=S3(w);return L.jsx(x3,{as:_,ref:n,className:Ye(O.root,d),...S,ownerState:w,style:{...f!=="inherit"&&{"--Typography-textAlign":f},...S.style}})});function wS(e){const t=I.useRef({});return I.useEffect(()=>{t.current=e}),t.current}var cr="top",qr="bottom",Gr="right",fr="left",Qh="auto",Xl=[cr,qr,Gr,fr],hs="start",Zl="end",E3="clippingParents",_S="viewport",Kl="popper",w3="reference",TS=Xl.reduce(function(e,t){return e.concat([t+"-"+hs,t+"-"+Zl])},[]),CS=[].concat(Xl,[Qh]).reduce(function(e,t){return e.concat([t,t+"-"+hs,t+"-"+Zl])},[]),_3="beforeRead",T3="read",C3="afterRead",A3="beforeMain",k3="main",O3="afterMain",R3="beforeWrite",N3="write",I3="afterWrite",M3=[_3,T3,C3,A3,k3,O3,R3,N3,I3];function Ai(e){return e?(e.nodeName||"").toLowerCase():null}function Cr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ga(e){var t=Cr(e).Element;return e instanceof t||e instanceof Element}function Yr(e){var t=Cr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Jh(e){if(typeof ShadowRoot>"u")return!1;var t=Cr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function D3(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},s=t.elements[n];!Yr(s)||!Ai(s)||(Object.assign(s.style,r),Object.keys(a).forEach(function(u){var f=a[u];f===!1?s.removeAttribute(u):s.setAttribute(u,f===!0?"":f)}))})}function B3(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var a=t.elements[r],s=t.attributes[r]||{},u=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),f=u.reduce(function(d,p){return d[p]="",d},{});!Yr(a)||!Ai(a)||(Object.assign(a.style,f),Object.keys(s).forEach(function(d){a.removeAttribute(d)}))})}}const z3={name:"applyStyles",enabled:!0,phase:"write",fn:D3,effect:B3,requires:["computeStyles"]};function ki(e){return e.split("-")[0]}var ya=Math.max,uf=Math.min,ms=Math.round;function em(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function AS(){return!/^((?!chrome|android).)*safari/i.test(em())}function gs(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,s=1;t&&Yr(e)&&(a=e.offsetWidth>0&&ms(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&ms(r.height)/e.offsetHeight||1);var u=ga(e)?Cr(e):window,f=u.visualViewport,d=!AS()&&n,p=(r.left+(d&&f?f.offsetLeft:0))/a,m=(r.top+(d&&f?f.offsetTop:0))/s,y=r.width/a,b=r.height/s;return{width:y,height:b,top:m,right:p+y,bottom:m+b,left:p,x:p,y:m}}function tm(e){var t=gs(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function kS(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Jh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Yi(e){return Cr(e).getComputedStyle(e)}function L3(e){return["table","td","th"].indexOf(Ai(e))>=0}function Ao(e){return((ga(e)?e.ownerDocument:e.document)||window.document).documentElement}function cf(e){return Ai(e)==="html"?e:e.assignedSlot||e.parentNode||(Jh(e)?e.host:null)||Ao(e)}function OS(e){return!Yr(e)||Yi(e).position==="fixed"?null:e.offsetParent}function P3(e){var t=/firefox/i.test(em()),n=/Trident/i.test(em());if(n&&Yr(e)){var r=Yi(e);if(r.position==="fixed")return null}var a=cf(e);for(Jh(a)&&(a=a.host);Yr(a)&&["html","body"].indexOf(Ai(a))<0;){var s=Yi(a);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return a;a=a.parentNode}return null}function Wl(e){for(var t=Cr(e),n=OS(e);n&&L3(n)&&Yi(n).position==="static";)n=OS(n);return n&&(Ai(n)==="html"||Ai(n)==="body"&&Yi(n).position==="static")?t:n||P3(e)||t}function nm(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ql(e,t,n){return ya(e,uf(t,n))}function $3(e,t,n){var r=Ql(e,t,n);return r>n?n:r}function RS(){return{top:0,right:0,bottom:0,left:0}}function NS(e){return Object.assign({},RS(),e)}function IS(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var U3=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,NS(typeof t!="number"?t:IS(t,Xl))};function j3(e){var t,n=e.state,r=e.name,a=e.options,s=n.elements.arrow,u=n.modifiersData.popperOffsets,f=ki(n.placement),d=nm(f),p=[fr,Gr].indexOf(f)>=0,m=p?"height":"width";if(!(!s||!u)){var y=U3(a.padding,n),b=tm(s),v=d==="y"?cr:fr,E=d==="y"?qr:Gr,S=n.rects.reference[m]+n.rects.reference[d]-u[d]-n.rects.popper[m],w=u[d]-n.rects.reference[d],_=Wl(s),O=_?d==="y"?_.clientHeight||0:_.clientWidth||0:0,T=S/2-w/2,C=y[v],N=O-b[m]-y[E],k=O/2-b[m]/2+T,z=Ql(C,k,N),H=d;n.modifiersData[r]=(t={},t[H]=z,t.centerOffset=z-k,t)}}function H3(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||kS(t.elements.popper,a)&&(t.elements.arrow=a))}const V3={name:"arrow",enabled:!0,phase:"main",fn:j3,effect:H3,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ys(e){return e.split("-")[1]}var F3={top:"auto",right:"auto",bottom:"auto",left:"auto"};function q3(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:ms(n*a)/a||0,y:ms(r*a)/a||0}}function MS(e){var t,n=e.popper,r=e.popperRect,a=e.placement,s=e.variation,u=e.offsets,f=e.position,d=e.gpuAcceleration,p=e.adaptive,m=e.roundOffsets,y=e.isFixed,b=u.x,v=b===void 0?0:b,E=u.y,S=E===void 0?0:E,w=typeof m=="function"?m({x:v,y:S}):{x:v,y:S};v=w.x,S=w.y;var _=u.hasOwnProperty("x"),O=u.hasOwnProperty("y"),T=fr,C=cr,N=window;if(p){var k=Wl(n),z="clientHeight",H="clientWidth";if(k===Cr(n)&&(k=Ao(n),Yi(k).position!=="static"&&f==="absolute"&&(z="scrollHeight",H="scrollWidth")),k=k,a===cr||(a===fr||a===Gr)&&s===Zl){C=qr;var j=y&&k===N&&N.visualViewport?N.visualViewport.height:k[z];S-=j-r.height,S*=d?1:-1}if(a===fr||(a===cr||a===qr)&&s===Zl){T=Gr;var G=y&&k===N&&N.visualViewport?N.visualViewport.width:k[H];v-=G-r.width,v*=d?1:-1}}var F=Object.assign({position:f},p&&F3),A=m===!0?q3({x:v,y:S},Cr(n)):{x:v,y:S};if(v=A.x,S=A.y,d){var X;return Object.assign({},F,(X={},X[C]=O?"0":"",X[T]=_?"0":"",X.transform=(N.devicePixelRatio||1)<=1?"translate("+v+"px, "+S+"px)":"translate3d("+v+"px, "+S+"px, 0)",X))}return Object.assign({},F,(t={},t[C]=O?S+"px":"",t[T]=_?v+"px":"",t.transform="",t))}function G3(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,s=n.adaptive,u=s===void 0?!0:s,f=n.roundOffsets,d=f===void 0?!0:f,p={placement:ki(t.placement),variation:ys(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,MS(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:u,roundOffsets:d})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,MS(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Y3={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:G3,data:{}};var ff={passive:!0};function X3(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,s=a===void 0?!0:a,u=r.resize,f=u===void 0?!0:u,d=Cr(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&p.forEach(function(m){m.addEventListener("scroll",n.update,ff)}),f&&d.addEventListener("resize",n.update,ff),function(){s&&p.forEach(function(m){m.removeEventListener("scroll",n.update,ff)}),f&&d.removeEventListener("resize",n.update,ff)}}const Z3={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:X3,data:{}};var K3={left:"right",right:"left",bottom:"top",top:"bottom"};function df(e){return e.replace(/left|right|bottom|top/g,function(t){return K3[t]})}var W3={start:"end",end:"start"};function DS(e){return e.replace(/start|end/g,function(t){return W3[t]})}function rm(e){var t=Cr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function im(e){return gs(Ao(e)).left+rm(e).scrollLeft}function Q3(e,t){var n=Cr(e),r=Ao(e),a=n.visualViewport,s=r.clientWidth,u=r.clientHeight,f=0,d=0;if(a){s=a.width,u=a.height;var p=AS();(p||!p&&t==="fixed")&&(f=a.offsetLeft,d=a.offsetTop)}return{width:s,height:u,x:f+im(e),y:d}}function J3(e){var t,n=Ao(e),r=rm(e),a=(t=e.ownerDocument)==null?void 0:t.body,s=ya(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),u=ya(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),f=-r.scrollLeft+im(e),d=-r.scrollTop;return Yi(a||n).direction==="rtl"&&(f+=ya(n.clientWidth,a?a.clientWidth:0)-s),{width:s,height:u,x:f,y:d}}function om(e){var t=Yi(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function BS(e){return["html","body","#document"].indexOf(Ai(e))>=0?e.ownerDocument.body:Yr(e)&&om(e)?e:BS(cf(e))}function Jl(e,t){var n;t===void 0&&(t=[]);var r=BS(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),s=Cr(r),u=a?[s].concat(s.visualViewport||[],om(r)?r:[]):r,f=t.concat(u);return a?f:f.concat(Jl(cf(u)))}function am(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function eI(e,t){var n=gs(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function zS(e,t,n){return t===_S?am(Q3(e,n)):ga(t)?eI(t,n):am(J3(Ao(e)))}function tI(e){var t=Jl(cf(e)),n=["absolute","fixed"].indexOf(Yi(e).position)>=0,r=n&&Yr(e)?Wl(e):e;return ga(r)?t.filter(function(a){return ga(a)&&kS(a,r)&&Ai(a)!=="body"}):[]}function nI(e,t,n,r){var a=t==="clippingParents"?tI(e):[].concat(t),s=[].concat(a,[n]),u=s[0],f=s.reduce(function(d,p){var m=zS(e,p,r);return d.top=ya(m.top,d.top),d.right=uf(m.right,d.right),d.bottom=uf(m.bottom,d.bottom),d.left=ya(m.left,d.left),d},zS(e,u,r));return f.width=f.right-f.left,f.height=f.bottom-f.top,f.x=f.left,f.y=f.top,f}function LS(e){var t=e.reference,n=e.element,r=e.placement,a=r?ki(r):null,s=r?ys(r):null,u=t.x+t.width/2-n.width/2,f=t.y+t.height/2-n.height/2,d;switch(a){case cr:d={x:u,y:t.y-n.height};break;case qr:d={x:u,y:t.y+t.height};break;case Gr:d={x:t.x+t.width,y:f};break;case fr:d={x:t.x-n.width,y:f};break;default:d={x:t.x,y:t.y}}var p=a?nm(a):null;if(p!=null){var m=p==="y"?"height":"width";switch(s){case hs:d[p]=d[p]-(t[m]/2-n[m]/2);break;case Zl:d[p]=d[p]+(t[m]/2-n[m]/2);break}}return d}function eu(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,s=n.strategy,u=s===void 0?e.strategy:s,f=n.boundary,d=f===void 0?E3:f,p=n.rootBoundary,m=p===void 0?_S:p,y=n.elementContext,b=y===void 0?Kl:y,v=n.altBoundary,E=v===void 0?!1:v,S=n.padding,w=S===void 0?0:S,_=NS(typeof w!="number"?w:IS(w,Xl)),O=b===Kl?w3:Kl,T=e.rects.popper,C=e.elements[E?O:b],N=nI(ga(C)?C:C.contextElement||Ao(e.elements.popper),d,m,u),k=gs(e.elements.reference),z=LS({reference:k,element:T,placement:a}),H=am(Object.assign({},T,z)),j=b===Kl?H:k,G={top:N.top-j.top+_.top,bottom:j.bottom-N.bottom+_.bottom,left:N.left-j.left+_.left,right:j.right-N.right+_.right},F=e.modifiersData.offset;if(b===Kl&&F){var A=F[a];Object.keys(G).forEach(function(X){var $=[Gr,qr].indexOf(X)>=0?1:-1,U=[cr,qr].indexOf(X)>=0?"y":"x";G[X]+=A[U]*$})}return G}function rI(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,s=n.rootBoundary,u=n.padding,f=n.flipVariations,d=n.allowedAutoPlacements,p=d===void 0?CS:d,m=ys(r),y=m?f?TS:TS.filter(function(E){return ys(E)===m}):Xl,b=y.filter(function(E){return p.indexOf(E)>=0});b.length===0&&(b=y);var v=b.reduce(function(E,S){return E[S]=eu(e,{placement:S,boundary:a,rootBoundary:s,padding:u})[ki(S)],E},{});return Object.keys(v).sort(function(E,S){return v[E]-v[S]})}function iI(e){if(ki(e)===Qh)return[];var t=df(e);return[DS(e),t,DS(t)]}function oI(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,s=a===void 0?!0:a,u=n.altAxis,f=u===void 0?!0:u,d=n.fallbackPlacements,p=n.padding,m=n.boundary,y=n.rootBoundary,b=n.altBoundary,v=n.flipVariations,E=v===void 0?!0:v,S=n.allowedAutoPlacements,w=t.options.placement,_=ki(w),O=_===w,T=d||(O||!E?[df(w)]:iI(w)),C=[w].concat(T).reduce(function(fe,ge){return fe.concat(ki(ge)===Qh?rI(t,{placement:ge,boundary:m,rootBoundary:y,padding:p,flipVariations:E,allowedAutoPlacements:S}):ge)},[]),N=t.rects.reference,k=t.rects.popper,z=new Map,H=!0,j=C[0],G=0;G<C.length;G++){var F=C[G],A=ki(F),X=ys(F)===hs,$=[cr,qr].indexOf(A)>=0,U=$?"width":"height",D=eu(t,{placement:F,boundary:m,rootBoundary:y,altBoundary:b,padding:p}),Y=$?X?Gr:fr:X?qr:cr;N[U]>k[U]&&(Y=df(Y));var re=df(Y),ae=[];if(s&&ae.push(D[A]<=0),f&&ae.push(D[Y]<=0,D[re]<=0),ae.every(function(fe){return fe})){j=F,H=!1;break}z.set(F,ae)}if(H)for(var B=E?3:1,P=function(ge){var ye=C.find(function(Se){var $e=z.get(Se);if($e)return $e.slice(0,ge).every(function(Ae){return Ae})});if(ye)return j=ye,"break"},W=B;W>0;W--){var M=P(W);if(M==="break")break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}}const aI={name:"flip",enabled:!0,phase:"main",fn:oI,requiresIfExists:["offset"],data:{_skip:!1}};function PS(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $S(e){return[cr,Gr,qr,fr].some(function(t){return e[t]>=0})}function sI(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,s=t.modifiersData.preventOverflow,u=eu(t,{elementContext:"reference"}),f=eu(t,{altBoundary:!0}),d=PS(u,r),p=PS(f,a,s),m=$S(d),y=$S(p);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:p,isReferenceHidden:m,hasPopperEscaped:y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":y})}const lI={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sI};function uI(e,t,n){var r=ki(e),a=[fr,cr].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,u=s[0],f=s[1];return u=u||0,f=(f||0)*a,[fr,Gr].indexOf(r)>=0?{x:f,y:u}:{x:u,y:f}}function cI(e){var t=e.state,n=e.options,r=e.name,a=n.offset,s=a===void 0?[0,0]:a,u=CS.reduce(function(m,y){return m[y]=uI(y,t.rects,s),m},{}),f=u[t.placement],d=f.x,p=f.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=p),t.modifiersData[r]=u}const fI={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cI};function dI(e){var t=e.state,n=e.name;t.modifiersData[n]=LS({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const pI={name:"popperOffsets",enabled:!0,phase:"read",fn:dI,data:{}};function hI(e){return e==="x"?"y":"x"}function mI(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,s=a===void 0?!0:a,u=n.altAxis,f=u===void 0?!1:u,d=n.boundary,p=n.rootBoundary,m=n.altBoundary,y=n.padding,b=n.tether,v=b===void 0?!0:b,E=n.tetherOffset,S=E===void 0?0:E,w=eu(t,{boundary:d,rootBoundary:p,padding:y,altBoundary:m}),_=ki(t.placement),O=ys(t.placement),T=!O,C=nm(_),N=hI(C),k=t.modifiersData.popperOffsets,z=t.rects.reference,H=t.rects.popper,j=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,G=typeof j=="number"?{mainAxis:j,altAxis:j}:Object.assign({mainAxis:0,altAxis:0},j),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(k){if(s){var X,$=C==="y"?cr:fr,U=C==="y"?qr:Gr,D=C==="y"?"height":"width",Y=k[C],re=Y+w[$],ae=Y-w[U],B=v?-H[D]/2:0,P=O===hs?z[D]:H[D],W=O===hs?-H[D]:-z[D],M=t.elements.arrow,fe=v&&M?tm(M):{width:0,height:0},ge=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:RS(),ye=ge[$],Se=ge[U],$e=Ql(0,z[D],fe[D]),Ae=T?z[D]/2-B-$e-ye-G.mainAxis:P-$e-ye-G.mainAxis,Me=T?-z[D]/2+B+$e+Se+G.mainAxis:W+$e+Se+G.mainAxis,Ue=t.elements.arrow&&Wl(t.elements.arrow),Xe=Ue?C==="y"?Ue.clientTop||0:Ue.clientLeft||0:0,Xt=(X=F?.[C])!=null?X:0,Oe=Y+Ae-Xt-Xe,Ge=Y+Me-Xt,Dt=Ql(v?uf(re,Oe):re,Y,v?ya(ae,Ge):ae);k[C]=Dt,A[C]=Dt-Y}if(f){var Rt,ht=C==="x"?cr:fr,ut=C==="x"?qr:Gr,mt=k[N],ot=N==="y"?"height":"width",ke=mt+w[ht],Bn=mt-w[ut],We=[cr,fr].indexOf(_)!==-1,tr=(Rt=F?.[N])!=null?Rt:0,te=We?ke:mt-z[ot]-H[ot]-tr+G.altAxis,se=We?mt+z[ot]+H[ot]-tr-G.altAxis:Bn,xe=v&&We?$3(te,mt,se):Ql(v?te:ke,mt,v?se:Bn);k[N]=xe,A[N]=xe-mt}t.modifiersData[r]=A}}const gI={name:"preventOverflow",enabled:!0,phase:"main",fn:mI,requiresIfExists:["offset"]};function yI(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vI(e){return e===Cr(e)||!Yr(e)?rm(e):yI(e)}function bI(e){var t=e.getBoundingClientRect(),n=ms(t.width)/e.offsetWidth||1,r=ms(t.height)/e.offsetHeight||1;return n!==1||r!==1}function SI(e,t,n){n===void 0&&(n=!1);var r=Yr(t),a=Yr(t)&&bI(t),s=Ao(t),u=gs(e,a,n),f={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!n)&&((Ai(t)!=="body"||om(s))&&(f=vI(t)),Yr(t)?(d=gs(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):s&&(d.x=im(s))),{x:u.left+f.scrollLeft-d.x,y:u.top+f.scrollTop-d.y,width:u.width,height:u.height}}function xI(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function a(s){n.add(s.name);var u=[].concat(s.requires||[],s.requiresIfExists||[]);u.forEach(function(f){if(!n.has(f)){var d=t.get(f);d&&a(d)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||a(s)}),r}function EI(e){var t=xI(e);return M3.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function wI(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function _I(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var US={placement:"bottom",modifiers:[],strategy:"absolute"};function jS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function TI(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,a=t.defaultOptions,s=a===void 0?US:a;return function(f,d,p){p===void 0&&(p=s);var m={placement:"bottom",orderedModifiers:[],options:Object.assign({},US,s),modifiersData:{},elements:{reference:f,popper:d},attributes:{},styles:{}},y=[],b=!1,v={state:m,setOptions:function(_){var O=typeof _=="function"?_(m.options):_;S(),m.options=Object.assign({},s,m.options,O),m.scrollParents={reference:ga(f)?Jl(f):f.contextElement?Jl(f.contextElement):[],popper:Jl(d)};var T=EI(_I([].concat(r,m.options.modifiers)));return m.orderedModifiers=T.filter(function(C){return C.enabled}),E(),v.update()},forceUpdate:function(){if(!b){var _=m.elements,O=_.reference,T=_.popper;if(jS(O,T)){m.rects={reference:SI(O,Wl(T),m.options.strategy==="fixed"),popper:tm(T)},m.reset=!1,m.placement=m.options.placement,m.orderedModifiers.forEach(function(G){return m.modifiersData[G.name]=Object.assign({},G.data)});for(var C=0;C<m.orderedModifiers.length;C++){if(m.reset===!0){m.reset=!1,C=-1;continue}var N=m.orderedModifiers[C],k=N.fn,z=N.options,H=z===void 0?{}:z,j=N.name;typeof k=="function"&&(m=k({state:m,options:H,name:j,instance:v})||m)}}}},update:wI(function(){return new Promise(function(w){v.forceUpdate(),w(m)})}),destroy:function(){S(),b=!0}};if(!jS(f,d))return v;v.setOptions(p).then(function(w){!b&&p.onFirstUpdate&&p.onFirstUpdate(w)});function E(){m.orderedModifiers.forEach(function(w){var _=w.name,O=w.options,T=O===void 0?{}:O,C=w.effect;if(typeof C=="function"){var N=C({state:m,name:_,instance:v,options:T}),k=function(){};y.push(N||k)}})}function S(){y.forEach(function(w){return w()}),y=[]}return v}}var CI=[Z3,pI,Y3,z3,fI,aI,gI,V3,lI],AI=TI({defaultModifiers:CI});function HS(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:a=!1,...s}=e,u=a?{}:hS(n,r),{props:f,internalRef:d}=yS({...s,externalSlotProps:u}),p=Hn(d,u?.ref,e.additionalProps?.ref);return pS(t,{...f,ref:p},r)}function vs(e){return parseInt(I.version,10)>=19?e?.props?.ref||null:e?.ref||null}function kI(e){return typeof e=="function"?e():e}const VS=I.forwardRef(function(t,n){const{children:r,container:a,disablePortal:s=!1}=t,[u,f]=I.useState(null),d=Hn(I.isValidElement(r)?vs(r):null,n);if(Vr(()=>{s||f(kI(a)||document.body)},[a,s]),Vr(()=>{if(u&&!s)return oS(n,u),()=>{oS(n,null)}},[n,u,s]),s){if(I.isValidElement(r)){const p={ref:d};return I.cloneElement(r,p)}return r}return u&&lS.createPortal(r,u)});function OI(e){return _t("MuiPopper",e)}Tt("MuiPopper",["root"]);function RI(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function sm(e){return typeof e=="function"?e():e}function NI(e){return e.nodeType!==void 0}const II=e=>{const{classes:t}=e;return Ct({root:["root"]},OI,t)},MI={},DI=I.forwardRef(function(t,n){const{anchorEl:r,children:a,direction:s,disablePortal:u,modifiers:f,open:d,placement:p,popperOptions:m,popperRef:y,slotProps:b={},slots:v={},TransitionProps:E,ownerState:S,...w}=t,_=I.useRef(null),O=Hn(_,n),T=I.useRef(null),C=Hn(T,y),N=I.useRef(C);Vr(()=>{N.current=C},[C]),I.useImperativeHandle(y,()=>T.current,[]);const k=RI(p,s),[z,H]=I.useState(k),[j,G]=I.useState(sm(r));I.useEffect(()=>{T.current&&T.current.forceUpdate()}),I.useEffect(()=>{r&&G(sm(r))},[r]),Vr(()=>{if(!j||!d)return;const U=re=>{H(re.placement)};let D=[{name:"preventOverflow",options:{altBoundary:u}},{name:"flip",options:{altBoundary:u}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:re})=>{U(re)}}];f!=null&&(D=D.concat(f)),m&&m.modifiers!=null&&(D=D.concat(m.modifiers));const Y=AI(j,_.current,{placement:k,...m,modifiers:D});return N.current(Y),()=>{Y.destroy(),N.current(null)}},[j,u,f,d,m,k]);const F={placement:z};E!==null&&(F.TransitionProps=E);const A=II(t),X=v.root??"div",$=HS({elementType:X,externalSlotProps:b.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:O},ownerState:t,className:A.root});return L.jsx(X,{...$,children:typeof a=="function"?a(F):a})}),BI=Ee(I.forwardRef(function(t,n){const{anchorEl:r,children:a,container:s,direction:u="ltr",disablePortal:f=!1,keepMounted:d=!1,modifiers:p,open:m,placement:y="bottom",popperOptions:b=MI,popperRef:v,style:E,transition:S=!1,slotProps:w={},slots:_={},...O}=t,[T,C]=I.useState(!0),N=()=>{C(!1)},k=()=>{C(!0)};if(!d&&!m&&(!S||T))return null;let z;if(s)z=s;else if(r){const G=sm(r);z=G&&NI(G)?_r(G).body:_r(null).body}const H=!m&&d&&(!S||T)?"none":void 0,j=S?{in:m,onEnter:N,onExited:k}:void 0;return L.jsx(VS,{disablePortal:f,container:z,children:L.jsx(DI,{anchorEl:r,direction:u,disablePortal:f,modifiers:p,ref:n,open:S?!T:m,placement:y,popperOptions:b,popperRef:v,slotProps:w,slots:_,...O,style:{position:"fixed",top:0,left:0,display:H,...E},TransitionProps:j,children:a})})}),{name:"MuiPopper",slot:"Root"})({}),FS=I.forwardRef(function(t,n){const r=Oh(),a=At({props:t,name:"MuiPopper"}),{anchorEl:s,component:u,components:f,componentsProps:d,container:p,disablePortal:m,keepMounted:y,modifiers:b,open:v,placement:E,popperOptions:S,popperRef:w,transition:_,slots:O,slotProps:T,...C}=a,N=O?.root??f?.Root,k={anchorEl:s,container:p,disablePortal:m,keepMounted:y,modifiers:b,open:v,placement:E,popperOptions:S,popperRef:w,transition:_,...C};return L.jsx(BI,{as:u,direction:r?"rtl":"ltr",slots:{root:N},slotProps:T??d,...k,ref:n})});function pf(e){return parseInt(e,10)||0}const zI={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function LI(e){for(const t in e)return!1;return!0}function qS(e){return LI(e)||e.outerHeightStyle===0&&!e.overflowing}const PI=I.forwardRef(function(t,n){const{onChange:r,maxRows:a,minRows:s=1,style:u,value:f,...d}=t,{current:p}=I.useRef(f!=null),m=I.useRef(null),y=Hn(n,m),b=I.useRef(null),v=I.useRef(null),E=I.useCallback(()=>{const T=m.current,C=v.current;if(!T||!C)return;const k=Fi(T).getComputedStyle(T);if(k.width==="0px")return{outerHeightStyle:0,overflowing:!1};C.style.width=k.width,C.value=T.value||t.placeholder||"x",C.value.slice(-1)===`
145
+ `&&(C.value+=" ");const z=k.boxSizing,H=pf(k.paddingBottom)+pf(k.paddingTop),j=pf(k.borderBottomWidth)+pf(k.borderTopWidth),G=C.scrollHeight;C.value="x";const F=C.scrollHeight;let A=G;s&&(A=Math.max(Number(s)*F,A)),a&&(A=Math.min(Number(a)*F,A)),A=Math.max(A,F);const X=A+(z==="border-box"?H+j:0),$=Math.abs(A-G)<=1;return{outerHeightStyle:X,overflowing:$}},[a,s,t.placeholder]),S=qi(()=>{const T=m.current,C=E();if(!T||!C||qS(C))return!1;const N=C.outerHeightStyle;return b.current!=null&&b.current!==N}),w=I.useCallback(()=>{const T=m.current,C=E();if(!T||!C||qS(C))return;const N=C.outerHeightStyle;b.current!==N&&(b.current=N,T.style.height=`${N}px`),T.style.overflow=C.overflowing?"hidden":""},[E]),_=I.useRef(-1);Vr(()=>{const T=iS(w),C=m?.current;if(!C)return;const N=Fi(C);N.addEventListener("resize",T);let k;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(()=>{S()&&(k.unobserve(C),cancelAnimationFrame(_.current),w(),_.current=requestAnimationFrame(()=>{k.observe(C)}))}),k.observe(C)),()=>{T.clear(),cancelAnimationFrame(_.current),N.removeEventListener("resize",T),k&&k.disconnect()}},[E,w,S]),Vr(()=>{w()});const O=T=>{p||w();const C=T.target,N=C.value.length,k=C.value.endsWith(`
146
+ `),z=C.selectionStart===N;k&&z&&C.setSelectionRange(N,N),r&&r(T)};return L.jsxs(I.Fragment,{children:[L.jsx("textarea",{value:f,onChange:O,ref:y,rows:s,style:u,...d}),L.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:v,tabIndex:-1,style:{...zI.shadow,...u,paddingTop:0,paddingBottom:0}})]})});function bs({props:e,states:t,muiFormControl:n}){return t.reduce((r,a)=>(r[a]=e[a],n&&typeof e[a]>"u"&&(r[a]=n[a]),r),{})}const lm=I.createContext(void 0);function Ss(){return I.useContext(lm)}function GS(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function hf(e,t=!1){return e&&(GS(e.value)&&e.value!==""||t&&GS(e.defaultValue)&&e.defaultValue!=="")}function $I(e){return e.startAdornment}function UI(e){return _t("MuiInputBase",e)}const xs=Tt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var YS;const mf=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Ce(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},gf=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},jI=e=>{const{classes:t,color:n,disabled:r,error:a,endAdornment:s,focused:u,formControl:f,fullWidth:d,hiddenLabel:p,multiline:m,readOnly:y,size:b,startAdornment:v,type:E}=e,S={root:["root",`color${Ce(n)}`,r&&"disabled",a&&"error",d&&"fullWidth",u&&"focused",f&&"formControl",b&&b!=="medium"&&`size${Ce(b)}`,m&&"multiline",v&&"adornedStart",s&&"adornedEnd",p&&"hiddenLabel",y&&"readOnly"],input:["input",r&&"disabled",E==="search"&&"inputTypeSearch",m&&"inputMultiline",b==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",s&&"inputAdornedEnd",y&&"readOnly"]};return Ct(S,UI,t)},yf=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:mf})(Mt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${xs.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),vf=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:gf})(Mt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${xs.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${xs.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:s})=>!s.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:s})=>s.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),XS=jh({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),um=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:s,autoFocus:u,className:f,color:d,components:p={},componentsProps:m={},defaultValue:y,disabled:b,disableInjectingGlobalStyles:v,endAdornment:E,error:S,fullWidth:w=!1,id:_,inputComponent:O="input",inputProps:T={},inputRef:C,margin:N,maxRows:k,minRows:z,multiline:H=!1,name:j,onBlur:G,onChange:F,onClick:A,onFocus:X,onKeyDown:$,onKeyUp:U,placeholder:D,readOnly:Y,renderSuffix:re,rows:ae,size:B,slotProps:P={},slots:W={},startAdornment:M,type:fe="text",value:ge,...ye}=r,Se=T.value!=null?T.value:ge,{current:$e}=I.useRef(Se!=null),Ae=I.useRef(),Me=I.useCallback(je=>{},[]),Ue=Hn(Ae,C,T.ref,Me),[Xe,Xt]=I.useState(!1),Oe=Ss(),Ge=bs({props:r,muiFormControl:Oe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Ge.focused=Oe?Oe.focused:Xe,I.useEffect(()=>{!Oe&&b&&Xe&&(Xt(!1),G&&G())},[Oe,b,Xe,G]);const Dt=Oe&&Oe.onFilled,Rt=Oe&&Oe.onEmpty,ht=I.useCallback(je=>{hf(je)?Dt&&Dt():Rt&&Rt()},[Dt,Rt]);Vr(()=>{$e&&ht({value:Se})},[Se,ht,$e]);const ut=je=>{X&&X(je),T.onFocus&&T.onFocus(je),Oe&&Oe.onFocus?Oe.onFocus(je):Xt(!0)},mt=je=>{G&&G(je),T.onBlur&&T.onBlur(je),Oe&&Oe.onBlur?Oe.onBlur(je):Xt(!1)},ot=(je,...en)=>{if(!$e){const Bt=je.target||Ae.current;if(Bt==null)throw new Error(Hi(1));ht({value:Bt.value})}T.onChange&&T.onChange(je,...en),F&&F(je,...en)};I.useEffect(()=>{ht(Ae.current)},[]);const ke=je=>{Ae.current&&je.currentTarget===je.target&&Ae.current.focus(),A&&A(je)};let Bn=O,We=T;H&&Bn==="input"&&(ae?We={type:void 0,minRows:ae,maxRows:ae,...We}:We={type:void 0,maxRows:k,minRows:z,...We},Bn=PI);const tr=je=>{ht(je.animationName==="mui-auto-fill-cancel"?Ae.current:{value:"x"})};I.useEffect(()=>{Oe&&Oe.setAdornedStart(!!M)},[Oe,M]);const te={...r,color:Ge.color||"primary",disabled:Ge.disabled,endAdornment:E,error:Ge.error,focused:Ge.focused,formControl:Oe,fullWidth:w,hiddenLabel:Ge.hiddenLabel,multiline:H,size:Ge.size,startAdornment:M,type:fe},se=jI(te),xe=W.root||p.Root||yf,Re=P.root||m.root||{},Ze=W.input||p.Input||vf;return We={...We,...P.input??m.input},L.jsxs(I.Fragment,{children:[!v&&typeof XS=="function"&&(YS||(YS=L.jsx(XS,{}))),L.jsxs(xe,{...Re,ref:n,onClick:ke,...ye,...!sf(xe)&&{ownerState:{...te,...Re.ownerState}},className:Ye(se.root,Re.className,f,Y&&"MuiInputBase-readOnly"),children:[M,L.jsx(lm.Provider,{value:null,children:L.jsx(Ze,{"aria-invalid":Ge.error,"aria-describedby":a,autoComplete:s,autoFocus:u,defaultValue:y,disabled:Ge.disabled,id:_,onAnimationStart:tr,name:j,placeholder:D,readOnly:Y,required:Ge.required,rows:ae,value:Se,onKeyDown:$,onKeyUp:U,type:fe,...We,...!sf(Ze)&&{as:Bn,ownerState:{...te,...We.ownerState}},ref:Ue,className:Ye(se.input,We.className,Y&&"MuiInputBase-readOnly"),onBlur:mt,onChange:ot,onFocus:ut})}),E,re?re({...Ge,startAdornment:M}):null]})]})});function HI(e){return _t("MuiInput",e)}const tu={...xs,...Tt("MuiInput",["root","underline","input"])};function VI(e){return _t("MuiOutlinedInput",e)}const Oi={...xs,...Tt("MuiOutlinedInput",["root","notchedOutline","input"])};function FI(e){return _t("MuiFilledInput",e)}const va={...xs,...Tt("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},qI=rr(L.jsx("path",{d:"M7 10l5 5 5-5z"})),GI=rr(L.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function YI(e){return _t("MuiAvatar",e)}Tt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const XI=e=>{const{classes:t,variant:n,colorDefault:r}=e;return Ct({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},YI,t)},ZI=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Mt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),KI=Ee("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),WI=Ee(GI,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function QI({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[a,s]=I.useState(!1);return I.useEffect(()=>{if(!n&&!r)return;s(!1);let u=!0;const f=new Image;return f.onload=()=>{u&&s("loaded")},f.onerror=()=>{u&&s("error")},f.crossOrigin=e,f.referrerPolicy=t,f.src=n,r&&(f.srcset=r),()=>{u=!1}},[e,t,n,r]),a}const bf=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiAvatar"}),{alt:a,children:s,className:u,component:f="div",slots:d={},slotProps:p={},imgProps:m,sizes:y,src:b,srcSet:v,variant:E="circular",...S}=r;let w=null;const _={...r,component:f,variant:E},O=QI({...m,...typeof p.img=="function"?p.img(_):p.img,src:b,srcSet:v}),T=b||v,C=T&&O!=="error";_.colorDefault=!C,delete _.ownerState;const N=XI(_),[k,z]=kt("root",{ref:n,className:Ye(N.root,u),elementType:ZI,externalForwardedProps:{slots:d,slotProps:p,component:f,...S},ownerState:_}),[H,j]=kt("img",{className:N.img,elementType:KI,externalForwardedProps:{slots:d,slotProps:{img:{...m,...p.img}}},additionalProps:{alt:a,src:b,srcSet:v,sizes:y},ownerState:_}),[G,F]=kt("fallback",{className:N.fallback,elementType:WI,externalForwardedProps:{slots:d,slotProps:p},shouldForwardComponentProp:!0,ownerState:_});return C?w=L.jsx(H,{...j}):s||s===0?w=s:T&&a?w=a[0]:w=L.jsx(G,{...F}),L.jsx(k,{...z,children:w})}),JI={entering:{opacity:1},entered:{opacity:1}},eM=I.forwardRef(function(t,n){const r=us(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:u=!0,children:f,easing:d,in:p,onEnter:m,onEntered:y,onEntering:b,onExit:v,onExited:E,onExiting:S,style:w,timeout:_=a,TransitionComponent:O=Ci,...T}=t,C=I.useRef(null),N=Hn(C,vs(f),n),k=$=>U=>{if($){const D=C.current;U===void 0?$(D):$(D,U)}},z=k(b),H=k(($,U)=>{dS($);const D=af({style:w,timeout:_,easing:d},{mode:"enter"});$.style.webkitTransition=r.transitions.create("opacity",D),$.style.transition=r.transitions.create("opacity",D),m&&m($,U)}),j=k(y),G=k(S),F=k($=>{const U=af({style:w,timeout:_,easing:d},{mode:"exit"});$.style.webkitTransition=r.transitions.create("opacity",U),$.style.transition=r.transitions.create("opacity",U),v&&v($)}),A=k(E),X=$=>{s&&s(C.current,$)};return L.jsx(O,{appear:u,in:p,nodeRef:C,onEnter:H,onEntered:j,onEntering:z,onExit:F,onExited:A,onExiting:G,addEndListener:X,timeout:_,...T,children:($,{ownerState:U,...D})=>I.cloneElement(f,{style:{opacity:0,visibility:$==="exited"&&!p?"hidden":void 0,...JI[$],...w,...f.props.style},ref:N,...D})})});function tM(e){return _t("MuiBackdrop",e)}Tt("MuiBackdrop",["root","invisible"]);const nM=e=>{const{classes:t,invisible:n}=e;return Ct({root:["root",n&&"invisible"]},tM,t)},rM=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),iM=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiBackdrop"}),{children:a,className:s,component:u="div",invisible:f=!1,open:d,components:p={},componentsProps:m={},slotProps:y={},slots:b={},TransitionComponent:v,transitionDuration:E,...S}=r,w={...r,component:u,invisible:f},_=nM(w),O={transition:v,root:p.Root,...b},T={...m,...y},C={component:u,slots:O,slotProps:T},[N,k]=kt("root",{elementType:rM,externalForwardedProps:C,className:Ye(_.root,s),ownerState:w}),[z,H]=kt("transition",{elementType:eM,externalForwardedProps:C,ownerState:w});return L.jsx(z,{in:d,timeout:E,...S,...H,children:L.jsx(N,{"aria-hidden":!0,...k,ref:n,children:a})})});function oM(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:a=!1}=e,s=wS({badgeContent:t,max:r});let u=n;n===!1&&t===0&&!a&&(u=!0);const{badgeContent:f,max:d=r}=u?s:e,p=f&&Number(f)>d?`${d}+`:f;return{badgeContent:f,invisible:u,max:d,displayValue:p}}function aM(e){return _t("MuiBadge",e)}const ko=Tt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),cm=10,fm=4,sM=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:a,variant:s,classes:u={}}=e,f={root:["root"],badge:["badge",s,r&&"invisible",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`,`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}${Ce(a)}`,`overlap${Ce(a)}`,t!=="default"&&`color${Ce(t)}`]};return Ct(f,aM,u)},lM=Ee("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),uM=Ee("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}${Ce(n.overlap)}`],n.color!=="default"&&t[`color${Ce(n.color)}`],n.invisible&&t.invisible]}})(Mt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:cm*2,lineHeight:1,padding:"0 6px",height:cm*2,borderRadius:cm,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(ur(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:fm,height:fm*2,minWidth:fm*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${ko.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function ZS(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const cM=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiBadge"}),{anchorOrigin:a,className:s,classes:u,component:f,components:d={},componentsProps:p={},children:m,overlap:y="rectangular",color:b="default",invisible:v=!1,max:E=99,badgeContent:S,slots:w,slotProps:_,showZero:O=!1,variant:T="standard",...C}=r,{badgeContent:N,invisible:k,max:z,displayValue:H}=oM({max:E,invisible:v,badgeContent:S,showZero:O}),j=wS({anchorOrigin:ZS(a),color:b,overlap:y,variant:T,badgeContent:S}),G=k||N==null&&T!=="dot",{color:F=b,overlap:A=y,anchorOrigin:X,variant:$=T}=G?j:r,U=ZS(X),D=$!=="dot"?H:void 0,Y={...r,badgeContent:N,invisible:G,max:z,displayValue:D,showZero:O,anchorOrigin:U,color:F,overlap:A,variant:$},re=sM(Y),ae={slots:{root:w?.root??d.Root,badge:w?.badge??d.Badge},slotProps:{root:_?.root??p.root,badge:_?.badge??p.badge}},[B,P]=kt("root",{elementType:lM,externalForwardedProps:{...ae,...C},ownerState:Y,className:Ye(re.root,s),ref:n,additionalProps:{as:f}}),[W,M]=kt("badge",{elementType:uM,externalForwardedProps:ae,ownerState:Y,className:re.badge});return L.jsxs(B,{...P,children:[m,L.jsx(W,{...M,children:D})]})}),fM=Tt("MuiBox",["root"]),dM=ef(),pn=zO({themeId:ui,defaultTheme:dM,defaultClassName:fM.root,generateClassName:xb.generate});function pM(e){return _t("MuiButton",e)}const ba=Tt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),hM=I.createContext({}),mM=I.createContext(void 0),gM=e=>{const{color:t,disableElevation:n,fullWidth:r,size:a,variant:s,loading:u,loadingPosition:f,classes:d}=e,p={root:["root",u&&"loading",s,`${s}${Ce(t)}`,`size${Ce(a)}`,`${s}Size${Ce(a)}`,`color${Ce(t)}`,n&&"disableElevation",r&&"fullWidth",u&&`loadingPosition${Ce(f)}`],startIcon:["icon","startIcon",`iconSize${Ce(a)}`],endIcon:["icon","endIcon",`iconSize${Ce(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},m=Ct(p,pM,d);return{...d,...m}},KS=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],yM=Ee(vS,{shouldForwardProp:e=>fi(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color)}`],t[`size${Ce(n.size)}`],t[`${n.variant}Size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Mt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${ba.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${ba.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${ba.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${ba.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(ur()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ba.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ba.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${ba.loading}`]:{color:"transparent"}}}]}})),vM=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${Ce(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...KS]})),bM=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${Ce(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...KS]})),SM=Ee("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),WS=Ee("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),dm=I.forwardRef(function(t,n){const r=I.useContext(hM),a=I.useContext(mM),s=Vl(r,t),u=At({props:s,name:"MuiButton"}),{children:f,color:d="primary",component:p="button",className:m,disabled:y=!1,disableElevation:b=!1,disableFocusRipple:v=!1,endIcon:E,focusVisibleClassName:S,fullWidth:w=!1,id:_,loading:O=null,loadingIndicator:T,loadingPosition:C="center",size:N="medium",startIcon:k,type:z,variant:H="text",...j}=u,G=ls(_),F=T??L.jsx(SS,{"aria-labelledby":G,color:"inherit",size:16}),A={...u,color:d,component:p,disabled:y,disableElevation:b,disableFocusRipple:v,fullWidth:w,loading:O,loadingIndicator:F,loadingPosition:C,size:N,type:z,variant:H},X=gM(A),$=(k||O&&C==="start")&&L.jsx(vM,{className:X.startIcon,ownerState:A,children:k||L.jsx(WS,{className:X.loadingIconPlaceholder,ownerState:A})}),U=(E||O&&C==="end")&&L.jsx(bM,{className:X.endIcon,ownerState:A,children:E||L.jsx(WS,{className:X.loadingIconPlaceholder,ownerState:A})}),D=a||"",Y=typeof O=="boolean"?L.jsx("span",{className:X.loadingWrapper,style:{display:"contents"},children:O&&L.jsx(SM,{className:X.loadingIndicator,ownerState:A,children:F})}):null;return L.jsxs(yM,{ownerState:A,className:Ye(r.className,X.root,m,D),component:p,disabled:y||O,focusRipple:!v,focusVisibleClassName:Ye(X.focusVisible,S),ref:n,type:z,id:O?G:_,...j,classes:X,children:[$,C!=="end"&&Y,f,C==="end"&&Y,U]})}),pm=typeof jh({})=="function",xM=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),EM=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),QS=(e,t=!1)=>{const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([s,u])=>{const f=e.getColorSchemeSelector(s);f.startsWith("@")?n[f]={":root":{colorScheme:u.palette?.mode}}:n[f.replace(/\s*&/,"")]={colorScheme:u.palette?.mode}});let r={html:xM(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...EM(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const a=e.components?.MuiCssBaseline?.styleOverrides;return a&&(r=[r,a]),r},Sf="mui-ecs",wM=e=>{const t=QS(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${Sf})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([r,a])=>{const s=e.getColorSchemeSelector(r);s.startsWith("@")?n[s]={[`:root:not(:has(.${Sf}))`]:{colorScheme:a.palette?.mode}}:n[s.replace(/\s*&/,"")]={[`&:not(:has(.${Sf}))`]:{colorScheme:a.palette?.mode}}}),t},_M=jh(pm?({theme:e,enableColorScheme:t})=>QS(e,t):({theme:e})=>wM(e));function TM(e){const t=At({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return L.jsxs(I.Fragment,{children:[pm&&L.jsx(_M,{enableColorScheme:r}),!pm&&!r&&L.jsx("span",{className:Sf,style:{display:"none"}}),n]})}function JS(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function CM(e){const t=_r(e);return t.body===e?Fi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function nu(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function e1(e){return parseFloat(Fi(e).getComputedStyle(e).paddingRight)||0}function AM(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function t1(e,t,n,r,a){const s=[t,n,...r];[].forEach.call(e.children,u=>{const f=!s.includes(u),d=!AM(u);f&&d&&nu(u,a)})}function hm(e,t){let n=-1;return e.some((r,a)=>t(r)?(n=a,!0):!1),n}function kM(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(CM(r)){const u=JS(Fi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${e1(r)+u}px`;const f=_r(r).querySelectorAll(".mui-fixed");[].forEach.call(f,d=>{n.push({value:d.style.paddingRight,property:"padding-right",el:d}),d.style.paddingRight=`${e1(d)+u}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=_r(r).body;else{const u=r.parentElement,f=Fi(r);s=u?.nodeName==="HTML"&&f.getComputedStyle(u).overflowY==="scroll"?u:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:u,property:f})=>{s?u.style.setProperty(f,s):u.style.removeProperty(f)})}}function OM(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class RM{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&nu(t.modalRef,!1);const a=OM(n);t1(n,t.mount,t.modalRef,a,!0);const s=hm(this.containers,u=>u.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:a}),r)}mount(t,n){const r=hm(this.containers,s=>s.modals.includes(t)),a=this.containers[r];a.restore||(a.restore=kM(a,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const a=hm(this.containers,u=>u.modals.includes(t)),s=this.containers[a];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&nu(t.modalRef,n),t1(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(a,1);else{const u=s.modals[s.modals.length-1];u.modalRef&&nu(u.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function ru(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const NM=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function IM(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function MM(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function DM(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||MM(e))}function BM(e){const t=[],n=[];return Array.from(e.querySelectorAll(NM)).forEach((r,a)=>{const s=IM(r);s===-1||!DM(r)||(s===0?t.push(r):n.push({documentOrder:a,tabIndex:s,node:r}))}),n.sort((r,a)=>r.tabIndex===a.tabIndex?r.documentOrder-a.documentOrder:r.tabIndex-a.tabIndex).map(r=>r.node).concat(t)}function zM(){return!0}function LM(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:a=!1,getTabbable:s=BM,isEnabled:u=zM,open:f}=e,d=I.useRef(!1),p=I.useRef(null),m=I.useRef(null),y=I.useRef(null),b=I.useRef(null),v=I.useRef(!1),E=I.useRef(null),S=Hn(vs(t),E),w=I.useRef(null);I.useEffect(()=>{!f||!E.current||(v.current=!n)},[n,f]),I.useEffect(()=>{if(!f||!E.current)return;const T=_r(E.current),C=ru(T);return E.current.contains(C)||(E.current.hasAttribute("tabIndex")||E.current.setAttribute("tabIndex","-1"),v.current&&E.current.focus()),()=>{a||(y.current&&y.current.focus&&(d.current=!0,y.current.focus()),y.current=null)}},[f]),I.useEffect(()=>{if(!f||!E.current)return;const T=_r(E.current),C=z=>{if(w.current=z,r||!u()||z.key!=="Tab")return;ru(T)===E.current&&z.shiftKey&&(d.current=!0,m.current&&m.current.focus())},N=()=>{const z=E.current;if(z===null)return;const H=ru(T);if(!T.hasFocus()||!u()||d.current){d.current=!1;return}if(z.contains(H)||r&&H!==p.current&&H!==m.current)return;if(H!==b.current)b.current=null;else if(b.current!==null)return;if(!v.current)return;let j=[];if((H===p.current||H===m.current)&&(j=s(E.current)),j.length>0){const G=!!(w.current?.shiftKey&&w.current?.key==="Tab"),F=j[0],A=j[j.length-1];typeof F!="string"&&typeof A!="string"&&(G?A.focus():F.focus())}else z.focus()};T.addEventListener("focusin",N),T.addEventListener("keydown",C,!0);const k=setInterval(()=>{const z=ru(T);z&&z.tagName==="BODY"&&N()},50);return()=>{clearInterval(k),T.removeEventListener("focusin",N),T.removeEventListener("keydown",C,!0)}},[n,r,a,u,f,s]);const _=T=>{y.current===null&&(y.current=T.relatedTarget),v.current=!0,b.current=T.target;const C=t.props.onFocus;C&&C(T)},O=T=>{y.current===null&&(y.current=T.relatedTarget),v.current=!0};return L.jsxs(I.Fragment,{children:[L.jsx("div",{tabIndex:f?0:-1,onFocus:O,ref:p,"data-testid":"sentinelStart"}),I.cloneElement(t,{ref:S,onFocus:_}),L.jsx("div",{tabIndex:f?0:-1,onFocus:O,ref:m,"data-testid":"sentinelEnd"})]})}function PM(e){return typeof e=="function"?e():e}function $M(e){return e?e.props.hasOwnProperty("in"):!1}const n1=()=>{},xf=new RM;function UM(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:u,children:f,onClose:d,open:p,rootRef:m}=e,y=I.useRef({}),b=I.useRef(null),v=I.useRef(null),E=Hn(v,m),[S,w]=I.useState(!p),_=$M(f);let O=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(O=!1);const T=()=>_r(b.current),C=()=>(y.current.modalRef=v.current,y.current.mount=b.current,y.current),N=()=>{xf.mount(C(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},k=qi(()=>{const U=PM(t)||T().body;xf.add(C(),U),v.current&&N()}),z=()=>xf.isTopModal(C()),H=qi(U=>{b.current=U,U&&(p&&z()?N():v.current&&nu(v.current,O))}),j=I.useCallback(()=>{xf.remove(C(),O)},[O]);I.useEffect(()=>()=>{j()},[j]),I.useEffect(()=>{p?k():(!_||!a)&&j()},[p,j,_,a,k]);const G=U=>D=>{U.onKeyDown?.(D),!(D.key!=="Escape"||D.which===229||!z())&&(n||(D.stopPropagation(),d&&d(D,"escapeKeyDown")))},F=U=>D=>{U.onClick?.(D),D.target===D.currentTarget&&d&&d(D,"backdropClick")};return{getRootProps:(U={})=>{const D=mS(e);delete D.onTransitionEnter,delete D.onTransitionExited;const Y={...D,...U};return{role:"presentation",...Y,onKeyDown:G(Y),ref:E}},getBackdropProps:(U={})=>{const D=U;return{"aria-hidden":!0,...D,onClick:F(D),open:p}},getTransitionProps:()=>{const U=()=>{w(!1),s&&s()},D=()=>{w(!0),u&&u(),a&&j()};return{onEnter:rS(U,f?.props.onEnter??n1),onExited:rS(D,f?.props.onExited??n1)}},rootRef:E,portalRef:H,isTopModal:z,exited:S,hasTransition:_}}function jM(e){return _t("MuiModal",e)}Tt("MuiModal",["root","hidden","backdrop"]);const HM=e=>{const{open:t,exited:n,classes:r}=e;return Ct({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},jM,r)},VM=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Mt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),FM=Ee(iM,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),qM=I.forwardRef(function(t,n){const r=At({name:"MuiModal",props:t}),{BackdropComponent:a=FM,BackdropProps:s,classes:u,className:f,closeAfterTransition:d=!1,children:p,container:m,component:y,components:b={},componentsProps:v={},disableAutoFocus:E=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:w=!1,disablePortal:_=!1,disableRestoreFocus:O=!1,disableScrollLock:T=!1,hideBackdrop:C=!1,keepMounted:N=!1,onClose:k,onTransitionEnter:z,onTransitionExited:H,open:j,slotProps:G={},slots:F={},theme:A,...X}=r,$={...r,closeAfterTransition:d,disableAutoFocus:E,disableEnforceFocus:S,disableEscapeKeyDown:w,disablePortal:_,disableRestoreFocus:O,disableScrollLock:T,hideBackdrop:C,keepMounted:N},{getRootProps:U,getBackdropProps:D,getTransitionProps:Y,portalRef:re,isTopModal:ae,exited:B,hasTransition:P}=UM({...$,rootRef:n}),W={...$,exited:B},M=HM(W),fe={};if(p.props.tabIndex===void 0&&(fe.tabIndex="-1"),P){const{onEnter:Me,onExited:Ue}=Y();fe.onEnter=Me,fe.onExited=Ue}const ge={slots:{root:b.Root,backdrop:b.Backdrop,...F},slotProps:{...v,...G}},[ye,Se]=kt("root",{ref:n,elementType:VM,externalForwardedProps:{...ge,...X,component:y},getSlotProps:U,ownerState:W,className:Ye(f,M?.root,!W.open&&W.exited&&M?.hidden)}),[$e,Ae]=kt("backdrop",{ref:s?.ref,elementType:a,externalForwardedProps:ge,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:Me=>D({...Me,onClick:Ue=>{Me?.onClick&&Me.onClick(Ue)}}),className:Ye(s?.className,M?.backdrop),ownerState:W});return!N&&!j&&(!P||B)?null:L.jsx(VS,{ref:re,container:m,disablePortal:_,children:L.jsxs(ye,{...Se,children:[!C&&a?L.jsx($e,{...Ae}):null,L.jsx(LM,{disableEnforceFocus:S,disableAutoFocus:E,disableRestoreFocus:O,isEnabled:ae,open:j,children:I.cloneElement(p,fe)})]})})}),GM=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:a,size:s,hiddenLabel:u,multiline:f}=e,d={root:["root",!n&&"underline",r&&"adornedStart",a&&"adornedEnd",s==="small"&&`size${Ce(s)}`,u&&"hiddenLabel",f&&"multiline"],input:["input"]},p=Ct(d,FI,t);return{...t,...p}},YM=Ee(yf,{shouldForwardProp:e=>fi(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...mf(e,t),!n.disableUnderline&&t.underline]}})(Mt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${va.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${va.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s},variants:[{props:({ownerState:u})=>!u.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${va.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${va.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${va.disabled}, .${va.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${va.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ur()).map(([u])=>({props:{disableUnderline:!1,color:u},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[u]?.main}`}}})),{props:({ownerState:u})=>u.startAdornment,style:{paddingLeft:12}},{props:({ownerState:u})=>u.endAdornment,style:{paddingRight:12}},{props:({ownerState:u})=>u.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:u,size:f})=>u.multiline&&f==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:u})=>u.multiline&&u.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:u})=>u.multiline&&u.hiddenLabel&&u.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),XM=Ee(vf,{name:"MuiFilledInput",slot:"Input",overridesResolver:gf})(Mt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),mm=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiFilledInput"}),{disableUnderline:a=!1,components:s={},componentsProps:u,fullWidth:f=!1,hiddenLabel:d,inputComponent:p="input",multiline:m=!1,slotProps:y,slots:b={},type:v="text",...E}=r,S={...r,disableUnderline:a,fullWidth:f,inputComponent:p,multiline:m,type:v},w=GM(r),_={root:{ownerState:S},input:{ownerState:S}},O=y??u?Ln(_,y??u):_,T=b.root??s.Root??YM,C=b.input??s.Input??XM;return L.jsx(um,{slots:{root:T,input:C},slotProps:O,fullWidth:f,inputComponent:p,multiline:m,ref:n,type:v,...E,classes:w})});mm.muiName="Input";function ZM(e){return _t("MuiFormControl",e)}Tt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const KM=e=>{const{classes:t,margin:n,fullWidth:r}=e,a={root:["root",n!=="none"&&`margin${Ce(n)}`,r&&"fullWidth"]};return Ct(a,ZM,t)},WM=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${Ce(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),QM=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiFormControl"}),{children:a,className:s,color:u="primary",component:f="div",disabled:d=!1,error:p=!1,focused:m,fullWidth:y=!1,hiddenLabel:b=!1,margin:v="none",required:E=!1,size:S="medium",variant:w="outlined",..._}=r,O={...r,color:u,component:f,disabled:d,error:p,fullWidth:y,hiddenLabel:b,margin:v,required:E,size:S,variant:w},T=KM(O),[C,N]=I.useState(()=>{let U=!1;return a&&I.Children.forEach(a,D=>{if(!Dh(D,["Input","Select"]))return;const Y=Dh(D,["Select"])?D.props.input:D;Y&&$I(Y.props)&&(U=!0)}),U}),[k,z]=I.useState(()=>{let U=!1;return a&&I.Children.forEach(a,D=>{Dh(D,["Input","Select"])&&(hf(D.props,!0)||hf(D.props.inputProps,!0))&&(U=!0)}),U}),[H,j]=I.useState(!1);d&&H&&j(!1);const G=m!==void 0&&!d?m:H;let F;I.useRef(!1);const A=I.useCallback(()=>{z(!0)},[]),X=I.useCallback(()=>{z(!1)},[]),$=I.useMemo(()=>({adornedStart:C,setAdornedStart:N,color:u,disabled:d,error:p,filled:k,focused:G,fullWidth:y,hiddenLabel:b,size:S,onBlur:()=>{j(!1)},onFocus:()=>{j(!0)},onEmpty:X,onFilled:A,registerEffect:F,required:E,variant:w}),[C,u,d,p,k,G,y,b,F,X,A,E,S,w]);return L.jsx(lm.Provider,{value:$,children:L.jsx(WM,{as:f,ownerState:O,className:Ye(T.root,s),ref:n,..._,children:a})})});function JM(e){return _t("MuiFormHelperText",e)}const r1=Tt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var i1;const e4=e=>{const{classes:t,contained:n,size:r,disabled:a,error:s,filled:u,focused:f,required:d}=e,p={root:["root",a&&"disabled",s&&"error",r&&`size${Ce(r)}`,n&&"contained",f&&"focused",u&&"filled",d&&"required"]};return Ct(p,JM,t)},t4=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Ce(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Mt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${r1.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${r1.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),n4=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiFormHelperText"}),{children:a,className:s,component:u="p",disabled:f,error:d,filled:p,focused:m,margin:y,required:b,variant:v,...E}=r,S=Ss(),w=bs({props:r,muiFormControl:S,states:["variant","size","disabled","error","filled","focused","required"]}),_={...r,component:u,contained:w.variant==="filled"||w.variant==="outlined",variant:w.variant,size:w.size,disabled:w.disabled,error:w.error,filled:w.filled,focused:w.focused,required:w.required};delete _.ownerState;const O=e4(_);return L.jsx(t4,{as:u,className:Ye(O.root,s),ref:n,...E,ownerState:_,children:a===" "?i1||(i1=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):a})});function r4(e){return _t("MuiFormLabel",e)}const iu=Tt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),i4=e=>{const{classes:t,color:n,focused:r,disabled:a,error:s,filled:u,required:f}=e,d={root:["root",`color${Ce(n)}`,a&&"disabled",s&&"error",u&&"filled",r&&"focused",f&&"required"],asterisk:["asterisk",s&&"error"]};return Ct(d,r4,t)},o4=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Mt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(ur()).map(([t])=>({props:{color:t},style:{[`&.${iu.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${iu.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${iu.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),a4=Ee("span",{name:"MuiFormLabel",slot:"Asterisk"})(Mt(({theme:e})=>({[`&.${iu.error}`]:{color:(e.vars||e).palette.error.main}}))),s4=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiFormLabel"}),{children:a,className:s,color:u,component:f="label",disabled:d,error:p,filled:m,focused:y,required:b,...v}=r,E=Ss(),S=bs({props:r,muiFormControl:E,states:["color","required","focused","disabled","error","filled"]}),w={...r,color:S.color||"primary",component:f,disabled:S.disabled,error:S.error,filled:S.filled,focused:S.focused,required:S.required},_=i4(w);return L.jsxs(o4,{as:f,ownerState:w,className:Ye(_.root,s),ref:n,...v,children:[a,S.required&&L.jsxs(a4,{ownerState:w,"aria-hidden":!0,className:_.asterisk,children:[" ","*"]})]})});function gm(e){return`scale(${e}, ${e**2})`}const l4={entering:{opacity:1,transform:gm(1)},entered:{opacity:1,transform:"none"}},ym=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Ef=I.forwardRef(function(t,n){const{addEndListener:r,appear:a=!0,children:s,easing:u,in:f,onEnter:d,onEntered:p,onEntering:m,onExit:y,onExited:b,onExiting:v,style:E,timeout:S="auto",TransitionComponent:w=Ci,..._}=t,O=ds(),T=I.useRef(),C=us(),N=I.useRef(null),k=Hn(N,vs(s),n),z=U=>D=>{if(U){const Y=N.current;D===void 0?U(Y):U(Y,D)}},H=z(m),j=z((U,D)=>{dS(U);const{duration:Y,delay:re,easing:ae}=af({style:E,timeout:S,easing:u},{mode:"enter"});let B;S==="auto"?(B=C.transitions.getAutoHeightDuration(U.clientHeight),T.current=B):B=Y,U.style.transition=[C.transitions.create("opacity",{duration:B,delay:re}),C.transitions.create("transform",{duration:ym?B:B*.666,delay:re,easing:ae})].join(","),d&&d(U,D)}),G=z(p),F=z(v),A=z(U=>{const{duration:D,delay:Y,easing:re}=af({style:E,timeout:S,easing:u},{mode:"exit"});let ae;S==="auto"?(ae=C.transitions.getAutoHeightDuration(U.clientHeight),T.current=ae):ae=D,U.style.transition=[C.transitions.create("opacity",{duration:ae,delay:Y}),C.transitions.create("transform",{duration:ym?ae:ae*.666,delay:ym?Y:Y||ae*.333,easing:re})].join(","),U.style.opacity=0,U.style.transform=gm(.75),y&&y(U)}),X=z(b),$=U=>{S==="auto"&&O.start(T.current||0,U),r&&r(N.current,U)};return L.jsx(w,{appear:a,in:f,nodeRef:N,onEnter:j,onEntered:G,onEntering:H,onExit:A,onExited:X,onExiting:F,addEndListener:$,timeout:S==="auto"?null:S,..._,children:(U,{ownerState:D,...Y})=>I.cloneElement(s,{style:{opacity:0,transform:gm(.75),visibility:U==="exited"&&!f?"hidden":void 0,...l4[U],...E,...s.props.style},ref:k,...Y})})});Ef&&(Ef.muiSupportAuto=!0);const u4=e=>{const{classes:t,disableUnderline:n}=e,a=Ct({root:["root",!n&&"underline"],input:["input"]},HI,t);return{...t,...a}},c4=Ee(yf,{shouldForwardProp:e=>fi(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...mf(e,t),!n.disableUnderline&&t.underline]}})(Mt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${tu.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${tu.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${tu.disabled}, .${tu.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${tu.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ur()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),f4=Ee(vf,{name:"MuiInput",slot:"Input",overridesResolver:gf})({}),vm=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiInput"}),{disableUnderline:a=!1,components:s={},componentsProps:u,fullWidth:f=!1,inputComponent:d="input",multiline:p=!1,slotProps:m,slots:y={},type:b="text",...v}=r,E=u4(r),w={root:{ownerState:{disableUnderline:a}}},_=m??u?Ln(m??u,w):w,O=y.root??s.Root??c4,T=y.input??s.Input??f4;return L.jsx(um,{slots:{root:O,input:T},slotProps:_,fullWidth:f,inputComponent:d,multiline:p,ref:n,type:b,...v,classes:E})});vm.muiName="Input";function d4(e){return _t("MuiInputLabel",e)}Tt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const p4=e=>{const{classes:t,formControl:n,size:r,shrink:a,disableAnimation:s,variant:u,required:f}=e,d={root:["root",n&&"formControl",!s&&"animated",a&&"shrink",r&&r!=="medium"&&`size${Ce(r)}`,u],asterisk:[f&&"asterisk"]},p=Ct(d,d4,t);return{...t,...p}},h4=Ee(s4,{shouldForwardProp:e=>fi(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${iu.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Mt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),m4=I.forwardRef(function(t,n){const r=At({name:"MuiInputLabel",props:t}),{disableAnimation:a=!1,margin:s,shrink:u,variant:f,className:d,...p}=r,m=Ss();let y=u;typeof y>"u"&&m&&(y=m.filled||m.focused||m.adornedStart);const b=bs({props:r,muiFormControl:m,states:["size","variant","required","focused"]}),v={...r,disableAnimation:a,formControl:m,shrink:y,size:b.size,variant:b.variant,required:b.required,focused:b.focused},E=p4(v);return L.jsx(h4,{"data-shrink":y,ref:n,className:Ye(E.root,d),...p,ownerState:v,classes:E})});function g4(e){return _t("MuiLink",e)}const y4=Tt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),v4=({theme:e,ownerState:t})=>{const n=t.color;if("colorSpace"in e&&e.colorSpace){const s=_i(e,`palette.${n}.main`)||_i(e,`palette.${n}`)||t.color;return e.alpha(s,.4)}const r=_i(e,`palette.${n}.main`,!1)||_i(e,`palette.${n}`,!1)||t.color,a=_i(e,`palette.${n}.mainChannel`)||_i(e,`palette.${n}Channel`);return"vars"in e&&a?`rgba(${a} / 0.4)`:ql(r,.4)},o1={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},b4=e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,s={root:["root",`underline${Ce(a)}`,n==="button"&&"button",r&&"focusVisible"]};return Ct(s,g4,t)},S4=Ee(Tr,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${Ce(n.underline)}`],n.component==="button"&&t.button]}})(Mt(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(ur()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${y4.focusVisible}`]:{outline:"auto"}}}]}))),x4=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiLink"}),a=us(),{className:s,color:u="primary",component:f="a",onBlur:d,onFocus:p,TypographyClasses:m,underline:y="always",variant:b="inherit",sx:v,...E}=r,[S,w]=I.useState(!1),_=N=>{ps(N.target)||w(!1),d&&d(N)},O=N=>{ps(N.target)&&w(!0),p&&p(N)},T={...r,color:u,component:f,focusVisible:S,underline:y,variant:b},C=b4(T);return L.jsx(S4,{color:u,className:Ye(C.root,s),classes:m,component:f,onBlur:_,onFocus:O,ref:n,ownerState:T,variant:b,...E,sx:[...o1[u]===void 0?[{color:u}]:[],...Array.isArray(v)?v:[v]],style:{...E.style,...y==="always"&&u!=="inherit"&&!o1[u]&&{"--Link-underlineColor":v4({theme:a,ownerState:T})}}})}),E4=I.createContext({});function w4(e){return _t("MuiList",e)}Tt("MuiList",["root","padding","dense","subheader"]);const _4=e=>{const{classes:t,disablePadding:n,dense:r,subheader:a}=e;return Ct({root:["root",!n&&"padding",r&&"dense",a&&"subheader"]},w4,t)},T4=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),C4=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiList"}),{children:a,className:s,component:u="ul",dense:f=!1,disablePadding:d=!1,subheader:p,...m}=r,y=I.useMemo(()=>({dense:f}),[f]),b={...r,component:u,dense:f,disablePadding:d},v=_4(b);return L.jsx(E4.Provider,{value:y,children:L.jsxs(T4,{as:u,className:Ye(v.root,s),ref:n,ownerState:b,...m,children:[p,a]})})});function bm(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function a1(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function s1(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function ou(e,t,n,r,a,s){let u=!1,f=a(e,t,t?n:!1);for(;f;){if(f===e.firstChild){if(u)return!1;u=!0}const d=r?!1:f.disabled||f.getAttribute("aria-disabled")==="true";if(!f.hasAttribute("tabindex")||!s1(f,s)||d)f=a(e,f,n);else return f.focus(),!0}return!1}const A4=I.forwardRef(function(t,n){const{actions:r,autoFocus:a=!1,autoFocusItem:s=!1,children:u,className:f,disabledItemsFocusable:d=!1,disableListWrap:p=!1,onKeyDown:m,variant:y="selectedMenu",...b}=t,v=I.useRef(null),E=I.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Vr(()=>{a&&v.current.focus()},[a]),I.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:C})=>{const N=!v.current.style.width;if(T.clientHeight<v.current.clientHeight&&N){const k=`${JS(Fi(T))}px`;v.current.style[C==="rtl"?"paddingLeft":"paddingRight"]=k,v.current.style.width=`calc(100% + ${k})`}return v.current}}),[]);const S=T=>{const C=v.current,N=T.key;if(T.ctrlKey||T.metaKey||T.altKey){m&&m(T);return}const z=ru(_r(C));if(N==="ArrowDown")T.preventDefault(),ou(C,z,p,d,bm);else if(N==="ArrowUp")T.preventDefault(),ou(C,z,p,d,a1);else if(N==="Home")T.preventDefault(),ou(C,null,p,d,bm);else if(N==="End")T.preventDefault(),ou(C,null,p,d,a1);else if(N.length===1){const H=E.current,j=N.toLowerCase(),G=performance.now();H.keys.length>0&&(G-H.lastTime>500?(H.keys=[],H.repeating=!0,H.previousKeyMatched=!0):H.repeating&&j!==H.keys[0]&&(H.repeating=!1)),H.lastTime=G,H.keys.push(j);const F=z&&!H.repeating&&s1(z,H);H.previousKeyMatched&&(F||ou(C,z,!1,d,bm,H))?T.preventDefault():H.previousKeyMatched=!1}m&&m(T)},w=Hn(v,n);let _=-1;I.Children.forEach(u,(T,C)=>{if(!I.isValidElement(T)){_===C&&(_+=1,_>=u.length&&(_=-1));return}T.props.disabled||(y==="selectedMenu"&&T.props.selected||_===-1)&&(_=C),_===C&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(_+=1,_>=u.length&&(_=-1))});const O=I.Children.map(u,(T,C)=>{if(C===_){const N={};return s&&(N.autoFocus=!0),T.props.tabIndex===void 0&&y==="selectedMenu"&&(N.tabIndex=0),I.cloneElement(T,N)}return T});return L.jsx(C4,{role:"menu",ref:w,className:f,onKeyDown:S,tabIndex:a?0:-1,...b,children:O})});function k4(e){return _t("MuiPopover",e)}Tt("MuiPopover",["root","paper"]);function l1(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function u1(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function c1(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function wf(e){return typeof e=="function"?e():e}const O4=e=>{const{classes:t}=e;return Ct({root:["root"],paper:["paper"]},k4,t)},R4=Ee(qM,{name:"MuiPopover",slot:"Root"})({}),f1=Ee(Xh,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),N4=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:d="anchorEl",children:p,className:m,container:y,elevation:b=8,marginThreshold:v=16,open:E,PaperProps:S={},slots:w={},slotProps:_={},transformOrigin:O={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:C="auto",TransitionProps:N={},disableScrollLock:k=!1,...z}=r,H=I.useRef(),j={...r,anchorOrigin:u,anchorReference:d,elevation:b,marginThreshold:v,transformOrigin:O,TransitionComponent:T,transitionDuration:C,TransitionProps:N},G=O4(j),F=I.useCallback(()=>{if(d==="anchorPosition")return f;const Me=wf(s),Xe=(Me&&Me.nodeType===1?Me:_r(H.current).body).getBoundingClientRect();return{top:Xe.top+l1(Xe,u.vertical),left:Xe.left+u1(Xe,u.horizontal)}},[s,u.horizontal,u.vertical,f,d]),A=I.useCallback(Me=>({vertical:l1(Me,O.vertical),horizontal:u1(Me,O.horizontal)}),[O.horizontal,O.vertical]),X=I.useCallback(Me=>{const Ue={width:Me.offsetWidth,height:Me.offsetHeight},Xe=A(Ue);if(d==="none")return{top:null,left:null,transformOrigin:c1(Xe)};const Xt=F();let Oe=Xt.top-Xe.vertical,Ge=Xt.left-Xe.horizontal;const Dt=Oe+Ue.height,Rt=Ge+Ue.width,ht=Fi(wf(s)),ut=ht.innerHeight-v,mt=ht.innerWidth-v;if(v!==null&&Oe<v){const ot=Oe-v;Oe-=ot,Xe.vertical+=ot}else if(v!==null&&Dt>ut){const ot=Dt-ut;Oe-=ot,Xe.vertical+=ot}if(v!==null&&Ge<v){const ot=Ge-v;Ge-=ot,Xe.horizontal+=ot}else if(Rt>mt){const ot=Rt-mt;Ge-=ot,Xe.horizontal+=ot}return{top:`${Math.round(Oe)}px`,left:`${Math.round(Ge)}px`,transformOrigin:c1(Xe)}},[s,d,F,A,v]),[$,U]=I.useState(E),D=I.useCallback(()=>{const Me=H.current;if(!Me)return;const Ue=X(Me);Ue.top!==null&&Me.style.setProperty("top",Ue.top),Ue.left!==null&&(Me.style.left=Ue.left),Me.style.transformOrigin=Ue.transformOrigin,U(!0)},[X]);I.useEffect(()=>(k&&window.addEventListener("scroll",D),()=>window.removeEventListener("scroll",D)),[s,k,D]);const Y=()=>{D()},re=()=>{U(!1)};I.useEffect(()=>{E&&D()}),I.useImperativeHandle(a,()=>E?{updatePosition:()=>{D()}}:null,[E,D]),I.useEffect(()=>{if(!E)return;const Me=iS(()=>{D()}),Ue=Fi(wf(s));return Ue.addEventListener("resize",Me),()=>{Me.clear(),Ue.removeEventListener("resize",Me)}},[s,E,D]);let ae=C;const B={slots:{transition:T,...w},slotProps:{transition:N,paper:S,..._}},[P,W]=kt("transition",{elementType:Ef,externalForwardedProps:B,ownerState:j,getSlotProps:Me=>({...Me,onEntering:(Ue,Xe)=>{Me.onEntering?.(Ue,Xe),Y()},onExited:Ue=>{Me.onExited?.(Ue),re()}}),additionalProps:{appear:!0,in:E}});C==="auto"&&!P.muiSupportAuto&&(ae=void 0);const M=y||(s?_r(wf(s)).body:void 0),[fe,{slots:ge,slotProps:ye,...Se}]=kt("root",{ref:n,elementType:R4,externalForwardedProps:{...B,...z},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:w.backdrop},slotProps:{backdrop:yN(typeof _.backdrop=="function"?_.backdrop(j):_.backdrop,{invisible:!0})},container:M,open:E},ownerState:j,className:Ye(G.root,m)}),[$e,Ae]=kt("paper",{ref:H,className:G.paper,elementType:f1,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:{elevation:b,style:$?void 0:{opacity:0}},ownerState:j});return L.jsx(fe,{...Se,...!sf(fe)&&{slots:ge,slotProps:ye,disableScrollLock:k},children:L.jsx(P,{...W,timeout:ae,children:L.jsx($e,{...Ae,children:p})})})});function I4(e){return _t("MuiMenu",e)}Tt("MuiMenu",["root","paper","list"]);const M4={vertical:"top",horizontal:"right"},D4={vertical:"top",horizontal:"left"},B4=e=>{const{classes:t}=e;return Ct({root:["root"],paper:["paper"],list:["list"]},I4,t)},z4=Ee(N4,{shouldForwardProp:e=>fi(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),L4=Ee(f1,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),P4=Ee(A4,{name:"MuiMenu",slot:"List"})({outline:0}),$4=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:u,disableAutoFocusItem:f=!1,MenuListProps:d={},onClose:p,open:m,PaperProps:y={},PopoverClasses:b,transitionDuration:v="auto",TransitionProps:{onEntering:E,...S}={},variant:w="selectedMenu",slots:_={},slotProps:O={},...T}=r,C=Oh(),N={...r,autoFocus:a,disableAutoFocusItem:f,MenuListProps:d,onEntering:E,PaperProps:y,transitionDuration:v,TransitionProps:S,variant:w},k=B4(N),z=a&&!f&&m,H=I.useRef(null),j=(ae,B)=>{H.current&&H.current.adjustStyleForScrollbar(ae,{direction:C?"rtl":"ltr"}),E&&E(ae,B)},G=ae=>{ae.key==="Tab"&&(ae.preventDefault(),p&&p(ae,"tabKeyDown"))};let F=-1;I.Children.map(s,(ae,B)=>{I.isValidElement(ae)&&(ae.props.disabled||(w==="selectedMenu"&&ae.props.selected||F===-1)&&(F=B))});const A={slots:_,slotProps:{list:d,transition:S,paper:y,...O}},X=HS({elementType:_.root,externalSlotProps:O.root,ownerState:N,className:[k.root,u]}),[$,U]=kt("paper",{className:k.paper,elementType:L4,externalForwardedProps:A,shouldForwardComponentProp:!0,ownerState:N}),[D,Y]=kt("list",{className:Ye(k.list,d.className),elementType:P4,shouldForwardComponentProp:!0,externalForwardedProps:A,getSlotProps:ae=>({...ae,onKeyDown:B=>{G(B),ae.onKeyDown?.(B)}}),ownerState:N}),re=typeof A.slotProps.transition=="function"?A.slotProps.transition(N):A.slotProps.transition;return L.jsx(z4,{onClose:p,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?M4:D4,slots:{root:_.root,paper:$,backdrop:_.backdrop,..._.transition&&{transition:_.transition}},slotProps:{root:X,paper:U,backdrop:typeof O.backdrop=="function"?O.backdrop(N):O.backdrop,transition:{...re,onEntering:(...ae)=>{j(...ae),re?.onEntering?.(...ae)}}},open:m,ref:n,transitionDuration:v,ownerState:N,...T,classes:b,children:L.jsx(D,{actions:H,autoFocus:a&&(F===-1||f),autoFocusItem:z,variant:w,...Y,children:s})})});function U4(e){return _t("MuiNativeSelect",e)}const Sm=Tt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),j4=e=>{const{classes:t,variant:n,disabled:r,multiple:a,open:s,error:u}=e,f={select:["select",n,r&&"disabled",a&&"multiple",u&&"error"],icon:["icon",`icon${Ce(n)}`,s&&"iconOpen",r&&"disabled"]};return Ct(f,U4,t)},d1=Ee("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Sm.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),H4=Ee(d1,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:fi,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Sm.multiple}`]:t.multiple}]}})({}),p1=Ee("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Sm.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),V4=Ee(p1,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),F4=I.forwardRef(function(t,n){const{className:r,disabled:a,error:s,IconComponent:u,inputRef:f,variant:d="standard",...p}=t,m={...t,disabled:a,variant:d,error:s},y=j4(m);return L.jsxs(I.Fragment,{children:[L.jsx(H4,{ownerState:m,className:Ye(y.select,r),disabled:a,ref:f||n,...p}),t.multiple?null:L.jsx(V4,{as:u,ownerState:m,className:y.icon})]})});var h1;const q4=Ee("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:fi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),G4=Ee("legend",{name:"MuiNotchedOutlined",shouldForwardProp:fi})(Mt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Y4(e){const{children:t,classes:n,className:r,label:a,notched:s,...u}=e,f=a!=null&&a!=="",d={...e,notched:s,withLabel:f};return L.jsx(q4,{"aria-hidden":!0,className:r,ownerState:d,...u,children:L.jsx(G4,{ownerState:d,children:f?L.jsx("span",{children:a}):h1||(h1=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}const X4=e=>{const{classes:t}=e,r=Ct({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},VI,t);return{...t,...r}},Z4=Ee(yf,{shouldForwardProp:e=>fi(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:mf})(Mt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Oi.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Oi.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Oi.focused} .${Oi.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(ur()).map(([n])=>({props:{color:n},style:{[`&.${Oi.focused} .${Oi.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Oi.error} .${Oi.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Oi.disabled} .${Oi.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),K4=Ee(Y4,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Mt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),W4=Ee(vf,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:gf})(Mt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),xm=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:u="input",label:f,multiline:d=!1,notched:p,slots:m={},slotProps:y={},type:b="text",...v}=r,E=X4(r),S=Ss(),w=bs({props:r,muiFormControl:S,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),_={...r,color:w.color||"primary",disabled:w.disabled,error:w.error,focused:w.focused,formControl:S,fullWidth:s,hiddenLabel:w.hiddenLabel,multiline:d,size:w.size,type:b},O=m.root??a.Root??Z4,T=m.input??a.Input??W4,[C,N]=kt("notchedOutline",{elementType:K4,className:E.notchedOutline,shouldForwardComponentProp:!0,ownerState:_,externalForwardedProps:{slots:m,slotProps:y},additionalProps:{label:f!=null&&f!==""&&w.required?L.jsxs(I.Fragment,{children:[f," ","*"]}):f}});return L.jsx(um,{slots:{root:O,input:T},slotProps:y,renderSuffix:k=>L.jsx(C,{...N,notched:typeof p<"u"?p:!!(k.startAdornment||k.filled||k.focused)}),fullWidth:s,inputComponent:u,multiline:d,ref:n,type:b,...v,classes:{...E,notchedOutline:null}})});xm.muiName="Input";function m1(e){return _t("MuiSelect",e)}const au=Tt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var g1;const Q4=Ee(d1,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${au.select}`]:t.select},{[`&.${au.select}`]:t[n.variant]},{[`&.${au.error}`]:t.error},{[`&.${au.multiple}`]:t.multiple}]}})({[`&.${au.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),J4=Ee(p1,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),e5=Ee("input",{shouldForwardProp:e=>nS(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function y1(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function t5(e){return e==null||typeof e=="string"&&!e.trim()}const n5=e=>{const{classes:t,variant:n,disabled:r,multiple:a,open:s,error:u}=e,f={select:["select",n,r&&"disabled",a&&"multiple",u&&"error"],icon:["icon",`icon${Ce(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ct(f,m1,t)},r5=I.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":a,autoFocus:s,autoWidth:u,children:f,className:d,defaultOpen:p,defaultValue:m,disabled:y,displayEmpty:b,error:v=!1,IconComponent:E,inputRef:S,labelId:w,MenuProps:_={},multiple:O,name:T,onBlur:C,onChange:N,onClose:k,onFocus:z,onKeyDown:H,onMouseDown:j,onOpen:G,open:F,readOnly:A,renderValue:X,required:$,SelectDisplayProps:U={},tabIndex:D,type:Y,value:re,variant:ae="standard",...B}=t,[P,W]=Vh({controlled:re,default:m,name:"Select"}),[M,fe]=Vh({controlled:F,default:p,name:"Select"}),ge=I.useRef(null),ye=I.useRef(null),[Se,$e]=I.useState(null),{current:Ae}=I.useRef(F!=null),[Me,Ue]=I.useState(),Xe=Hn(n,S),Xt=I.useCallback(Te=>{ye.current=Te,Te&&$e(Te)},[]),Oe=Se?.parentNode;I.useImperativeHandle(Xe,()=>({focus:()=>{ye.current.focus()},node:ge.current,value:P}),[P]);const Ge=Se!==null&&M;I.useEffect(()=>{if(!Ge||!Oe||u||typeof ResizeObserver>"u")return;const Te=new ResizeObserver(()=>{Ue(Oe.clientWidth)});return Te.observe(Oe),()=>{Te.disconnect()}},[Ge,Oe,u]),I.useEffect(()=>{p&&M&&Se&&!Ae&&(Ue(u?null:Oe.clientWidth),ye.current.focus())},[Se,u]),I.useEffect(()=>{s&&ye.current.focus()},[s]),I.useEffect(()=>{if(!w)return;const Te=_r(ye.current).getElementById(w);if(Te){const Je=()=>{getSelection().isCollapsed&&ye.current.focus()};return Te.addEventListener("click",Je),()=>{Te.removeEventListener("click",Je)}}},[w]);const Dt=(Te,Je)=>{Te?G&&G(Je):k&&k(Je),Ae||(Ue(u?null:Oe.clientWidth),fe(Te))},Rt=Te=>{j?.(Te),Te.button===0&&(Te.preventDefault(),ye.current.focus(),Dt(!0,Te))},ht=Te=>{Dt(!1,Te)},ut=I.Children.toArray(f),mt=Te=>{const Je=ut.find(wn=>wn.props.value===Te.target.value);Je!==void 0&&(W(Je.props.value),N&&N(Te,Je))},ot=Te=>Je=>{let wn;if(Je.currentTarget.hasAttribute("tabindex")){if(O){wn=Array.isArray(P)?P.slice():[];const Mr=P.indexOf(Te.props.value);Mr===-1?wn.push(Te.props.value):wn.splice(Mr,1)}else wn=Te.props.value;if(Te.props.onClick&&Te.props.onClick(Je),P!==wn&&(W(wn),N)){const Mr=Je.nativeEvent||Je,no=new Mr.constructor(Mr.type,Mr);Object.defineProperty(no,"target",{writable:!0,value:{value:wn,name:T}}),N(no,Te)}O||Dt(!1,Je)}},ke=Te=>{A||([" ","ArrowUp","ArrowDown","Enter"].includes(Te.key)&&(Te.preventDefault(),Dt(!0,Te)),H?.(Te))},Bn=Te=>{!Ge&&C&&(Object.defineProperty(Te,"target",{writable:!0,value:{value:P,name:T}}),C(Te))};delete B["aria-invalid"];let We,tr;const te=[];let se=!1;(hf({value:P})||b)&&(X?We=X(P):se=!0);const xe=ut.map(Te=>{if(!I.isValidElement(Te))return null;let Je;if(O){if(!Array.isArray(P))throw new Error(Hi(2));Je=P.some(wn=>y1(wn,Te.props.value)),Je&&se&&te.push(Te.props.children)}else Je=y1(P,Te.props.value),Je&&se&&(tr=Te.props.children);return I.cloneElement(Te,{"aria-selected":Je?"true":"false",onClick:ot(Te),onKeyUp:wn=>{wn.key===" "&&wn.preventDefault(),Te.props.onKeyUp&&Te.props.onKeyUp(wn)},role:"option",selected:Je,value:void 0,"data-value":Te.props.value})});se&&(O?te.length===0?We=null:We=te.reduce((Te,Je,wn)=>(Te.push(Je),wn<te.length-1&&Te.push(", "),Te),[]):We=tr);let Re=Me;!u&&Ae&&Se&&(Re=Oe.clientWidth);let Ze;typeof D<"u"?Ze=D:Ze=y?null:0;const je=U.id||(T?`mui-component-select-${T}`:void 0),en={...t,variant:ae,value:P,open:Ge,error:v},Bt=n5(en),$t={..._.PaperProps,...typeof _.slotProps?.paper=="function"?_.slotProps.paper(en):_.slotProps?.paper},Pn={..._.MenuListProps,...typeof _.slotProps?.list=="function"?_.slotProps.list(en):_.slotProps?.list},gt=ls();return L.jsxs(I.Fragment,{children:[L.jsx(Q4,{as:"div",ref:Xt,tabIndex:Ze,role:"combobox","aria-controls":Ge?gt:void 0,"aria-disabled":y?"true":void 0,"aria-expanded":Ge?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[w,je].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":$?"true":void 0,"aria-invalid":v?"true":void 0,onKeyDown:ke,onMouseDown:y||A?null:Rt,onBlur:Bn,onFocus:z,...U,ownerState:en,className:Ye(U.className,Bt.select,d),id:je,children:t5(We)?g1||(g1=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):We}),L.jsx(e5,{"aria-invalid":v,value:Array.isArray(P)?P.join(","):P,name:T,ref:ge,"aria-hidden":!0,onChange:mt,tabIndex:-1,disabled:y,className:Bt.nativeInput,autoFocus:s,required:$,...B,ownerState:en}),L.jsx(J4,{as:E,className:Bt.icon,ownerState:en}),L.jsx($4,{id:`menu-${T||""}`,anchorEl:Oe,open:Ge,onClose:ht,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},..._,slotProps:{..._.slotProps,list:{"aria-labelledby":w,role:"listbox","aria-multiselectable":O?"true":void 0,disableListWrap:!0,id:gt,...Pn},paper:{...$t,style:{minWidth:Re,...$t!=null?$t.style:null}}},children:xe})]})}),i5=e=>{const{classes:t}=e,r=Ct({root:["root"]},m1,t);return{...t,...r}},Em={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>fi(e)&&e!=="variant"},o5=Ee(vm,Em)(""),a5=Ee(xm,Em)(""),s5=Ee(mm,Em)(""),v1=I.forwardRef(function(t,n){const r=At({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:s,classes:u={},className:f,defaultOpen:d=!1,displayEmpty:p=!1,IconComponent:m=qI,id:y,input:b,inputProps:v,label:E,labelId:S,MenuProps:w,multiple:_=!1,native:O=!1,onClose:T,onOpen:C,open:N,renderValue:k,SelectDisplayProps:z,variant:H="outlined",...j}=r,G=O?F4:r5,F=Ss(),A=bs({props:r,muiFormControl:F,states:["variant","error"]}),X=A.variant||H,$={...r,variant:X,classes:u},U=i5($),{root:D,...Y}=U,re=b||{standard:L.jsx(o5,{ownerState:$}),outlined:L.jsx(a5,{label:E,ownerState:$}),filled:L.jsx(s5,{ownerState:$})}[X],ae=Hn(n,vs(re));return L.jsx(I.Fragment,{children:I.cloneElement(re,{inputComponent:G,inputProps:{children:s,error:A.error,IconComponent:m,variant:X,type:void 0,multiple:_,...O?{id:y}:{autoWidth:a,defaultOpen:d,displayEmpty:p,labelId:S,MenuProps:w,onClose:T,onOpen:C,open:N,renderValue:k,SelectDisplayProps:{id:y,...z}},...v,classes:v?Ln(Y,v.classes):Y,...b?b.props.inputProps:{}},...(_&&O||p)&&X==="outlined"?{notched:!0}:{},ref:ae,className:Ye(re.props.className,f,U.root),...!b&&{variant:X},...j})})});v1.muiName="Select";function l5(e){return _t("MuiTooltip",e)}const hn=Tt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function u5(e){return Math.round(e*1e5)/1e5}const c5=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:a,placement:s}=e,u={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",a&&"touch",`tooltipPlacement${Ce(s.split("-")[0])}`],arrow:["arrow"]};return Ct(u,l5,t)},f5=Ee(FS,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Mt(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${hn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${hn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${hn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${hn.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${hn.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${hn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${hn.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${hn.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),d5=Ee("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ce(n.placement.split("-")[0])}`]]}})(Mt(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${hn.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${hn.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${hn.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${hn.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${u5(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${hn.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${hn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${hn.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${hn.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${hn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${hn.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${hn.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${hn.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${hn.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${hn.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),p5=Ee("span",{name:"MuiTooltip",slot:"Arrow"})(Mt(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let _f=!1;const b1=new of;let su={x:0,y:0};function Tf(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const S1=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiTooltip"}),{arrow:a=!1,children:s,classes:u,components:f={},componentsProps:d={},describeChild:p=!1,disableFocusListener:m=!1,disableHoverListener:y=!1,disableInteractive:b=!1,disableTouchListener:v=!1,enterDelay:E=100,enterNextDelay:S=0,enterTouchDelay:w=700,followCursor:_=!1,id:O,leaveDelay:T=0,leaveTouchDelay:C=1500,onClose:N,onOpen:k,open:z,placement:H="bottom",PopperComponent:j,PopperProps:G={},slotProps:F={},slots:A={},title:X,TransitionComponent:$,TransitionProps:U,...D}=r,Y=I.isValidElement(s)?s:L.jsx("span",{children:s}),re=us(),ae=Oh(),[B,P]=I.useState(),[W,M]=I.useState(null),fe=I.useRef(!1),ge=b||_,ye=ds(),Se=ds(),$e=ds(),Ae=ds(),[Me,Ue]=Vh({controlled:z,default:!1,name:"Tooltip",state:"open"});let Xe=Me;const Xt=ls(O),Oe=I.useRef(),Ge=qi(()=>{Oe.current!==void 0&&(document.body.style.WebkitUserSelect=Oe.current,Oe.current=void 0),Ae.clear()});I.useEffect(()=>Ge,[Ge]);const Dt=et=>{b1.clear(),_f=!0,Ue(!0),k&&!Xe&&k(et)},Rt=qi(et=>{b1.start(800+T,()=>{_f=!1}),Ue(!1),N&&Xe&&N(et),ye.start(re.transitions.duration.shortest,()=>{fe.current=!1})}),ht=et=>{fe.current&&et.type!=="touchstart"||(B&&B.removeAttribute("title"),Se.clear(),$e.clear(),E||_f&&S?Se.start(_f?S:E,()=>{Dt(et)}):Dt(et))},ut=et=>{Se.clear(),$e.start(T,()=>{Rt(et)})},[,mt]=I.useState(!1),ot=et=>{ps(et.target)||(mt(!1),ut(et))},ke=et=>{B||P(et.currentTarget),ps(et.target)&&(mt(!0),ht(et))},Bn=et=>{fe.current=!0;const Qr=Y.props;Qr.onTouchStart&&Qr.onTouchStart(et)},We=et=>{Bn(et),$e.clear(),ye.clear(),Ge(),Oe.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ae.start(w,()=>{document.body.style.WebkitUserSelect=Oe.current,ht(et)})},tr=et=>{Y.props.onTouchEnd&&Y.props.onTouchEnd(et),Ge(),$e.start(C,()=>{Rt(et)})};I.useEffect(()=>{if(!Xe)return;function et(Qr){Qr.key==="Escape"&&Rt(Qr)}return document.addEventListener("keydown",et),()=>{document.removeEventListener("keydown",et)}},[Rt,Xe]);const te=Hn(vs(Y),P,n);!X&&X!==0&&(Xe=!1);const se=I.useRef(),xe=et=>{const Qr=Y.props;Qr.onMouseMove&&Qr.onMouseMove(et),su={x:et.clientX,y:et.clientY},se.current&&se.current.update()},Re={},Ze=typeof X=="string";p?(Re.title=!Xe&&Ze&&!y?X:null,Re["aria-describedby"]=Xe?Xt:null):(Re["aria-label"]=Ze?X:null,Re["aria-labelledby"]=Xe&&!Ze?Xt:null);const je={...Re,...D,...Y.props,className:Ye(D.className,Y.props.className),onTouchStart:Bn,ref:te,..._?{onMouseMove:xe}:{}},en={};v||(je.onTouchStart=We,je.onTouchEnd=tr),y||(je.onMouseOver=Tf(ht,je.onMouseOver),je.onMouseLeave=Tf(ut,je.onMouseLeave),ge||(en.onMouseOver=ht,en.onMouseLeave=ut)),m||(je.onFocus=Tf(ke,je.onFocus),je.onBlur=Tf(ot,je.onBlur),ge||(en.onFocus=ke,en.onBlur=ot));const Bt={...r,isRtl:ae,arrow:a,disableInteractive:ge,placement:H,PopperComponentProp:j,touch:fe.current},$t=typeof F.popper=="function"?F.popper(Bt):F.popper,Pn=I.useMemo(()=>{let et=[{name:"arrow",enabled:!!W,options:{element:W,padding:4}}];return G.popperOptions?.modifiers&&(et=et.concat(G.popperOptions.modifiers)),$t?.popperOptions?.modifiers&&(et=et.concat($t.popperOptions.modifiers)),{...G.popperOptions,...$t?.popperOptions,modifiers:et}},[W,G.popperOptions,$t?.popperOptions]),gt=c5(Bt),Te=typeof F.transition=="function"?F.transition(Bt):F.transition,Je={slots:{popper:f.Popper,transition:f.Transition??$,tooltip:f.Tooltip,arrow:f.Arrow,...A},slotProps:{arrow:F.arrow??d.arrow,popper:{...G,...$t??d.popper},tooltip:F.tooltip??d.tooltip,transition:{...U,...Te??d.transition}}},[wn,Mr]=kt("popper",{elementType:f5,externalForwardedProps:Je,ownerState:Bt,className:Ye(gt.popper,G?.className)}),[no,Hs]=kt("transition",{elementType:Ef,externalForwardedProps:Je,ownerState:Bt}),[ro,Vs]=kt("tooltip",{elementType:d5,className:gt.tooltip,externalForwardedProps:Je,ownerState:Bt}),[Ba,cy]=kt("arrow",{elementType:p5,className:gt.arrow,externalForwardedProps:Je,ownerState:Bt,ref:M});return L.jsxs(I.Fragment,{children:[I.cloneElement(Y,je),L.jsx(wn,{as:j??FS,placement:H,anchorEl:_?{getBoundingClientRect:()=>({top:su.y,left:su.x,right:su.x,bottom:su.y,width:0,height:0})}:B,popperRef:se,open:B?Xe:!1,id:Xt,transition:!0,...en,...Mr,popperOptions:Pn,children:({TransitionProps:et})=>L.jsx(no,{timeout:re.transitions.duration.shorter,...et,...Hs,children:L.jsxs(ro,{...Vs,children:[X,a?L.jsx(Ba,{...cy}):null]})})})]})}),x1=OR({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>At({props:e,name:"MuiStack"})});function h5(e){return _t("MuiTextField",e)}Tt("MuiTextField",["root"]);const m5={standard:vm,filled:mm,outlined:xm},g5=e=>{const{classes:t}=e;return Ct({root:["root"]},h5,t)},y5=Ee(QM,{name:"MuiTextField",slot:"Root"})({}),Cf=I.forwardRef(function(t,n){const r=At({props:t,name:"MuiTextField"}),{autoComplete:a,autoFocus:s=!1,children:u,className:f,color:d="primary",defaultValue:p,disabled:m=!1,error:y=!1,FormHelperTextProps:b,fullWidth:v=!1,helperText:E,id:S,InputLabelProps:w,inputProps:_,InputProps:O,inputRef:T,label:C,maxRows:N,minRows:k,multiline:z=!1,name:H,onBlur:j,onChange:G,onFocus:F,placeholder:A,required:X=!1,rows:$,select:U=!1,SelectProps:D,slots:Y={},slotProps:re={},type:ae,value:B,variant:P="outlined",...W}=r,M={...r,autoFocus:s,color:d,disabled:m,error:y,fullWidth:v,multiline:z,required:X,select:U,variant:P},fe=g5(M),ge=ls(S),ye=E&&ge?`${ge}-helper-text`:void 0,Se=C&&ge?`${ge}-label`:void 0,$e=m5[P],Ae={slots:Y,slotProps:{input:O,inputLabel:w,htmlInput:_,formHelperText:b,select:D,...re}},Me={},Ue=Ae.slotProps.inputLabel;P==="outlined"&&(Ue&&typeof Ue.shrink<"u"&&(Me.notched=Ue.shrink),Me.label=C),U&&((!D||!D.native)&&(Me.id=void 0),Me["aria-describedby"]=void 0);const[Xe,Xt]=kt("root",{elementType:y5,shouldForwardComponentProp:!0,externalForwardedProps:{...Ae,...W},ownerState:M,className:Ye(fe.root,f),ref:n,additionalProps:{disabled:m,error:y,fullWidth:v,required:X,color:d,variant:P}}),[Oe,Ge]=kt("input",{elementType:$e,externalForwardedProps:Ae,additionalProps:Me,ownerState:M}),[Dt,Rt]=kt("inputLabel",{elementType:m4,externalForwardedProps:Ae,ownerState:M}),[ht,ut]=kt("htmlInput",{elementType:"input",externalForwardedProps:Ae,ownerState:M}),[mt,ot]=kt("formHelperText",{elementType:n4,externalForwardedProps:Ae,ownerState:M}),[ke,Bn]=kt("select",{elementType:v1,externalForwardedProps:Ae,ownerState:M}),We=L.jsx(Oe,{"aria-describedby":ye,autoComplete:a,autoFocus:s,defaultValue:p,fullWidth:v,multiline:z,name:H,rows:$,maxRows:N,minRows:k,type:ae,value:B,id:ge,inputRef:T,onBlur:j,onChange:G,onFocus:F,placeholder:A,inputProps:ut,slots:{input:Y.htmlInput?ht:void 0},...Ge});return L.jsxs(Xe,{...Xt,children:[C!=null&&C!==""&&L.jsx(Dt,{htmlFor:ge,id:Se,...Rt,children:C}),U?L.jsx(ke,{"aria-describedby":ye,id:ge,labelId:Se,value:B,input:We,...Bn,children:u}):We,E&&L.jsx(mt,{id:ye,...ot,children:E})]})}),v5=kb({themeId:ui});var yt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const s={};for(const u of a)s[u]=u;return s},e.getValidEnumValues=a=>{const s=e.objectKeys(a).filter(f=>typeof a[a[f]]!="number"),u={};for(const f of s)u[f]=a[f];return e.objectValues(u)},e.objectValues=a=>e.objectKeys(a).map(function(s){return a[s]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.push(u);return s},e.find=(a,s)=>{for(const u of a)if(s(u))return u},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,s=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(yt||(yt={}));var E1;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(E1||(E1={}));const we=yt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Oo=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return Number.isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},he=yt.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 Xi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},a=s=>{for(const u of s.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)r._errors.push(n(u));else{let f=r,d=0;for(;d<u.path.length;){const p=u.path[d];d===u.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(n(u))):f[p]=f[p]||{_errors:[]},f=f[p],d++}}};return a(this),r}static assert(t){if(!(t instanceof Xi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,yt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];n[s]=n[s]||[],n[s].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Xi.create=e=>new Xi(e);const wm=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,yt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${yt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${yt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${yt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:yt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,yt.assertNever(e)}return{message:n}};let b5=wm;function S5(){return b5}const x5=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],u={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let f="";const d=r.filter(p=>!!p).slice().reverse();for(const p of d)f=p(u,{data:t,defaultError:f}).message;return{...a,path:s,message:f}};function be(e,t){const n=S5(),r=x5({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===wm?void 0:wm].filter(a=>!!a)});e.common.issues.push(r)}class ir{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return Ve;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const s=await a.key,u=await a.value;r.push({key:s,value:u})}return ir.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:s,value:u}=a;if(s.status==="aborted"||u.status==="aborted")return Ve;s.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(r[s.value]=u.value)}return{status:t.value,value:r}}}const Ve=Object.freeze({status:"aborted"}),lu=e=>({status:"dirty",value:e}),Xr=e=>({status:"valid",value:e}),w1=e=>e.status==="aborted",_1=e=>e.status==="dirty",Es=e=>e.status==="valid",Af=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));class Ri{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const T1=(e,t)=>{if(Es(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Xi(e.common.issues);return this._error=n,this._error}}};function nt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(u,f)=>{const{message:d}=e;return u.code==="invalid_enum_value"?{message:d??f.defaultError}:typeof f.data>"u"?{message:d??r??f.defaultError}:u.code!=="invalid_type"?{message:f.defaultError}:{message:d??n??f.defaultError}},description:a}}class lt{get description(){return this._def.description}_getType(t){return Oo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Oo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ir,ctx:{common:t.parent.common,data:t.data,parsedType:Oo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Af(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Oo(t)},a=this._parseSync({data:t,path:r.path,parent:r});return T1(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Oo(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Es(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Es(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Oo(t)},a=this._parse({data:t,path:r.path,parent:r}),s=await(Af(a)?a:Promise.resolve(a));return T1(r,s)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,s)=>{const u=t(a),f=()=>s.addIssue({code:he.custom,...r(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(d=>d?!0:(f(),!1)):u?!0:(f(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new Ea({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Wi.create(this,this._def)}nullable(){return wa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ni.create(this)}promise(){return Df.create(this,this._def)}or(t){return Of.create([this,t],this._def)}and(t){return Rf.create(this,t,this._def)}transform(t){return new Ea({...nt(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Bf({...nt(this._def),innerType:this,defaultValue:n,typeName:Fe.ZodDefault})}brand(){return new D1({typeName:Fe.ZodBranded,type:this,...nt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new zf({...nt(this._def),innerType:this,catchValue:n,typeName:Fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Im.create(this,t)}readonly(){return Lf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const E5=/^c[^\s-]{8,}$/i,w5=/^[0-9a-z]+$/,_5=/^[0-9A-HJKMNP-TV-Z]{26}$/i,T5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,C5=/^[a-z0-9_-]{21}$/i,A5=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,k5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,O5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _m;const N5=/^(?:(?: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])$/,I5=/^(?:(?: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])$/,M5=/^(([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]))$/,D5=/^(([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])$/,B5=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,z5=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,C1="((\\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])))",L5=new RegExp(`^${C1}$`);function A1(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function P5(e){return new RegExp(`^${A1(e)}$`)}function $5(e){let t=`${C1}T${A1(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function U5(e,t){return!!((t==="v4"||!t)&&N5.test(e)||(t==="v6"||!t)&&M5.test(e))}function j5(e,t){if(!A5.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function H5(e,t){return!!((t==="v4"||!t)&&I5.test(e)||(t==="v6"||!t)&&D5.test(e))}class Zi extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const s=this._getOrReturnCtx(t);return be(s,{code:he.invalid_type,expected:we.string,received:s.parsedType}),Ve}const r=new ir;let a;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(a=this._getOrReturnCtx(t,a),be(a,{code:he.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(a=this._getOrReturnCtx(t,a),be(a,{code:he.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const u=t.data.length>s.value,f=t.data.length<s.value;(u||f)&&(a=this._getOrReturnCtx(t,a),u?be(a,{code:he.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):f&&be(a,{code:he.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")O5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"email",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")_m||(_m=new RegExp(R5,"u")),_m.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"emoji",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")T5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"uuid",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")C5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"nanoid",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")E5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"cuid",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")w5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"cuid2",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")_5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"ulid",code:he.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),be(a,{validation:"url",code:he.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"regex",code:he.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(t,a),be(a,{code:he.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(a=this._getOrReturnCtx(t,a),be(a,{code:he.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(a=this._getOrReturnCtx(t,a),be(a,{code:he.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?$5(s).test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{code:he.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?L5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{code:he.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?P5(s).test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{code:he.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?k5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"duration",code:he.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?U5(t.data,s.version)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"ip",code:he.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?j5(t.data,s.alg)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"jwt",code:he.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?H5(t.data,s.version)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"cidr",code:he.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?B5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"base64",code:he.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?z5.test(t.data)||(a=this._getOrReturnCtx(t,a),be(a,{validation:"base64url",code:he.invalid_string,message:s.message}),r.dirty()):yt.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:he.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new Zi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ie.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new Zi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Zi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Zi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Zi.create=e=>new Zi({checks:[],typeName:Fe.ZodString,coerce:e?.coerce??!1,...nt(e)});function V5(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,s=Number.parseInt(e.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return s%u/10**a}class ws extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const s=this._getOrReturnCtx(t);return be(s,{code:he.invalid_type,expected:we.number,received:s.parsedType}),Ve}let r;const a=new ir;for(const s of this._def.checks)s.kind==="int"?yt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),be(r,{code:he.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:he.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:he.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?V5(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),be(r,{code:he.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),be(r,{code:he.not_finite,message:s.message}),a.dirty()):yt.assertNever(s);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,a){return new ws({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(a)}]})}_addCheck(t){return new ws({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&yt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ws.create=e=>new ws({checks:[],typeName:Fe.ZodNumber,coerce:e?.coerce||!1,...nt(e)});class uu extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==we.bigint)return this._getInvalidInput(t);let r;const a=new ir;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:he.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),be(r,{code:he.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),be(r,{code:he.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):yt.assertNever(s);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return be(n,{code:he.invalid_type,expected:we.bigint,received:n.parsedType}),Ve}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,a){return new uu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(a)}]})}_addCheck(t){return new uu({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}uu.create=e=>new uu({checks:[],typeName:Fe.ZodBigInt,coerce:e?.coerce??!1,...nt(e)});class Tm extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return be(r,{code:he.invalid_type,expected:we.boolean,received:r.parsedType}),Ve}return Xr(t.data)}}Tm.create=e=>new Tm({typeName:Fe.ZodBoolean,coerce:e?.coerce||!1,...nt(e)});class kf extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const s=this._getOrReturnCtx(t);return be(s,{code:he.invalid_type,expected:we.date,received:s.parsedType}),Ve}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return be(s,{code:he.invalid_date}),Ve}const r=new ir;let a;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(a=this._getOrReturnCtx(t,a),be(a,{code:he.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(a=this._getOrReturnCtx(t,a),be(a,{code:he.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):yt.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new kf({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}kf.create=e=>new kf({checks:[],coerce:e?.coerce||!1,typeName:Fe.ZodDate,...nt(e)});class k1 extends lt{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return be(r,{code:he.invalid_type,expected:we.symbol,received:r.parsedType}),Ve}return Xr(t.data)}}k1.create=e=>new k1({typeName:Fe.ZodSymbol,...nt(e)});class Cm extends lt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return be(r,{code:he.invalid_type,expected:we.undefined,received:r.parsedType}),Ve}return Xr(t.data)}}Cm.create=e=>new Cm({typeName:Fe.ZodUndefined,...nt(e)});class Am extends lt{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return be(r,{code:he.invalid_type,expected:we.null,received:r.parsedType}),Ve}return Xr(t.data)}}Am.create=e=>new Am({typeName:Fe.ZodNull,...nt(e)});class km extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return Xr(t.data)}}km.create=e=>new km({typeName:Fe.ZodAny,...nt(e)});class O1 extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Xr(t.data)}}O1.create=e=>new O1({typeName:Fe.ZodUnknown,...nt(e)});class Ro extends lt{_parse(t){const n=this._getOrReturnCtx(t);return be(n,{code:he.invalid_type,expected:we.never,received:n.parsedType}),Ve}}Ro.create=e=>new Ro({typeName:Fe.ZodNever,...nt(e)});class R1 extends lt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return be(r,{code:he.invalid_type,expected:we.void,received:r.parsedType}),Ve}return Xr(t.data)}}R1.create=e=>new R1({typeName:Fe.ZodVoid,...nt(e)});class Ni extends lt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==we.array)return be(n,{code:he.invalid_type,expected:we.array,received:n.parsedType}),Ve;if(a.exactLength!==null){const u=n.data.length>a.exactLength.value,f=n.data.length<a.exactLength.value;(u||f)&&(be(n,{code:u?he.too_big:he.too_small,minimum:f?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(be(n,{code:he.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(be(n,{code:he.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((u,f)=>a.type._parseAsync(new Ri(n,u,n.path,f)))).then(u=>ir.mergeArray(r,u));const s=[...n.data].map((u,f)=>a.type._parseSync(new Ri(n,u,n.path,f)));return ir.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Ni({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new Ni({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new Ni({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}Ni.create=(e,t)=>new Ni({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...nt(t)});function _s(e){if(e instanceof An){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Wi.create(_s(r))}return new An({...e._def,shape:()=>t})}else return e instanceof Ni?new Ni({...e._def,type:_s(e.element)}):e instanceof Wi?Wi.create(_s(e.unwrap())):e instanceof wa?wa.create(_s(e.unwrap())):e instanceof Sa?Sa.create(e.items.map(t=>_s(t))):e}class An extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=yt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==we.object){const p=this._getOrReturnCtx(t);return be(p,{code:he.invalid_type,expected:we.object,received:p.parsedType}),Ve}const{status:r,ctx:a}=this._processInputParams(t),{shape:s,keys:u}=this._getCached(),f=[];if(!(this._def.catchall instanceof Ro&&this._def.unknownKeys==="strip"))for(const p in a.data)u.includes(p)||f.push(p);const d=[];for(const p of u){const m=s[p],y=a.data[p];d.push({key:{status:"valid",value:p},value:m._parse(new Ri(a,y,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof Ro){const p=this._def.unknownKeys;if(p==="passthrough")for(const m of f)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(p==="strict")f.length>0&&(be(a,{code:he.unrecognized_keys,keys:f}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const m of f){const y=a.data[m];d.push({key:{status:"valid",value:m},value:p._parse(new Ri(a,y,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const m of d){const y=await m.key,b=await m.value;p.push({key:y,value:b,alwaysSet:m.alwaysSet})}return p}).then(p=>ir.mergeObjectSync(r,p)):ir.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new An({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ie.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new An({...this._def,unknownKeys:"strip"})}passthrough(){return new An({...this._def,unknownKeys:"passthrough"})}extend(t){return new An({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new An({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new An({...this._def,catchall:t})}pick(t){const n={};for(const r of yt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new An({...this._def,shape:()=>n})}omit(t){const n={};for(const r of yt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new An({...this._def,shape:()=>n})}deepPartial(){return _s(this)}partial(t){const n={};for(const r of yt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new An({...this._def,shape:()=>n})}required(t){const n={};for(const r of yt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Wi;)s=s._def.innerType;n[r]=s}return new An({...this._def,shape:()=>n})}keyof(){return I1(yt.objectKeys(this.shape))}}An.create=(e,t)=>new An({shape:()=>e,unknownKeys:"strip",catchall:Ro.create(),typeName:Fe.ZodObject,...nt(t)}),An.strictCreate=(e,t)=>new An({shape:()=>e,unknownKeys:"strict",catchall:Ro.create(),typeName:Fe.ZodObject,...nt(t)}),An.lazycreate=(e,t)=>new An({shape:e,unknownKeys:"strip",catchall:Ro.create(),typeName:Fe.ZodObject,...nt(t)});class Of extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(s){for(const f of s)if(f.result.status==="valid")return f.result;for(const f of s)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const u=s.map(f=>new Xi(f.ctx.common.issues));return be(n,{code:he.invalid_union,unionErrors:u}),Ve}if(n.common.async)return Promise.all(r.map(async s=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(a);{let s;const u=[];for(const d of r){const p={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:p});if(m.status==="valid")return m;m.status==="dirty"&&!s&&(s={result:m,ctx:p}),p.common.issues.length&&u.push(p.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const f=u.map(d=>new Xi(d));return be(n,{code:he.invalid_union,unionErrors:f}),Ve}}get options(){return this._def.options}}Of.create=(e,t)=>new Of({options:e,typeName:Fe.ZodUnion,...nt(t)});const Ki=e=>e instanceof Nm?Ki(e.schema):e instanceof Ea?Ki(e.innerType()):e instanceof If?[e.value]:e instanceof xa?e.options:e instanceof Mf?yt.objectValues(e.enum):e instanceof Bf?Ki(e._def.innerType):e instanceof Cm?[void 0]:e instanceof Am?[null]:e instanceof Wi?[void 0,...Ki(e.unwrap())]:e instanceof wa?[null,...Ki(e.unwrap())]:e instanceof D1||e instanceof Lf?Ki(e.unwrap()):e instanceof zf?Ki(e._def.innerType):[];class Om extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return be(n,{code:he.invalid_type,expected:we.object,received:n.parsedType}),Ve;const r=this.discriminator,a=n.data[r],s=this.optionsMap.get(a);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(be(n,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const s of n){const u=Ki(s.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const f of u){if(a.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);a.set(f,s)}}return new Om({typeName:Fe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...nt(r)})}}function Rm(e,t){const n=Oo(e),r=Oo(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const a=yt.objectKeys(t),s=yt.objectKeys(e).filter(f=>a.indexOf(f)!==-1),u={...e,...t};for(const f of s){const d=Rm(e[f],t[f]);if(!d.valid)return{valid:!1};u[f]=d.data}return{valid:!0,data:u}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const u=e[s],f=t[s],d=Rm(u,f);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Rf extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(s,u)=>{if(w1(s)||w1(u))return Ve;const f=Rm(s.value,u.value);return f.valid?((_1(s)||_1(u))&&n.dirty(),{status:n.value,value:f.data}):(be(r,{code:he.invalid_intersection_types}),Ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,u])=>a(s,u)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Rf.create=(e,t,n)=>new Rf({left:e,right:t,typeName:Fe.ZodIntersection,...nt(n)});class Sa extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return be(r,{code:he.invalid_type,expected:we.array,received:r.parsedType}),Ve;if(r.data.length<this._def.items.length)return be(r,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&r.data.length>this._def.items.length&&(be(r,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((u,f)=>{const d=this._def.items[f]||this._def.rest;return d?d._parse(new Ri(r,u,r.path,f)):null}).filter(u=>!!u);return r.common.async?Promise.all(s).then(u=>ir.mergeArray(n,u)):ir.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new Sa({...this._def,rest:t})}}Sa.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Sa({items:e,typeName:Fe.ZodTuple,rest:null,...nt(t)})};class Nf extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return be(r,{code:he.invalid_type,expected:we.object,received:r.parsedType}),Ve;const a=[],s=this._def.keyType,u=this._def.valueType;for(const f in r.data)a.push({key:s._parse(new Ri(r,f,r.path,f)),value:u._parse(new Ri(r,r.data[f],r.path,f)),alwaysSet:f in r.data});return r.common.async?ir.mergeObjectAsync(n,a):ir.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof lt?new Nf({keyType:t,valueType:n,typeName:Fe.ZodRecord,...nt(r)}):new Nf({keyType:Zi.create(),valueType:t,typeName:Fe.ZodRecord,...nt(n)})}}class N1 extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.map)return be(r,{code:he.invalid_type,expected:we.map,received:r.parsedType}),Ve;const a=this._def.keyType,s=this._def.valueType,u=[...r.data.entries()].map(([f,d],p)=>({key:a._parse(new Ri(r,f,r.path,[p,"key"])),value:s._parse(new Ri(r,d,r.path,[p,"value"]))}));if(r.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const d of u){const p=await d.key,m=await d.value;if(p.status==="aborted"||m.status==="aborted")return Ve;(p.status==="dirty"||m.status==="dirty")&&n.dirty(),f.set(p.value,m.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const d of u){const p=d.key,m=d.value;if(p.status==="aborted"||m.status==="aborted")return Ve;(p.status==="dirty"||m.status==="dirty")&&n.dirty(),f.set(p.value,m.value)}return{status:n.value,value:f}}}}N1.create=(e,t,n)=>new N1({valueType:t,keyType:e,typeName:Fe.ZodMap,...nt(n)});class cu extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return be(r,{code:he.invalid_type,expected:we.set,received:r.parsedType}),Ve;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(be(r,{code:he.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(be(r,{code:he.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const s=this._def.valueType;function u(d){const p=new Set;for(const m of d){if(m.status==="aborted")return Ve;m.status==="dirty"&&n.dirty(),p.add(m.value)}return{status:n.value,value:p}}const f=[...r.data.values()].map((d,p)=>s._parse(new Ri(r,d,r.path,p)));return r.common.async?Promise.all(f).then(d=>u(d)):u(f)}min(t,n){return new cu({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new cu({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}cu.create=(e,t)=>new cu({valueType:e,minSize:null,maxSize:null,typeName:Fe.ZodSet,...nt(t)});class Nm extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Nm.create=(e,t)=>new Nm({getter:e,typeName:Fe.ZodLazy,...nt(t)});class If extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return be(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}If.create=(e,t)=>new If({value:e,typeName:Fe.ZodLiteral,...nt(t)});function I1(e,t){return new xa({values:e,typeName:Fe.ZodEnum,...nt(t)})}class xa extends lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return be(n,{expected:yt.joinValues(r),received:n.parsedType,code:he.invalid_type}),Ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return be(n,{received:n.data,code:he.invalid_enum_value,options:r}),Ve}return Xr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return xa.create(t,{...this._def,...n})}exclude(t,n=this._def){return xa.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}xa.create=I1;class Mf extends lt{_parse(t){const n=yt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const a=yt.objectValues(n);return be(r,{expected:yt.joinValues(a),received:r.parsedType,code:he.invalid_type}),Ve}if(this._cache||(this._cache=new Set(yt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=yt.objectValues(n);return be(r,{received:r.data,code:he.invalid_enum_value,options:a}),Ve}return Xr(t.data)}get enum(){return this._def.values}}Mf.create=(e,t)=>new Mf({values:e,typeName:Fe.ZodNativeEnum,...nt(t)});class Df extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return be(n,{code:he.invalid_type,expected:we.promise,received:n.parsedType}),Ve;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return Xr(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Df.create=(e,t)=>new Df({type:e,typeName:Fe.ZodPromise,...nt(t)});class Ea extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,s={addIssue:u=>{be(r,u),u.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const u=a.transform(r.data,s);if(r.common.async)return Promise.resolve(u).then(async f=>{if(n.value==="aborted")return Ve;const d=await this._def.schema._parseAsync({data:f,path:r.path,parent:r});return d.status==="aborted"?Ve:d.status==="dirty"||n.value==="dirty"?lu(d.value):d});{if(n.value==="aborted")return Ve;const f=this._def.schema._parseSync({data:u,path:r.path,parent:r});return f.status==="aborted"?Ve:f.status==="dirty"||n.value==="dirty"?lu(f.value):f}}if(a.type==="refinement"){const u=f=>{const d=a.refinement(f,s);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return f.status==="aborted"?Ve:(f.status==="dirty"&&n.dirty(),u(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>f.status==="aborted"?Ve:(f.status==="dirty"&&n.dirty(),u(f.value).then(()=>({status:n.value,value:f.value}))))}if(a.type==="transform")if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Es(u))return Ve;const f=a.transform(u.value,s);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>Es(u)?Promise.resolve(a.transform(u.value,s)).then(f=>({status:n.value,value:f})):Ve);yt.assertNever(a)}}Ea.create=(e,t,n)=>new Ea({schema:e,typeName:Fe.ZodEffects,effect:t,...nt(n)}),Ea.createWithPreprocess=(e,t,n)=>new Ea({schema:t,effect:{type:"preprocess",transform:e},typeName:Fe.ZodEffects,...nt(n)});class Wi extends lt{_parse(t){return this._getType(t)===we.undefined?Xr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wi.create=(e,t)=>new Wi({innerType:e,typeName:Fe.ZodOptional,...nt(t)});class wa extends lt{_parse(t){return this._getType(t)===we.null?Xr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}wa.create=(e,t)=>new wa({innerType:e,typeName:Fe.ZodNullable,...nt(t)});class Bf extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Bf.create=(e,t)=>new Bf({innerType:e,typeName:Fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...nt(t)});class zf extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Af(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Xi(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Xi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}zf.create=(e,t)=>new zf({innerType:e,typeName:Fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...nt(t)});class M1 extends lt{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return be(r,{code:he.invalid_type,expected:we.nan,received:r.parsedType}),Ve}return{status:"valid",value:t.data}}}M1.create=e=>new M1({typeName:Fe.ZodNaN,...nt(e)});class D1 extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Im extends lt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ve:s.status==="dirty"?(n.dirty(),lu(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ve:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Im({in:t,out:n,typeName:Fe.ZodPipeline})}}class Lf extends lt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(Es(a)&&(a.value=Object.freeze(a.value)),a);return Af(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}Lf.create=(e,t)=>new Lf({innerType:e,typeName:Fe.ZodReadonly,...nt(t)});var Fe;(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"})(Fe||(Fe={}));const pe=Zi.create,F5=ws.create,Mm=Tm.create,or=km.create;Ro.create;const No=Ni.create,on=An.create,Dm=Of.create,Pf=Om.create;Rf.create,Sa.create;const B1=Nf.create,De=If.create,z1=xa.create,q5=Mf.create;Df.create,Wi.create,wa.create;var G5=on({name:pe(),arguments:pe()}),Y5=on({id:pe(),type:De("function"),function:G5}),$f=on({id:pe(),role:pe(),content:pe().optional(),name:pe().optional()}),X5=on({type:De("text"),text:pe()}),L1=on({type:De("binary"),mimeType:pe(),id:pe().optional(),url:pe().optional(),data:pe().optional(),filename:pe().optional()}),P1=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:he.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};L1.superRefine((e,t)=>{P1(e,t)});var Z5=Pf("type",[X5,L1]),K5=Z5.superRefine((e,t)=>{e.type==="binary"&&P1(e,t)}),W5=$f.extend({role:De("developer"),content:pe()}),Q5=$f.extend({role:De("system"),content:pe()}),J5=$f.extend({role:De("assistant"),content:pe().optional(),toolCalls:No(Y5).optional()}),eD=$f.extend({role:De("user"),content:Dm([pe(),No(K5)])}),tD=on({id:pe(),content:pe(),role:De("tool"),toolCallId:pe(),error:pe().optional()}),nD=on({id:pe(),role:De("activity"),activityType:pe(),content:B1(or())}),$1=Pf("role",[W5,Q5,J5,eD,tD,nD]);Dm([De("developer"),De("system"),De("assistant"),De("user"),De("tool"),De("activity")]);var rD=on({description:pe(),value:pe()}),iD=on({name:pe(),description:pe(),parameters:or()}),oD=on({threadId:pe(),runId:pe(),parentRunId:pe().optional(),state:or(),messages:No($1),tools:No(iD),context:No(rD),forwardedProps:or()}),aD=or(),mn=class extends Error{constructor(e){super(e)}},U1=class extends mn{constructor(){super("Connect not implemented. This method is not supported by the current agent.")}},j1=Dm([De("developer"),De("system"),De("assistant"),De("user")]),de=(e=>(e.TEXT_MESSAGE_START="TEXT_MESSAGE_START",e.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",e.TEXT_MESSAGE_END="TEXT_MESSAGE_END",e.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",e.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",e.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",e.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",e.TOOL_CALL_START="TOOL_CALL_START",e.TOOL_CALL_ARGS="TOOL_CALL_ARGS",e.TOOL_CALL_END="TOOL_CALL_END",e.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",e.TOOL_CALL_RESULT="TOOL_CALL_RESULT",e.THINKING_START="THINKING_START",e.THINKING_END="THINKING_END",e.STATE_SNAPSHOT="STATE_SNAPSHOT",e.STATE_DELTA="STATE_DELTA",e.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",e.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",e.ACTIVITY_DELTA="ACTIVITY_DELTA",e.RAW="RAW",e.CUSTOM="CUSTOM",e.RUN_STARTED="RUN_STARTED",e.RUN_FINISHED="RUN_FINISHED",e.RUN_ERROR="RUN_ERROR",e.STEP_STARTED="STEP_STARTED",e.STEP_FINISHED="STEP_FINISHED",e))(de||{}),Jt=on({type:q5(de),timestamp:F5().optional(),rawEvent:or().optional()}).passthrough(),sD=Jt.extend({type:De("TEXT_MESSAGE_START"),messageId:pe(),role:j1.default("assistant")}),H1=Jt.extend({type:De("TEXT_MESSAGE_CONTENT"),messageId:pe(),delta:pe().refine(e=>e.length>0,"Delta must not be an empty string")}),lD=Jt.extend({type:De("TEXT_MESSAGE_END"),messageId:pe()}),uD=Jt.extend({type:De("TEXT_MESSAGE_CHUNK"),messageId:pe().optional(),role:j1.optional(),delta:pe().optional()}),cD=Jt.extend({type:De("THINKING_TEXT_MESSAGE_START")}),fD=H1.omit({messageId:!0,type:!0}).extend({type:De("THINKING_TEXT_MESSAGE_CONTENT")}),dD=Jt.extend({type:De("THINKING_TEXT_MESSAGE_END")}),pD=Jt.extend({type:De("TOOL_CALL_START"),toolCallId:pe(),toolCallName:pe(),parentMessageId:pe().optional()}),hD=Jt.extend({type:De("TOOL_CALL_ARGS"),toolCallId:pe(),delta:pe()}),mD=Jt.extend({type:De("TOOL_CALL_END"),toolCallId:pe()}),gD=Jt.extend({messageId:pe(),type:De("TOOL_CALL_RESULT"),toolCallId:pe(),content:pe(),role:De("tool").optional()}),yD=Jt.extend({type:De("TOOL_CALL_CHUNK"),toolCallId:pe().optional(),toolCallName:pe().optional(),parentMessageId:pe().optional(),delta:pe().optional()}),vD=Jt.extend({type:De("THINKING_START"),title:pe().optional()}),bD=Jt.extend({type:De("THINKING_END")}),SD=Jt.extend({type:De("STATE_SNAPSHOT"),snapshot:aD}),xD=Jt.extend({type:De("STATE_DELTA"),delta:No(or())}),ED=Jt.extend({type:De("MESSAGES_SNAPSHOT"),messages:No($1)}),wD=Jt.extend({type:De("ACTIVITY_SNAPSHOT"),messageId:pe(),activityType:pe(),content:B1(or()),replace:Mm().optional().default(!0)}),_D=Jt.extend({type:De("ACTIVITY_DELTA"),messageId:pe(),activityType:pe(),patch:No(or())}),TD=Jt.extend({type:De("RAW"),event:or(),source:pe().optional()}),CD=Jt.extend({type:De("CUSTOM"),name:pe(),value:or()}),AD=Jt.extend({type:De("RUN_STARTED"),threadId:pe(),runId:pe(),parentRunId:pe().optional(),input:oD.optional()}),kD=Jt.extend({type:De("RUN_FINISHED"),threadId:pe(),runId:pe(),result:or().optional()}),OD=Jt.extend({type:De("RUN_ERROR"),message:pe(),code:pe().optional()}),RD=Jt.extend({type:De("STEP_STARTED"),stepName:pe()}),ND=Jt.extend({type:De("STEP_FINISHED"),stepName:pe()}),V1=Pf("type",[sD,H1,lD,uD,vD,bD,cD,fD,dD,pD,hD,mD,yD,gD,SD,xD,ED,wD,_D,TD,CD,AD,kD,OD,RD,ND]);function gn(e){return typeof e=="function"}function ID(e){return gn(e?.lift)}function Ii(e){return function(t){if(ID(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var Bm=function(e,t){return Bm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},Bm(e,t)};function Ts(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function MD(e,t,n,r){function a(s){return s instanceof n?s:new n(function(u){u(s)})}return new(n||(n=Promise))(function(s,u){function f(m){try{p(r.next(m))}catch(y){u(y)}}function d(m){try{p(r.throw(m))}catch(y){u(y)}}function p(m){m.done?s(m.value):a(m.value).then(f,d)}p((r=r.apply(e,t||[])).next())})}function F1(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,a,s,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=f(0),u.throw=f(1),u.return=f(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(p){return function(m){return d([p,m])}}function d(p){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,p[0]&&(n=0)),n;)try{if(r=1,a&&(s=p[0]&2?a.return:p[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,p[1])).done)return s;switch(a=0,s&&(p=[p[0]&2,s.value]),p[0]){case 0:case 1:s=p;break;case 4:return n.label++,{value:p[1],done:!1};case 5:n.label++,a=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(p[0]===6||p[0]===2)){n=0;continue}if(p[0]===3&&(!s||p[1]>s[0]&&p[1]<s[3])){n.label=p[1];break}if(p[0]===6&&n.label<s[1]){n.label=s[1],s=p;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(p);break}s[2]&&n.ops.pop(),n.trys.pop();continue}p=t.call(e,n)}catch(m){p=[6,m],a=0}finally{r=s=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function Cs(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zm(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),a,s=[],u;try{for(;(t===void 0||t-- >0)&&!(a=r.next()).done;)s.push(a.value)}catch(f){u={error:f}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return s}function Lm(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function As(e){return this instanceof As?(this.v=e,this):new As(e)}function DD(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),a,s=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),f("next"),f("throw"),f("return",u),a[Symbol.asyncIterator]=function(){return this},a;function u(v){return function(E){return Promise.resolve(E).then(v,y)}}function f(v,E){r[v]&&(a[v]=function(S){return new Promise(function(w,_){s.push([v,S,w,_])>1||d(v,S)})},E&&(a[v]=E(a[v])))}function d(v,E){try{p(r[v](E))}catch(S){b(s[0][3],S)}}function p(v){v.value instanceof As?Promise.resolve(v.value.v).then(m,y):b(s[0][2],v)}function m(v){d("next",v)}function y(v){d("throw",v)}function b(v,E){v(E),s.shift(),s.length&&d(s[0][0],s[0][1])}}function BD(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Cs=="function"?Cs(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(u){return new Promise(function(f,d){u=e[s](u),a(f,d,u.done,u.value)})}}function a(s,u,f,d){Promise.resolve(d).then(function(p){s({value:p,done:f})},u)}}typeof SuppressedError=="function"&&SuppressedError;var q1=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function G1(e){return gn(e?.then)}function Pm(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var $m=Pm(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
147
+ `+n.map(function(r,a){return a+1+") "+r.toString()}).join(`
148
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Um(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Uf=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,a,s;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var f=Cs(u),d=f.next();!d.done;d=f.next()){var p=d.value;p.remove(this)}}catch(S){t={error:S}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}else u.remove(this);var m=this.initialTeardown;if(gn(m))try{m()}catch(S){s=S instanceof $m?S.errors:[S]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var b=Cs(y),v=b.next();!v.done;v=b.next()){var E=v.value;try{Z1(E)}catch(S){s=s??[],S instanceof $m?s=Lm(Lm([],zm(s)),zm(S.errors)):s.push(S)}}}catch(S){r={error:S}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(r)throw r.error}}}if(s)throw new $m(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Z1(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Um(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Um(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Y1=Uf.EMPTY;function X1(e){return e instanceof Uf||e&&"closed"in e&&gn(e.remove)&&gn(e.add)&&gn(e.unsubscribe)}function Z1(e){gn(e)?e():e.unsubscribe()}var zD={Promise:void 0},LD={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Lm([e,t],zm(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function K1(e){LD.setTimeout(function(){throw e})}function jm(){}function jf(e){e()}var Hm=(function(e){Ts(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,X1(n)&&n.add(r)):r.destination=UD,r}return t.create=function(n,r,a){return new Vm(n,r,a)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Uf),PD=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Hf(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Hf(r)}else Hf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Hf(n)}},e})(),Vm=(function(e){Ts(t,e);function t(n,r,a){var s=e.call(this)||this,u;return gn(n)||!n?u={next:n??void 0,error:r??void 0,complete:a??void 0}:u=n,s.destination=new PD(u),s}return t})(Hm);function Hf(e){K1(e)}function $D(e){throw e}var UD={closed:!0,next:jm,error:$D,complete:jm},Fm=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function qm(e){return e}function W1(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Q1(e)}function Q1(e){return e.length===0?qm:e.length===1?e[0]:function(n){return e.reduce(function(r,a){return a(r)},n)}}var ar=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var a=this,s=HD(t)?t:new Vm(t,n,r);return jf(function(){var u=a,f=u.operator,d=u.source;s.add(f?f.call(s,d):d?a._subscribe(s):a._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=J1(n),new n(function(a,s){var u=new Vm({next:function(f){try{t(f)}catch(d){s(d),u.unsubscribe()}},error:s,complete:a});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Fm]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Q1(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=J1(t),new t(function(r,a){var s;n.subscribe(function(u){return s=u},function(u){return a(u)},function(){return r(s)})})},e.create=function(t){return new e(t)},e})();function J1(e){var t;return(t=e??zD.Promise)!==null&&t!==void 0?t:Promise}function jD(e){return e&&gn(e.next)&&gn(e.error)&&gn(e.complete)}function HD(e){return e&&e instanceof Hm||jD(e)&&X1(e)}function ex(e){return gn(e[Fm])}function tx(e){return Symbol.asyncIterator&&gn(e?.[Symbol.asyncIterator])}function nx(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function VD(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var rx=VD();function ix(e){return gn(e?.[rx])}function ox(e){return DD(this,arguments,function(){var n,r,a,s;return F1(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,As(n.read())];case 3:return r=u.sent(),a=r.value,s=r.done,s?[4,As(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,As(a)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function ax(e){return gn(e?.getReader)}function Qi(e){if(e instanceof ar)return e;if(e!=null){if(ex(e))return FD(e);if(q1(e))return qD(e);if(G1(e))return GD(e);if(tx(e))return sx(e);if(ix(e))return YD(e);if(ax(e))return XD(e)}throw nx(e)}function FD(e){return new ar(function(t){var n=e[Fm]();if(gn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function qD(e){return new ar(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function GD(e){return new ar(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,K1)})}function YD(e){return new ar(function(t){var n,r;try{for(var a=Cs(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(t.next(u),t.closed)return}}catch(f){n={error:f}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}t.complete()})}function sx(e){return new ar(function(t){ZD(e,t).catch(function(n){return t.error(n)})})}function XD(e){return sx(ox(e))}function ZD(e,t){var n,r,a,s;return MD(this,void 0,void 0,function(){var u,f;return F1(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),n=BD(e),d.label=1;case 1:return[4,n.next()];case 2:if(r=d.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=d.sent(),a={error:f},[3,11];case 6:return d.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Mi(e,t,n,r,a){return new KD(e,t,n,r,a)}var KD=(function(e){Ts(t,e);function t(n,r,a,s,u,f){var d=e.call(this,n)||this;return d.onFinalize=u,d.shouldUnsubscribe=f,d._next=r?function(p){try{r(p)}catch(m){n.error(m)}}:e.prototype._next,d._error=s?function(p){try{s(p)}catch(m){n.error(m)}finally{this.unsubscribe()}}:e.prototype._error,d._complete=a?function(){try{a()}catch(p){n.error(p)}finally{this.unsubscribe()}}:e.prototype._complete,d}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Hm),lx={now:function(){return(lx.delegate||Date).now()},delegate:void 0};function WD(e){return e&&gn(e.schedule)}function QD(e){return e[e.length-1]}function JD(e){return WD(QD(e))?e.pop():void 0}function _a(e,t,n,r,a){r===void 0&&(r=0),a===void 0&&(a=!1);var s=t.schedule(function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!a)return s}function fu(e){return Ii(function(t,n){var r=null,a=!1,s;r=t.subscribe(Mi(n,void 0,void 0,function(u){s=Qi(e(u,fu(e)(t))),r?(r.unsubscribe(),r=null,s.subscribe(n)):a=!0})),a&&(r.unsubscribe(),r=null,s.subscribe(n))})}function ux(e,t){return t===void 0&&(t=0),Ii(function(n,r){n.subscribe(Mi(r,function(a){return _a(r,e,function(){return r.next(a)},t)},function(){return _a(r,e,function(){return r.complete()},t)},function(a){return _a(r,e,function(){return r.error(a)},t)}))})}function cx(e,t){return t===void 0&&(t=0),Ii(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function e6(e,t){return Qi(e).pipe(cx(t),ux(t))}function t6(e,t){return Qi(e).pipe(cx(t),ux(t))}function n6(e,t){return new ar(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function r6(e,t){return new ar(function(n){var r;return _a(n,t,function(){r=e[rx](),_a(n,t,function(){var a,s,u;try{a=r.next(),s=a.value,u=a.done}catch(f){n.error(f);return}u?n.complete():n.next(s)},0,!0)}),function(){return gn(r?.return)&&r.return()}})}function fx(e,t){if(!e)throw new Error("Iterable cannot be null");return new ar(function(n){_a(n,t,function(){var r=e[Symbol.asyncIterator]();_a(n,t,function(){r.next().then(function(a){a.done?n.complete():n.next(a.value)})},0,!0)})})}function i6(e,t){return fx(ox(e),t)}function o6(e,t){if(e!=null){if(ex(e))return e6(e,t);if(q1(e))return n6(e,t);if(G1(e))return t6(e,t);if(tx(e))return fx(e,t);if(ix(e))return r6(e,t);if(ax(e))return i6(e,t)}throw nx(e)}function du(e,t){return t?o6(e,t):Qi(e)}function Gm(e,t){return Ii(function(n,r){var a=0;n.subscribe(Mi(r,function(s){r.next(e.call(t,s,a++))}))})}function a6(e,t,n,r,a,s,u,f){var d=[],p=0,m=0,y=!1,b=function(){y&&!d.length&&!p&&t.complete()},v=function(S){return p<r?E(S):d.push(S)},E=function(S){p++;var w=!1;Qi(n(S,m++)).subscribe(Mi(t,function(_){t.next(_)},function(){w=!0},void 0,function(){if(w)try{p--;for(var _=function(){var O=d.shift();u||E(O)};d.length&&p<r;)_();b()}catch(O){t.error(O)}}))};return e.subscribe(Mi(t,v,function(){y=!0,b()})),function(){}}function Io(e,t,n){return n===void 0&&(n=1/0),gn(t)?Io(function(r,a){return Gm(function(s,u){return t(r,s,a,u)})(Qi(e(r,a)))},n):(typeof t=="number"&&(n=t),Ii(function(r,a){return a6(r,a,e,n)}))}function s6(e){return e===void 0&&(e=1/0),Io(qm,e)}function dx(e,t){return gn(t)?Io(e,t,1):Io(e,1)}var l6=Pm(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ta=(function(e){Ts(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new px(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new l6},t.prototype.next=function(n){var r=this;jf(function(){var a,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=Cs(r.currentObservers),f=u.next();!f.done;f=u.next()){var d=f.value;d.next(n)}}catch(p){a={error:p}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}}})},t.prototype.error=function(n){var r=this;jf(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var a=r.observers;a.length;)a.shift().error(n)}})},t.prototype.complete=function(){var n=this;jf(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,a=this,s=a.hasError,u=a.isStopped,f=a.observers;return s||u?Y1:(this.currentObservers=null,f.push(n),new Uf(function(){r.currentObservers=null,Um(f,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,a=r.hasError,s=r.thrownError,u=r.isStopped;a?n.error(s):u&&n.complete()},t.prototype.asObservable=function(){var n=new ar;return n.source=this,n},t.create=function(n,r){return new px(n,r)},t})(ar),px=(function(e){Ts(t,e);function t(n,r){var a=e.call(this)||this;return a.destination=n,a.source=r,a}return t.prototype.next=function(n){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.next)===null||a===void 0||a.call(r,n)},t.prototype.error=function(n){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.error)===null||a===void 0||a.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,a;return(a=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&a!==void 0?a:Y1},t})(Ta);function u6(e){return Ii(function(t,n){var r=!1;t.subscribe(Mi(n,function(a){r=!0,n.next(a)},function(){r||n.next(e),n.complete()}))})}var hx=new ar(function(e){return e.complete()});function xn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=JD(e);return du(e,n)}function an(e,t){var n=gn(e)?e:function(){return e},r=function(a){return a.error(n())};return new ar(r)}var c6=Pm(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Ym(e){return Ii(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}var mx=(function(e){Ts(t,e);function t(n,r,a){n===void 0&&(n=1/0),r===void 0&&(r=1/0),a===void 0&&(a=lx);var s=e.call(this)||this;return s._bufferSize=n,s._windowTime=r,s._timestampProvider=a,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=r===1/0,s._bufferSize=Math.max(1,n),s._windowTime=Math.max(1,r),s}return t.prototype.next=function(n){var r=this,a=r.isStopped,s=r._buffer,u=r._infiniteTimeWindow,f=r._timestampProvider,d=r._windowTime;a||(s.push(n),!u&&s.push(f.now()+d)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),a=this,s=a._infiniteTimeWindow,u=a._buffer,f=u.slice(),d=0;d<f.length&&!n.closed;d+=s?1:2)n.next(f[d]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,a=n._timestampProvider,s=n._buffer,u=n._infiniteTimeWindow,f=(u?1:2)*r;if(r<1/0&&f<s.length&&s.splice(0,s.length-f),!u){for(var d=a.now(),p=0,m=1;m<s.length&&s[m]<=d;m+=2)p=m;p&&s.splice(0,p+1)}},t})(Ta);function gx(e,t){return Ii(function(n,r){var a=null,s=0,u=!1,f=function(){return u&&!a&&r.complete()};n.subscribe(Mi(r,function(d){a?.unsubscribe();var p=0,m=s++;Qi(e(d,m)).subscribe(a=Mi(r,function(y){return r.next(t?t(d,y,m,p++):y)},function(){a=null,f()}))},function(){u=!0,f()}))})}function yx(e){return Ii(function(t,n){Qi(e).subscribe(Mi(n,function(){return n.complete()},jm)),!n.closed&&t.subscribe(n)})}function f6(e,t,n){var r=gn(e)||t||n?{next:e,error:t,complete:n}:e;return r?Ii(function(a,s){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var f=!0;a.subscribe(Mi(s,function(d){var p;(p=r.next)===null||p===void 0||p.call(r,d),s.next(d)},function(){var d;f=!1,(d=r.complete)===null||d===void 0||d.call(r),s.complete()},function(d){var p;f=!1,(p=r.error)===null||p===void 0||p.call(r,d),s.error(d)},function(){var d,p;f&&((d=r.unsubscribe)===null||d===void 0||d.call(r)),(p=r.finalize)===null||p===void 0||p.call(r)}))}):qm}function vx(e,t){return new Promise(function(n,r){var a=!1,s;e.subscribe({next:function(u){s=u,a=!0},error:r,complete:function(){a?n(s):r(new c6)}})})}function bx(e){return new ar(function(t){Qi(e()).subscribe(t)})}const Vn=[];for(let e=0;e<256;++e)Vn.push((e+256).toString(16).slice(1));function d6(e,t=0){return(Vn[e[t+0]]+Vn[e[t+1]]+Vn[e[t+2]]+Vn[e[t+3]]+"-"+Vn[e[t+4]]+Vn[e[t+5]]+"-"+Vn[e[t+6]]+Vn[e[t+7]]+"-"+Vn[e[t+8]]+Vn[e[t+9]]+"-"+Vn[e[t+10]]+Vn[e[t+11]]+Vn[e[t+12]]+Vn[e[t+13]]+Vn[e[t+14]]+Vn[e[t+15]]).toLowerCase()}let Xm;const p6=new Uint8Array(16);function h6(){if(!Xm){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Xm=crypto.getRandomValues.bind(crypto)}return Xm(p6)}const Sx={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pu(e,t,n){if(Sx.randomUUID&&!e)return Sx.randomUUID();e=e||{};const r=e.random??e.rng?.()??h6();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,d6(r)}var m6=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)a.hasOwnProperty(s)&&(r[s]=a[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),g6=Object.prototype.hasOwnProperty;function Zm(e,t){return g6.call(e,t)}function Km(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var a in e)Zm(e,a)&&r.push(a);return r}function Ar(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Wm(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function Ca(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function xx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Qm(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(Qm(e[t]))return!0}else if(typeof e=="object"){for(var r=Km(e),a=r.length,s=0;s<a;s++)if(Qm(e[r[s]]))return!0}}return!1}function Ex(e,t){var n=[e];for(var r in t){var a=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof a<"u"&&n.push(r+": "+a)}return n.join(`
149
+ `)}var wx=(function(e){m6(t,e);function t(n,r,a,s,u){var f=this.constructor,d=e.call(this,Ex(n,{name:r,index:a,operation:s,tree:u}))||this;return d.name=r,d.index=a,d.operation=s,d.tree=u,Object.setPrototypeOf(d,f.prototype),d.message=Ex(n,{name:r,index:a,operation:s,tree:u}),d}return t})(Error),yn=wx,y6=Ar,ks={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=Vf(n,this.path);r&&(r=Ar(r));var a=Aa(n,{op:"remove",path:this.from}).removed;return Aa(n,{op:"add",path:this.path,value:a}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=Vf(n,this.from);return Aa(n,{op:"add",path:this.path,value:Ar(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:hu(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},v6={add:function(e,t,n){return Wm(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:ks.move,copy:ks.copy,test:ks.test,_get:ks._get};function Vf(e,t){if(t=="")return e;var n={op:"_get",path:t};return Aa(e,n),n.value}function Aa(e,t,n,r,a,s){if(n===void 0&&(n=!1),r===void 0&&(r=!0),a===void 0&&(a=!0),s===void 0&&(s=0),n&&(typeof n=="function"?n(t,0,e,t.path):Ff(t,0)),t.path===""){var u={newDocument:e};if(t.op==="add")return u.newDocument=t.value,u;if(t.op==="replace")return u.newDocument=t.value,u.removed=e,u;if(t.op==="move"||t.op==="copy")return u.newDocument=Vf(e,t.from),t.op==="move"&&(u.removed=e),u;if(t.op==="test"){if(u.test=hu(e,t.value),u.test===!1)throw new yn("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u.newDocument=e,u}else{if(t.op==="remove")return u.removed=e,u.newDocument=null,u;if(t.op==="_get")return t.value=e,u;if(n)throw new yn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e);return u}}else{r||(e=Ar(e));var f=t.path||"",d=f.split("/"),p=e,m=1,y=d.length,b=void 0,v=void 0,E=void 0;for(typeof n=="function"?E=n:E=Ff;;){if(v=d[m],v&&v.indexOf("~")!=-1&&(v=xx(v)),a&&(v=="__proto__"||v=="prototype"&&m>0&&d[m-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&b===void 0&&(p[v]===void 0?b=d.slice(0,m).join("/"):m==y-1&&(b=t.path),b!==void 0&&E(t,0,e,b)),m++,Array.isArray(p)){if(v==="-")v=p.length;else{if(n&&!Wm(v))throw new yn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,t,e);Wm(v)&&(v=~~v)}if(m>=y){if(n&&t.op==="add"&&v>p.length)throw new yn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);var u=v6[t.op].call(t,p,v,e);if(u.test===!1)throw new yn("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u}}else if(m>=y){var u=ks[t.op].call(t,p,v,e);if(u.test===!1)throw new yn("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u}if(p=p[v],n&&m<y&&(!p||typeof p!="object"))throw new yn("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,t,e)}}}function Os(e,t,n,r,a){if(r===void 0&&(r=!0),a===void 0&&(a=!0),n&&!Array.isArray(t))throw new yn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Ar(e));for(var s=new Array(t.length),u=0,f=t.length;u<f;u++)s[u]=Aa(e,t[u],n,!0,a,u),e=s[u].newDocument;return s.newDocument=e,s}function b6(e,t,n){var r=Aa(e,t);if(r.test===!1)throw new yn("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function Ff(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new yn("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(ks[e.op]){if(typeof e.path!="string")throw new yn("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new yn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new yn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new yn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Qm(e.value))throw new yn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var a=e.path.split("/").length,s=r.split("/").length;if(a!==s+1&&a!==s)throw new yn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new yn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var u={op:"_get",path:e.from,value:void 0},f=_x([u],n);if(f&&f.name==="OPERATION_PATH_UNRESOLVABLE")throw new yn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new yn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function _x(e,t,n){try{if(!Array.isArray(e))throw new yn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Os(Ar(t),Ar(e),n||!0);else{n=n||Ff;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(a){if(a instanceof yn)return a;throw a}}function hu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),a,s,u;if(n&&r){if(s=e.length,s!=t.length)return!1;for(a=s;a--!==0;)if(!hu(e[a],t[a]))return!1;return!0}if(n!=r)return!1;var f=Object.keys(e);if(s=f.length,s!==Object.keys(t).length)return!1;for(a=s;a--!==0;)if(!t.hasOwnProperty(f[a]))return!1;for(a=s;a--!==0;)if(u=f[a],!hu(e[u],t[u]))return!1;return!0}return e!==e&&t!==t}const S6=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:yn,_areEquals:hu,applyOperation:Aa,applyPatch:Os,applyReducer:b6,deepClone:y6,getValueByPointer:Vf,validate:_x,validator:Ff},Symbol.toStringTag,{value:"Module"}));var Jm=new WeakMap,x6=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),E6=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function w6(e){return Jm.get(e)}function _6(e,t){return e.observers.get(t)}function T6(e,t){e.observers.delete(t.callback)}function C6(e,t){t.unobserve()}function A6(e,t){var n=[],r,a=w6(e);if(!a)a=new x6(e),Jm.set(e,a);else{var s=_6(a,t);r=s&&s.observer}if(r)return r;if(r={},a.value=Ar(e),t){r.callback=t,r.next=null;var u=function(){eg(r)},f=function(){clearTimeout(r.next),r.next=setTimeout(u)};typeof window<"u"&&(window.addEventListener("mouseup",f),window.addEventListener("keyup",f),window.addEventListener("mousedown",f),window.addEventListener("keydown",f),window.addEventListener("change",f))}return r.patches=n,r.object=e,r.unobserve=function(){eg(r),clearTimeout(r.next),T6(a,r),typeof window<"u"&&(window.removeEventListener("mouseup",f),window.removeEventListener("keyup",f),window.removeEventListener("mousedown",f),window.removeEventListener("keydown",f),window.removeEventListener("change",f))},a.observers.set(t,new E6(t,r)),r}function eg(e,t){t===void 0&&(t=!1);var n=Jm.get(e.object);tg(n.value,e.object,e.patches,"",t),e.patches.length&&Os(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function tg(e,t,n,r,a){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var s=Km(t),u=Km(e),f=!1,d=u.length-1;d>=0;d--){var p=u[d],m=e[p];if(Zm(t,p)&&!(t[p]===void 0&&m!==void 0&&Array.isArray(t)===!1)){var y=t[p];typeof m=="object"&&m!=null&&typeof y=="object"&&y!=null&&Array.isArray(m)===Array.isArray(y)?tg(m,y,n,r+"/"+Ca(p),a):m!==y&&(a&&n.push({op:"test",path:r+"/"+Ca(p),value:Ar(m)}),n.push({op:"replace",path:r+"/"+Ca(p),value:Ar(y)}))}else Array.isArray(e)===Array.isArray(t)?(a&&n.push({op:"test",path:r+"/"+Ca(p),value:Ar(m)}),n.push({op:"remove",path:r+"/"+Ca(p)}),f=!0):(a&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!f&&s.length==u.length))for(var d=0;d<s.length;d++){var p=s[d];!Zm(e,p)&&t[p]!==void 0&&n.push({op:"add",path:r+"/"+Ca(p),value:Ar(t[p])})}}}function k6(e,t,n){n===void 0&&(n=!1);var r=[];return tg(e,t,r,"",n),r}Object.assign({},S6,Object.freeze(Object.defineProperty({__proto__:null,compare:k6,generate:eg,observe:A6,unobserve:C6},Symbol.toStringTag,{value:"Module"})),{JsonPatchError:wx,deepClone:Ar,escapePathComponent:Ca,unescapePathComponent:xx});function Tx(e){return` \r
150
+ `.indexOf(e)>=0}function Cx(e){for(var t=["topLevel"],n=0,r,a,s,u=function(O){return t.push(O)},f=function(O){return t[t.length-1]=O},d=function(O){r==null&&(r=n,a=t.length,s=O)},p=function(O){O===s&&(r=void 0,a=void 0,s=void 0)},m=function(){return t.pop()},y=function(){return n--},b=function(O){if("0"<=O&&O<="9"){u("number");return}switch(O){case'"':u("string");return;case"-":u("numberNeedsDigit");return;case"t":u("true");return;case"f":u("false");return;case"n":u("null");return;case"[":u("arrayNeedsValue");return;case"{":u("objectNeedsKey");return}},v=e.length;n<v;n++){var E=e[n];switch(t[t.length-1]){case"topLevel":b(E);break;case"string":switch(E){case'"':m();break;case"\\":d("stringEscape"),u("stringEscaped");break}break;case"stringEscaped":E==="u"?u("stringUnicode"):(p("stringEscape"),m());break;case"stringUnicode":n-e.lastIndexOf("u",n)===4&&(p("stringEscape"),m());break;case"number":E==="."?f("numberNeedsDigit"):E==="e"||E==="E"?f("numberNeedsExponent"):(E<"0"||E>"9")&&(y(),m());break;case"numberNeedsDigit":f("number");break;case"numberNeedsExponent":f(E==="+"||E==="-"?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(E<"a"||E>"z")&&(y(),m());break;case"arrayNeedsValue":E==="]"?m():Tx(E)||(p("collectionItem"),f("arrayNeedsComma"),b(E));break;case"arrayNeedsComma":E==="]"?m():E===","&&(d("collectionItem"),f("arrayNeedsValue"));break;case"objectNeedsKey":E==="}"?m():E==='"'&&(d("collectionItem"),f("objectNeedsColon"),u("string"));break;case"objectNeedsColon":E===":"&&f("objectNeedsValue");break;case"objectNeedsValue":Tx(E)||(p("collectionItem"),f("objectNeedsComma"),b(E));break;case"objectNeedsComma":E==="}"?m():E===","&&(d("collectionItem"),f("objectNeedsKey"));break}}a!=null&&(t.length=a);for(var S=[r!=null?e.slice(0,r):e],w=function(O){return S.push(O.slice(e.length-e.lastIndexOf(O[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case"string":S.push('"');break;case"numberNeedsDigit":case"numberNeedsExponent":S.push("0");break;case"true":w("true");break;case"false":w("false");break;case"null":w("null");break;case"arrayNeedsValue":case"arrayNeedsComma":S.push("]");break;case"objectNeedsKey":case"objectNeedsColon":case"objectNeedsValue":case"objectNeedsComma":S.push("}");break}return S.join("")}function O6(){let e=0,t=0;for(let r=0;r<28;r+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<r,(a&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let a=this.buf[this.pos++];if(t|=(a&127)<<r,(a&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function ng(e,t,n){for(let s=0;s<28;s=s+7){const u=e>>>s,f=!(!(u>>>7)&&t==0),d=(f?u|128:u)&255;if(n.push(d),!f)return}const r=e>>>28&15|(t&7)<<4,a=t>>3!=0;if(n.push((a?r|128:r)&255),!!a){for(let s=3;s<31;s=s+7){const u=t>>>s,f=!!(u>>>7),d=(f?u|128:u)&255;if(n.push(d),!f)return}n.push(t>>>31&1)}}const qf=4294967296;function Ax(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let r=0,a=0;function s(u,f){const d=Number(e.slice(u,f));a*=n,r=r*n+d,r>=qf&&(a=a+(r/qf|0),r=r%qf)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?Ox(r,a):rg(r,a)}function R6(e,t){let n=rg(e,t);const r=n.hi&2147483648;r&&(n=Ox(n.lo,n.hi));const a=kx(n.lo,n.hi);return r?"-"+a:a}function kx(e,t){if({lo:e,hi:t}=N6(e,t),t<=2097151)return String(qf*t+e);const n=e&16777215,r=(e>>>24|t<<8)&16777215,a=t>>16&65535;let s=n+r*6777216+a*6710656,u=r+a*8147497,f=a*2;const d=1e7;return s>=d&&(u+=Math.floor(s/d),s%=d),u>=d&&(f+=Math.floor(u/d),u%=d),f.toString()+Rx(u)+Rx(s)}function N6(e,t){return{lo:e>>>0,hi:t>>>0}}function rg(e,t){return{lo:e|0,hi:t|0}}function Ox(e,t){return t=~t,e?e=~e+1:t+=1,rg(e,t)}const Rx=e=>{const t=String(e);return"0000000".slice(t.length)+t};function Nx(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function I6(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}const Di=M6();function M6(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),s=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(u){const f=typeof u=="bigint"?u:BigInt(u);if(f>r||f<n)throw new Error(`invalid int64: ${u}`);return f},uParse(u){const f=typeof u=="bigint"?u:BigInt(u);if(f>s||f<a)throw new Error(`invalid uint64: ${u}`);return f},enc(u){return e.setBigInt64(0,this.parse(u),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(u){return e.setBigInt64(0,this.uParse(u),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(u,f){return e.setInt32(0,u,!0),e.setInt32(4,f,!0),e.getBigInt64(0,!0)},uDec(u,f){return e.setInt32(0,u,!0),e.setInt32(4,f,!0),e.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(n){return typeof n!="string"&&(n=n.toString()),Ix(n),n},uParse(n){return typeof n!="string"&&(n=n.toString()),Mx(n),n},enc(n){return typeof n!="string"&&(n=n.toString()),Ix(n),Ax(n)},uEnc(n){return typeof n!="string"&&(n=n.toString()),Mx(n),Ax(n)},dec(n,r){return R6(n,r)},uDec(n,r){return kx(n,r)}}}function Ix(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function Mx(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}const ig=Symbol.for("@bufbuild/protobuf/text-encoding");function Dx(){if(globalThis[ig]==null){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[ig]={encodeUtf8(n){return e.encode(n)},decodeUtf8(n){return t.decode(n)},checkUtf8(n){try{return encodeURIComponent(n),!0}catch{return!1}}}}return globalThis[ig]}var Mo;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(Mo||(Mo={}));const D6=34028234663852886e22,B6=-34028234663852886e22,z6=4294967295,L6=2147483647,P6=-2147483648;class Vt{constructor(t=Dx().encodeUtf8){this.encodeUtf8=t,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let t=0;for(let a=0;a<this.chunks.length;a++)t+=this.chunks[a].length;let n=new Uint8Array(t),r=0;for(let a=0;a<this.chunks.length;a++)n.set(this.chunks[a],r),r+=this.chunks[a].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(Bx(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return og(t),Nx(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.encodeUtf8(t);return this.uint32(n.byteLength),this.raw(n)}float(t){$6(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){Bx(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){og(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return og(t),t=(t<<1^t>>31)>>>0,Nx(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),a=Di.enc(t);return r.setInt32(0,a.lo,!0),r.setInt32(4,a.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),a=Di.uEnc(t);return r.setInt32(0,a.lo,!0),r.setInt32(4,a.hi,!0),this.raw(n)}int64(t){let n=Di.enc(t);return ng(n.lo,n.hi,this.buf),this}sint64(t){const n=Di.enc(t),r=n.hi>>31,a=n.lo<<1^r,s=(n.hi<<1|n.lo>>>31)^r;return ng(a,s,this.buf),this}uint64(t){const n=Di.uEnc(t);return ng(n.lo,n.hi,this.buf),this}}class Be{constructor(t,n=Dx().decodeUtf8){this.decodeUtf8=n,this.varint64=O6,this.uint32=I6,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t,n){let r=this.pos;switch(t){case Mo.Varint:for(;this.buf[this.pos++]&128;);break;case Mo.Bit64:this.pos+=4;case Mo.Bit32:this.pos+=4;break;case Mo.LengthDelimited:let a=this.uint32();this.pos+=a;break;case Mo.StartGroup:for(;;){const[s,u]=this.tag();if(u===Mo.EndGroup){if(n!==void 0&&s!==n)throw new Error("invalid end group tag");break}this.skip(u,s)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return Di.dec(...this.varint64())}uint64(){return Di.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Di.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Di.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Di.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.decodeUtf8(this.bytes())}}function og(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>L6||e<P6)throw new Error("invalid int32: "+e)}function Bx(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>z6||e<0)throw new Error("invalid uint32: "+e)}function $6(e){if(typeof e=="string"){const t=e;if(e=Number(e),Number.isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>D6||e<B6))throw new Error("invalid float32: "+e)}function ag(){return{fields:{}}}var mu={encode(e,t=new Vt){return Object.entries(e.fields).forEach(([n,r])=>{r!==void 0&&sg.encode({key:n,value:r},t.uint32(10).fork()).join()}),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=ag();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;const u=sg.decode(n,n.uint32());u.value!==void 0&&(a.fields[u.key]=u.value);continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return mu.fromPartial(e??{})},fromPartial(e){var t;const n=ag();return n.fields=Object.entries((t=e.fields)!=null?t:{}).reduce((r,[a,s])=>(s!==void 0&&(r[a]=s),r),{}),n},wrap(e){const t=ag();if(e!==void 0)for(const n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){const t={};if(e.fields)for(const n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function zx(){return{key:"",value:void 0}}var sg={encode(e,t=new Vt){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&vt.encode(vt.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=zx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.key=n.string();continue}case 2:{if(s!==18)break;a.value=vt.unwrap(vt.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return sg.fromPartial(e??{})},fromPartial(e){var t,n;const r=zx();return r.key=(t=e.key)!=null?t:"",r.value=(n=e.value)!=null?n:void 0,r}};function lg(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var vt={encode(e,t=new Vt){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&mu.encode(mu.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&gu.encode(gu.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=lg();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.nullValue=n.int32();continue}case 2:{if(s!==17)break;a.numberValue=n.double();continue}case 3:{if(s!==26)break;a.stringValue=n.string();continue}case 4:{if(s!==32)break;a.boolValue=n.bool();continue}case 5:{if(s!==42)break;a.structValue=mu.unwrap(mu.decode(n,n.uint32()));continue}case 6:{if(s!==50)break;a.listValue=gu.unwrap(gu.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return vt.fromPartial(e??{})},fromPartial(e){var t,n,r,a,s,u;const f=lg();return f.nullValue=(t=e.nullValue)!=null?t:void 0,f.numberValue=(n=e.numberValue)!=null?n:void 0,f.stringValue=(r=e.stringValue)!=null?r:void 0,f.boolValue=(a=e.boolValue)!=null?a:void 0,f.structValue=(s=e.structValue)!=null?s:void 0,f.listValue=(u=e.listValue)!=null?u:void 0,f},wrap(e){const t=lg();if(e===null)t.nullValue=0;else if(typeof e=="boolean")t.boolValue=e;else if(typeof e=="number")t.numberValue=e;else if(typeof e=="string")t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e=="object")t.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function ug(){return{values:[]}}var gu={encode(e,t=new Vt){for(const n of e.values)vt.encode(vt.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=ug();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.values.push(vt.unwrap(vt.decode(n,n.uint32())));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return gu.fromPartial(e??{})},fromPartial(e){var t;const n=ug();return n.values=((t=e.values)==null?void 0:t.map(r=>r))||[],n},wrap(e){const t=ug();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}},Lx=(e=>(e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.REPLACE=2]="REPLACE",e[e.MOVE=3]="MOVE",e[e.COPY=4]="COPY",e[e.TEST=5]="TEST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(Lx||{});function Px(){return{op:0,path:"",from:void 0,value:void 0}}var Gf={encode(e,t=new Vt){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==""&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&vt.encode(vt.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Px();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.op=n.int32();continue}case 2:{if(s!==18)break;a.path=n.string();continue}case 3:{if(s!==26)break;a.from=n.string();continue}case 4:{if(s!==34)break;a.value=vt.unwrap(vt.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Gf.fromPartial(e??{})},fromPartial(e){var t,n,r,a;const s=Px();return s.op=(t=e.op)!=null?t:0,s.path=(n=e.path)!=null?n:"",s.from=(r=e.from)!=null?r:void 0,s.value=(a=e.value)!=null?a:void 0,s}};function $x(){return{id:"",type:"",function:void 0}}var Yf={encode(e,t=new Vt){return e.id!==""&&t.uint32(10).string(e.id),e.type!==""&&t.uint32(18).string(e.type),e.function!==void 0&&Xf.encode(e.function,t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=$x();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.id=n.string();continue}case 2:{if(s!==18)break;a.type=n.string();continue}case 3:{if(s!==26)break;a.function=Xf.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Yf.fromPartial(e??{})},fromPartial(e){var t,n;const r=$x();return r.id=(t=e.id)!=null?t:"",r.type=(n=e.type)!=null?n:"",r.function=e.function!==void 0&&e.function!==null?Xf.fromPartial(e.function):void 0,r}};function Ux(){return{name:"",arguments:""}}var Xf={encode(e,t=new Vt){return e.name!==""&&t.uint32(10).string(e.name),e.arguments!==""&&t.uint32(18).string(e.arguments),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Ux();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.name=n.string();continue}case 2:{if(s!==18)break;a.arguments=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Xf.fromPartial(e??{})},fromPartial(e){var t,n;const r=Ux();return r.name=(t=e.name)!=null?t:"",r.arguments=(n=e.arguments)!=null?n:"",r}};function jx(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0}}var Zf={encode(e,t=new Vt){e.id!==""&&t.uint32(10).string(e.id),e.role!==""&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(const n of e.toolCalls)Yf.encode(n,t.uint32(42).fork()).join();return e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=jx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.id=n.string();continue}case 2:{if(s!==18)break;a.role=n.string();continue}case 3:{if(s!==26)break;a.content=n.string();continue}case 4:{if(s!==34)break;a.name=n.string();continue}case 5:{if(s!==42)break;a.toolCalls.push(Yf.decode(n,n.uint32()));continue}case 6:{if(s!==50)break;a.toolCallId=n.string();continue}case 7:{if(s!==58)break;a.error=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Zf.fromPartial(e??{})},fromPartial(e){var t,n,r,a,s,u,f;const d=jx();return d.id=(t=e.id)!=null?t:"",d.role=(n=e.role)!=null?n:"",d.content=(r=e.content)!=null?r:void 0,d.name=(a=e.name)!=null?a:void 0,d.toolCalls=((s=e.toolCalls)==null?void 0:s.map(p=>Yf.fromPartial(p)))||[],d.toolCallId=(u=e.toolCallId)!=null?u:void 0,d.error=(f=e.error)!=null?f:void 0,d}},Hx=(e=>(e[e.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",e[e.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",e[e.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",e[e.TOOL_CALL_START=3]="TOOL_CALL_START",e[e.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",e[e.TOOL_CALL_END=5]="TOOL_CALL_END",e[e.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",e[e.STATE_DELTA=7]="STATE_DELTA",e[e.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",e[e.RAW=9]="RAW",e[e.CUSTOM=10]="CUSTOM",e[e.RUN_STARTED=11]="RUN_STARTED",e[e.RUN_FINISHED=12]="RUN_FINISHED",e[e.RUN_ERROR=13]="RUN_ERROR",e[e.STEP_STARTED=14]="STEP_STARTED",e[e.STEP_FINISHED=15]="STEP_FINISHED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(Hx||{});function Vx(){return{type:0,timestamp:void 0,rawEvent:void 0}}var ze={encode(e,t=new Vt){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&vt.encode(vt.wrap(e.rawEvent),t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Vx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.type=n.int32();continue}case 2:{if(s!==16)break;a.timestamp=U6(n.int64());continue}case 3:{if(s!==26)break;a.rawEvent=vt.unwrap(vt.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ze.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=Vx();return a.type=(t=e.type)!=null?t:0,a.timestamp=(n=e.timestamp)!=null?n:void 0,a.rawEvent=(r=e.rawEvent)!=null?r:void 0,a}};function Fx(){return{baseEvent:void 0,messageId:"",role:void 0}}var Kf={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Fx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.role=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Kf.fromPartial(e??{})},fromPartial(e){var t,n;const r=Fx();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r.role=(n=e.role)!=null?n:void 0,r}};function qx(){return{baseEvent:void 0,messageId:"",delta:""}}var Wf={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=qx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Wf.fromPartial(e??{})},fromPartial(e){var t,n;const r=qx();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r.delta=(n=e.delta)!=null?n:"",r}};function Gx(){return{baseEvent:void 0,messageId:""}}var Qf={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Gx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Qf.fromPartial(e??{})},fromPartial(e){var t;const n=Gx();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.messageId=(t=e.messageId)!=null?t:"",n}};function Yx(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}var Jf={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.toolCallName!==""&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Yx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.toolCallName=n.string();continue}case 4:{if(s!==34)break;a.parentMessageId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Jf.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=Yx();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,a.toolCallId=(t=e.toolCallId)!=null?t:"",a.toolCallName=(n=e.toolCallName)!=null?n:"",a.parentMessageId=(r=e.parentMessageId)!=null?r:void 0,a}};function Xx(){return{baseEvent:void 0,toolCallId:"",delta:""}}var ed={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Xx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ed.fromPartial(e??{})},fromPartial(e){var t,n;const r=Xx();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.toolCallId=(t=e.toolCallId)!=null?t:"",r.delta=(n=e.delta)!=null?n:"",r}};function Zx(){return{baseEvent:void 0,toolCallId:""}}var td={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Zx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return td.fromPartial(e??{})},fromPartial(e){var t;const n=Zx();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.toolCallId=(t=e.toolCallId)!=null?t:"",n}};function Kx(){return{baseEvent:void 0,snapshot:void 0}}var nd={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&vt.encode(vt.wrap(e.snapshot),t.uint32(18).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Kx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.snapshot=vt.unwrap(vt.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return nd.fromPartial(e??{})},fromPartial(e){var t;const n=Kx();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.snapshot=(t=e.snapshot)!=null?t:void 0,n}};function Wx(){return{baseEvent:void 0,delta:[]}}var rd={encode(e,t=new Vt){e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join();for(const n of e.delta)Gf.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Wx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.delta.push(Gf.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return rd.fromPartial(e??{})},fromPartial(e){var t;const n=Wx();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.delta=((t=e.delta)==null?void 0:t.map(r=>Gf.fromPartial(r)))||[],n}};function Qx(){return{baseEvent:void 0,messages:[]}}var id={encode(e,t=new Vt){e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join();for(const n of e.messages)Zf.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Qx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messages.push(Zf.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return id.fromPartial(e??{})},fromPartial(e){var t;const n=Qx();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.messages=((t=e.messages)==null?void 0:t.map(r=>Zf.fromPartial(r)))||[],n}};function Jx(){return{baseEvent:void 0,event:void 0,source:void 0}}var od={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&vt.encode(vt.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=Jx();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.event=vt.unwrap(vt.decode(n,n.uint32()));continue}case 3:{if(s!==26)break;a.source=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return od.fromPartial(e??{})},fromPartial(e){var t,n;const r=Jx();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.event=(t=e.event)!=null?t:void 0,r.source=(n=e.source)!=null?n:void 0,r}};function eE(){return{baseEvent:void 0,name:"",value:void 0}}var ad={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==""&&t.uint32(18).string(e.name),e.value!==void 0&&vt.encode(vt.wrap(e.value),t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=eE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.name=n.string();continue}case 3:{if(s!==26)break;a.value=vt.unwrap(vt.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ad.fromPartial(e??{})},fromPartial(e){var t,n;const r=eE();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.name=(t=e.name)!=null?t:"",r.value=(n=e.value)!=null?n:void 0,r}};function tE(){return{baseEvent:void 0,threadId:"",runId:""}}var sd={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=tE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.threadId=n.string();continue}case 3:{if(s!==26)break;a.runId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return sd.fromPartial(e??{})},fromPartial(e){var t,n;const r=tE();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.threadId=(t=e.threadId)!=null?t:"",r.runId=(n=e.runId)!=null?n:"",r}};function nE(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0}}var ld={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),e.result!==void 0&&vt.encode(vt.wrap(e.result),t.uint32(34).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=nE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.threadId=n.string();continue}case 3:{if(s!==26)break;a.runId=n.string();continue}case 4:{if(s!==34)break;a.result=vt.unwrap(vt.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ld.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=nE();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,a.threadId=(t=e.threadId)!=null?t:"",a.runId=(n=e.runId)!=null?n:"",a.result=(r=e.result)!=null?r:void 0,a}};function rE(){return{baseEvent:void 0,code:void 0,message:""}}var ud={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==""&&t.uint32(26).string(e.message),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=rE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.code=n.string();continue}case 3:{if(s!==26)break;a.message=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ud.fromPartial(e??{})},fromPartial(e){var t,n;const r=rE();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,r.code=(t=e.code)!=null?t:void 0,r.message=(n=e.message)!=null?n:"",r}};function iE(){return{baseEvent:void 0,stepName:""}}var cd={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=iE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.stepName=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return cd.fromPartial(e??{})},fromPartial(e){var t;const n=iE();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.stepName=(t=e.stepName)!=null?t:"",n}};function oE(){return{baseEvent:void 0,stepName:""}}var fd={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=oE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.stepName=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return fd.fromPartial(e??{})},fromPartial(e){var t;const n=oE();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,n.stepName=(t=e.stepName)!=null?t:"",n}};function aE(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0}}var dd={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=aE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.role=n.string();continue}case 4:{if(s!==34)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return dd.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=aE();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,a.messageId=(t=e.messageId)!=null?t:void 0,a.role=(n=e.role)!=null?n:void 0,a.delta=(r=e.delta)!=null?r:void 0,a}};function sE(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}var pd={encode(e,t=new Vt){return e.baseEvent!==void 0&&ze.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=sE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=ze.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.toolCallName=n.string();continue}case 4:{if(s!==34)break;a.parentMessageId=n.string();continue}case 5:{if(s!==42)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return pd.fromPartial(e??{})},fromPartial(e){var t,n,r,a;const s=sE();return s.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?ze.fromPartial(e.baseEvent):void 0,s.toolCallId=(t=e.toolCallId)!=null?t:void 0,s.toolCallName=(n=e.toolCallName)!=null?n:void 0,s.parentMessageId=(r=e.parentMessageId)!=null?r:void 0,s.delta=(a=e.delta)!=null?a:void 0,s}};function lE(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}var uE={encode(e,t=new Vt){return e.textMessageStart!==void 0&&Kf.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&Wf.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&Qf.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&Jf.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&ed.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&td.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&nd.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&rd.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&id.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&od.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&ad.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&sd.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&ld.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&ud.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&cd.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&fd.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&dd.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&pd.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t},decode(e,t){const n=e instanceof Be?e:new Be(e),r=t===void 0?n.len:n.pos+t,a=lE();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.textMessageStart=Kf.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.textMessageContent=Wf.decode(n,n.uint32());continue}case 3:{if(s!==26)break;a.textMessageEnd=Qf.decode(n,n.uint32());continue}case 4:{if(s!==34)break;a.toolCallStart=Jf.decode(n,n.uint32());continue}case 5:{if(s!==42)break;a.toolCallArgs=ed.decode(n,n.uint32());continue}case 6:{if(s!==50)break;a.toolCallEnd=td.decode(n,n.uint32());continue}case 7:{if(s!==58)break;a.stateSnapshot=nd.decode(n,n.uint32());continue}case 8:{if(s!==66)break;a.stateDelta=rd.decode(n,n.uint32());continue}case 9:{if(s!==74)break;a.messagesSnapshot=id.decode(n,n.uint32());continue}case 10:{if(s!==82)break;a.raw=od.decode(n,n.uint32());continue}case 11:{if(s!==90)break;a.custom=ad.decode(n,n.uint32());continue}case 12:{if(s!==98)break;a.runStarted=sd.decode(n,n.uint32());continue}case 13:{if(s!==106)break;a.runFinished=ld.decode(n,n.uint32());continue}case 14:{if(s!==114)break;a.runError=ud.decode(n,n.uint32());continue}case 15:{if(s!==122)break;a.stepStarted=cd.decode(n,n.uint32());continue}case 16:{if(s!==130)break;a.stepFinished=fd.decode(n,n.uint32());continue}case 17:{if(s!==138)break;a.textMessageChunk=dd.decode(n,n.uint32());continue}case 18:{if(s!==146)break;a.toolCallChunk=pd.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return uE.fromPartial(e??{})},fromPartial(e){const t=lE();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?Kf.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?Wf.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?Qf.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?Jf.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?ed.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?td.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?nd.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?rd.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?id.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?od.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?ad.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?sd.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?ld.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?ud.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?cd.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?fd.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?dd.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?pd.fromPartial(e.toolCallChunk):void 0,t}};function U6(e){const t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}function j6(e){var t;const n=uE.decode(e),r=Object.values(n).find(a=>a!==void 0);if(!r)throw new Error("Invalid event");if(r.type=Hx[r.baseEvent.type],r.timestamp=r.baseEvent.timestamp,r.rawEvent=r.baseEvent.rawEvent,r.type===de.MESSAGES_SNAPSHOT)for(const a of r.messages){const s=a;((t=s.toolCalls)==null?void 0:t.length)===0&&(s.toolCalls=void 0)}if(r.type===de.STATE_DELTA)for(const a of r.delta)a.op=Lx[a.op].toLowerCase(),Object.keys(a).forEach(s=>{a[s]===void 0&&delete a[s]});return Object.keys(r).forEach(a=>{r[a]===void 0&&delete r[a]}),V1.parse(r)}var H6="application/vnd.ag-ui.event+proto";const V6=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,cE=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(V6);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},fE=e=>e==="*"||e==="x"||e==="X",dE=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},F6=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],q6=(e,t)=>{if(fE(e)||fE(t))return 0;const[n,r]=F6(dE(e),dE(t));return n>r?1:n<r?-1:0},pE=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=q6(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},G6=(e,t)=>{const n=cE(e),r=cE(t),a=n.pop(),s=r.pop(),u=pE(n,r);return u!==0?u:a&&s?pE(a.split("."),s.split(".")):a||s?a?-1:1:0};var Y6=Object.defineProperty,X6=Object.defineProperties,Z6=Object.getOwnPropertyDescriptors,hd=Object.getOwnPropertySymbols,hE=Object.prototype.hasOwnProperty,mE=Object.prototype.propertyIsEnumerable,gE=(e,t,n)=>t in e?Y6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wn=(e,t)=>{for(var n in t||(t={}))hE.call(t,n)&&gE(e,n,t[n]);if(hd)for(var n of hd(t))mE.call(t,n)&&gE(e,n,t[n]);return e},Do=(e,t)=>X6(e,Z6(t)),K6=(e,t)=>{var n={};for(var r in e)hE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hd)for(var r of hd(e))t.indexOf(r)<0&&mE.call(e,r)&&(n[r]=e[r]);return n},Ft=e=>{if(typeof structuredClone=="function")return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Wn({},e)}};async function ln(e,t,n,r){let a=t,s=n,u;for(let f of e)try{let d=await r(f,Ft(a),Ft(s));if(d===void 0)continue;if(d.messages!==void 0&&(a=d.messages),d.state!==void 0&&(s=d.state),u=d.stopPropagation,u===!0)break}catch(d){process.env.JEST_WORKER_ID!==void 0||console.error("Subscriber error:",d);continue}return Wn(Wn(Wn({},JSON.stringify(a)!==JSON.stringify(t)?{messages:a}:{}),JSON.stringify(s)!==JSON.stringify(n)?{state:s}:{}),u!==void 0?{stopPropagation:u}:{})}var yE=(e,t,n,r)=>{let a=Ft(n.messages),s=Ft(e.state),u={},f=p=>{p.messages!==void 0&&(a=p.messages,u.messages=p.messages),p.state!==void 0&&(s=p.state,u.state=p.state)},d=()=>{let p=Ft(u);return u={},p.messages!==void 0||p.state!==void 0?xn(p):hx};return t.pipe(dx(async p=>{var m,y,b,v;let E=await ln(r,a,s,(S,w,_)=>{var O;return(O=S.onEvent)==null?void 0:O.call(S,{event:p,agent:n,input:e,messages:w,state:_})});if(f(E),E.stopPropagation===!0)return d();switch(p.type){case de.TEXT_MESSAGE_START:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onTextMessageStartEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let{messageId:w,role:_="assistant"}=p,O={id:w,role:_,content:""};a.push(O),f({messages:a})}return d()}case de.TEXT_MESSAGE_CONTENT:{let{messageId:S,delta:w}=p,_=a.find(T=>T.id===S);if(!_)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${S}'`),d();let O=await ln(r,a,s,(T,C,N)=>{var k;return(k=T.onTextMessageContentEvent)==null?void 0:k.call(T,{event:p,messages:C,state:N,agent:n,input:e,textMessageBuffer:typeof _.content=="string"?_.content:""})});if(f(O),O.stopPropagation!==!0){let T=typeof _.content=="string"?_.content:"";_.content=`${T}${w}`,f({messages:a})}return d()}case de.TEXT_MESSAGE_END:{let{messageId:S}=p,w=a.find(O=>O.id===S);if(!w)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${S}'`),d();let _=await ln(r,a,s,(O,T,C)=>{var N;return(N=O.onTextMessageEndEvent)==null?void 0:N.call(O,{event:p,messages:T,state:C,agent:n,input:e,textMessageBuffer:typeof w.content=="string"?w.content:""})});return f(_),await Promise.all(r.map(O=>{var T;(T=O.onNewMessage)==null||T.call(O,{message:w,messages:a,state:s,agent:n,input:e})})),d()}case de.TOOL_CALL_START:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onToolCallStartEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let{toolCallId:w,toolCallName:_,parentMessageId:O}=p,T;O&&a.length>0&&a[a.length-1].id===O?T=a[a.length-1]:(T={id:O||w,role:"assistant",toolCalls:[]},a.push(T)),T.toolCalls!=null||(T.toolCalls=[]),T.toolCalls.push({id:w,type:"function",function:{name:_,arguments:""}}),f({messages:a})}return d()}case de.TOOL_CALL_ARGS:{let{toolCallId:S,delta:w}=p,_=a.find(C=>{var N;return(N=C.toolCalls)==null?void 0:N.some(k=>k.id===S)});if(!_)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${S}'`),d();let O=_.toolCalls.find(C=>C.id===S);if(!O)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${S}'`),d();let T=await ln(r,a,s,(C,N,k)=>{var z;let H=O.function.arguments,j=O.function.name,G={};try{G=Cx(H)}catch{}return(z=C.onToolCallArgsEvent)==null?void 0:z.call(C,{event:p,messages:N,state:k,agent:n,input:e,toolCallBuffer:H,toolCallName:j,partialToolCallArgs:G})});return f(T),T.stopPropagation!==!0&&(O.function.arguments+=w,f({messages:a})),d()}case de.TOOL_CALL_END:{let{toolCallId:S}=p,w=a.find(T=>{var C;return(C=T.toolCalls)==null?void 0:C.some(N=>N.id===S)});if(!w)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${S}'`),d();let _=w.toolCalls.find(T=>T.id===S);if(!_)return console.warn(`TOOL_CALL_END: No tool call found with ID '${S}'`),d();let O=await ln(r,a,s,(T,C,N)=>{var k;let z=_.function.arguments,H=_.function.name,j={};try{j=JSON.parse(z)}catch{}return(k=T.onToolCallEndEvent)==null?void 0:k.call(T,{event:p,messages:C,state:N,agent:n,input:e,toolCallName:H,toolCallArgs:j})});return f(O),await Promise.all(r.map(T=>{var C;(C=T.onNewToolCall)==null||C.call(T,{toolCall:_,messages:a,state:s,agent:n,input:e})})),d()}case de.TOOL_CALL_RESULT:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onToolCallResultEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let{messageId:w,toolCallId:_,content:O,role:T}=p,C={id:w,toolCallId:_,role:T||"tool",content:O};a.push(C),await Promise.all(r.map(N=>{var k;(k=N.onNewMessage)==null||k.call(N,{message:C,messages:a,state:s,agent:n,input:e})})),f({messages:a})}return d()}case de.STATE_SNAPSHOT:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onStateSnapshotEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let{snapshot:w}=p;s=w,f({state:s})}return d()}case de.STATE_DELTA:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onStateDeltaEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let{delta:w}=p;try{s=Os(s,w,!0,!1).newDocument,f({state:s})}catch(_){let O=_ instanceof Error?_.message:String(_);console.warn(`Failed to apply state patch:
151
+ Current state: ${JSON.stringify(s,null,2)}
152
+ Patch operations: ${JSON.stringify(w,null,2)}
153
+ Error: ${O}`)}}return d()}case de.MESSAGES_SNAPSHOT:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onMessagesSnapshotEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let{messages:w}=p;a=w,f({messages:a})}return d()}case de.ACTIVITY_SNAPSHOT:{let S=p,w=a.findIndex(N=>N.id===S.messageId),_=w>=0?a[w]:void 0,O=_?.role==="activity"?_:void 0,T=(m=S.replace)!=null?m:!0,C=await ln(r,a,s,(N,k,z)=>{var H;return(H=N.onActivitySnapshotEvent)==null?void 0:H.call(N,{event:S,messages:k,state:z,agent:n,input:e,activityMessage:O,existingMessage:_})});if(f(C),C.stopPropagation!==!0){let N={id:S.messageId,role:"activity",activityType:S.activityType,content:Ft(S.content)},k;w===-1?(a.push(N),k=N):O?T&&(a[w]=Do(Wn({},O),{activityType:S.activityType,content:Ft(S.content)})):T&&(a[w]=N,k=N),f({messages:a}),k&&await Promise.all(r.map(z=>{var H;return(H=z.onNewMessage)==null?void 0:H.call(z,{message:k,messages:a,state:s,agent:n,input:e})}))}return d()}case de.ACTIVITY_DELTA:{let S=p,w=a.findIndex(C=>C.id===S.messageId);if(w===-1)return console.warn(`ACTIVITY_DELTA: No message found with ID '${S.messageId}' to apply patch`),d();let _=a[w];if(_.role!=="activity")return console.warn(`ACTIVITY_DELTA: Message '${S.messageId}' is not an activity message`),d();let O=_,T=await ln(r,a,s,(C,N,k)=>{var z;return(z=C.onActivityDeltaEvent)==null?void 0:z.call(C,{event:S,messages:N,state:k,agent:n,input:e,activityMessage:O})});if(f(T),T.stopPropagation!==!0)try{let C=Ft((y=O.content)!=null?y:{}),N=Os(C,(b=S.patch)!=null?b:[],!0,!1).newDocument;a[w]=Do(Wn({},O),{content:Ft(N),activityType:S.activityType}),f({messages:a})}catch(C){let N=C instanceof Error?C.message:String(C);console.warn(`Failed to apply activity patch for '${S.messageId}': ${N}`)}return d()}case de.RAW:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onRawEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});return f(S),d()}case de.CUSTOM:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onCustomEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});return f(S),d()}case de.RUN_STARTED:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onRunStartedEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});if(f(S),S.stopPropagation!==!0){let w=p;if((v=w.input)!=null&&v.messages){for(let _ of w.input.messages)a.find(O=>O.id===_.id)||a.push(_);f({messages:a})}}return d()}case de.RUN_FINISHED:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onRunFinishedEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e,result:p.result})});return f(S),d()}case de.RUN_ERROR:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onRunErrorEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});return f(S),d()}case de.STEP_STARTED:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onStepStartedEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});return f(S),d()}case de.STEP_FINISHED:{let S=await ln(r,a,s,(w,_,O)=>{var T;return(T=w.onStepFinishedEvent)==null?void 0:T.call(w,{event:p,messages:_,state:O,agent:n,input:e})});return f(S),d()}case de.TEXT_MESSAGE_CHUNK:throw new Error("TEXT_MESSAGE_CHUNK must be tranformed before being applied");case de.TOOL_CALL_CHUNK:throw new Error("TOOL_CALL_CHUNK must be tranformed before being applied");case de.THINKING_START:return d();case de.THINKING_END:return d();case de.THINKING_TEXT_MESSAGE_START:return d();case de.THINKING_TEXT_MESSAGE_CONTENT:return d();case de.THINKING_TEXT_MESSAGE_END:return d()}return p.type,d()}),s6(),r.length>0?u6({}):p=>p)},cg=e=>t=>{let n=new Map,r=new Map,a=!1,s=!1,u=!1,f=new Map,d=!1,p=!1,m=!1,y=()=>{n.clear(),r.clear(),f.clear(),d=!1,p=!1,a=!1,s=!1,m=!0};return t.pipe(Io(b=>{let v=b.type;if(e&&console.debug("[VERIFY]:",JSON.stringify(b)),s)return an(()=>new mn(`Cannot send event type '${v}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(a&&v!==de.RUN_ERROR&&v!==de.RUN_STARTED)return an(()=>new mn(`Cannot send event type '${v}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(u){if(v===de.RUN_STARTED){if(m&&!a)return an(()=>new mn("Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run."));a&&y()}}else if(u=!0,v!==de.RUN_STARTED&&v!==de.RUN_ERROR)return an(()=>new mn("First event must be 'RUN_STARTED'"));switch(v){case de.TEXT_MESSAGE_START:{let E=b.messageId;return n.has(E)?an(()=>new mn(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${E}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`)):(n.set(E,!0),xn(b))}case de.TEXT_MESSAGE_CONTENT:{let E=b.messageId;return n.has(E)?xn(b):an(()=>new mn(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${E}'. Start a text message with 'TEXT_MESSAGE_START' first.`))}case de.TEXT_MESSAGE_END:{let E=b.messageId;return n.has(E)?(n.delete(E),xn(b)):an(()=>new mn(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${E}'. A 'TEXT_MESSAGE_START' event must be sent first.`))}case de.TOOL_CALL_START:{let E=b.toolCallId;return r.has(E)?an(()=>new mn(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${E}' is already in progress. Complete it with 'TOOL_CALL_END' first.`)):(r.set(E,!0),xn(b))}case de.TOOL_CALL_ARGS:{let E=b.toolCallId;return r.has(E)?xn(b):an(()=>new mn(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${E}'. Start a tool call with 'TOOL_CALL_START' first.`))}case de.TOOL_CALL_END:{let E=b.toolCallId;return r.has(E)?(r.delete(E),xn(b)):an(()=>new mn(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${E}'. A 'TOOL_CALL_START' event must be sent first.`))}case de.STEP_STARTED:{let E=b.stepName;return f.has(E)?an(()=>new mn(`Step "${E}" is already active for 'STEP_STARTED'`)):(f.set(E,!0),xn(b))}case de.STEP_FINISHED:{let E=b.stepName;return f.has(E)?(f.delete(E),xn(b)):an(()=>new mn(`Cannot send 'STEP_FINISHED' for step "${E}" that was not started`))}case de.RUN_STARTED:return m=!0,xn(b);case de.RUN_FINISHED:{if(f.size>0){let E=Array.from(f.keys()).join(", ");return an(()=>new mn(`Cannot send 'RUN_FINISHED' while steps are still active: ${E}`))}if(n.size>0){let E=Array.from(n.keys()).join(", ");return an(()=>new mn(`Cannot send 'RUN_FINISHED' while text messages are still active: ${E}`))}if(r.size>0){let E=Array.from(r.keys()).join(", ");return an(()=>new mn(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${E}`))}return a=!0,xn(b)}case de.RUN_ERROR:return s=!0,xn(b);case de.CUSTOM:return xn(b);case de.THINKING_TEXT_MESSAGE_START:return d?p?an(()=>new mn("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.")):(p=!0,xn(b)):an(()=>new mn("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first."));case de.THINKING_TEXT_MESSAGE_CONTENT:return p?xn(b):an(()=>new mn("Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first."));case de.THINKING_TEXT_MESSAGE_END:return p?(p=!1,xn(b)):an(()=>new mn("Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first."));case de.THINKING_START:return d?an(()=>new mn("Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.")):(d=!0,xn(b));case de.THINKING_END:return d?(d=!1,xn(b)):an(()=>new mn("Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first."));default:return xn(b)}}))},W6=(e,t)=>bx(()=>du(fetch(e,t))).pipe(gx(n=>{var r;if(!n.ok){let u=n.headers.get("content-type")||"";return du(n.text()).pipe(Io(f=>{let d=f;if(u.includes("application/json"))try{d=JSON.parse(f)}catch{}let p=new Error(`HTTP ${n.status}: ${typeof d=="string"?d:JSON.stringify(d)}`);return p.status=n.status,p.payload=d,an(()=>p)}))}let a={type:"headers",status:n.status,headers:n.headers},s=(r=n.body)==null?void 0:r.getReader();return s?new ar(u=>(u.next(a),(async()=>{try{for(;;){let{done:f,value:d}=await s.read();if(f)break;let p={type:"data",data:d};u.next(p)}u.complete()}catch(f){u.error(f)}})(),()=>{s.cancel().catch(f=>{if(f?.name!=="AbortError")throw f})})):an(()=>new Error("Failed to getReader() from response"))})),Q6=e=>{let t=new Ta,n=new TextDecoder("utf-8",{fatal:!1}),r="";e.subscribe({next:s=>{if(s.type!=="headers"&&s.type==="data"&&s.data){let u=n.decode(s.data,{stream:!0});r+=u;let f=r.split(/\n\n/);r=f.pop()||"";for(let d of f)a(d)}},error:s=>t.error(s),complete:()=>{r&&(r+=n.decode(),a(r)),t.complete()}});function a(s){let u=s.split(`
154
+ `),f=[];for(let d of u)d.startsWith("data:")&&f.push(d.slice(5).replace(/^ /,""));if(f.length>0)try{let d=f.join(`
155
+ `),p=JSON.parse(d);t.next(p)}catch(d){t.error(d)}}return t.asObservable()},J6=e=>{let t=new Ta,n=new Uint8Array(0);e.subscribe({next:a=>{if(a.type!=="headers"&&a.type==="data"&&a.data){let s=new Uint8Array(n.length+a.data.length);s.set(n,0),s.set(a.data,n.length),n=s,r()}},error:a=>t.error(a),complete:()=>{if(n.length>0)try{r()}catch{console.warn("Incomplete or invalid protocol buffer data at stream end")}t.complete()}});function r(){for(;n.length>=4;){let a=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length<a)break;try{let s=n.slice(4,a),u=j6(s);t.next(u),n=n.slice(a)}catch(s){let u=s instanceof Error?s.message:String(s);t.error(new Error(`Failed to decode protocol buffer message: ${u}`));return}}}return t.asObservable()},eB=e=>{let t=new Ta,n=new mx,r=!1;return e.subscribe({next:a=>{n.next(a),a.type==="headers"&&!r?(r=!0,a.headers.get("content-type")===H6?J6(n).subscribe({next:s=>t.next(s),error:s=>t.error(s),complete:()=>t.complete()}):Q6(n).subscribe({next:s=>{try{let u=V1.parse(s);t.next(u)}catch(u){t.error(u)}},error:s=>{if(s?.name==="AbortError"){t.next({type:de.RUN_ERROR,message:s.message||"Request aborted",code:"abort",rawEvent:s}),t.complete();return}return t.error(s)},complete:()=>t.complete()})):r||t.error(new Error("No headers event received before data events"))},error:a=>{n.error(a),t.error(a)},complete:()=>{n.complete()}}),t.asObservable()},Kt=z1(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),tB=z1(["LangGraphInterruptEvent","PredictState","Exit"]),nB=on({type:De(Kt.enum.TextMessageStart),messageId:pe(),parentMessageId:pe().optional(),role:pe().optional()}),rB=on({type:De(Kt.enum.TextMessageContent),messageId:pe(),content:pe()}),iB=on({type:De(Kt.enum.TextMessageEnd),messageId:pe()}),oB=on({type:De(Kt.enum.ActionExecutionStart),actionExecutionId:pe(),actionName:pe(),parentMessageId:pe().optional()}),aB=on({type:De(Kt.enum.ActionExecutionArgs),actionExecutionId:pe(),args:pe()}),sB=on({type:De(Kt.enum.ActionExecutionEnd),actionExecutionId:pe()}),lB=on({type:De(Kt.enum.ActionExecutionResult),actionName:pe(),actionExecutionId:pe(),result:pe()}),uB=on({type:De(Kt.enum.AgentStateMessage),threadId:pe(),agentName:pe(),nodeName:pe(),runId:pe(),active:Mm(),role:pe(),state:pe(),running:Mm()}),cB=on({type:De(Kt.enum.MetaEvent),name:tB,value:or()}),fB=on({type:De(Kt.enum.RunError),message:pe(),code:pe().optional()});Pf("type",[nB,rB,iB,oB,aB,sB,lB,uB,cB,fB]),on({id:pe(),role:pe(),content:pe(),parentMessageId:pe().optional()}),on({id:pe(),name:pe(),arguments:or(),parentMessageId:pe().optional()}),on({id:pe(),result:or(),actionExecutionId:pe(),actionName:pe()});var dB=e=>{if(typeof e=="string")return e;if(!Array.isArray(e))return;let t=e.filter(n=>n.type==="text").map(n=>n.text).filter(n=>n.length>0);if(t.length!==0)return t.join(`
156
+ `)},pB=(e,t,n)=>r=>{let a={},s=!0,u=!0,f="",d=null,p=null,m=[],y={},b=v=>{typeof v=="object"&&v!==null&&("messages"in v&&delete v.messages,a=v)};return r.pipe(Io(v=>{switch(v.type){case de.TEXT_MESSAGE_START:{let E=v;return[{type:Kt.enum.TextMessageStart,messageId:E.messageId,role:E.role}]}case de.TEXT_MESSAGE_CONTENT:{let E=v;return[{type:Kt.enum.TextMessageContent,messageId:E.messageId,content:E.delta}]}case de.TEXT_MESSAGE_END:{let E=v;return[{type:Kt.enum.TextMessageEnd,messageId:E.messageId}]}case de.TOOL_CALL_START:{let E=v;return m.push({id:E.toolCallId,type:"function",function:{name:E.toolCallName,arguments:""}}),u=!0,y[E.toolCallId]=E.toolCallName,[{type:Kt.enum.ActionExecutionStart,actionExecutionId:E.toolCallId,actionName:E.toolCallName,parentMessageId:E.parentMessageId}]}case de.TOOL_CALL_ARGS:{let E=v,S=m.find(_=>_.id===E.toolCallId);if(!S)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${E.toolCallId}'`),[];S.function.arguments+=E.delta;let w=!1;if(p){let _=p.find(O=>O.tool==S.function.name);if(_)try{let O=JSON.parse(Cx(S.function.arguments));_.tool_argument&&_.tool_argument in O?(b(Do(Wn({},a),{[_.state_key]:O[_.tool_argument]})),w=!0):_.tool_argument||(b(Do(Wn({},a),{[_.state_key]:O})),w=!0)}catch{}}return[{type:Kt.enum.ActionExecutionArgs,actionExecutionId:E.toolCallId,args:E.delta},...w?[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}]:[]]}case de.TOOL_CALL_END:{let E=v;return[{type:Kt.enum.ActionExecutionEnd,actionExecutionId:E.toolCallId}]}case de.TOOL_CALL_RESULT:{let E=v;return[{type:Kt.enum.ActionExecutionResult,actionExecutionId:E.toolCallId,result:E.content,actionName:y[E.toolCallId]||"unknown"}]}case de.RAW:return[];case de.CUSTOM:{let E=v;switch(E.name){case"Exit":s=!1;break;case"PredictState":p=E.value;break}return[{type:Kt.enum.MetaEvent,name:E.name,value:E.value}]}case de.STATE_SNAPSHOT:return b(v.snapshot),[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}];case de.STATE_DELTA:{let E=Os(a,v.delta,!0,!1);return E?(b(E.newDocument),[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}]):[]}case de.MESSAGES_SNAPSHOT:return d=v.messages,[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(Wn(Wn({},a),d?{messages:d}:{})),active:!0}];case de.RUN_STARTED:return[];case de.RUN_FINISHED:return d&&(a.messages=d),Object.keys(a).length===0?[]:[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(Wn(Wn({},a),d?{messages:hB(d)}:{})),active:!1}];case de.RUN_ERROR:{let E=v;return[{type:Kt.enum.RunError,message:E.message,code:E.code}]}case de.STEP_STARTED:return f=v.stepName,m=[],p=null,[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:!0}];case de.STEP_FINISHED:return m=[],p=null,[{type:Kt.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:!1}];default:return[]}}))};function hB(e){var t;let n=[];for(let r of e)if(r.role==="assistant"||r.role==="user"||r.role==="system"){let a=dB(r.content);if(a){let s={id:r.id,role:r.role,content:a};n.push(s)}if(r.role==="assistant"&&r.toolCalls&&r.toolCalls.length>0)for(let s of r.toolCalls){let u={id:s.id,name:s.function.name,arguments:JSON.parse(s.function.arguments),parentMessageId:r.id};n.push(u)}}else if(r.role==="tool"){let a="unknown";for(let u of e)if(u.role==="assistant"&&(t=u.toolCalls)!=null&&t.length){for(let f of u.toolCalls)if(f.id===r.toolCallId){a=f.function.name;break}}let s={id:r.id,result:r.content,actionExecutionId:r.toolCallId,actionName:a};n.push(s)}return n}var md=e=>t=>{let n,r,a,s=()=>{if(!n||a!=="text")throw new Error("No text message to close");let d={type:de.TEXT_MESSAGE_END,messageId:n.messageId};return a=void 0,n=void 0,e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_END",JSON.stringify(d)),d},u=()=>{if(!r||a!=="tool")throw new Error("No tool call to close");let d={type:de.TOOL_CALL_END,toolCallId:r.toolCallId};return a=void 0,r=void 0,e&&console.debug("[TRANSFORM]: TOOL_CALL_END",JSON.stringify(d)),d},f=()=>a==="text"?[s()]:a==="tool"?[u()]:[];return t.pipe(Io(d=>{switch(d.type){case de.TEXT_MESSAGE_START:case de.TEXT_MESSAGE_CONTENT:case de.TEXT_MESSAGE_END:case de.TOOL_CALL_START:case de.TOOL_CALL_ARGS:case de.TOOL_CALL_END:case de.TOOL_CALL_RESULT:case de.STATE_SNAPSHOT:case de.STATE_DELTA:case de.MESSAGES_SNAPSHOT:case de.CUSTOM:case de.RUN_STARTED:case de.RUN_FINISHED:case de.RUN_ERROR:case de.STEP_STARTED:case de.STEP_FINISHED:case de.THINKING_START:case de.THINKING_END:case de.THINKING_TEXT_MESSAGE_START:case de.THINKING_TEXT_MESSAGE_CONTENT:case de.THINKING_TEXT_MESSAGE_END:return[...f(),d];case de.RAW:case de.ACTIVITY_SNAPSHOT:case de.ACTIVITY_DELTA:return[d];case de.TEXT_MESSAGE_CHUNK:let p=d,m=[];if((a!=="text"||p.messageId!==void 0&&p.messageId!==n?.messageId)&&m.push(...f()),a!=="text"){if(p.messageId===void 0)throw new Error("First TEXT_MESSAGE_CHUNK must have a messageId");n={messageId:p.messageId},a="text";let v={type:de.TEXT_MESSAGE_START,messageId:p.messageId,role:p.role||"assistant"};m.push(v),e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_START",JSON.stringify(v))}if(p.delta!==void 0){let v={type:de.TEXT_MESSAGE_CONTENT,messageId:n.messageId,delta:p.delta};m.push(v),e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_CONTENT",JSON.stringify(v))}return m;case de.TOOL_CALL_CHUNK:let y=d,b=[];if((a!=="tool"||y.toolCallId!==void 0&&y.toolCallId!==r?.toolCallId)&&b.push(...f()),a!=="tool"){if(y.toolCallId===void 0)throw new Error("First TOOL_CALL_CHUNK must have a toolCallId");if(y.toolCallName===void 0)throw new Error("First TOOL_CALL_CHUNK must have a toolCallName");r={toolCallId:y.toolCallId,toolCallName:y.toolCallName,parentMessageId:y.parentMessageId},a="tool";let v={type:de.TOOL_CALL_START,toolCallId:y.toolCallId,toolCallName:y.toolCallName,parentMessageId:y.parentMessageId};b.push(v),e&&console.debug("[TRANSFORM]: TOOL_CALL_START",JSON.stringify(v))}if(y.delta!==void 0){let v={type:de.TOOL_CALL_ARGS,toolCallId:r.toolCallId,delta:y.delta};b.push(v),e&&console.debug("[TRANSFORM]: TOOL_CALL_ARGS",JSON.stringify(v))}return b}return d.type,[]}),Ym(()=>{f()}))},vE=class{runNext(e,t){return t.run(e).pipe(md(!1))}runNextWithState(e,t){let n=Ft(e.messages||[]),r=Ft(e.state||{}),a=new mx;return yE(e,a,t,[]).subscribe(s=>{s.messages!==void 0&&(n=s.messages),s.state!==void 0&&(r=s.state)}),this.runNext(e,t).pipe(dx(async s=>(a.next(s),await new Promise(u=>setTimeout(u,0)),{event:s,messages:Ft(n),state:Ft(r)})))}},mB=class extends vE{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function gB(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(r=>typeof r=="object"&&r!==null&&"type"in r&&r.type==="text"&&typeof r.text=="string").map(r=>r.text).join("");return Do(Wn({},e),{content:n})}return typeof t=="string"?e:Do(Wn({},e),{content:""})}var yB=class extends vE{run(e,t){let n=e,{parentRunId:r}=n,a=K6(n,["parentRunId"]),s=Do(Wn({},a),{messages:a.messages.map(gB)});return this.runNext(s,t)}},vB={version:"0.0.43"},bB=class{constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:a,debug:s}={}){this.debug=!1,this.subscribers=[],this.isRunning=!1,this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=n??pu(),this.messages=Ft(r??[]),this.state=Ft(a??{}),this.debug=s??!1,G6(this.maxVersion,"0.0.39")<=0&&this.middlewares.unshift(new yB)}get maxVersion(){return vB.version}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(n=>typeof n=="function"?new mB(n):n);return this.middlewares.push(...t),this}async runAgent(e,t){var n;try{this.isRunning=!0,this.agentId=(n=this.agentId)!=null?n:pu();let r=this.prepareRunAgentInput(e),a,s=new Set(this.messages.map(m=>m.id)),u=[{onRunFinishedEvent:m=>{a=m.result}},...this.subscribers,t??{}];await this.onInitialize(r,u),this.activeRunDetach$=new Ta;let f;this.activeRunCompletionPromise=new Promise(m=>{f=m});let d=W1(()=>this.middlewares.length===0?this.run(r):this.middlewares.reduceRight((m,y)=>({run:b=>y.run(b,m)}),this).run(r),md(this.debug),cg(this.debug),m=>m.pipe(yx(this.activeRunDetach$)),m=>this.apply(r,m,u),m=>this.processApplyEvents(r,m,u),fu(m=>(this.isRunning=!1,this.onError(r,m,u))),Ym(()=>{this.isRunning=!1,this.onFinalize(r,u),f?.(),f=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}));await vx(d(xn(null)));let p=Ft(this.messages).filter(m=>!s.has(m.id));return{result:a,newMessages:p}}finally{this.isRunning=!1}}connect(e){throw new U1}async connectAgent(e,t){var n;try{this.isRunning=!0,this.agentId=(n=this.agentId)!=null?n:pu();let r=this.prepareRunAgentInput(e),a,s=new Set(this.messages.map(m=>m.id)),u=[{onRunFinishedEvent:m=>{a=m.result}},...this.subscribers,t??{}];await this.onInitialize(r,u),this.activeRunDetach$=new Ta;let f;this.activeRunCompletionPromise=new Promise(m=>{f=m});let d=W1(()=>this.connect(r),md(this.debug),cg(this.debug),m=>m.pipe(yx(this.activeRunDetach$)),m=>this.apply(r,m,u),m=>this.processApplyEvents(r,m,u),fu(m=>(this.isRunning=!1,m instanceof U1?hx:this.onError(r,m,u))),Ym(()=>{this.isRunning=!1,this.onFinalize(r,u),f?.(),f=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}));await vx(d(xn(null)));let p=Ft(this.messages).filter(m=>!s.has(m.id));return{result:a,newMessages:p}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){var e,t;if(!this.activeRunDetach$)return;let n=(e=this.activeRunCompletionPromise)!=null?e:Promise.resolve();this.activeRunDetach$.next(),(t=this.activeRunDetach$)==null||t.complete(),await n}apply(e,t,n){return yE(e,t,this,n)}processApplyEvents(e,t,n){return t.pipe(f6(r=>{r.messages&&(this.messages=r.messages,n.forEach(a=>{var s;(s=a.onMessagesChanged)==null||s.call(a,{messages:this.messages,state:this.state,agent:this,input:e})})),r.state&&(this.state=r.state,n.forEach(a=>{var s;(s=a.onStateChanged)==null||s.call(a,{state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){var t,n,r;let a=Ft(this.messages).filter(s=>s.role!=="activity");return{threadId:this.threadId,runId:e?.runId||pu(),tools:Ft((t=e?.tools)!=null?t:[]),context:Ft((n=e?.context)!=null?n:[]),forwardedProps:Ft((r=e?.forwardedProps)!=null?r:{}),state:Ft(this.state),messages:a}}async onInitialize(e,t){let n=await ln(t,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunInitialized)==null?void 0:u.call(r,{messages:a,state:s,agent:this,input:e})});(n.messages!==void 0||n.state!==void 0)&&(n.messages&&(this.messages=n.messages,e.messages=n.messages,t.forEach(r=>{var a;(a=r.onMessagesChanged)==null||a.call(r,{messages:this.messages,state:this.state,agent:this,input:e})})),n.state&&(this.state=n.state,e.state=n.state,t.forEach(r=>{var a;(a=r.onStateChanged)==null||a.call(r,{state:this.state,messages:this.messages,agent:this,input:e})})))}onError(e,t,n){return du(ln(n,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunFailed)==null?void 0:u.call(r,{error:t,messages:a,state:s,agent:this,input:e})})).pipe(Gm(r=>{let a=r;if((a.messages!==void 0||a.state!==void 0)&&(a.messages!==void 0&&(this.messages=a.messages,n.forEach(s=>{var u;(u=s.onMessagesChanged)==null||u.call(s,{messages:this.messages,state:this.state,agent:this,input:e})})),a.state!==void 0&&(this.state=a.state,n.forEach(s=>{var u;(u=s.onStateChanged)==null||u.call(s,{state:this.state,messages:this.messages,agent:this,input:e})}))),a.stopPropagation!==!0)throw console.error("Agent execution failed:",t),t;return{}}))}async onFinalize(e,t){let n=await ln(t,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunFinalized)==null?void 0:u.call(r,{messages:a,state:s,agent:this,input:e})});(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(r=>{var a;(a=r.onMessagesChanged)==null||a.call(r,{messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(r=>{var a;(a=r.onStateChanged)==null||a.call(r,{state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=Ft(this.messages),e.state=Ft(this.state),e.debug=this.debug,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e}addMessage(e){this.messages.push(e),(async()=>{var t,n,r;for(let a of this.subscribers)await((t=a.onNewMessage)==null?void 0:t.call(a,{message:e,messages:this.messages,state:this.state,agent:this}));if(e.role==="assistant"&&e.toolCalls)for(let a of e.toolCalls)for(let s of this.subscribers)await((n=s.onNewToolCall)==null?void 0:n.call(s,{toolCall:a,messages:this.messages,state:this.state,agent:this}));for(let a of this.subscribers)await((r=a.onMessagesChanged)==null?void 0:r.call(a,{messages:this.messages,state:this.state,agent:this}))})()}addMessages(e){this.messages.push(...e),(async()=>{var t,n,r;for(let a of e){for(let s of this.subscribers)await((t=s.onNewMessage)==null?void 0:t.call(s,{message:a,messages:this.messages,state:this.state,agent:this}));if(a.role==="assistant"&&a.toolCalls)for(let s of a.toolCalls)for(let u of this.subscribers)await((n=u.onNewToolCall)==null?void 0:n.call(u,{toolCall:s,messages:this.messages,state:this.state,agent:this}))}for(let a of this.subscribers)await((r=a.onMessagesChanged)==null?void 0:r.call(a,{messages:this.messages,state:this.state,agent:this}))})()}setMessages(e){this.messages=Ft(e),(async()=>{var t;for(let n of this.subscribers)await((t=n.onMessagesChanged)==null?void 0:t.call(n,{messages:this.messages,state:this.state,agent:this}))})()}setState(e){this.state=Ft(e),(async()=>{var t;for(let n of this.subscribers)await((t=n.onStateChanged)==null?void 0:t.call(n,{messages:this.messages,state:this.state,agent:this}))})()}legacy_to_be_removed_runAgentBridged(e){var t;this.agentId=(t=this.agentId)!=null?t:pu();let n=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((r,a)=>({run:s=>a.run(s,r)}),this).run(n)).pipe(md(this.debug),cg(this.debug),pB(this.threadId,n.runId,this.agentId),r=>r.pipe(Gm(a=>(this.debug&&console.debug("[LEGACY]:",JSON.stringify(a)),a))))}},SB=class extends bB{constructor(e){var t;super(e),this.abortController=new AbortController,this.url=e.url,this.headers=Ft((t=e.headers)!=null?t:{})}requestInit(e){return{method:"POST",headers:Do(Wn({},this.headers),{"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(e),signal:this.abortController.signal}}runAgent(e,t){var n;return this.abortController=(n=e?.abortController)!=null?n:new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}run(e){let t=W6(this.url,this.requestInit(e));return eB(t)}clone(){var e;let t=super.clone();t.url=this.url,t.headers=Ft((e=this.headers)!=null?e:{});let n=new AbortController,r=this.abortController.signal;return r.aborted&&n.abort(r.reason),t.abortController=n,t}};const xB=2e3,gd="/api/chat",EB="/api/chat-session",wB="/api/ui/events",bE=e=>{let t;const n=new Set,r=(p,m)=>{const y=typeof p=="function"?p(t):p;if(!Object.is(y,t)){const b=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(v=>v(t,b))}},a=()=>t,f={setState:r,getState:a,getInitialState:()=>d,subscribe:p=>(n.add(p),()=>n.delete(p))},d=t=e(r,a,f);return f},_B=(e=>e?bE(e):bE),TB=e=>e;function CB(e,t=TB){const n=nr.useSyncExternalStore(e.subscribe,nr.useCallback(()=>t(e.getState()),[e,t]),nr.useCallback(()=>t(e.getInitialState()),[e,t]));return nr.useDebugValue(n),n}const SE=e=>{const t=_B(e),n=r=>CB(t,r);return Object.assign(n,t),n},yd=(e=>e?SE(e):SE)((e,t)=>({items:[],push:n=>{const r=crypto.randomUUID?crypto.randomUUID():String(Date.now()),a={id:r,ttl:5e3,...n};e(s=>({items:[...s.items,a]})),setTimeout(()=>{t().remove(r)},a.ttl)},remove:n=>e(r=>({items:r.items.filter(a=>a.id!==n)})),clear:()=>e({items:[]})}));let xE=null;function AB(e){xE=e}function yu(){return xE}let vd=null;async function fg(){const e=yu();return vd||(vd=fetch(`${e?.apiBaseUrl}${EB}/${e?.clientId}/authorize`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(t=>{if(!t.ok)throw new Error("refresh failed");return t.json()}).then(t=>(e&&(e.sessionToken=t),t)).finally(()=>{vd=null})),vd}async function vu(e,t={}){const n=new Headers(t.headers),r=yu();r?.sessionToken&&n.set("Authorization",`Bearer ${r?.sessionToken}`);const a=await fetch(e,{...t,headers:n});if(!a.ok&&a.status!==401){const u=await a.json();return yd.getState().push({type:"error",message:u.message,status:a.status}),a}if(a.status!==401)return a;const s=await fg();return n.set("Authorization",`Bearer ${s}`),fetch(e,{...t,headers:n})}const bu={UIDirectiveEvent:"UI_DIRECTIVE",AgentDirective:"AGENT_DIRECTIVE"},pi={verificationForm:"verification_form",VerificationFormSubmit:"verification_form_submitted",OtpForm:"otp_form",OtpFormSubmit:"otp_form_submitted",OperationValidationFailed:"operation_validation_Failed",OperationError:"error_operation",OperationSuccess:"success_operation"},kB={ReplayMessagePendingActionAfterVerification:"replay_message_pending_action_after_verification"};function OB(){const e=window.innerWidth;return e<=767?"Mobile":e<=1024?"Tablet":"Desktop"}function EE(e){return e?.status??e?.response?.status??e?.cause?.status??e?.cause?.response?.status}function RB(e){return EE(e)===401}function NB(e){const t=EE(e);return typeof t=="number"&&t==400}function IB(e){if(RB(e))return!0;const n=String(e?.message??"");return n.includes("401")||n.toLowerCase().includes("unauthorized")}const wE=(e,t)=>{const n={...e.headers??{}};t?n.Authorization=`Bearer ${t}`:delete n.Authorization,e.headers=n};function MB(e,t){let n=null;const r=()=>(n||(n=t.refreshAccessToken().finally(()=>n=null)),n);return(a,s)=>{let u=!1;return bx(()=>(wE(e,t.getAccessToken()),s.run(a).pipe(fu(f=>u||!IB(f)?an(()=>f):(u=!0,du(r()).pipe(gx(d=>(wE(e,d),s.run(a)))))))))}}const DB=(e,t)=>t.run(e).pipe(fu(n=>{if(NB(n)){const r=n.payload;yd.getState().push({type:"error",message:r.message,status:r.statusCode})}return t.run(e)}));async function BB(e){const t=new SB({url:e.url,threadId:e.conversationId||void 0,headers:{"X-Device-Type":OB(),...e.clientId?{"X-Client-Id":e.clientId}:{},...e.conversationId?{"X-Conversation-Id":e.conversationId}:{},...e.messageId?{"X-Message-Id":e.messageId}:{}}}),n={onRunStartedEvent:({event:s})=>{e.onRunStarted(s.threadId)},onTextMessageContentEvent:({event:s})=>{if(s.type===de.TEXT_MESSAGE_CONTENT){const u={id:s.messageId,text:s.delta,role:s.role||"assistant"};e.onDelta(u)}},onRunFinishedEvent:({result:s})=>{console.log("Run completed with result:",s)},onRunErrorEvent:({event:s})=>{},onToolCallArgsEvent:({event:s})=>{console.log("Tool call args event:",s)},onToolCallResultEvent:({event:s})=>{console.log("Tool call result event:",s)},onToolCallStartEvent:({event:s})=>{console.log("Tool call start event:",s)},onCustomEvent({event:s}){if(s.name===bu.UIDirectiveEvent){const f=JSON.parse(s.value),d={type:"CUSTOM",name:bu.UIDirectiveEvent,value:f};e.onAgentEvent&&e.onAgentEvent(d)}}};e.body&&(t.messages=[...t.messages,{id:e.messageId||"",role:"user",content:e.body}]);let r=null;e.directiveForAgent&&(r={directive:e.directiveForAgent});const a=MB(t,{getAccessToken:()=>e.token||null,refreshAccessToken:async()=>await fg()});t.use(a,DB),await t.runAgent({tools:[],forwardedProps:r},n)}const dg="chat_session_v1",zB=1440*60*1e3;function LB(){try{const e=localStorage.getItem(dg);return e?JSON.parse(e):null}catch{return null}}function _E(e){localStorage.setItem(dg,JSON.stringify(e))}function Su(){const e=Date.now(),t=LB();if(!t)return null;if(e-t.lastActivityAt>zB)return $B(),null;const r={...t,lastActivityAt:e};return _E(r),r.conversationId}function PB(e){const t={conversationId:e,lastActivityAt:Date.now()};_E(t)}function $B(){localStorage.removeItem(dg)}const UB=rr(L.jsx("path",{d:"M20 4v12H5.17L4 17.17V4zm0-2H4c-1.1 0-2 .9-2 2v15.59c0 .89 1.08 1.34 1.71.71L6 18h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2"}));function jB(){if(typeof document>"u"||document.querySelector('meta[name="viewport"]'))return;const t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1",document.head.appendChild(t)}function HB(){I.useEffect(()=>{const e=()=>{const t=window.innerHeight*.01;document.documentElement.style.setProperty("--vh",`${t}px`)};return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[])}const VB=e=>e==="AI"?"Răspunde automat":e==="Human"?"In conversatie cu un operator":e==="Disconnected"?"Conexiune pierduta. Reincarcati pagina!":e==="Ended"?"Conversație închisă":"Conversație nouă",pg=rr(L.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M15 17H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"})),TE=rr(L.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function FB({isMobile:e,conversationMode:t,setOpen:n}){return L.jsxs(pn,{sx:{px:1.75,py:1.25,display:"flex",alignItems:"center",gap:1,borderBottom:"1px solid",borderColor:"divider",background:"linear-gradient(135deg, rgba(25,118,210,.18), rgba(156,39,176,.14))",backdropFilter:e?"none":"blur(10px)"},children:[L.jsx(cM,{overlap:"circular",variant:"dot",color:t!="Disconnected"?"success":"error",sx:{"& .MuiBadge-badge":{width:10,height:10,borderRadius:999,border:"2px solid",borderColor:"background.paper"}},children:L.jsx(bf,{sx:{bgcolor:"primary.main"},children:L.jsx(pg,{})})}),L.jsxs(pn,{sx:{flex:1,minWidth:0},children:[L.jsx(Tr,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.1},children:"Asistent"}),L.jsx(Tr,{variant:"caption",sx:{color:"text.secondary"},children:VB(t)})]}),L.jsx(Co,{size:"small",onClick:()=>n(!1),sx:{bgcolor:"rgba(255,255,255,.55)",border:"1px solid",borderColor:"divider","&:hover":{bgcolor:"rgba(255,255,255,.75)"}},children:L.jsx(TE,{fontSize:"small"})})]})}function qB(e){const{error:t,onClose:n}=e;return t?L.jsx(pn,{sx:{px:2,pt:1},children:L.jsx(g3,{severity:"error",variant:"filled",action:L.jsx(Co,{size:"small",onClick:n,"aria-label":"Close error banner",children:L.jsx(TE,{fontSize:"small"})}),children:t})}):null}const CE=rr(L.jsx("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"})),GB=rr(L.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4"})),YB=rr(L.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"})),XB=rr(L.jsx("path",{d:"m3.4 20.4 17.45-7.48c.81-.35.81-1.49 0-1.84L3.4 3.6c-.66-.29-1.39.2-1.39.91L2 9.12c0 .5.37.93.87.99L17 12 2.87 13.88c-.5.07-.87.5-.87 1l.01 4.61c0 .71.73 1.2 1.39.91"})),ZB=rr(L.jsx("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48z"}));function x7(){}function E7(){}function KB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const WB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JB={};function AE(e,t){return(JB.jsx?QB:WB).test(e)}const ez=/[ \t\n\f\r]/g;function tz(e){return typeof e=="object"?e.type==="text"?kE(e.value):!1:kE(e)}function kE(e){return e.replace(ez,"")===""}class xu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xu.prototype.normal={},xu.prototype.property={},xu.prototype.space=void 0;function OE(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new xu(n,r,t)}function hg(e){return e.toLowerCase()}class dr{constructor(t,n){this.attribute=n,this.property=t}}dr.prototype.attribute="",dr.prototype.booleanish=!1,dr.prototype.boolean=!1,dr.prototype.commaOrSpaceSeparated=!1,dr.prototype.commaSeparated=!1,dr.prototype.defined=!1,dr.prototype.mustUseProperty=!1,dr.prototype.number=!1,dr.prototype.overloadedBoolean=!1,dr.prototype.property="",dr.prototype.spaceSeparated=!1,dr.prototype.space=void 0;let nz=0;const rt=ka(),kn=ka(),mg=ka(),me=ka(),Wt=ka(),Rs=ka(),kr=ka();function ka(){return 2**++nz}const gg=Object.freeze(Object.defineProperty({__proto__:null,boolean:rt,booleanish:kn,commaOrSpaceSeparated:kr,commaSeparated:Rs,number:me,overloadedBoolean:mg,spaceSeparated:Wt},Symbol.toStringTag,{value:"Module"})),yg=Object.keys(gg);class vg extends dr{constructor(t,n,r,a){let s=-1;if(super(t,n),RE(this,"space",a),typeof r=="number")for(;++s<yg.length;){const u=yg[s];RE(this,yg[s],(r&gg[u])===gg[u])}}}vg.prototype.defined=!0;function RE(e,t,n){n&&(e[t]=n)}function Ns(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new vg(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[hg(r)]=r,n[hg(s.attribute)]=r}return new xu(t,n,e.space)}const NE=Ns({properties:{ariaActiveDescendant:null,ariaAtomic:kn,ariaAutoComplete:null,ariaBusy:kn,ariaChecked:kn,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:Wt,ariaCurrent:null,ariaDescribedBy:Wt,ariaDetails:null,ariaDisabled:kn,ariaDropEffect:Wt,ariaErrorMessage:null,ariaExpanded:kn,ariaFlowTo:Wt,ariaGrabbed:kn,ariaHasPopup:null,ariaHidden:kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Wt,ariaLevel:me,ariaLive:null,ariaModal:kn,ariaMultiLine:kn,ariaMultiSelectable:kn,ariaOrientation:null,ariaOwns:Wt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:kn,ariaReadOnly:kn,ariaRelevant:null,ariaRequired:kn,ariaRoleDescription:Wt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:kn,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function IE(e,t){return t in e?e[t]:t}function ME(e,t){return IE(e,t.toLowerCase())}const rz=Ns({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rs,acceptCharset:Wt,accessKey:Wt,action:null,allow:null,allowFullScreen:rt,allowPaymentRequest:rt,allowUserMedia:rt,alt:null,as:null,async:rt,autoCapitalize:null,autoComplete:Wt,autoFocus:rt,autoPlay:rt,blocking:Wt,capture:null,charSet:null,checked:rt,cite:null,className:Wt,cols:me,colSpan:null,content:null,contentEditable:kn,controls:rt,controlsList:Wt,coords:me|Rs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rt,defer:rt,dir:null,dirName:null,disabled:rt,download:mg,draggable:kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rt,formTarget:null,headers:Wt,height:me,hidden:mg,high:me,href:null,hrefLang:null,htmlFor:Wt,httpEquiv:Wt,id:null,imageSizes:null,imageSrcSet:null,inert:rt,inputMode:null,integrity:null,is:null,isMap:rt,itemId:null,itemProp:Wt,itemRef:Wt,itemScope:rt,itemType:Wt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rt,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:rt,muted:rt,name:null,nonce:null,noModule:rt,noValidate:rt,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:rt,optimum:me,pattern:null,ping:Wt,placeholder:null,playsInline:rt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rt,referrerPolicy:null,rel:Wt,required:rt,reversed:rt,rows:me,rowSpan:me,sandbox:Wt,scope:null,scoped:rt,seamless:rt,selected:rt,shadowRootClonable:rt,shadowRootDelegatesFocus:rt,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:rt,useMap:null,value:kn,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Wt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rt,declare:rt,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:rt,noHref:rt,noShade:rt,noWrap:rt,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:kn,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:rt,disableRemotePlayback:rt,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:ME}),iz=Ns({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:kr,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:Wt,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:rt,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:Rs,g2:Rs,glyphName:Rs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Wt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kr,rev:kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kr,requiredFeatures:kr,requiredFonts:kr,requiredFormats:kr,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kr,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:IE}),DE=Ns({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),BE=Ns({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ME}),zE=Ns({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),oz={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"},az=/[A-Z]/g,LE=/-[a-z]/g,sz=/^data[-\w.:]+$/i;function lz(e,t){const n=hg(t);let r=t,a=dr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sz.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(LE,cz);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!LE.test(s)){let u=s.replace(az,uz);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=vg}return new a(r,t)}function uz(e){return"-"+e.toLowerCase()}function cz(e){return e.charAt(1).toUpperCase()}const fz=OE([NE,rz,DE,BE,zE],"html"),bg=OE([NE,iz,DE,BE,zE],"svg");function dz(e){return e.join(" ").trim()}var Is={},Sg,PE;function pz(){if(PE)return Sg;PE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
157
+ `,p="/",m="*",y="",b="comment",v="declaration";function E(w,_){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];_=_||{};var O=1,T=1;function C($){var U=$.match(t);U&&(O+=U.length);var D=$.lastIndexOf(d);T=~D?$.length-D:T+$.length}function N(){var $={line:O,column:T};return function(U){return U.position=new k($),j(),U}}function k($){this.start=$,this.end={line:O,column:T},this.source=_.source}k.prototype.content=w;function z($){var U=new Error(_.source+":"+O+":"+T+": "+$);if(U.reason=$,U.filename=_.source,U.line=O,U.column=T,U.source=w,!_.silent)throw U}function H($){var U=$.exec(w);if(U){var D=U[0];return C(D),w=w.slice(D.length),U}}function j(){H(n)}function G($){var U;for($=$||[];U=F();)U!==!1&&$.push(U);return $}function F(){var $=N();if(!(p!=w.charAt(0)||m!=w.charAt(1))){for(var U=2;y!=w.charAt(U)&&(m!=w.charAt(U)||p!=w.charAt(U+1));)++U;if(U+=2,y===w.charAt(U-1))return z("End of comment missing");var D=w.slice(2,U-2);return T+=2,C(D),w=w.slice(U),T+=2,$({type:b,comment:D})}}function A(){var $=N(),U=H(r);if(U){if(F(),!H(a))return z("property missing ':'");var D=H(s),Y=$({type:v,property:S(U[0].replace(e,y)),value:D?S(D[0].replace(e,y)):y});return H(u),Y}}function X(){var $=[];G($);for(var U;U=A();)U!==!1&&($.push(U),G($));return $}return j(),X()}function S(w){return w?w.replace(f,y):y}return Sg=E,Sg}var $E;function hz(){if($E)return Is;$E=1;var e=Is&&Is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Is,"__esModule",{value:!0}),Is.default=n;const t=e(pz());function n(r,a){let s=null;if(!r||typeof r!="string")return s;const u=(0,t.default)(r),f=typeof a=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:p,value:m}=d;f?a(p,m,d):m&&(s=s||{},s[p]=m)}),s}return Is}var Eu={},UE;function mz(){if(UE)return Eu;UE=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(p){return!p||n.test(p)||e.test(p)},u=function(p,m){return m.toUpperCase()},f=function(p,m){return"".concat(m,"-")},d=function(p,m){return m===void 0&&(m={}),s(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(a,f):p=p.replace(r,f),p.replace(t,u))};return Eu.camelCase=d,Eu}var wu,jE;function gz(){if(jE)return wu;jE=1;var e=wu&&wu.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(hz()),n=mz();function r(a,s){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(f,d){f&&d&&(u[(0,n.camelCase)(f,s)]=d)}),u}return r.default=r,wu=r,wu}var yz=gz();const vz=Ac(yz),HE=VE("end"),xg=VE("start");function VE(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function bz(e){const t=xg(e),n=HE(e);if(t&&n)return{start:t,end:n}}function _u(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?FE(e.position):"start"in e||"end"in e?FE(e):"line"in e||"column"in e?Eg(e):""}function Eg(e){return qE(e&&e.line)+":"+qE(e&&e.column)}function FE(e){return Eg(e&&e.start)+"-"+Eg(e&&e.end)}function qE(e){return e&&typeof e=="number"?e:1}class Qn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",s={},u=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(u=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?s.ruleId=r:(s.source=r.slice(0,d),s.ruleId=r.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=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=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=f?f.line:void 0,this.name=_u(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=u&&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}}Qn.prototype.file="",Qn.prototype.name="",Qn.prototype.reason="",Qn.prototype.message="",Qn.prototype.stack="",Qn.prototype.column=void 0,Qn.prototype.line=void 0,Qn.prototype.ancestors=void 0,Qn.prototype.cause=void 0,Qn.prototype.fatal=void 0,Qn.prototype.place=void 0,Qn.prototype.ruleId=void 0,Qn.prototype.source=void 0;const wg={}.hasOwnProperty,Sz=new Map,xz=/[A-Z]/g,Ez=new Set(["table","tbody","thead","tfoot","tr"]),wz=new Set(["td","th"]),GE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _z(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Iz(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Nz(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?bg:fz,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=YE(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function YE(e,t,n){if(t.type==="element")return Tz(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Cz(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kz(e,t,n);if(t.type==="mdxjsEsm")return Az(e,t);if(t.type==="root")return Oz(e,t,n);if(t.type==="text")return Rz(e,t)}function Tz(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=bg,e.schema=a),e.ancestors.push(t);const s=ZE(e,t.tagName,!1),u=Mz(e,t);let f=Tg(e,t);return Ez.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!tz(d):!0})),XE(e,u,s,t),_g(u,f),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function Cz(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Tu(e,t.position)}function Az(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tu(e,t.position)}function kz(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=bg,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:ZE(e,t.name,!0),u=Dz(e,t),f=Tg(e,t);return XE(e,u,s,t),_g(u,f),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function Oz(e,t,n){const r={};return _g(r,Tg(e,t)),e.create(t,e.Fragment,r,n)}function Rz(e,t){return t.value}function XE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _g(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Nz(e,t,n){return r;function r(a,s,u,f){const p=Array.isArray(u.children)?n:t;return f?p(s,u,f):p(s,u)}}function Iz(e,t){return n;function n(r,a,s,u){const f=Array.isArray(s.children),d=xg(r);return t(a,s,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Mz(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&wg.call(t.properties,a)){const s=Bz(e,a,t.properties[a]);if(s){const[u,f]=s;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&wz.has(t.tagName)?r=f:n[u]=f}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Dz(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const u=s.expression;u.type;const f=u.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Tu(e,t.position);else{const a=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Tu(e,t.position);else s=r.value===null?!0:r.value;n[a]=s}return n}function Tg(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Sz;for(;++r<t.children.length;){const s=t.children[r];let u;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const p=a.get(d)||0;u=d+"-"+p,a.set(d,p+1)}}const f=YE(e,s,u);f!==void 0&&n.push(f)}return n}function Bz(e,t,n){const r=lz(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?KB(n):dz(n)),r.property==="style"){let a=typeof n=="object"?n:zz(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Lz(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?oz[r.property]||r.property:r.attribute,n]}}function zz(e,t){try{return vz(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Qn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=GE+"#cannot-parse-style-attribute",a}}function ZE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,u;for(;++s<a.length;){const f=AE(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}r=u}else r=AE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return wg.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tu(e)}function Tu(e,t){const n=new Qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=GE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Lz(e){const t={};let n;for(n in e)wg.call(e,n)&&(t[Pz(n)]=e[n]);return t}function Pz(e){let t=e.replace(xz,$z);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $z(e){return"-"+e.toLowerCase()}const Cg={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"]},Uz={};function jz(e,t){const n=Uz,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return KE(e,r,a)}function KE(e,t,n){if(Hz(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return WE(e.children,t,n)}return Array.isArray(e)?WE(e,t,n):""}function WE(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=KE(e[a],t,n);return r.join("")}function Hz(e){return!!(e&&typeof e=="object")}const QE=document.createElement("i");function Ag(e){const t="&"+e+";";QE.innerHTML=t;const n=QE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Bi(e,t,n,r){const a=e.length;let s=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);s<r.length;)u=r.slice(s,s+1e4),u.unshift(t,0),e.splice(...u),s+=1e4,t+=1e4}function Zr(e,t){return e.length>0?(Bi(e,e.length,0,t),e):t}const JE={}.hasOwnProperty;function Vz(e){const t={};let n=-1;for(;++n<e.length;)Fz(t,e[n]);return t}function Fz(e,t){let n;for(n in t){const a=(JE.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let u;if(s)for(u in s){JE.call(a,u)||(a[u]=[]);const f=s[u];qz(a[u],Array.isArray(f)?f:f?[f]:[])}}}function qz(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Bi(e,0,0,r)}function ew(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ms(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zi=Bo(/[A-Za-z]/),Or=Bo(/[\dA-Za-z]/),Gz=Bo(/[#-'*+\--9=?A-Z^-~]/);function kg(e){return e!==null&&(e<32||e===127)}const Og=Bo(/\d/),Yz=Bo(/[\dA-Fa-f]/),Xz=Bo(/[!-/:-@[-`{-~]/);function qe(e){return e!==null&&e<-2}function pr(e){return e!==null&&(e<0||e===32)}function Ot(e){return e===-2||e===-1||e===32}const Zz=Bo(new RegExp("\\p{P}|\\p{S}","u")),Kz=Bo(/\s/);function Bo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ds(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let u="";if(s===37&&Or(e.charCodeAt(n+1))&&Or(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(n+1);s<56320&&f>56319&&f<57344?(u=String.fromCharCode(s,f),a=1):u="�"}else u=String.fromCharCode(s);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+a+1,u=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Qt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(d){return Ot(d)?(e.enter(n),f(d)):t(d)}function f(d){return Ot(d)&&s++<a?(e.consume(d),f):(e.exit(n),t(d))}}const Wz={tokenize:Qz};function Qz(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Qt(e,t,"linePrefix")}function a(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return qe(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),u)}}const Jz={tokenize:eL},tw={tokenize:tL};function eL(e){const t=this,n=[];let r=0,a,s,u;return f;function f(T){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,d,p)(T)}return p(T)}function d(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&O();const C=t.events.length;let N=C,k;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){k=t.events[N][1].end;break}_(r);let z=C;for(;z<t.events.length;)t.events[z][1].end={...k},z++;return Bi(t.events,N+1,0,t.events.slice(C)),t.events.length=z,p(T)}return f(T)}function p(T){if(r===n.length){if(!a)return b(T);if(a.currentConstruct&&a.currentConstruct.concrete)return E(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tw,m,y)(T)}function m(T){return a&&O(),_(r),b(T)}function y(T){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,E(T)}function b(T){return t.containerState={},e.attempt(tw,v,E)(T)}function v(T){return r++,n.push([t.currentConstruct,t.containerState]),b(T)}function E(T){if(T===null){a&&O(),_(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),S(T)}function S(T){if(T===null){w(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return qe(T)?(e.consume(T),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,f):(e.consume(T),S)}function w(T,C){const N=t.sliceStream(T);if(C&&N.push(null),T.previous=s,s&&(s.next=T),s=T,a.defineSkip(T.start),a.write(N),t.parser.lazy[T.start.line]){let k=a.events.length;for(;k--;)if(a.events[k][1].start.offset<u&&(!a.events[k][1].end||a.events[k][1].end.offset>u))return;const z=t.events.length;let H=z,j,G;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(j){G=t.events[H][1].end;break}j=!0}for(_(r),k=z;k<t.events.length;)t.events[k][1].end={...G},k++;Bi(t.events,H+1,0,t.events.slice(z)),t.events.length=k}}function _(T){let C=n.length;for(;C-- >T;){const N=n[C];t.containerState=N[1],N[0].exit.call(t,e)}n.length=T}function O(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function tL(e,t,n){return Qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nw(e){if(e===null||pr(e)||Kz(e))return 1;if(Zz(e))return 2}function Rg(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const s=e[a].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ng={name:"attention",resolveAll:nL,tokenize:rL};function nL(e,t){let n=-1,r,a,s,u,f,d,p,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[r][1].end},b={...e[n][1].start};rw(y,-d),rw(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[r][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[r][1].end={...u.start},e[n][1].start={...f.end},p=[],e[r][1].end.offset-e[r][1].start.offset&&(p=Zr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])),p=Zr(p,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",s,t]]),p=Zr(p,Rg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),p=Zr(p,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,p=Zr(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Bi(e,r-1,n-r+3,p),n=r+p.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function rL(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=nw(r);let s;return u;function u(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const p=e.exit("attentionSequence"),m=nw(d),y=!m||m===2&&a||n.includes(d),b=!a||a===2&&m||n.includes(r);return p._open=!!(s===42?y:y&&(a||!b)),p._close=!!(s===42?b:b&&(m||!y)),t(d)}}function rw(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const iL={name:"autolink",tokenize:oL};function oL(e,t,n){let r=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return zi(v)?(e.consume(v),u):v===64?n(v):p(v)}function u(v){return v===43||v===45||v===46||Or(v)?(r=1,f(v)):p(v)}function f(v){return v===58?(e.consume(v),r=0,d):(v===43||v===45||v===46||Or(v))&&r++<32?(e.consume(v),f):(r=0,p(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||kg(v)?n(v):(e.consume(v),d)}function p(v){return v===64?(e.consume(v),m):Gz(v)?(e.consume(v),p):n(v)}function m(v){return Or(v)?y(v):n(v)}function y(v){return v===46?(e.consume(v),r=0,m):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||Or(v))&&r++<63){const E=v===45?b:y;return e.consume(v),E}return n(v)}}const bd={partial:!0,tokenize:aL};function aL(e,t,n){return r;function r(s){return Ot(s)?Qt(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||qe(s)?t(s):n(s)}}const iw={continuation:{tokenize:lL},exit:uL,name:"blockQuote",tokenize:sL};function sL(e,t,n){const r=this;return a;function a(u){if(u===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),s}return n(u)}function s(u){return Ot(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function lL(e,t,n){const r=this;return a;function a(u){return Ot(u)?Qt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(iw,t,n)(u)}}function uL(e){e.exit("blockQuote")}const ow={name:"characterEscape",tokenize:cL};function cL(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return Xz(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const aw={name:"characterReference",tokenize:fL};function fL(e,t,n){const r=this;let a=0,s,u;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),s=31,u=Or,m(y))}function p(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=Yz,m):(e.enter("characterReferenceValue"),s=7,u=Og,m(y))}function m(y){if(y===59&&a){const b=e.exit("characterReferenceValue");return u===Or&&!Ag(r.sliceSerialize(b))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(y)&&a++<s?(e.consume(y),m):n(y)}}const sw={partial:!0,tokenize:pL},lw={concrete:!0,name:"codeFenced",tokenize:dL};function dL(e,t,n){const r=this,a={partial:!0,tokenize:N};let s=0,u=0,f;return d;function d(k){return p(k)}function p(k){const z=r.events[r.events.length-1];return s=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,f=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(k)}function m(k){return k===f?(u++,e.consume(k),m):u<3?n(k):(e.exit("codeFencedFenceSequence"),Ot(k)?Qt(e,y,"whitespace")(k):y(k))}function y(k){return k===null||qe(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(sw,S,C)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===null||qe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(k)):Ot(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qt(e,v,"whitespace")(k)):k===96&&k===f?n(k):(e.consume(k),b)}function v(k){return k===null||qe(k)?y(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(k))}function E(k){return k===null||qe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(k)):k===96&&k===f?n(k):(e.consume(k),E)}function S(k){return e.attempt(a,C,w)(k)}function w(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),_}function _(k){return s>0&&Ot(k)?Qt(e,O,"linePrefix",s+1)(k):O(k)}function O(k){return k===null||qe(k)?e.check(sw,S,C)(k):(e.enter("codeFlowValue"),T(k))}function T(k){return k===null||qe(k)?(e.exit("codeFlowValue"),O(k)):(e.consume(k),T)}function C(k){return e.exit("codeFenced"),t(k)}function N(k,z,H){let j=0;return G;function G(U){return k.enter("lineEnding"),k.consume(U),k.exit("lineEnding"),F}function F(U){return k.enter("codeFencedFence"),Ot(U)?Qt(k,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):A(U)}function A(U){return U===f?(k.enter("codeFencedFenceSequence"),X(U)):H(U)}function X(U){return U===f?(j++,k.consume(U),X):j>=u?(k.exit("codeFencedFenceSequence"),Ot(U)?Qt(k,$,"whitespace")(U):$(U)):H(U)}function $(U){return U===null||qe(U)?(k.exit("codeFencedFence"),z(U)):H(U)}}}function pL(e,t,n){const r=this;return a;function a(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Ig={name:"codeIndented",tokenize:mL},hL={partial:!0,tokenize:gL};function mL(e,t,n){const r=this;return a;function a(p){return e.enter("codeIndented"),Qt(e,s,"linePrefix",5)(p)}function s(p){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(p):n(p)}function u(p){return p===null?d(p):qe(p)?e.attempt(hL,u,d)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||qe(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),f)}function d(p){return e.exit("codeIndented"),t(p)}}function gL(e,t,n){const r=this;return a;function a(u){return r.parser.lazy[r.now().line]?n(u):qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):Qt(e,s,"linePrefix",5)(u)}function s(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):qe(u)?a(u):n(u)}}const yL={name:"codeText",previous:bL,resolve:vL,tokenize:SL};function vL(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function bL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function SL(e,t,n){let r=0,a,s;return u;function u(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),r++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),a=0,m(y)):qe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||qe(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),p)}function m(y){return y===96?(e.consume(y),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(s.type="codeTextData",p(y))}}class xL{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Cu(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Cu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Cu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Cu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Cu(this.left,n.reverse())}}}function Cu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function uw(e){const t={};let n=-1,r,a,s,u,f,d,p;const m=new xL(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,EL(m,n)),n=t[n],p=!0);else if(r[1]._container){for(s=n,a=void 0;s--;)if(u=m.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(r[1].end={...m.get(a)[1].start},f=m.slice(a,n),f.unshift(r),m.splice(a,n-a+1,f))}}return Bi(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function EL(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const s=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],p={};let m,y,b=-1,v=n,E=0,S=0;const w=[S];for(;v;){for(;e.get(++a)[1]!==v;);s.push(a),v._tokenizer||(m=r.sliceStream(v),v.next||m.push(null),y&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=n;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(S=b+1,w.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):w.pop(),b=w.length;b--;){const _=f.slice(w[b],w[b+1]),O=s.pop();d.push([O,O+_.length-1]),e.splice(O,2,_)}for(d.reverse(),b=-1;++b<d.length;)p[E+d[b][0]]=E+d[b][1],E+=d[b][1]-d[b][0]-1;return p}const wL={resolve:TL,tokenize:CL},_L={partial:!0,tokenize:AL};function TL(e){return uw(e),e}function CL(e,t){let n;return r;function r(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?s(f):qe(f)?e.check(_L,u,s)(f):(e.consume(f),a)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function AL(e,t,n){const r=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Qt(e,s,"linePrefix")}function s(u){if(u===null||qe(u))return n(u);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function cw(e,t,n,r,a,s,u,f,d){const p=d||Number.POSITIVE_INFINITY;let m=0;return y;function y(_){return _===60?(e.enter(r),e.enter(a),e.enter(s),e.consume(_),e.exit(s),b):_===null||_===32||_===41||kg(_)?n(_):(e.enter(r),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(_))}function b(_){return _===62?(e.enter(s),e.consume(_),e.exit(s),e.exit(a),e.exit(r),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(f),b(_)):_===null||_===60||qe(_)?n(_):(e.consume(_),_===92?E:v)}function E(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function S(_){return!m&&(_===null||_===41||pr(_))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(r),t(_)):m<p&&_===40?(e.consume(_),m++,S):_===41?(e.consume(_),m--,S):_===null||_===32||_===40||kg(_)?n(_):(e.consume(_),_===92?w:S)}function w(_){return _===40||_===41||_===92?(e.consume(_),S):S(_)}}function fw(e,t,n,r,a,s){const u=this;let f=0,d;return p;function p(v){return e.enter(r),e.enter(a),e.consume(v),e.exit(a),e.enter(s),m}function m(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(s),e.enter(a),e.consume(v),e.exit(a),e.exit(r),t):qe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||qe(v)||f++>999?(e.exit("chunkString"),m(v)):(e.consume(v),d||(d=!Ot(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function dw(e,t,n,r,a,s){let u;return f;function f(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(s),p(b))}function p(b){return b===u?(e.exit(s),d(u)):b===null?n(b):qe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Qt(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===u||b===null||qe(b)?(e.exit("chunkString"),p(b)):(e.consume(b),b===92?y:m)}function y(b){return b===u||b===92?(e.consume(b),m):m(b)}}function Au(e,t){let n;return r;function r(a){return qe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):Ot(a)?Qt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const kL={name:"definition",tokenize:RL},OL={partial:!0,tokenize:NL};function RL(e,t,n){const r=this;let a;return s;function s(v){return e.enter("definition"),u(v)}function u(v){return fw.call(r,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return a=Ms(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return pr(v)?Au(e,p)(v):p(v)}function p(v){return cw(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function m(v){return e.attempt(OL,y,y)(v)}function y(v){return Ot(v)?Qt(e,b,"whitespace")(v):b(v)}function b(v){return v===null||qe(v)?(e.exit("definition"),r.parser.defined.push(a),t(v)):n(v)}}function NL(e,t,n){return r;function r(f){return pr(f)?Au(e,a)(f):n(f)}function a(f){return dw(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ot(f)?Qt(e,u,"whitespace")(f):u(f)}function u(f){return f===null||qe(f)?t(f):n(f)}}const IL={name:"hardBreakEscape",tokenize:ML};function ML(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return qe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const DL={name:"headingAtx",resolve:BL,tokenize:zL};function BL(e,t){let n=e.length-2,r=3,a,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Bi(e,r,n-r+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function zL(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||pr(m)?(e.exit("atxHeadingSequence"),f(m)):n(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||qe(m)?(e.exit("atxHeading"),t(m)):Ot(m)?Qt(e,f,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),f(m))}function p(m){return m===null||m===35||pr(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),p)}}const LL=["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"],pw=["pre","script","style","textarea"],PL={concrete:!0,name:"htmlFlow",resolveTo:jL,tokenize:HL},$L={partial:!0,tokenize:FL},UL={partial:!0,tokenize:VL};function jL(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function HL(e,t,n){const r=this;let a,s,u,f,d;return p;function p(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),y}function y(M){return M===33?(e.consume(M),b):M===47?(e.consume(M),s=!0,S):M===63?(e.consume(M),a=3,r.interrupt?t:B):zi(M)?(e.consume(M),u=String.fromCharCode(M),w):n(M)}function b(M){return M===45?(e.consume(M),a=2,v):M===91?(e.consume(M),a=5,f=0,E):zi(M)?(e.consume(M),a=4,r.interrupt?t:B):n(M)}function v(M){return M===45?(e.consume(M),r.interrupt?t:B):n(M)}function E(M){const fe="CDATA[";return M===fe.charCodeAt(f++)?(e.consume(M),f===fe.length?r.interrupt?t:A:E):n(M)}function S(M){return zi(M)?(e.consume(M),u=String.fromCharCode(M),w):n(M)}function w(M){if(M===null||M===47||M===62||pr(M)){const fe=M===47,ge=u.toLowerCase();return!fe&&!s&&pw.includes(ge)?(a=1,r.interrupt?t(M):A(M)):LL.includes(u.toLowerCase())?(a=6,fe?(e.consume(M),_):r.interrupt?t(M):A(M)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):s?O(M):T(M))}return M===45||Or(M)?(e.consume(M),u+=String.fromCharCode(M),w):n(M)}function _(M){return M===62?(e.consume(M),r.interrupt?t:A):n(M)}function O(M){return Ot(M)?(e.consume(M),O):G(M)}function T(M){return M===47?(e.consume(M),G):M===58||M===95||zi(M)?(e.consume(M),C):Ot(M)?(e.consume(M),T):G(M)}function C(M){return M===45||M===46||M===58||M===95||Or(M)?(e.consume(M),C):N(M)}function N(M){return M===61?(e.consume(M),k):Ot(M)?(e.consume(M),N):T(M)}function k(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),d=M,z):Ot(M)?(e.consume(M),k):H(M)}function z(M){return M===d?(e.consume(M),d=null,j):M===null||qe(M)?n(M):(e.consume(M),z)}function H(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||pr(M)?N(M):(e.consume(M),H)}function j(M){return M===47||M===62||Ot(M)?T(M):n(M)}function G(M){return M===62?(e.consume(M),F):n(M)}function F(M){return M===null||qe(M)?A(M):Ot(M)?(e.consume(M),F):n(M)}function A(M){return M===45&&a===2?(e.consume(M),D):M===60&&a===1?(e.consume(M),Y):M===62&&a===4?(e.consume(M),P):M===63&&a===3?(e.consume(M),B):M===93&&a===5?(e.consume(M),ae):qe(M)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check($L,W,X)(M)):M===null||qe(M)?(e.exit("htmlFlowData"),X(M)):(e.consume(M),A)}function X(M){return e.check(UL,$,W)(M)}function $(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),U}function U(M){return M===null||qe(M)?X(M):(e.enter("htmlFlowData"),A(M))}function D(M){return M===45?(e.consume(M),B):A(M)}function Y(M){return M===47?(e.consume(M),u="",re):A(M)}function re(M){if(M===62){const fe=u.toLowerCase();return pw.includes(fe)?(e.consume(M),P):A(M)}return zi(M)&&u.length<8?(e.consume(M),u+=String.fromCharCode(M),re):A(M)}function ae(M){return M===93?(e.consume(M),B):A(M)}function B(M){return M===62?(e.consume(M),P):M===45&&a===2?(e.consume(M),B):A(M)}function P(M){return M===null||qe(M)?(e.exit("htmlFlowData"),W(M)):(e.consume(M),P)}function W(M){return e.exit("htmlFlow"),t(M)}}function VL(e,t,n){const r=this;return a;function a(u){return qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):n(u)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function FL(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(bd,t,n)}}const qL={name:"htmlText",tokenize:GL};function GL(e,t,n){const r=this;let a,s,u;return f;function f(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),d}function d(B){return B===33?(e.consume(B),p):B===47?(e.consume(B),N):B===63?(e.consume(B),T):zi(B)?(e.consume(B),H):n(B)}function p(B){return B===45?(e.consume(B),m):B===91?(e.consume(B),s=0,E):zi(B)?(e.consume(B),O):n(B)}function m(B){return B===45?(e.consume(B),v):n(B)}function y(B){return B===null?n(B):B===45?(e.consume(B),b):qe(B)?(u=y,Y(B)):(e.consume(B),y)}function b(B){return B===45?(e.consume(B),v):y(B)}function v(B){return B===62?D(B):B===45?b(B):y(B)}function E(B){const P="CDATA[";return B===P.charCodeAt(s++)?(e.consume(B),s===P.length?S:E):n(B)}function S(B){return B===null?n(B):B===93?(e.consume(B),w):qe(B)?(u=S,Y(B)):(e.consume(B),S)}function w(B){return B===93?(e.consume(B),_):S(B)}function _(B){return B===62?D(B):B===93?(e.consume(B),_):S(B)}function O(B){return B===null||B===62?D(B):qe(B)?(u=O,Y(B)):(e.consume(B),O)}function T(B){return B===null?n(B):B===63?(e.consume(B),C):qe(B)?(u=T,Y(B)):(e.consume(B),T)}function C(B){return B===62?D(B):T(B)}function N(B){return zi(B)?(e.consume(B),k):n(B)}function k(B){return B===45||Or(B)?(e.consume(B),k):z(B)}function z(B){return qe(B)?(u=z,Y(B)):Ot(B)?(e.consume(B),z):D(B)}function H(B){return B===45||Or(B)?(e.consume(B),H):B===47||B===62||pr(B)?j(B):n(B)}function j(B){return B===47?(e.consume(B),D):B===58||B===95||zi(B)?(e.consume(B),G):qe(B)?(u=j,Y(B)):Ot(B)?(e.consume(B),j):D(B)}function G(B){return B===45||B===46||B===58||B===95||Or(B)?(e.consume(B),G):F(B)}function F(B){return B===61?(e.consume(B),A):qe(B)?(u=F,Y(B)):Ot(B)?(e.consume(B),F):j(B)}function A(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),a=B,X):qe(B)?(u=A,Y(B)):Ot(B)?(e.consume(B),A):(e.consume(B),$)}function X(B){return B===a?(e.consume(B),a=void 0,U):B===null?n(B):qe(B)?(u=X,Y(B)):(e.consume(B),X)}function $(B){return B===null||B===34||B===39||B===60||B===61||B===96?n(B):B===47||B===62||pr(B)?j(B):(e.consume(B),$)}function U(B){return B===47||B===62||pr(B)?j(B):n(B)}function D(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):n(B)}function Y(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),re}function re(B){return Ot(B)?Qt(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):ae(B)}function ae(B){return e.enter("htmlTextData"),u(B)}}const Mg={name:"labelEnd",resolveAll:KL,resolveTo:WL,tokenize:QL},YL={tokenize:JL},XL={tokenize:eP},ZL={tokenize:tP};function KL(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Bi(e,0,e.length,n),e}function WL(e,t){let n=e.length,r=0,a,s,u,f;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(u=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[s][1].start},end:{...e[u][1].end}},m={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,t],["enter",p,t]],f=Zr(f,e.slice(s+1,s+r+3)),f=Zr(f,[["enter",m,t]]),f=Zr(f,Rg(t.parser.constructs.insideSpan.null,e.slice(s+r+4,u-3),t)),f=Zr(f,[["exit",m,t],e[u-2],e[u-1],["exit",p,t]]),f=Zr(f,e.slice(u+1)),f=Zr(f,[["exit",d,t]]),Bi(e,s,e.length,f),e}function QL(e,t,n){const r=this;let a=r.events.length,s,u;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){s=r.events[a][1];break}return f;function f(b){return s?s._inactive?y(b):(u=r.parser.defined.includes(Ms(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(YL,m,u?m:y)(b):b===91?e.attempt(XL,m,u?p:y)(b):u?m(b):y(b)}function p(b){return e.attempt(ZL,m,y)(b)}function m(b){return t(b)}function y(b){return s._balanced=!0,n(b)}}function JL(e,t,n){return r;function r(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),a}function a(y){return pr(y)?Au(e,s)(y):s(y)}function s(y){return y===41?m(y):cw(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function u(y){return pr(y)?Au(e,d)(y):m(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?dw(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):m(y)}function p(y){return pr(y)?Au(e,m)(y):m(y)}function m(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function eP(e,t,n){const r=this;return a;function a(f){return fw.call(r,e,s,u,"reference","referenceMarker","referenceString")(f)}function s(f){return r.parser.defined.includes(Ms(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function u(f){return n(f)}}function tP(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const nP={name:"labelStartImage",resolveAll:Mg.resolveAll,tokenize:rP};function rP(e,t,n){const r=this;return a;function a(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):n(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(f):t(f)}}const iP={name:"labelStartLink",resolveAll:Mg.resolveAll,tokenize:oP};function oP(e,t,n){const r=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Dg={name:"lineEnding",tokenize:aP};function aP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qt(e,t,"linePrefix")}}const Sd={name:"thematicBreak",tokenize:sP};function sP(e,t,n){let r=0,a;return s;function s(p){return e.enter("thematicBreak"),u(p)}function u(p){return a=p,f(p)}function f(p){return p===a?(e.enter("thematicBreakSequence"),d(p)):r>=3&&(p===null||qe(p))?(e.exit("thematicBreak"),t(p)):n(p)}function d(p){return p===a?(e.consume(p),r++,d):(e.exit("thematicBreakSequence"),Ot(p)?Qt(e,f,"whitespace")(p):f(p))}}const hr={continuation:{tokenize:fP},exit:pP,name:"list",tokenize:cP},lP={partial:!0,tokenize:hP},uP={partial:!0,tokenize:dP};function cP(e,t,n){const r=this,a=r.events[r.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return f;function f(v){const E=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:Og(v)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Sd,n,p)(v):p(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return Og(v)&&++u<10?(e.consume(v),d):(!r.interrupt||u<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),p(v)):n(v)}function p(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(bd,r.interrupt?n:m,e.attempt(lP,b,y))}function m(v){return r.containerState.initialBlankLine=!0,s++,b(v)}function y(v){return Ot(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function fP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(bd,a,s);function a(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qt(e,t,"listItemIndent",r.containerState.size+1)(f)}function s(f){return r.containerState.furtherBlankLines||!Ot(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uP,t,u)(f))}function u(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qt(e,e.attempt(hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function dP(e,t,n){const r=this;return Qt(e,a,"listItemIndent",r.containerState.size+1);function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(s):n(s)}}function pP(e){e.exit(this.containerState.type)}function hP(e,t,n){const r=this;return Qt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const u=r.events[r.events.length-1];return!Ot(s)&&u&&u[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const hw={name:"setextUnderline",resolveTo:mP,tokenize:gP};function mP(e,t){let n=e.length,r,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",u,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=u,e.push(["exit",u,t]),e}function gP(e,t,n){const r=this;let a;return s;function s(p){let m=r.events.length,y;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){y=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(e.enter("setextHeadingLine"),a=p,u(p)):n(p)}function u(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===a?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Ot(p)?Qt(e,d,"lineSuffix")(p):d(p))}function d(p){return p===null||qe(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const yP={tokenize:vP};function vP(e){const t=this,n=e.attempt(bd,r,e.attempt(this.parser.constructs.flowInitial,a,Qt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(wL,a)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bP={resolveAll:gw()},SP=mw("string"),xP=mw("text");function mw(e){return{resolveAll:gw(e==="text"?EP:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],s=n.attempt(a,u,f);return u;function u(m){return p(m)?s(m):f(m)}function f(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return p(m)?(n.exit("data"),s(m)):(n.consume(m),d)}function p(m){if(m===null)return!0;const y=a[m];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function gw(e){return t;function t(n,r){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,r):n}}function EP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let s=a.length,u=-1,f=0,d;for(;s--;){const p=a[s];if(typeof p=="string"){for(u=p.length;p.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(p===-2)d=!0,f++;else if(p!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const p={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:r.start._bufferIndex+u,_index:r.start._index+s,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const wP=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:kL},disable:{null:[]},document:{42:hr,43:hr,45:hr,48:hr,49:hr,50:hr,51:hr,52:hr,53:hr,54:hr,55:hr,56:hr,57:hr,62:iw},flow:{35:DL,42:Sd,45:[hw,Sd],60:PL,61:hw,95:Sd,96:lw,126:lw},flowInitial:{[-2]:Ig,[-1]:Ig,32:Ig},insideSpan:{null:[Ng,bP]},string:{38:aw,92:ow},text:{[-5]:Dg,[-4]:Dg,[-3]:Dg,33:nP,38:aw,42:Ng,60:[iL,qL],91:iP,92:[IL,ow],93:Mg,95:Ng,96:yL}},Symbol.toStringTag,{value:"Module"}));function _P(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let u=[],f=[];const d={attempt:z(N),check:z(k),consume:O,enter:T,exit:C,interrupt:z(k,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:E,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:y};let m=t.tokenize.call(p,d);return t.resolveAll&&s.push(t),p;function y(F){return u=Zr(u,F),w(),u[u.length-1]!==null?[]:(H(t,0),p.events=Rg(s,p.events,p),p.events)}function b(F,A){return CP(v(F),A)}function v(F){return TP(u,F)}function E(){const{_bufferIndex:F,_index:A,line:X,column:$,offset:U}=r;return{_bufferIndex:F,_index:A,line:X,column:$,offset:U}}function S(F){a[F.line]=F.column,G()}function w(){let F;for(;r._index<u.length;){const A=u[r._index];if(typeof A=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<A.length;)_(A.charCodeAt(r._bufferIndex));else _(A)}}function _(F){m=m(F)}function O(F){qe(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,G()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=F}function T(F,A){const X=A||{};return X.type=F,X.start=E(),p.events.push(["enter",X,p]),f.push(X),X}function C(F){const A=f.pop();return A.end=E(),p.events.push(["exit",A,p]),A}function N(F,A){H(F,A.from)}function k(F,A){A.restore()}function z(F,A){return X;function X($,U,D){let Y,re,ae,B;return Array.isArray($)?W($):"tokenize"in $?W([$]):P($);function P(ye){return Se;function Se($e){const Ae=$e!==null&&ye[$e],Me=$e!==null&&ye.null,Ue=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return W(Ue)($e)}}function W(ye){return Y=ye,re=0,ye.length===0?D:M(ye[re])}function M(ye){return Se;function Se($e){return B=j(),ae=ye,ye.partial||(p.currentConstruct=ye),ye.name&&p.parser.constructs.disable.null.includes(ye.name)?ge():ye.tokenize.call(A?Object.assign(Object.create(p),A):p,d,fe,ge)($e)}}function fe(ye){return F(ae,B),U}function ge(ye){return B.restore(),++re<Y.length?M(Y[re]):D}}}function H(F,A){F.resolveAll&&!s.includes(F)&&s.push(F),F.resolve&&Bi(p.events,A,p.events.length-A,F.resolve(p.events.slice(A),p)),F.resolveTo&&(p.events=F.resolveTo(p.events,p))}function j(){const F=E(),A=p.previous,X=p.currentConstruct,$=p.events.length,U=Array.from(f);return{from:$,restore:D};function D(){r=F,p.previous=A,p.currentConstruct=X,p.events.length=$,f=U,G()}}function G(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function TP(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let u;if(n===a)u=[e[n].slice(r,s)];else{if(u=e.slice(n,a),r>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(r):u.shift()}s>0&&u.push(e[a].slice(0,s))}return u}function CP(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const s=e[n];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
158
+ `;break}case-3:{u=`\r
159
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(s)}a=s===-2,r.push(u)}return r.join("")}function AP(e){const r={constructs:Vz([wP,...(e||{}).extensions||[]]),content:a(Wz),defined:[],document:a(Jz),flow:a(yP),lazy:{},string:a(SP),text:a(xP)};return r;function a(s){return u;function u(f){return _P(r,s,f)}}}function kP(e){for(;!uw(e););return e}const yw=/[\0\t\n\r]/g;function OP(){let e=1,t="",n=!0,r;return a;function a(s,u,f){const d=[];let p,m,y,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),y=0,t="",n&&(s.charCodeAt(0)===65279&&y++,n=void 0);y<s.length;){if(yw.lastIndex=y,p=yw.exec(s),b=p&&p.index!==void 0?p.index:s.length,v=s.charCodeAt(b),!p){t=s.slice(y);break}if(v===10&&y===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),y<b&&(d.push(s.slice(y,b)),e+=b-y),v){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}y=b+1}return f&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const RP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NP(e){return e.replace(RP,IP)}function IP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return ew(n.slice(s?2:1),s?16:10)}return Ag(n)||e}const vw={}.hasOwnProperty;function MP(e,t,n){return typeof t!="string"&&(n=t,t=void 0),DP(n)(kP(AP(n).document().write(OP()(e,t,!0))))}function DP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ut),autolinkProtocol:j,autolinkEmail:j,atxHeading:s(Ge),blockQuote:s(Me),characterEscape:j,characterReference:j,codeFenced:s(Ue),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(Ue,u),codeText:s(Xe,u),codeTextData:j,data:j,codeFlowValue:j,definition:s(Xt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(Oe),hardBreakEscape:s(Dt),hardBreakTrailing:s(Dt),htmlFlow:s(Rt,u),htmlFlowData:j,htmlText:s(Rt,u),htmlTextData:j,image:s(ht),label:u,link:s(ut),listItem:s(ot),listItemValue:b,listOrdered:s(mt,y),listUnordered:s(mt),paragraph:s(ke),reference:M,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(Ge),strong:s(Bn),thematicBreak:s(tr)},exit:{atxHeading:d(),atxHeadingSequence:N,autolink:d(),autolinkEmail:Ae,autolinkProtocol:$e,blockQuote:d(),characterEscapeValue:G,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:ye,characterReference:Se,codeFenced:d(w),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:G,codeIndented:d(_),codeText:d(U),codeTextData:G,data:G,definition:d(),definitionDestinationString:C,definitionLabelString:O,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(A),hardBreakTrailing:d(A),htmlFlow:d(X),htmlFlowData:G,htmlText:d($),htmlTextData:G,image:d(Y),label:ae,labelText:re,lineEnding:F,link:d(D),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:fe,resourceDestinationString:B,resourceTitleString:P,resource:W,setextHeading:d(H),setextHeadingLineSequence:z,setextHeadingText:k,strong:d(),thematicBreak:d()}};bw(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(te){let se={type:"root",children:[]};const xe={stack:[se],tokenStack:[],config:t,enter:f,exit:p,buffer:u,resume:m,data:n},Re=[];let Ze=-1;for(;++Ze<te.length;)if(te[Ze][1].type==="listOrdered"||te[Ze][1].type==="listUnordered")if(te[Ze][0]==="enter")Re.push(Ze);else{const je=Re.pop();Ze=a(te,je,Ze)}for(Ze=-1;++Ze<te.length;){const je=t[te[Ze][0]];vw.call(je,te[Ze][1].type)&&je[te[Ze][1].type].call(Object.assign({sliceSerialize:te[Ze][2].sliceSerialize},xe),te[Ze][1])}if(xe.tokenStack.length>0){const je=xe.tokenStack[xe.tokenStack.length-1];(je[1]||Sw).call(xe,void 0,je[0])}for(se.position={start:zo(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:zo(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<t.transforms.length;)se=t.transforms[Ze](se)||se;return se}function a(te,se,xe){let Re=se-1,Ze=-1,je=!1,en,Bt,$t,Pn;for(;++Re<=xe;){const gt=te[Re];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?Ze++:Ze--,Pn=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(en&&!Pn&&!Ze&&!$t&&($t=Re),Pn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Pn=void 0}if(!Ze&&gt[0]==="enter"&&gt[1].type==="listItemPrefix"||Ze===-1&&gt[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(en){let Te=Re;for(Bt=void 0;Te--;){const Je=te[Te];if(Je[1].type==="lineEnding"||Je[1].type==="lineEndingBlank"){if(Je[0]==="exit")continue;Bt&&(te[Bt][1].type="lineEndingBlank",je=!0),Je[1].type="lineEnding",Bt=Te}else if(!(Je[1].type==="linePrefix"||Je[1].type==="blockQuotePrefix"||Je[1].type==="blockQuotePrefixWhitespace"||Je[1].type==="blockQuoteMarker"||Je[1].type==="listItemIndent"))break}$t&&(!Bt||$t<Bt)&&(en._spread=!0),en.end=Object.assign({},Bt?te[Bt][1].start:gt[1].end),te.splice(Bt||Re,0,["exit",en,gt[2]]),Re++,xe++}if(gt[1].type==="listItemPrefix"){const Te={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};en=Te,te.splice(Re,0,["enter",Te,gt[2]]),Re++,xe++,$t=void 0,Pn=!0}}}return te[se][1]._spread=je,xe}function s(te,se){return xe;function xe(Re){f.call(this,te(Re),Re),se&&se.call(this,Re)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(te,se,xe){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([se,xe||void 0]),te.position={start:zo(se.start),end:void 0}}function d(te){return se;function se(xe){te&&te.call(this,xe),p.call(this,xe)}}function p(te,se){const xe=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==te.type&&(se?se.call(this,te,Re[0]):(Re[1]||Sw).call(this,te,Re[0]));else throw new Error("Cannot close `"+te.type+"` ("+_u({start:te.start,end:te.end})+"): it’s not open");xe.position.end=zo(te.end)}function m(){return jz(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(te){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function v(){const te=this.resume(),se=this.stack[this.stack.length-1];se.lang=te}function E(){const te=this.resume(),se=this.stack[this.stack.length-1];se.meta=te}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const te=this.resume(),se=this.stack[this.stack.length-1];se.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const te=this.resume(),se=this.stack[this.stack.length-1];se.value=te.replace(/(\r?\n|\r)$/g,"")}function O(te){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.label=se,xe.identifier=Ms(this.sliceSerialize(te)).toLowerCase()}function T(){const te=this.resume(),se=this.stack[this.stack.length-1];se.title=te}function C(){const te=this.resume(),se=this.stack[this.stack.length-1];se.url=te}function N(te){const se=this.stack[this.stack.length-1];if(!se.depth){const xe=this.sliceSerialize(te).length;se.depth=xe}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function z(te){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function j(te){const xe=this.stack[this.stack.length-1].children;let Re=xe[xe.length-1];(!Re||Re.type!=="text")&&(Re=We(),Re.position={start:zo(te.start),end:void 0},xe.push(Re)),this.stack.push(Re)}function G(te){const se=this.stack.pop();se.value+=this.sliceSerialize(te),se.position.end=zo(te.end)}function F(te){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=se.children[se.children.length-1];xe.position.end=zo(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(j.call(this,te),G.call(this,te))}function A(){this.data.atHardBreak=!0}function X(){const te=this.resume(),se=this.stack[this.stack.length-1];se.value=te}function $(){const te=this.resume(),se=this.stack[this.stack.length-1];se.value=te}function U(){const te=this.resume(),se=this.stack[this.stack.length-1];se.value=te}function D(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=se,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Y(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=se,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function re(te){const se=this.sliceSerialize(te),xe=this.stack[this.stack.length-2];xe.label=NP(se),xe.identifier=Ms(se).toLowerCase()}function ae(){const te=this.stack[this.stack.length-1],se=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Re=te.children;xe.children=Re}else xe.alt=se}function B(){const te=this.resume(),se=this.stack[this.stack.length-1];se.url=te}function P(){const te=this.resume(),se=this.stack[this.stack.length-1];se.title=te}function W(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function fe(te){const se=this.resume(),xe=this.stack[this.stack.length-1];xe.label=se,xe.identifier=Ms(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ge(te){this.data.characterReferenceType=te.type}function ye(te){const se=this.sliceSerialize(te),xe=this.data.characterReferenceType;let Re;xe?(Re=ew(se,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Ag(se);const Ze=this.stack[this.stack.length-1];Ze.value+=Re}function Se(te){const se=this.stack.pop();se.position.end=zo(te.end)}function $e(te){G.call(this,te);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(te)}function Ae(te){G.call(this,te);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(te)}function Me(){return{type:"blockquote",children:[]}}function Ue(){return{type:"code",lang:null,meta:null,value:""}}function Xe(){return{type:"inlineCode",value:""}}function Xt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Oe(){return{type:"emphasis",children:[]}}function Ge(){return{type:"heading",depth:0,children:[]}}function Dt(){return{type:"break"}}function Rt(){return{type:"html",value:""}}function ht(){return{type:"image",title:null,url:"",alt:null}}function ut(){return{type:"link",title:null,url:"",children:[]}}function mt(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function ot(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function ke(){return{type:"paragraph",children:[]}}function Bn(){return{type:"strong",children:[]}}function We(){return{type:"text",value:""}}function tr(){return{type:"thematicBreak"}}}function zo(e){return{line:e.line,column:e.column,offset:e.offset}}function bw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?bw(e,r):BP(e,r)}}function BP(e,t){let n;for(n in t)if(vw.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Sw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_u({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_u({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_u({start:t.start,end:t.end})+") is still open")}function zP(e){const t=this;t.parser=n;function n(r){return MP(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function LP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function PP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
160
+ `}]}function $P(e,t){const n=t.value?t.value+`
161
+ `:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function UP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Ds(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let u,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=s+1,f+=1,e.footnoteCounts.set(r,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const p={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,p),e.applyData(t,p)}function VP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xw(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const u=a[a.length-1];return u&&u.type==="text"?u.value+=r:a.push({type:"text",value:r}),a}function qP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xw(e,t);const a={src:Ds(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function GP(e,t){const n={src:Ds(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function YP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function XP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xw(e,t);const a={href:Ds(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function ZP(e,t){const n={href:Ds(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function KP(e,t,n){const r=e.all(t),a=n?WP(n):Ew(t),s={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let y;m&&m.type==="element"&&m.tagName==="p"?y=m:(y={type:"element",tagName:"p",properties:{},children:[]},r.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const m=r[f];(a||f!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
162
+ `}),m.type==="element"&&m.tagName==="p"&&!a?u.push(...m.children):u.push(m)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
163
+ `});const p={type:"element",tagName:"li",properties:s,children:u};return e.patch(t,p),e.applyData(t,p)}function WP(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ew(n[r])}return t}function Ew(e){const t=e.spread;return t??e.children.length>1}function QP(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const u=r[a];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function JP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e$(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function t$(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n$(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),a.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=xg(t.children[1]),d=HE(t.children[t.children.length-1]);f&&d&&(u.position={start:f,end:d}),a.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function r$(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,f=u?u.length:t.children.length;let d=-1;const p=[];for(;++d<f;){const y=t.children[d],b={},v=u?u[d]:void 0;v&&(b.align=v);let E={type:"element",tagName:s,properties:b,children:[]};y&&(E.children=e.all(y),e.patch(y,E),E=e.applyData(y,E)),p.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,m),e.applyData(t,m)}function i$(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ww=9,_w=32;function o$(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const s=[];for(;r;)s.push(Tw(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return s.push(Tw(t.slice(a),a>0,!1)),s.join("")}function Tw(e,t,n){let r=0,a=e.length;if(t){let s=e.codePointAt(r);for(;s===ww||s===_w;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(a-1);for(;s===ww||s===_w;)a--,s=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function a$(e,t){const n={type:"text",value:o$(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function s$(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const l$={blockquote:LP,break:PP,code:$P,delete:UP,emphasis:jP,footnoteReference:HP,heading:VP,html:FP,imageReference:qP,image:GP,inlineCode:YP,linkReference:XP,link:ZP,listItem:KP,list:QP,paragraph:JP,root:e$,strong:t$,table:n$,tableCell:i$,tableRow:r$,text:a$,thematicBreak:s$,toml:xd,yaml:xd,definition:xd,footnoteDefinition:xd};function xd(){}const Cw=-1,Ed=0,ku=1,wd=2,Bg=3,zg=4,Lg=5,Pg=6,Aw=7,kw=8,Ow=typeof self=="object"?self:globalThis,u$=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),r=a=>{if(e.has(a))return e.get(a);const[s,u]=t[a];switch(s){case Ed:case Cw:return n(u,a);case ku:{const f=n([],a);for(const d of u)f.push(r(d));return f}case wd:{const f=n({},a);for(const[d,p]of u)f[r(d)]=r(p);return f}case Bg:return n(new Date(u),a);case zg:{const{source:f,flags:d}=u;return n(new RegExp(f,d),a)}case Lg:{const f=n(new Map,a);for(const[d,p]of u)f.set(r(d),r(p));return f}case Pg:{const f=n(new Set,a);for(const d of u)f.add(r(d));return f}case Aw:{const{name:f,message:d}=u;return n(new Ow[f](d),a)}case kw:return n(BigInt(u),a);case"BigInt":return n(Object(BigInt(u)),a);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return n(new DataView(f),u)}}return n(new Ow[s](u),a)};return r},Rw=e=>u$(new Map,e)(0),Bs="",{toString:c$}={},{keys:f$}=Object,Ou=e=>{const t=typeof e;if(t!=="object"||!e)return[Ed,t];const n=c$.call(e).slice(8,-1);switch(n){case"Array":return[ku,Bs];case"Object":return[wd,Bs];case"Date":return[Bg,Bs];case"RegExp":return[zg,Bs];case"Map":return[Lg,Bs];case"Set":return[Pg,Bs];case"DataView":return[ku,n]}return n.includes("Array")?[ku,n]:n.includes("Error")?[Aw,n]:[wd,n]},_d=([e,t])=>e===Ed&&(t==="function"||t==="symbol"),d$=(e,t,n,r)=>{const a=(u,f)=>{const d=r.push(u)-1;return n.set(f,d),d},s=u=>{if(n.has(u))return n.get(u);let[f,d]=Ou(u);switch(f){case Ed:{let m=u;switch(d){case"bigint":f=kw,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return a([Cw],u)}return a([f,m],u)}case ku:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),a([d,[...b]],u)}const m=[],y=a([f,m],u);for(const b of u)m.push(s(b));return y}case wd:{if(d)switch(d){case"BigInt":return a([d,u.toString()],u);case"Boolean":case"Number":case"String":return a([d,u.valueOf()],u)}if(t&&"toJSON"in u)return s(u.toJSON());const m=[],y=a([f,m],u);for(const b of f$(u))(e||!_d(Ou(u[b])))&&m.push([s(b),s(u[b])]);return y}case Bg:return a([f,u.toISOString()],u);case zg:{const{source:m,flags:y}=u;return a([f,{source:m,flags:y}],u)}case Lg:{const m=[],y=a([f,m],u);for(const[b,v]of u)(e||!(_d(Ou(b))||_d(Ou(v))))&&m.push([s(b),s(v)]);return y}case Pg:{const m=[],y=a([f,m],u);for(const b of u)(e||!_d(Ou(b)))&&m.push(s(b));return y}}const{message:p}=u;return a([f,{name:d,message:p}],u)};return s},Nw=(e,{json:t,lossy:n}={})=>{const r=[];return d$(!(t||n),!!t,new Map,r)(e),r},Td=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Rw(Nw(e,t)):structuredClone(e):(e,t)=>Rw(Nw(e,t));function p$(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function h$(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function m$(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||p$,r=e.options.footnoteBackLabel||h$,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[d]);if(!p)continue;const m=e.all(p),y=String(p.identifier).toUpperCase(),b=Ds(y.toLowerCase());let v=0;const E=[],S=e.footnoteCounts.get(y);for(;S!==void 0&&++v<=S;){E.length>0&&E.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,v);typeof O=="string"&&(O={type:"text",value:O}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const w=m[m.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const O=w.children[w.children.length-1];O&&O.type==="text"?O.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...E)}else m.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(p,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Td(u),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
164
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
165
+ `}]}}const Iw=(function(e){if(e==null)return b$;if(typeof e=="function")return Cd(e);if(typeof e=="object")return Array.isArray(e)?g$(e):y$(e);if(typeof e=="string")return v$(e);throw new Error("Expected function, string, or object as test")});function g$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Iw(e[n]);return Cd(r);function r(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function y$(e){const t=e;return Cd(n);function n(r){const a=r;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function v$(e){return Cd(t);function t(n){return n&&n.type===e}}function Cd(e){return t;function t(n,r,a){return!!(S$(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function b$(){return!0}function S$(e){return e!==null&&typeof e=="object"&&"type"in e}function I7(e){return e}const Mw=[],x$=!0,Dw=!1,E$="skip";function w$(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const s=Iw(a),u=r?-1:1;f(e,void 0,[])();function f(d,p,m){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=Mw,E,S,w;if((!t||s(d,p,m[m.length-1]||void 0))&&(v=_$(n(d,m)),v[0]===Dw))return v;if("children"in d&&d.children){const _=d;if(_.children&&v[0]!==E$)for(S=(r?_.children.length:-1)+u,w=m.concat(_);S>-1&&S<_.children.length;){const O=_.children[S];if(E=f(O,S,w)(),E[0]===Dw)return E;S=typeof E[1]=="number"?E[1]:S+u}}return v}}}function _$(e){return Array.isArray(e)?e:typeof e=="number"?[x$,e]:e==null?Mw:[e]}function Bw(e,t,n,r){let a,s,u;typeof t=="function"&&typeof n!="function"?(s=void 0,u=t,a=n):(s=t,u=n,a=r),w$(e,s,f,a);function f(d,p){const m=p[p.length-1],y=m?m.children.indexOf(d):void 0;return u(d,y,m)}}const $g={}.hasOwnProperty,T$={};function C$(e,t){const n=t||T$,r=new Map,a=new Map,s=new Map,u={...l$,...n.handlers},f={all:p,applyData:k$,definitionById:r,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:u,one:d,options:n,patch:A$,wrap:R$};return Bw(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const y=m.type==="definition"?r:a,b=String(m.identifier).toUpperCase();y.has(b)||y.set(b,m)}}),f;function d(m,y){const b=m.type,v=f.handlers[b];if($g.call(f.handlers,b)&&v)return v(f,m,y);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in m){const{children:S,...w}=m,_=Td(w);return _.children=f.all(m),_}return Td(m)}return(f.options.unknownHandler||O$)(f,m,y)}function p(m){const y=[];if("children"in m){const b=m.children;let v=-1;for(;++v<b.length;){const E=f.one(b[v],m);if(E){if(v&&b[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=zw(E.value)),!Array.isArray(E)&&E.type==="element")){const S=E.children[0];S&&S.type==="text"&&(S.value=zw(S.value))}Array.isArray(E)?y.push(...E):y.push(E)}}}return y}}function A$(e,t){e.position&&(t.position=bz(e))}function k$(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&s&&Object.assign(n.properties,Td(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function O$(e,t){const n=t.data||{},r="value"in t&&!($g.call(n,"hProperties")||$g.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function R$(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
166
+ `});++r<e.length;)r&&n.push({type:"text",value:`
167
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
168
+ `}),n}function zw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Lw(e,t){const n=C$(e,t),r=n.one(e,void 0),a=m$(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
169
+ `},a),s}function N$(e,t){return e&&"run"in e?async function(n,r){const a=Lw(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Lw(n,{file:r,...e||t})}}function Pw(e){if(e)throw e}var Ug,$w;function I$(){if($w)return Ug;$w=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},s=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!y)return!1;var b;for(b in p);return typeof b>"u"||e.call(p,b)},u=function(p,m){n&&m.name==="__proto__"?n(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},f=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(r)return r(p,m).value}else return;return p[m]};return Ug=function d(){var p,m,y,b,v,E,S=arguments[0],w=1,_=arguments.length,O=!1;for(typeof S=="boolean"&&(O=S,S=arguments[1]||{},w=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});w<_;++w)if(p=arguments[w],p!=null)for(m in p)y=f(S,m),b=f(p,m),S!==b&&(O&&b&&(s(b)||(v=a(b)))?(v?(v=!1,E=y&&a(y)?y:[]):E=y&&s(y)?y:{},u(S,{name:m,newValue:d(O,E,b)})):typeof b<"u"&&u(S,{name:m,newValue:b}));return S},Ug}var M$=I$();const jg=Ac(M$);function Hg(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function D$(){const e=[],t={run:n,use:r};return t;function n(...a){let s=-1;const u=a.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...a);function f(d,...p){const m=e[++s];let y=-1;if(d){u(d);return}for(;++y<a.length;)(p[y]===null||p[y]===void 0)&&(p[y]=a[y]);a=p,m?B$(m,f)(...p):u(null,...p)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function B$(e,t){let n;return r;function r(...u){const f=e.length>u.length;let d;f&&u.push(a);try{d=e.apply(this,u)}catch(p){const m=p;if(f&&n)throw m;return a(m)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,a):d instanceof Error?a(d):s(d))}function a(u,...f){n||(n=!0,t(u,...f))}function s(u){a(null,u)}}const Li={basename:z$,dirname:L$,extname:P$,join:$$,sep:"/"};function z$(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ru(e);let n=0,r=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else r<0&&(s=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else u<0&&(s=!0,u=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(r=a):(f=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function L$(e){if(Ru(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function P$(e){Ru(e);let t=e.length,n=-1,r=0,a=-1,s=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),f===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function $$(...e){let t=-1,n;for(;++t<e.length;)Ru(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":U$(n)}function U$(e){Ru(e);const t=e.codePointAt(0)===47;let n=j$(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function j$(e,t){let n="",r=0,a=-1,s=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(a===u-1||s===1))if(a!==u-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=u,s=0;continue}}else if(n.length>0){n="",r=0,a=u,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,u):n=e.slice(a+1,u),r=u-a-1;a=u,s=0}else f===46&&s>-1?s++:s=-1}return n}function Ru(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const H$={cwd:V$};function V$(){return"/"}function Vg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function F$(e){if(typeof e=="string")e=new URL(e);else if(!Vg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return q$(e)}function q$(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Fg=["history","path","basename","stem","extname","dirname"];class Uw{constructor(t){let n;t?Vg(t)?n={path:t}:typeof t=="string"||G$(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":H$.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Fg.length;){const s=Fg[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let a;for(a in n)Fg.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Li.basename(this.path):void 0}set basename(t){Gg(t,"basename"),qg(t,"basename"),this.path=Li.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Li.dirname(this.path):void 0}set dirname(t){jw(this.basename,"dirname"),this.path=Li.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Li.extname(this.path):void 0}set extname(t){if(qg(t,"extname"),jw(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Li.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vg(t)&&(t=F$(t)),Gg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Li.basename(this.path,this.extname):void 0}set stem(t){Gg(t,"stem"),qg(t,"stem"),this.path=Li.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Qn(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function qg(e,t){if(e&&e.includes(Li.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Li.sep+"`")}function Gg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function G$(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Y$=(function(e){const r=this.constructor.prototype,a=r[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),X$={}.hasOwnProperty;class Yg extends Y${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=D$()}copy(){const t=new Yg;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(jg(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Kg("data",this.frozen),this.namespace[t]=n,this):X$.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kg("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ad(t),r=this.parser||this.Parser;return Xg("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Xg("process",this.parser||this.Parser),Zg("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,u){const f=Ad(t),d=r.parse(f);r.run(d,f,function(m,y,b){if(m||!y||!b)return p(m);const v=y,E=r.stringify(v,b);W$(E)?b.value=E:b.result=E,p(m,b)});function p(m,y){m||!y?u(m):s?s(y):n(void 0,y)}}}processSync(t){let n=!1,r;return this.freeze(),Xg("processSync",this.parser||this.Parser),Zg("processSync",this.compiler||this.Compiler),this.process(t,a),Vw("processSync","process",n),r;function a(s,u){n=!0,Pw(s),r=u}}run(t,n,r){Hw(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(u,f){const d=Ad(n);a.run(t,d,p);function p(m,y,b){const v=y||t;m?f(m):u?u(v):r(void 0,v,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,s),Vw("runSync","run",r),a;function s(u,f){Pw(u),a=f,r=!0}}stringify(t,n){this.freeze();const r=Ad(n),a=this.compiler||this.Compiler;return Zg("stringify",a),Hw(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(Kg("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(p){if(typeof p=="function")d(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...y]=p;d(m,y)}else u(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function u(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(a.settings=jg(!0,a.settings,p.settings))}function f(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const y=p[m];s(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function d(p,m){let y=-1,b=-1;for(;++y<r.length;)if(r[y][0]===p){b=y;break}if(b===-1)r.push([p,...m]);else if(m.length>0){let[v,...E]=m;const S=r[b][1];Hg(S)&&Hg(v)&&(v=jg(!0,S,v)),r[b]=[p,v,...E]}}}}const Z$=new Yg().freeze();function Xg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Zg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kg(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hw(e){if(!Hg(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ad(e){return K$(e)?e:new Uw(e)}function K$(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function W$(e){return typeof e=="string"||Q$(e)}function Q$(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const J$="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fw=[],qw={allowDangerousHtml:!0},e8=/^(https?|ircs?|mailto|xmpp)$/i,t8=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function n8(e){const t=r8(e),n=i8(e);return o8(t.runSync(t.parse(n),n),e)}function r8(e){const t=e.rehypePlugins||Fw,n=e.remarkPlugins||Fw,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qw}:qw;return Z$().use(zP).use(n).use(N$,r).use(t)}function i8(e){const t=e.children||"",n=new Uw;return typeof t=="string"&&(n.value=t),n}function o8(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,s=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||a8;for(const m of t8)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+J$+m.id,void 0);return Bw(e,p),_z(e,{Fragment:L.Fragment,components:a,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function p(m,y,b){if(m.type==="raw"&&b&&typeof y=="number")return u?b.children.splice(y,1):b.children[y]={type:"text",value:m.value},y;if(m.type==="element"){let v;for(v in Cg)if(Object.hasOwn(Cg,v)&&Object.hasOwn(m.properties,v)){const E=m.properties[v],S=Cg[v];(S===null||S.includes(m.tagName))&&(m.properties[v]=d(String(E||""),v,m))}}if(m.type==="element"){let v=n?!n.includes(m.tagName):s?s.includes(m.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(m,y,b)),v&&b&&typeof y=="number")return f&&m.children?b.children.splice(y,1,...m.children):b.children.splice(y,1),y}}}function a8(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||e8.test(e.slice(0,t))?e:""}function Gw({msg:e,isMe:t,showSeenIndicator:n,isSeen:r,send:a}){return L.jsxs(pn,{sx:{maxWidth:"78%"},children:[L.jsx(pn,{sx:{wordBreak:"break-word",position:"relative",px:1.4,py:1.05,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:t?"primary.main":"background.paper",color:t?"primary.contrastText":"text.primary",boxShadow:t?"0 10px 30px rgba(25,118,210,.22)":"0 10px 30px rgba(0,0,0,.10)",whiteSpace:"normal","&:before":{content:'""',position:"absolute",top:14,width:10,height:10,transform:"rotate(45deg)",bgcolor:t?"primary.main":"background.paper",borderLeft:t?"none":"0px solid",borderTop:t?"none":"0px solid",borderColor:"divider",right:t?-5:"auto",left:t?"auto":-5},"& p":{margin:0,lineHeight:1.35},"& p + p":{marginTop:"6px"},"& ol, & ul":{margin:"6px 0",paddingLeft:"20px"},"& li":{margin:"2px 0"},"& li > p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"},"& code":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",padding:"2px 6px",borderRadius:8,backgroundColor:t?"rgba(255,255,255,.14)":"rgba(0,0,0,.06)"},"& pre":{margin:0,marginTop:8,padding:12,overflow:"auto",borderRadius:12,backgroundColor:t?"rgba(255,255,255,.12)":"rgba(0,0,0,.05)"}},children:L.jsx(n8,{children:e.text},"message"+e.id)}),n?L.jsx(Tr,{sx:{mt:.35,fontSize:12,textAlign:"right",color:r?"text.secondary":"text.disabled"},children:r?"Seen":"Sent"}):null,e.status==="failed"?L.jsxs(pn,{sx:{mt:.1,display:"flex",gap:1,alignItems:"center"},children:[L.jsx(Tr,{variant:"caption",color:"error",children:e.errorText}),L.jsx(Co,{sx:{p:0},size:"small",color:"primary",onClick:()=>a(e.id),children:L.jsx(YB,{sx:{fontSize:18}})})]}):null]},"container"+e.id)}function Yw({msg:e,isMe:t}){return L.jsxs(pn,{children:[L.jsx(bf,{sx:{width:30,height:30,mt:.25,bgcolor:"primary.main"},children:L.jsx(pg,{sx:{fontSize:18}})}),e.sentAt&&L.jsx(pn,{sx:{display:"flex",justifyContent:t?"flex-end":"flex-start",mt:.5},children:L.jsx(Tr,{variant:"caption",sx:{color:"text.secondary",fontSize:11},children:e.sentAt})})]},"asistent"+e.id)}function s8({msg:e,isMe:t}){return L.jsxs(pn,{children:[L.jsx(bf,{sx:{width:30,height:30,mt:.25,bgcolor:"grey.900"},children:L.jsx(GB,{sx:{fontSize:18}})}),e.sentAt&&L.jsx(pn,{sx:{display:"flex",justifyContent:t?"flex-end":"flex-start",mt:.5},children:L.jsx(Tr,{variant:"caption",sx:{color:"text.secondary",fontSize:11},children:e.sentAt})})]},"sentAt"+e.id)}const l8=nr.memo(function({msgs:t,isMessageSeen:n,endRef:r,reSend:a}){return L.jsxs(L.Fragment,{children:[t.map((s,u)=>{const f=s.role==="User",{showSeenIndicator:d,isSeen:p}=n(u,f,t,s);return L.jsxs(pn,{sx:{display:"flex",justifyContent:f?"flex-end":"flex-start",gap:1,mb:1.2,overflowAnchor:"none"},children:[!f&&L.jsx(Yw,{msg:s,isMe:f}),L.jsx(Gw,{msg:s,isMe:f,showSeenIndicator:d,isSeen:p,send:a}),f&&L.jsx(s8,{msg:s,isMe:f})]},s.id)}),L.jsx("div",{ref:r})]})}),u8=({send:e})=>{const t=n=>{};return L.jsxs(pn,{sx:{p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",mb:2},children:[L.jsx(Tr,{variant:"h6",gutterBottom:!0,children:"Introdu numărul de telefon"}),L.jsx(Cf,{size:"small"}),L.jsx(Co,{color:"primary",onClick:t,sx:{ml:1},children:L.jsx(ZB,{})}),L.jsx(Tr,{variant:"body2",color:"text.secondary",sx:{mt:1},children:"Vom trimite un cod de verificare la aceasta."})]})};function c8(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function f8(e){return/^[0-9]{6}$/.test(e)}const d8=({send:e,cancel:t})=>{const[n,r]=I.useState(""),[a,s]=I.useState(!0),u=f=>{if(!c8(n)){s(!1);return}const d={type:bu.UIDirectiveEvent,kind:pi.VerificationFormSubmit,value:{channel:"email",value:n}};e(d)};return L.jsxs(x1,{spacing:1,sx:{position:"relative",p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",maxWidth:380,mb:2,display:"flex",flexDirection:"column",alignItems:"center"},children:[L.jsx(Tr,{variant:"h6",gutterBottom:!0,children:"Introdu adresa de email"}),L.jsx(Cf,{focused:!0,fullWidth:!0,size:"small",value:n,onChange:f=>{r(f.target.value),s(!0)},error:!a,helperText:a?void 0:"Adresa de email nu este validă"}),L.jsx(dm,{variant:"outlined",color:"primary",onClick:u,children:"Trimite"}),L.jsx(Tr,{variant:"body2",color:"text.secondary",children:"Vom trimite un cod de verificare la aceasta."}),L.jsx(S1,{title:"Anuleaza operatiunea!",children:L.jsx(Co,{onClick:t,sx:{position:"absolute",bottom:-5,right:-5},color:"error",children:L.jsx(CE,{})})})]})},p8=async e=>{const t=Su(),n=yu();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");const r=await vu(n.apiBaseUrl+wB+`/${n.clientId}/send`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)});if(!r.ok)throw new Error("Somethig happend on the request");return await r.json()},h8=({send:e,cancel:t,valueRecieved:n,failedValidationOperation:r})=>{const[a,s]=I.useState(""),[u,f]=I.useState(!0),d=m=>{if(!f8(a)){f(!1);return}const y={type:bu.UIDirectiveEvent,kind:pi.OtpFormSubmit,value:{requestId:n.requestId,code:a}};e(y)},p=()=>r?r.value.message:null;return L.jsxs(x1,{spacing:1,sx:{position:"relative",p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",maxWidth:380,mb:2,display:"flex",flexDirection:"column",alignItems:"center"},children:[L.jsxs(Tr,{variant:"body1",align:"center",gutterBottom:!0,sx:{wordBreak:"break-word"},children:["Introdu codul primit la ",n.from]}),L.jsx(Cf,{focused:!0,fullWidth:!0,size:"small",value:a,onChange:m=>{s(m.target.value),f(!0)},error:!u||r!=null,helperText:p()}),L.jsx(dm,{variant:"outlined",color:"primary",onClick:d,children:"Trimite codul"}),L.jsx(S1,{title:"Anuleaza operatiunea!",children:L.jsx(Co,{onClick:t,sx:{position:"absolute",bottom:-5,right:-5},color:"error",children:L.jsx(CE,{})})})]})},m8=(()=>{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return t=>e.call(t)})();function kd(e){return m8(e)==="Uint8Array"}function g8(e){return typeof e=="object"&&e!=null&&Symbol.toStringTag in e&&(e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer")}function y8(e){return e instanceof RegExp||Object.prototype.toString.call(e)==="[object RegExp]"}function Xw(e){return typeof e=="object"&&e!=null&&Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Map"}function v8(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Rr(e,t){return JSON.stringify(e,(n,r)=>typeof r=="bigint"?{$numberLong:`${r}`}:Xw(r)?Object.fromEntries(r):r)}function b8(e){if(e!=null&&typeof e=="object"&&"stylize"in e&&typeof e.stylize=="function")return e.stylize}const Wg=7,Zw=Symbol.for("@@mdb.bson.version"),Qg=2147483647,Jg=-2147483648,Kw=Math.pow(2,63)-1,Ww=-Math.pow(2,63),S8=Math.pow(2,53),x8=-Math.pow(2,53),Qw=4;class ve extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(t,n){super(t,n)}static isBSONError(t){return t!=null&&typeof t=="object"&&"bsonError"in t&&t.bsonError===!0&&"name"in t&&"message"in t&&"stack"in t}}class E8 extends ve{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${Wg}.x.x`)}}class Jw extends ve{get name(){return"BSONRuntimeError"}constructor(t){super(t)}}class Lo extends ve{get name(){return"BSONOffsetError"}offset;constructor(t,n,r){super(`${t}. offset: ${n}`,r),this.offset=n}}let e_,t_;function n_(e,t,n,r){if(r){e_??=new TextDecoder("utf8",{fatal:!0});try{return e_.decode(e.subarray(t,n))}catch(a){throw new ve("Invalid UTF-8 string in BSON document",{cause:a})}}return t_??=new TextDecoder("utf8",{fatal:!1}),t_.decode(e.subarray(t,n))}function r_(e,t,n){if(e.length===0)return"";const r=n-t;if(r===0)return"";if(r>20)return null;if(r===1&&e[t]<128)return String.fromCharCode(e[t]);if(r===2&&e[t]<128&&e[t+1]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(r===3&&e[t]<128&&e[t+1]<128&&e[t+2]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2]);const a=[];for(let s=t;s<n;s++){const u=e[s];if(u>127)return null;a.push(u)}return String.fromCharCode(...a)}function w8(e,t,n){if(t.length===0)return 0;if(t.length>25||e.length-n<t.length)return null;for(let r=0,a=n;r<t.length;r++,a++){const s=t.charCodeAt(r);if(s>127)return null;e[a]=s}return t.length}function _8(e){return hi.fromNumberArray(Array.from({length:e},()=>Math.floor(Math.random()*256)))}function T8(e){return crypto.getRandomValues(hi.allocate(e))}const C8=(()=>{const{crypto:e}=globalThis;return e!=null&&typeof e.getRandomValues=="function"?T8:_8})(),hi={isUint8Array:kd,toLocalBufferType(e){if(Buffer.isBuffer(e))return e;if(ArrayBuffer.isView(e))return Buffer.from(e.buffer,e.byteOffset,e.byteLength);const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return Buffer.from(e);throw new ve("Cannot create Buffer from the passed potentialBuffer.")},allocate(e){return Buffer.alloc(e)},allocateUnsafe(e){return Buffer.allocUnsafe(e)},compare(e,t){return hi.toLocalBufferType(e).compare(t)},concat(e){return Buffer.concat(e)},equals(e,t){return hi.toLocalBufferType(e).equals(t)},fromNumberArray(e){return Buffer.from(e)},fromBase64(e){return Buffer.from(e,"base64")},fromUTF8(e){return Buffer.from(e,"utf8")},toBase64(e){return hi.toLocalBufferType(e).toString("base64")},fromISO88591(e){return Buffer.from(e,"binary")},toISO88591(e){return hi.toLocalBufferType(e).toString("binary")},fromHex(e){return Buffer.from(e,"hex")},toHex(e){return hi.toLocalBufferType(e).toString("hex")},toUTF8(e,t,n,r){const a=n-t<=20?r_(e,t,n):null;if(a!=null)return a;const s=hi.toLocalBufferType(e).toString("utf8",t,n);if(r){for(let u=0;u<s.length;u++)if(s.charCodeAt(u)===65533){n_(e,t,n,!0);break}}return s},utf8ByteLength(e){return Buffer.byteLength(e,"utf8")},encodeUTF8Into(e,t,n){const r=w8(e,t,n);return r??hi.toLocalBufferType(e).write(t,n,void 0,"utf8")},randomBytes:C8,swap32(e){return hi.toLocalBufferType(e).swap32()}};function A8(){const{navigator:e}=globalThis;return typeof e=="object"&&e.product==="ReactNative"}function k8(e){if(e<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${e}`);return Oa.fromNumberArray(Array.from({length:e},()=>Math.floor(Math.random()*256)))}const O8=(()=>{const{crypto:e}=globalThis;if(e!=null&&typeof e.getRandomValues=="function")return t=>e.getRandomValues(Oa.allocate(t));if(A8()){const{console:t}=globalThis;t?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return k8})(),i_=/(\d|[a-f])/i,Oa={isUint8Array:kd,toLocalBufferType(e){const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if(t==="Uint8Array")return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return new Uint8Array(e);throw new ve("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(e){if(typeof e!="number")throw new TypeError(`The "size" argument must be of type number. Received ${String(e)}`);return new Uint8Array(e)},allocateUnsafe(e){return Oa.allocate(e)},compare(e,t){if(e===t)return 0;const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return e.length<t.length?-1:e.length>t.length?1:0},concat(e){if(e.length===0)return Oa.allocate(0);let t=0;for(const a of e)t+=a.length;const n=Oa.allocate(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n},equals(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},fromNumberArray(e){return Uint8Array.from(e)},fromBase64(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))},fromUTF8(e){return new TextEncoder().encode(e)},toBase64(e){return btoa(Oa.toISO88591(e))},fromISO88591(e){return Uint8Array.from(e,t=>t.charCodeAt(0)&255)},toISO88591(e){return Array.from(Uint16Array.from(e),t=>String.fromCharCode(t)).join("")},fromHex(e){const t=e.length%2===0?e:e.slice(0,e.length-1),n=[];for(let r=0;r<t.length;r+=2){const a=t[r],s=t[r+1];if(!i_.test(a)||!i_.test(s))break;const u=Number.parseInt(`${a}${s}`,16);n.push(u)}return Uint8Array.from(n)},toHex(e){return Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")},toUTF8(e,t,n,r){const a=n-t<=20?r_(e,t,n):null;return a??n_(e,t,n,r)},utf8ByteLength(e){return new TextEncoder().encode(e).byteLength},encodeUTF8Into(e,t,n){const r=new TextEncoder().encode(t);return e.set(r,n),r.byteLength},randomBytes:O8,swap32(e){if(e.length%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e.length;t+=4){const n=e[t],r=e[t+1],a=e[t+2],s=e[t+3];e[t]=s,e[t+1]=a,e[t+2]=r,e[t+3]=n}return e}},Le=typeof Buffer=="function"&&Buffer.prototype?._isBuffer!==!0?hi:Oa,o_=Symbol.for("@@mdb.bson.type");class Kr{get[o_](){return this._bsontype}get[Zw](){return Wg}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return this.inspect(t,n,r)}}const zs=new Float64Array(1),bt=new Uint8Array(zs.buffer,0,8);zs[0]=-1;const ey=bt[7]===0,Ra={isBigEndian:ey,getNonnegativeInt32LE(e,t){if(e[t+3]>127)throw new RangeError(`Size cannot be negative at offset: ${t}`);return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getInt32LE(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getUint32LE(e,t){return e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216},getUint32BE(e,t){return e[t+3]+e[t+2]*256+e[t+1]*65536+e[t]*16777216},getBigInt64LE(e,t){const n=BigInt(e[t+4]+e[t+5]*256+e[t+6]*65536+(e[t+7]<<24)),r=BigInt(e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216);return(n<<32n)+r},getFloat64LE:ey?(e,t)=>(bt[7]=e[t],bt[6]=e[t+1],bt[5]=e[t+2],bt[4]=e[t+3],bt[3]=e[t+4],bt[2]=e[t+5],bt[1]=e[t+6],bt[0]=e[t+7],zs[0]):(e,t)=>(bt[0]=e[t],bt[1]=e[t+1],bt[2]=e[t+2],bt[3]=e[t+3],bt[4]=e[t+4],bt[5]=e[t+5],bt[6]=e[t+6],bt[7]=e[t+7],zs[0]),setInt32BE(e,t,n){return e[t+3]=n,n>>>=8,e[t+2]=n,n>>>=8,e[t+1]=n,n>>>=8,e[t]=n,4},setInt32LE(e,t,n){return e[t]=n,n>>>=8,e[t+1]=n,n>>>=8,e[t+2]=n,n>>>=8,e[t+3]=n,4},setBigInt64LE(e,t,n){const r=0xffffffffn;let a=Number(n&r);e[t]=a,a>>=8,e[t+1]=a,a>>=8,e[t+2]=a,a>>=8,e[t+3]=a;let s=Number(n>>32n&r);return e[t+4]=s,s>>=8,e[t+5]=s,s>>=8,e[t+6]=s,s>>=8,e[t+7]=s,8},setFloat64LE:ey?(e,t,n)=>(zs[0]=n,e[t]=bt[7],e[t+1]=bt[6],e[t+2]=bt[5],e[t+3]=bt[4],e[t+4]=bt[3],e[t+5]=bt[2],e[t+6]=bt[1],e[t+7]=bt[0],8):(e,t,n)=>(zs[0]=n,e[t]=bt[0],e[t+1]=bt[1],e[t+2]=bt[2],e[t+3]=bt[3],e[t+4]=bt[4],e[t+5]=bt[5],e[t+6]=bt[6],e[t+7]=bt[7],8)};class dt extends Kr{get _bsontype(){return"Binary"}static BSON_BINARY_SUBTYPE_DEFAULT=0;static BUFFER_SIZE=256;static SUBTYPE_DEFAULT=0;static SUBTYPE_FUNCTION=1;static SUBTYPE_BYTE_ARRAY=2;static SUBTYPE_UUID_OLD=3;static SUBTYPE_UUID=4;static SUBTYPE_MD5=5;static SUBTYPE_ENCRYPTED=6;static SUBTYPE_COLUMN=7;static SUBTYPE_SENSITIVE=8;static SUBTYPE_VECTOR=9;static SUBTYPE_USER_DEFINED=128;static VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});buffer;sub_type;position;constructor(t,n){if(super(),t!=null&&typeof t=="string"&&!ArrayBuffer.isView(t)&&!g8(t)&&!Array.isArray(t))throw new ve("Binary can only be constructed from Uint8Array or number[]");this.sub_type=n??dt.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=Le.allocate(dt.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(t)?Le.fromNumberArray(t):Le.toLocalBufferType(t),this.position=this.buffer.byteLength)}put(t){if(typeof t=="string"&&t.length!==1)throw new ve("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new ve("only accepts single character Uint8Array or Array");let n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new ve("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=n;else{const r=Le.allocate(dt.BUFFER_SIZE+this.buffer.length);r.set(this.buffer,0),this.buffer=r,this.buffer[this.position++]=n}}write(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.byteLength<n+t.length){const r=Le.allocate(this.buffer.byteLength+t.length);r.set(this.buffer,0),this.buffer=r}if(ArrayBuffer.isView(t))this.buffer.set(Le.toLocalBufferType(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position;else if(typeof t=="string")throw new ve("input cannot be string")}read(t,n){n=n&&n>0?n:this.position;const r=t+n;return this.buffer.subarray(t,r>this.position?this.position:r)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return Le.toBase64(this.buffer.subarray(0,this.position))}toString(t){return t==="hex"?Le.toHex(this.buffer.subarray(0,this.position)):t==="base64"?Le.toBase64(this.buffer.subarray(0,this.position)):t==="utf8"||t==="utf-8"?Le.toUTF8(this.buffer,0,this.position,!1):Le.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(t){t=t||{},this.sub_type===dt.SUBTYPE_VECTOR&&Po(this);const n=Le.toBase64(this.buffer),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}}toUUID(){if(this.sub_type===dt.SUBTYPE_UUID)return new Jn(this.buffer.subarray(0,this.position));throw new ve(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${dt.SUBTYPE_UUID}" is currently supported.`)}static createFromHexString(t,n){return new dt(Le.fromHex(t),n)}static createFromBase64(t,n){return new dt(Le.fromBase64(t),n)}static fromExtendedJSON(t,n){n=n||{};let r,a;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(a=t.$type?parseInt(t.$type,16):0,r=Le.fromBase64(t.$binary)):typeof t.$binary!="string"&&(a=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=Le.fromBase64(t.$binary.base64)):"$uuid"in t&&(a=4,r=Jn.bytesFromString(t.$uuid)),!r)throw new ve(`Unexpected Binary Extended JSON format ${JSON.stringify(t)}`);return a===Qw?new Jn(r):new dt(r,a)}inspect(t,n,r){r??=Rr;const a=Le.toBase64(this.buffer.subarray(0,this.position)),s=r(a,n),u=r(this.sub_type,n);return`Binary.createFromBase64(${s}, ${u})`}toInt8Array(){if(this.sub_type!==dt.SUBTYPE_VECTOR)throw new ve("Binary sub_type is not Vector");if(this.buffer[0]!==dt.VECTOR_TYPE.Int8)throw new ve("Binary datatype field is not Int8");return Po(this),new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==dt.SUBTYPE_VECTOR)throw new ve("Binary sub_type is not Vector");if(this.buffer[0]!==dt.VECTOR_TYPE.Float32)throw new ve("Binary datatype field is not Float32");Po(this);const t=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return Ra.isBigEndian&&Le.swap32(t),new Float32Array(t.buffer)}toPackedBits(){if(this.sub_type!==dt.SUBTYPE_VECTOR)throw new ve("Binary sub_type is not Vector");if(this.buffer[0]!==dt.VECTOR_TYPE.PackedBit)throw new ve("Binary datatype field is not packed bit");return Po(this),new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==dt.SUBTYPE_VECTOR)throw new ve("Binary sub_type is not Vector");if(this.buffer[0]!==dt.VECTOR_TYPE.PackedBit)throw new ve("Binary datatype field is not packed bit");Po(this);const n=(this.length()-2)*8-this.buffer[1],r=new Int8Array(n);for(let a=0;a<r.length;a++){const s=a/8|0,u=this.buffer[s+2],f=7-a%8,d=u>>f&1;r[a]=d}return r}static fromInt8Array(t){const n=Le.allocate(t.byteLength+2);n[0]=dt.VECTOR_TYPE.Int8,n[1]=0;const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(r,2);const a=new this(n,this.SUBTYPE_VECTOR);return Po(a),a}static fromFloat32Array(t){const n=Le.allocate(t.byteLength+2);n[0]=dt.VECTOR_TYPE.Float32,n[1]=0;const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(r,2),Ra.isBigEndian&&Le.swap32(new Uint8Array(n.buffer,2));const a=new this(n,this.SUBTYPE_VECTOR);return Po(a),a}static fromPackedBits(t,n=0){const r=Le.allocate(t.byteLength+2);r[0]=dt.VECTOR_TYPE.PackedBit,r[1]=n,r.set(t,2);const a=new this(r,this.SUBTYPE_VECTOR);return Po(a),a}static fromBits(t){const n=t.length+7>>>3,r=new Uint8Array(n+2);r[0]=dt.VECTOR_TYPE.PackedBit;const a=t.length%8;r[1]=a===0?0:8-a;for(let s=0;s<t.length;s++){const u=s>>>3,f=t[s];if(f!==0&&f!==1)throw new ve(`Invalid bit value at ${s}: must be 0 or 1, found ${t[s]}`);if(f===0)continue;const d=7-s%8;r[u+2]|=f<<d}return new this(r,dt.SUBTYPE_VECTOR)}}function Po(e){if(e.sub_type!==dt.SUBTYPE_VECTOR)return;const t=e.position,n=e.buffer[0],r=e.buffer[1];if((n===dt.VECTOR_TYPE.Float32||n===dt.VECTOR_TYPE.Int8)&&r!==0)throw new ve("Invalid Vector: padding must be zero for int8 and float32 vectors");if(n===dt.VECTOR_TYPE.Float32&&t!==0&&t-2!==0&&(t-2)%4!==0)throw new ve("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");if(n===dt.VECTOR_TYPE.PackedBit&&r!==0&&t===2)throw new ve("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(n===dt.VECTOR_TYPE.PackedBit&&r>7)throw new ve(`Invalid Vector: padding must be a value between 0 and 7. found: ${r}`)}const ty=16,R8=/^[0-9A-F]{32}$/i,N8=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class Jn extends dt{constructor(t){let n;if(t==null)n=Jn.generate();else if(t instanceof Jn)n=Le.toLocalBufferType(new Uint8Array(t.buffer));else if(ArrayBuffer.isView(t)&&t.byteLength===ty)n=Le.toLocalBufferType(t);else if(typeof t=="string")n=Jn.bytesFromString(t);else throw new ve("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");super(n,Qw)}get id(){return this.buffer}set id(t){this.buffer=t}toHexString(t=!0){return t?[Le.toHex(this.buffer.subarray(0,4)),Le.toHex(this.buffer.subarray(4,6)),Le.toHex(this.buffer.subarray(6,8)),Le.toHex(this.buffer.subarray(8,10)),Le.toHex(this.buffer.subarray(10,16))].join("-"):Le.toHex(this.buffer)}toString(t){return t==="hex"?Le.toHex(this.id):t==="base64"?Le.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(t){if(!t)return!1;if(t instanceof Jn)return Le.equals(t.id,this.id);try{return Le.equals(new Jn(t).id,this.id)}catch{return!1}}toBinary(){return new dt(this.id,dt.SUBTYPE_UUID)}static generate(){const t=Le.randomBytes(ty);return t[6]=t[6]&15|64,t[8]=t[8]&63|128,t}static isValid(t){return t?typeof t=="string"?Jn.isValidUUIDString(t):kd(t)?t.byteLength===ty:t._bsontype==="Binary"&&t.sub_type===this.SUBTYPE_UUID&&t.buffer.byteLength===16:!1}static createFromHexString(t){const n=Jn.bytesFromString(t);return new Jn(n)}static createFromBase64(t){return new Jn(Le.fromBase64(t))}static bytesFromString(t){if(!Jn.isValidUUIDString(t))throw new ve("UUID string representation must be 32 hex digits or canonical hyphenated representation");return Le.fromHex(t.replace(/-/g,""))}static isValidUUIDString(t){return R8.test(t)||N8.test(t)}inspect(t,n,r){return r??=Rr,`new UUID(${r(this.toHexString(),n)})`}}class Nu extends Kr{get _bsontype(){return"Code"}code;scope;constructor(t,n){super(),this.code=t.toString(),this.scope=n??null}toJSON(){return this.scope!=null?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(t){return new Nu(t.$code,t.$scope)}inspect(t,n,r){r??=Rr;let a=r(this.code,n);const s=a.includes(`
170
+ `);this.scope!=null&&(a+=`,${s?`
171
+ `:" "}${r(this.scope,n)}`);const u=s&&this.scope===null;return`new Code(${s?`
172
+ `:""}${a}${u?`
173
+ `:""})`}}function I8(e){return e!=null&&typeof e=="object"&&"$id"in e&&e.$id!=null&&"$ref"in e&&typeof e.$ref=="string"&&(!("$db"in e)||"$db"in e&&typeof e.$db=="string")}class Ls extends Kr{get _bsontype(){return"DBRef"}collection;oid;db;fields;constructor(t,n,r,a){super();const s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=a||{}}get namespace(){return this.collection}set namespace(t){this.collection=t}toJSON(){const t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t}toExtendedJSON(t){t=t||{};let n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n}static fromExtendedJSON(t){const n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new Ls(t.$ref,t.$id,t.$db,n)}inspect(t,n,r){r??=Rr;const a=[r(this.namespace,n),r(this.oid,n),...this.db?[r(this.db,n)]:[],...Object.keys(this.fields).length>0?[r(this.fields,n)]:[]];return a[1]=r===Rr?`new ObjectId(${a[1]})`:a[1],`new DBRef(${a.join(", ")})`}}function a_(e){if(e==="")return e;let t=0;const n=e[t]==="-",r=e[t]==="+";(r||n)&&(t+=1);let a=!1;for(;t<e.length&&e[t]==="0";++t)a=!0;return a?`${n?"-":""}${e.length===t?"0":e.slice(t)}`:r?e.slice(1):e}function M8(e,t){t=t??10;const n="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,t);return new RegExp(`[^-+${n}]`,"i").test(e)?!1:e}let Wr;try{Wr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}const s_=65536,D8=1<<24,Ps=s_*s_,l_=Ps*Ps,u_=l_/2,c_={},f_={},B8=20,z8=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class K extends Kr{get _bsontype(){return"Long"}get __isLong__(){return!0}high;low;unsigned;constructor(t=0,n,r){super();const a=typeof n=="boolean"?n:!!r,s=typeof n=="number"?n:0,u=typeof t=="string"?K.fromString(t,a):typeof t=="bigint"?K.fromBigInt(t,a):{low:t|0,high:s|0,unsigned:a};this.low=u.low,this.high=u.high,this.unsigned=u.unsigned}static TWO_PWR_24=K.fromInt(D8);static MAX_UNSIGNED_VALUE=K.fromBits(-1,-1,!0);static ZERO=K.fromInt(0);static UZERO=K.fromInt(0,!0);static ONE=K.fromInt(1);static UONE=K.fromInt(1,!0);static NEG_ONE=K.fromInt(-1);static MAX_VALUE=K.fromBits(-1,2147483647,!1);static MIN_VALUE=K.fromBits(0,-2147483648,!1);static fromBits(t,n,r){return new K(t,n,r)}static fromInt(t,n){let r,a,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(a=f_[t],a)?a:(r=K.fromBits(t,(t|0)<0?-1:0,!0),s&&(f_[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(a=c_[t],a)?a:(r=K.fromBits(t,t<0?-1:0,!1),s&&(c_[t]=r),r))}static fromNumber(t,n){if(isNaN(t))return n?K.UZERO:K.ZERO;if(n){if(t<0)return K.UZERO;if(t>=l_)return K.MAX_UNSIGNED_VALUE}else{if(t<=-u_)return K.MIN_VALUE;if(t+1>=u_)return K.MAX_VALUE}return t<0?K.fromNumber(-t,n).neg():K.fromBits(t%Ps|0,t/Ps|0,n)}static fromBigInt(t,n){const r=0xffffffffn,a=32n;return new K(Number(t&r),Number(t>>a&r),n)}static _fromString(t,n,r){if(t.length===0)throw new ve("empty string");if(r<2||36<r)throw new ve("radix");let a;if((a=t.indexOf("-"))>0)throw new ve("interior hyphen");if(a===0)return K._fromString(t.substring(1),n,r).neg();const s=K.fromNumber(Math.pow(r,8));let u=K.ZERO;for(let f=0;f<t.length;f+=8){const d=Math.min(8,t.length-f),p=parseInt(t.substring(f,f+d),r);if(d<8){const m=K.fromNumber(Math.pow(r,d));u=u.mul(m).add(K.fromNumber(p))}else u=u.mul(s),u=u.add(K.fromNumber(p))}return u.unsigned=n,u}static fromStringStrict(t,n,r){let a=!1;if(typeof n=="number"?(r=n,n=!1):a=!!n,r??=10,t.trim()!==t)throw new ve(`Input: '${t}' contains leading and/or trailing whitespace`);if(!M8(t,r))throw new ve(`Input: '${t}' contains invalid characters for radix: ${r}`);const s=a_(t),u=K._fromString(s,a,r);if(u.toString(r).toLowerCase()!==s.toLowerCase())throw new ve(`Input: ${t} is not representable as ${u.unsigned?"an unsigned":"a signed"} 64-bit Long ${r!=null?`with radix: ${r}`:""}`);return u}static fromString(t,n,r){let a=!1;return typeof n=="number"?(r=n,n=!1):a=!!n,r??=10,t==="NaN"&&r<24||(t==="Infinity"||t==="+Infinity"||t==="-Infinity")&&r<35?K.ZERO:K._fromString(t,a,r)}static fromBytes(t,n,r){return r?K.fromBytesLE(t,n):K.fromBytesBE(t,n)}static fromBytesLE(t,n){return new K(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)}static fromBytesBE(t,n){return new K(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)}static isLong(t){return t!=null&&typeof t=="object"&&"__isLong__"in t&&t.__isLong__===!0}static fromValue(t,n){return typeof t=="number"?K.fromNumber(t,n):typeof t=="string"?K.fromString(t,n):K.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)}add(t){K.isLong(t)||(t=K.fromValue(t));const n=this.high>>>16,r=this.high&65535,a=this.low>>>16,s=this.low&65535,u=t.high>>>16,f=t.high&65535,d=t.low>>>16,p=t.low&65535;let m=0,y=0,b=0,v=0;return v+=s+p,b+=v>>>16,v&=65535,b+=a+d,y+=b>>>16,b&=65535,y+=r+f,m+=y>>>16,y&=65535,m+=n+u,m&=65535,K.fromBits(b<<16|v,m<<16|y,this.unsigned)}and(t){return K.isLong(t)||(t=K.fromValue(t)),K.fromBits(this.low&t.low,this.high&t.high,this.unsigned)}compare(t){if(K.isLong(t)||(t=K.fromValue(t)),this.eq(t))return 0;const n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1}comp(t){return this.compare(t)}divide(t){if(K.isLong(t)||(t=K.fromValue(t)),t.isZero())throw new ve("division by zero");if(Wr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;const s=(this.unsigned?Wr.div_u:Wr.div_s)(this.low,this.high,t.low,t.high);return K.fromBits(s,Wr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?K.UZERO:K.ZERO;let n,r,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return K.UZERO;if(t.gt(this.shru(1)))return K.UONE;a=K.UZERO}else{if(this.eq(K.MIN_VALUE))return t.eq(K.ONE)||t.eq(K.NEG_ONE)?K.MIN_VALUE:t.eq(K.MIN_VALUE)?K.ONE:(n=this.shr(1).div(t).shl(1),n.eq(K.ZERO)?t.isNegative()?K.ONE:K.NEG_ONE:(r=this.sub(t.mul(n)),a=n.add(r.div(t)),a));if(t.eq(K.MIN_VALUE))return this.unsigned?K.UZERO:K.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=K.ZERO}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));const s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:Math.pow(2,s-48);let f=K.fromNumber(n),d=f.mul(t);for(;d.isNegative()||d.gt(r);)n-=u,f=K.fromNumber(n,this.unsigned),d=f.mul(t);f.isZero()&&(f=K.ONE),a=a.add(f),r=r.sub(d)}return a}div(t){return this.divide(t)}equals(t){return K.isLong(t)||(t=K.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}eq(t){return this.equals(t)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(K.MIN_VALUE)?64:this.neg().getNumBitsAbs();const t=this.high!==0?this.high:this.low;let n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1}greaterThan(t){return this.comp(t)>0}gt(t){return this.greaterThan(t)}greaterThanOrEqual(t){return this.comp(t)>=0}gte(t){return this.greaterThanOrEqual(t)}ge(t){return this.greaterThanOrEqual(t)}isEven(){return(this.low&1)===0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(this.low&1)===1}isPositive(){return this.unsigned||this.high>=0}isZero(){return this.high===0&&this.low===0}lessThan(t){return this.comp(t)<0}lt(t){return this.lessThan(t)}lessThanOrEqual(t){return this.comp(t)<=0}lte(t){return this.lessThanOrEqual(t)}modulo(t){if(K.isLong(t)||(t=K.fromValue(t)),Wr){const n=(this.unsigned?Wr.rem_u:Wr.rem_s)(this.low,this.high,t.low,t.high);return K.fromBits(n,Wr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))}mod(t){return this.modulo(t)}rem(t){return this.modulo(t)}multiply(t){if(this.isZero())return K.ZERO;if(K.isLong(t)||(t=K.fromValue(t)),Wr){const E=Wr.mul(this.low,this.high,t.low,t.high);return K.fromBits(E,Wr.get_high(),this.unsigned)}if(t.isZero())return K.ZERO;if(this.eq(K.MIN_VALUE))return t.isOdd()?K.MIN_VALUE:K.ZERO;if(t.eq(K.MIN_VALUE))return this.isOdd()?K.MIN_VALUE:K.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(K.TWO_PWR_24)&&t.lt(K.TWO_PWR_24))return K.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);const n=this.high>>>16,r=this.high&65535,a=this.low>>>16,s=this.low&65535,u=t.high>>>16,f=t.high&65535,d=t.low>>>16,p=t.low&65535;let m=0,y=0,b=0,v=0;return v+=s*p,b+=v>>>16,v&=65535,b+=a*p,y+=b>>>16,b&=65535,b+=s*d,y+=b>>>16,b&=65535,y+=r*p,m+=y>>>16,y&=65535,y+=a*d,m+=y>>>16,y&=65535,y+=s*f,m+=y>>>16,y&=65535,m+=n*p+r*d+a*f+s*u,m&=65535,K.fromBits(b<<16|v,m<<16|y,this.unsigned)}mul(t){return this.multiply(t)}negate(){return!this.unsigned&&this.eq(K.MIN_VALUE)?K.MIN_VALUE:this.not().add(K.ONE)}neg(){return this.negate()}not(){return K.fromBits(~this.low,~this.high,this.unsigned)}notEquals(t){return!this.equals(t)}neq(t){return this.notEquals(t)}ne(t){return this.notEquals(t)}or(t){return K.isLong(t)||(t=K.fromValue(t)),K.fromBits(this.low|t.low,this.high|t.high,this.unsigned)}shiftLeft(t){return K.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?K.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):K.fromBits(0,this.low<<t-32,this.unsigned)}shl(t){return this.shiftLeft(t)}shiftRight(t){return K.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?K.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):K.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)}shr(t){return this.shiftRight(t)}shiftRightUnsigned(t){if(K.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;{const n=this.high;if(t<32){const r=this.low;return K.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?K.fromBits(n,0,this.unsigned):K.fromBits(n>>>t-32,0,this.unsigned)}}shr_u(t){return this.shiftRightUnsigned(t)}shru(t){return this.shiftRightUnsigned(t)}subtract(t){return K.isLong(t)||(t=K.fromValue(t)),this.add(t.neg())}sub(t){return this.subtract(t)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*Ps+(this.low>>>0):this.high*Ps+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(t){return t?this.toBytesLE():this.toBytesBE()}toBytesLE(){const t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}toBytesBE(){const t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]}toSigned(){return this.unsigned?K.fromBits(this.low,this.high,!1):this}toString(t){if(t=t||10,t<2||36<t)throw new ve("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(K.MIN_VALUE)){const s=K.fromNumber(t),u=this.div(s),f=u.mul(s).sub(this);return u.toString(t)+f.toInt().toString(t)}else return"-"+this.neg().toString(t);const n=K.fromNumber(Math.pow(t,6),this.unsigned);let r=this,a="";for(;;){const s=r.div(n);let f=(r.sub(s.mul(n)).toInt()>>>0).toString(t);if(r=s,r.isZero())return f+a;for(;f.length<6;)f="0"+f;a=""+f+a}}toUnsigned(){return this.unsigned?this:K.fromBits(this.low,this.high,!0)}xor(t){return K.isLong(t)||(t=K.fromValue(t)),K.fromBits(this.low^t.low,this.high^t.high,this.unsigned)}eqz(){return this.isZero()}le(t){return this.lessThanOrEqual(t)}toExtendedJSON(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(t,n){const{useBigInt64:r=!1,relaxed:a=!0}={...n};if(t.$numberLong.length>B8)throw new ve("$numberLong string is too long");if(!z8.test(t.$numberLong))throw new ve(`$numberLong string "${t.$numberLong}" is in an invalid format`);if(r){const u=BigInt(t.$numberLong);return BigInt.asIntN(64,u)}const s=K.fromString(t.$numberLong);return a?s.toNumber():s}inspect(t,n,r){r??=Rr;const a=r(this.toString(),n),s=this.unsigned?`, ${r(this.unsigned,n)}`:"";return`new Long(${a}${s})`}}const L8=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,P8=/^(\+|-)?(Infinity|inf)$/i,$8=/^(\+|-)?NaN$/i,$s=6111,Iu=-6176,d_=6176,p_=34,ny=Le.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),h_=Le.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),m_=Le.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),U8=/^([-+])?(\d+)?$/,j8=31,g_=16383,H8=30,V8=31;function y_(e){return!isNaN(parseInt(e,10))}function F8(e){const t=K.fromNumber(1e9);let n=K.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(let r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new K(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function q8(e,t){if(!e&&!t)return{high:K.fromNumber(0),low:K.fromNumber(0)};const n=e.shiftRightUnsigned(32),r=new K(e.getLowBits(),0),a=t.shiftRightUnsigned(32),s=new K(t.getLowBits(),0);let u=n.multiply(a),f=n.multiply(s);const d=r.multiply(a);let p=r.multiply(s);return u=u.add(f.shiftRightUnsigned(32)),f=new K(f.getLowBits(),0).add(d).add(p.shiftRightUnsigned(32)),u=u.add(f.shiftRightUnsigned(32)),p=f.shiftLeft(32).add(new K(p.getLowBits(),0)),{high:u,low:p}}function G8(e,t){const n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){const a=e.low>>>0,s=t.low>>>0;if(a<s)return!0}return!1}function mi(e,t){throw new ve(`"${e}" is not a valid Decimal128 string - ${t}`)}class Nr extends Kr{get _bsontype(){return"Decimal128"}bytes;constructor(t){if(super(),typeof t=="string")this.bytes=Nr.fromString(t).bytes;else if(t instanceof Uint8Array||kd(t)){if(t.byteLength!==16)throw new ve("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new ve("Decimal128 must take a Buffer or string")}static fromString(t){return Nr._fromString(t,{allowRounding:!1})}static fromStringWithRounding(t){return Nr._fromString(t,{allowRounding:!0})}static _fromString(t,n){let r=!1,a=!1,s=!1,u=!1,f=0,d=0,p=0,m=0,y=0;const b=[0];let v=0,E=0,S=0,w=0,_=new K(0,0),O=new K(0,0),T=0,C=0;if(t.length>=7e3)throw new ve(""+t+" not a valid Decimal128 string");const N=t.match(L8),k=t.match(P8),z=t.match($8);if(!N&&!k&&!z||t.length===0)throw new ve(""+t+" not a valid Decimal128 string");if(N){const F=N[2],A=N[4],X=N[5],$=N[6];A&&$===void 0&&mi(t,"missing exponent power"),A&&F===void 0&&mi(t,"missing exponent base"),A===void 0&&(X||$)&&mi(t,"missing e before exponent")}if((t[C]==="+"||t[C]==="-")&&(a=!0,r=t[C++]==="-"),!y_(t[C])&&t[C]!=="."){if(t[C]==="i"||t[C]==="I")return new Nr(r?h_:m_);if(t[C]==="N")return new Nr(ny)}for(;y_(t[C])||t[C]===".";){if(t[C]==="."){s&&mi(t,"contains multiple periods"),s=!0,C=C+1;continue}v<p_&&(t[C]!=="0"||u)&&(u||(y=d),u=!0,b[E++]=parseInt(t[C],10),v=v+1),u&&(p=p+1),s&&(m=m+1),d=d+1,C=C+1}if(s&&!d)throw new ve(""+t+" not a valid Decimal128 string");if(t[C]==="e"||t[C]==="E"){const F=t.substr(++C).match(U8);if(!F||!F[2])return new Nr(ny);w=parseInt(F[0],10),C=C+F[0].length}if(t[C])return new Nr(ny);if(!v)b[0]=0,p=1,v=1,f=0;else if(S=v-1,f=p,f!==1)for(;t[y+f-1+Number(a)+Number(s)]==="0";)f=f-1;for(w<=m&&m>w+16384?w=Iu:w=w-m;w>$s;){if(S=S+1,S>=p_){if(f===0){w=$s;break}mi(t,"overflow")}w=w-1}if(n.allowRounding){for(;w<Iu||v<p;){if(S===0&&f<v){w=Iu,f=0;break}if(v<p?p=p-1:S=S-1,w<$s)w=w+1;else{if(b.join("").match(/^0+$/)){w=$s;break}mi(t,"overflow")}}if(S+1<f){let F=d;s&&(y=y+1,F=F+1),a&&(y=y+1,F=F+1);const A=parseInt(t[y+S+1],10);let X=0;if(A>=5&&(X=1,A===5)){X=b[S]%2===1?1:0;for(let $=y+S+2;$<F;$++)if(parseInt(t[$],10)){X=1;break}}if(X){let $=S;for(;$>=0&&++b[$]>9;$--)if(b[$]=0,$===0)if(w<$s)w=w+1,b[$]=1;else return new Nr(r?h_:m_)}}}else{for(;w<Iu||v<p;){if(S===0){if(f===0){w=Iu;break}mi(t,"exponent underflow")}v<p?(t[p-1+Number(a)+Number(s)]!=="0"&&f!==0&&mi(t,"inexact rounding"),p=p-1):(b[S]!==0&&mi(t,"inexact rounding"),S=S-1),w<$s?w=w+1:mi(t,"overflow")}S+1<f&&(s&&(y=y+1),a&&(y=y+1),parseInt(t[y+S+1],10)!==0&&mi(t,"inexact rounding"))}if(_=K.fromNumber(0),O=K.fromNumber(0),f===0)_=K.fromNumber(0),O=K.fromNumber(0);else if(S<17){let F=0;for(O=K.fromNumber(b[F++]),_=new K(0,0);F<=S;F++)O=O.multiply(K.fromNumber(10)),O=O.add(K.fromNumber(b[F]))}else{let F=0;for(_=K.fromNumber(b[F++]);F<=S-17;F++)_=_.multiply(K.fromNumber(10)),_=_.add(K.fromNumber(b[F]));for(O=K.fromNumber(b[F++]);F<=S;F++)O=O.multiply(K.fromNumber(10)),O=O.add(K.fromNumber(b[F]))}const H=q8(_,K.fromString("100000000000000000"));H.low=H.low.add(O),G8(H.low,O)&&(H.high=H.high.add(K.fromNumber(1))),T=w+d_;const j={low:K.fromNumber(0),high:K.fromNumber(0)};H.high.shiftRightUnsigned(49).and(K.fromNumber(1)).equals(K.fromNumber(1))?(j.high=j.high.or(K.fromNumber(3).shiftLeft(61)),j.high=j.high.or(K.fromNumber(T).and(K.fromNumber(16383).shiftLeft(47))),j.high=j.high.or(H.high.and(K.fromNumber(0x7fffffffffff)))):(j.high=j.high.or(K.fromNumber(T&16383).shiftLeft(49)),j.high=j.high.or(H.high.and(K.fromNumber(562949953421311)))),j.low=H.low,r&&(j.high=j.high.or(K.fromString("9223372036854775808")));const G=Le.allocateUnsafe(16);return C=0,G[C++]=j.low.low&255,G[C++]=j.low.low>>8&255,G[C++]=j.low.low>>16&255,G[C++]=j.low.low>>24&255,G[C++]=j.low.high&255,G[C++]=j.low.high>>8&255,G[C++]=j.low.high>>16&255,G[C++]=j.low.high>>24&255,G[C++]=j.high.low&255,G[C++]=j.high.low>>8&255,G[C++]=j.high.low>>16&255,G[C++]=j.high.low>>24&255,G[C++]=j.high.high&255,G[C++]=j.high.high>>8&255,G[C++]=j.high.high>>16&255,G[C++]=j.high.high>>24&255,new Nr(G)}toString(){let t,n=0;const r=new Array(36);for(let C=0;C<r.length;C++)r[C]=0;let a=0,s=!1,u,f={parts:[0,0,0,0]},d,p;const m=[];a=0;const y=this.bytes,b=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,v=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,E=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,S=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24;a=0,{low:new K(b,v),high:new K(E,S)}.high.lessThan(K.ZERO)&&m.push("-");const _=S>>26&j8;if(_>>3===3){if(_===H8)return m.join("")+"Infinity";if(_===V8)return"NaN";t=S>>15&g_,u=8+(S>>14&1)}else u=S>>14&7,t=S>>17&g_;const O=t-d_;if(f.parts[0]=(S&16383)+((u&15)<<14),f.parts[1]=E,f.parts[2]=v,f.parts[3]=b,f.parts[0]===0&&f.parts[1]===0&&f.parts[2]===0&&f.parts[3]===0)s=!0;else for(p=3;p>=0;p--){let C=0;const N=F8(f);if(f=N.quotient,C=N.rem.low,!!C)for(d=8;d>=0;d--)r[p*9+d]=C%10,C=Math.floor(C/10)}if(s)n=1,r[a]=0;else for(n=36;!r[a];)n=n-1,a=a+1;const T=n-1+O;if(T>=34||T<=-7||O>0){if(n>34)return m.push("0"),O>0?m.push(`E+${O}`):O<0&&m.push(`E${O}`),m.join("");m.push(`${r[a++]}`),n=n-1,n&&m.push(".");for(let C=0;C<n;C++)m.push(`${r[a++]}`);m.push("E"),T>0?m.push(`+${T}`):m.push(`${T}`)}else if(O>=0)for(let C=0;C<n;C++)m.push(`${r[a++]}`);else{let C=n+O;if(C>0)for(let N=0;N<C;N++)m.push(`${r[a++]}`);else m.push("0");for(m.push(".");C++<0;)m.push("0");for(let N=0;N<n-Math.max(C-1,0);N++)m.push(`${r[a++]}`)}return m.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(t){return Nr.fromString(t.$numberDecimal)}inspect(t,n,r){return r??=Rr,`new Decimal128(${r(this.toString(),n)})`}}class Ji extends Kr{get _bsontype(){return"Double"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t}static fromString(t){const n=Number(t);if(t==="NaN")return new Ji(NaN);if(t==="Infinity")return new Ji(1/0);if(t==="-Infinity")return new Ji(-1/0);if(!Number.isFinite(n))throw new ve(`Input: ${t} is not representable as a Double`);if(t.trim()!==t)throw new ve(`Input: '${t}' contains whitespace`);if(t==="")throw new ve("Input is an empty string");if(/[^-0-9.+eE]/.test(t))throw new ve(`Input: '${t}' is not in decimal or exponential notation`);return new Ji(n)}valueOf(){return this.value}toJSON(){return this.value}toString(t){return this.value.toString(t)}toExtendedJSON(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(t,n){const r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new Ji(r)}inspect(t,n,r){return r??=Rr,`new Double(${r(this.value,n)})`}}class Us extends Kr{get _bsontype(){return"Int32"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t|0}static fromString(t){const n=a_(t),r=Number(t);if(Qg<r)throw new ve(`Input: '${t}' is larger than the maximum value for Int32`);if(Jg>r)throw new ve(`Input: '${t}' is smaller than the minimum value for Int32`);if(Number.isSafeInteger(r)){if(r.toString()!==n)throw new ve(`Input: '${t}' is not a valid Int32 string`)}else throw new ve(`Input: '${t}' is not a safe integer`);return new Us(r)}valueOf(){return this.value}toString(t){return this.value.toString(t)}toJSON(){return this.value}toExtendedJSON(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new Us(t.$numberInt)}inspect(t,n,r){return r??=Rr,`new Int32(${r(this.value,n)})`}}class Od extends Kr{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new Od}inspect(){return"new MaxKey()"}}class Rd extends Kr{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new Rd}inspect(){return"new MinKey()"}}let Na=null;const Mu=new WeakMap;class En extends Kr{get _bsontype(){return"ObjectId"}static index=Math.floor(Math.random()*16777215);static cacheHexString;buffer;constructor(t){super();let n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new ve("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=Le.fromHex(t.toHexString()):n=t.id}else n=t;if(n==null)this.buffer=En.generate();else if(ArrayBuffer.isView(n)&&n.byteLength===12)this.buffer=Le.toLocalBufferType(n);else if(typeof n=="string")if(En.validateHexString(n))this.buffer=Le.fromHex(n),En.cacheHexString&&Mu.set(this,n);else throw new ve("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new ve("Argument passed in does not match the accepted types")}get id(){return this.buffer}set id(t){this.buffer=t,En.cacheHexString&&Mu.set(this,Le.toHex(t))}static validateHexString(t){if(t?.length!==24)return!1;for(let n=0;n<24;n++){const r=t.charCodeAt(n);if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70))return!1}return!0}toHexString(){if(En.cacheHexString){const n=Mu.get(this);if(n)return n}const t=Le.toHex(this.id);return En.cacheHexString&&Mu.set(this,t),t}static getInc(){return En.index=(En.index+1)%16777215}static generate(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));const n=En.getInc(),r=Le.allocateUnsafe(12);return Ra.setInt32BE(r,0,t),Na===null&&(Na=Le.randomBytes(5)),r[4]=Na[0],r[5]=Na[1],r[6]=Na[2],r[7]=Na[3],r[8]=Na[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r}toString(t){return t==="base64"?Le.toBase64(this.id):t==="hex"?this.toHexString():this.toHexString()}toJSON(){return this.toHexString()}static is(t){return t!=null&&typeof t=="object"&&"_bsontype"in t&&t._bsontype==="ObjectId"}equals(t){if(t==null)return!1;if(En.is(t))return this.buffer[11]===t.buffer[11]&&Le.equals(this.buffer,t.buffer);if(typeof t=="string")return t.toLowerCase()===this.toHexString();if(typeof t=="object"&&typeof t.toHexString=="function"){const n=t.toHexString(),r=this.toHexString();return typeof n=="string"&&n.toLowerCase()===r}return!1}getTimestamp(){const t=new Date,n=Ra.getUint32BE(this.buffer,0);return t.setTime(Math.floor(n)*1e3),t}static createPk(){return new En}serializeInto(t,n){return t[n]=this.buffer[0],t[n+1]=this.buffer[1],t[n+2]=this.buffer[2],t[n+3]=this.buffer[3],t[n+4]=this.buffer[4],t[n+5]=this.buffer[5],t[n+6]=this.buffer[6],t[n+7]=this.buffer[7],t[n+8]=this.buffer[8],t[n+9]=this.buffer[9],t[n+10]=this.buffer[10],t[n+11]=this.buffer[11],12}static createFromTime(t){const n=Le.allocate(12);for(let r=11;r>=4;r--)n[r]=0;return Ra.setInt32BE(n,0,t),new En(n)}static createFromHexString(t){if(t?.length!==24)throw new ve("hex string must be 24 characters");return new En(Le.fromHex(t))}static createFromBase64(t){if(t?.length!==16)throw new ve("base64 string must be 16 characters");return new En(Le.fromBase64(t))}static isValid(t){if(t==null)return!1;if(typeof t=="string")return En.validateHexString(t);try{return new En(t),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(t){return new En(t.$oid)}isCached(){return En.cacheHexString&&Mu.has(this)}inspect(t,n,r){return r??=Rr,`new ObjectId(${r(this.toHexString(),n)})`}}function Y8(e){return e.split("").sort().join("")}class eo extends Kr{get _bsontype(){return"BSONRegExp"}pattern;options;constructor(t,n){if(super(),this.pattern=t,this.options=Y8(n??""),this.pattern.indexOf("\0")!==-1)throw new ve(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(this.options.indexOf("\0")!==-1)throw new ve(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new ve(`The regular expression option [${this.options[r]}] is not supported`)}static parseOptions(t){return t?t.split("").sort().join(""):""}toExtendedJSON(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new eo(t.$regex,eo.parseOptions(t.$options));if("$regularExpression"in t)return new eo(t.$regularExpression.pattern,eo.parseOptions(t.$regularExpression.options));throw new ve(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t)}`)}inspect(t,n,r){const a=b8(n)??(f=>f);r??=Rr;const s=a(r(this.pattern),"regexp"),u=a(r(this.options),"regexp");return`new BSONRegExp(${s}, ${u})`}}class Nd extends Kr{get _bsontype(){return"BSONSymbol"}value;constructor(t){super(),this.value=t}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(t){return new Nd(t.$symbol)}inspect(t,n,r){return r??=Rr,`new BSONSymbol(${r(this.value,n)})`}}const X8=K;class $o extends X8{get _bsontype(){return"Timestamp"}get[o_](){return"Timestamp"}static MAX_VALUE=K.MAX_UNSIGNED_VALUE;get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(t){if(t==null)super(0,0,!0);else if(typeof t=="bigint")super(t,!0);else if(K.isLong(t))super(t.low,t.high,!0);else if(typeof t=="object"&&"t"in t&&"i"in t){if(typeof t.t!="number"&&(typeof t.t!="object"||t.t._bsontype!=="Int32"))throw new ve("Timestamp constructed from { t, i } must provide t as a number");if(typeof t.i!="number"&&(typeof t.i!="object"||t.i._bsontype!=="Int32"))throw new ve("Timestamp constructed from { t, i } must provide i as a number");const n=Number(t.t),r=Number(t.i);if(n<0||Number.isNaN(n))throw new ve("Timestamp constructed from { t, i } must provide a positive t");if(r<0||Number.isNaN(r))throw new ve("Timestamp constructed from { t, i } must provide a positive i");if(n>4294967295)throw new ve("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(r>4294967295)throw new ve("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(r,n,!0)}else throw new ve("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }")}toJSON(){return{$timestamp:this.toString()}}static fromInt(t){return new $o(K.fromInt(t,!0))}static fromNumber(t){return new $o(K.fromNumber(t,!0))}static fromBits(t,n){return new $o({i:t,t:n})}static fromString(t,n){return new $o(K.fromString(t,!0,n))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(t){const n=K.isLong(t.$timestamp.i)?t.$timestamp.i.getLowBitsUnsigned():t.$timestamp.i,r=K.isLong(t.$timestamp.t)?t.$timestamp.t.getLowBitsUnsigned():t.$timestamp.t;return new $o({t:r,i:n})}inspect(t,n,r){r??=Rr;const a=r(this.t,n),s=r(this.i,n);return`new Timestamp({ t: ${a}, i: ${s} })`}}K.fromNumber(S8),K.fromNumber(x8);function Z8(e){return e!=null&&typeof e=="object"&&"_bsontype"in e&&typeof e._bsontype=="string"}const K8={$oid:En,$binary:dt,$uuid:dt,$symbol:Nd,$numberInt:Us,$numberDecimal:Nr,$numberDouble:Ji,$numberLong:K,$minKey:Rd,$maxKey:Od,$regex:eo,$regularExpression:eo,$timestamp:$o};function v_(e,t={}){if(typeof e=="number"){const r=e<=Qg&&e>=Jg,a=e<=Kw&&e>=Ww;if(t.relaxed||t.legacy)return e;if(Number.isInteger(e)&&!Object.is(e,-0)){if(r)return new Us(e);if(a)return t.useBigInt64?BigInt(e):K.fromNumber(e)}return new Ji(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;const n=Object.keys(e).filter(r=>r.startsWith("$")&&e[r]!=null);for(let r=0;r<n.length;r++){const a=K8[n[r]];if(a)return a.fromExtendedJSON(e,t)}if(e.$date!=null){const r=e.$date,a=new Date;if(t.legacy)if(typeof r=="number")a.setTime(r);else if(typeof r=="string")a.setTime(Date.parse(r));else if(typeof r=="bigint")a.setTime(Number(r));else throw new Jw(`Unrecognized type for EJSON date: ${typeof r}`);else if(typeof r=="string")a.setTime(Date.parse(r));else if(K.isLong(r))a.setTime(r.toNumber());else if(typeof r=="number"&&t.relaxed)a.setTime(r);else if(typeof r=="bigint")a.setTime(Number(r));else throw new Jw(`Unrecognized type for EJSON date: ${typeof r}`);return a}if(e.$code!=null){const r=Object.assign({},e);return e.$scope&&(r.$scope=v_(e.$scope)),Nu.fromExtendedJSON(e)}if(I8(e)||e.$dbPointer){const r=e.$ref?e:e.$dbPointer;if(r instanceof Ls)return r;const a=Object.keys(r).filter(u=>u.startsWith("$"));let s=!0;if(a.forEach(u=>{["$ref","$id","$db"].indexOf(u)===-1&&(s=!1)}),s)return Ls.fromExtendedJSON(r)}return e}function W8(e,t){return e.map((n,r)=>{t.seenObjects.push({propertyName:`index ${r}`,obj:null});try{return to(n,t)}finally{t.seenObjects.pop()}})}function b_(e){const t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function to(e,t){if(e instanceof Map||Xw(e)){const n=Object.create(null);for(const[r,a]of e){if(typeof r!="string")throw new ve("Can only serialize maps with string keys");n[r]=a}return to(n,t)}if((typeof e=="object"||typeof e=="function")&&e!==null){const n=t.seenObjects.findIndex(r=>r.obj===e);if(n!==-1){const r=t.seenObjects.map(m=>m.propertyName),a=r.slice(0,n).map(m=>`${m} -> `).join(""),s=r[n],u=" -> "+r.slice(n+1,r.length-1).map(m=>`${m} -> `).join(""),f=r[r.length-1],d=" ".repeat(a.length+s.length/2),p="-".repeat(u.length+(s.length+f.length)/2-1);throw new ve(`Converting circular structure to EJSON:
174
+ ${a}${s}${u}${f}
175
+ ${d}\\${p}/`)}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return W8(e,t);if(e===void 0)return null;if(e instanceof Date||v8(e)){const n=e.getTime(),r=n>-1&&n<2534023188e5;return t.legacy?t.relaxed&&r?{$date:e.getTime()}:{$date:b_(e)}:t.relaxed&&r?{$date:b_(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Number.isInteger(e)&&!Object.is(e,-0)){if(e>=Jg&&e<=Qg)return{$numberInt:e.toString()};if(e>=Ww&&e<=Kw)return{$numberLong:e.toString()}}return{$numberDouble:Object.is(e,-0)?"-0.0":e.toString()}}if(typeof e=="bigint")return t.relaxed?Number(BigInt.asIntN(64,e)):{$numberLong:BigInt.asIntN(64,e).toString()};if(e instanceof RegExp||y8(e)){let n=e.flags;if(n===void 0){const a=e.toString().match(/[gimuy]*$/);a&&(n=a[0])}return new eo(e.source,n).toExtendedJSON(t)}return e!=null&&typeof e=="object"?J8(e,t):e}const Q8={Binary:e=>new dt(e.value(),e.sub_type),Code:e=>new Nu(e.code,e.scope),DBRef:e=>new Ls(e.collection||e.namespace,e.oid,e.db,e.fields),Decimal128:e=>new Nr(e.bytes),Double:e=>new Ji(e.value),Int32:e=>new Us(e.value),Long:e=>K.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_),MaxKey:()=>new Od,MinKey:()=>new Rd,ObjectId:e=>new En(e),BSONRegExp:e=>new eo(e.pattern,e.options),BSONSymbol:e=>new Nd(e.value),Timestamp:e=>$o.fromBits(e.low,e.high)};function J8(e,t){if(e==null||typeof e!="object")throw new ve("not an object instance");const n=e._bsontype;if(typeof n>"u"){const r={};for(const a of Object.keys(e)){t.seenObjects.push({propertyName:a,obj:null});try{const s=to(e[a],t);a==="__proto__"?Object.defineProperty(r,a,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[a]=s}finally{t.seenObjects.pop()}}return r}else{if(e!=null&&typeof e=="object"&&typeof e._bsontype=="string"&&e[Zw]!==Wg)throw new E8;if(Z8(e)){let r=e;if(typeof r.toExtendedJSON!="function"){const a=Q8[e._bsontype];if(!a)throw new ve("Unrecognized or invalid _bsontype: "+e._bsontype);r=a(r)}return n==="Code"&&r.scope?r=new Nu(r.code,to(r.scope,t)):n==="DBRef"&&r.oid&&(r=new Ls(to(r.collection,t),to(r.oid,t),to(r.db,t),to(r.fields,t))),r.toExtendedJSON(t)}else throw new ve("_bsontype must be a string, but was: "+typeof n)}}function S_(e,t){const n={useBigInt64:t?.useBigInt64??!1,relaxed:t?.relaxed??!0,legacy:t?.legacy??!1};return JSON.parse(e,(r,a)=>{if(r.indexOf("\0")!==-1)throw new ve(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(r)}`);return v_(a,n)})}function x_(e,t,n,r){n!=null&&typeof n=="object"&&(r=n,n=0),t!=null&&typeof t=="object"&&!Array.isArray(t)&&(r=t,t=void 0,n=0);const a=Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}),s=to(e,a);return JSON.stringify(s,t,n)}function eU(e,t){return t=t||{},JSON.parse(x_(e,t))}function tU(e,t){return t=t||{},S_(JSON.stringify(e),t)}const Du=Object.create(null);Du.parse=S_,Du.stringify=x_,Du.serialize=eU,Du.deserialize=tU,Object.freeze(Du);const un={double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:255,maxKey:127};function ry(e,t){try{return Ra.getNonnegativeInt32LE(e,t)}catch(n){throw new Lo("BSON size cannot be negative",t,{cause:n})}}function iy(e,t){let n=t;for(;e[n]!==0;n++);if(n===e.length-1)throw new Lo("Null terminator not found",t);return n}function nU(e,t=0){if(t??=0,e.length<5)throw new Lo(`Input must be at least 5 bytes, got ${e.length} bytes`,t);const n=ry(e,t);if(n>e.length-t)throw new Lo(`Parsed documentSize (${n} bytes) does not match input length (${e.length} bytes)`,t);if(e[t+n-1]!==0)throw new Lo("BSON documents must end in 0x00",t+n);const r=[];let a=t+4;for(;a<=n+t;){const s=e[a];if(a+=1,s===0){if(a-t!==n)throw new Lo("Invalid 0x00 type byte",a);break}const u=a,f=iy(e,a)-u;a+=f+1;let d;if(s===un.double||s===un.long||s===un.date||s===un.timestamp)d=8;else if(s===un.int)d=4;else if(s===un.objectId)d=12;else if(s===un.decimal)d=16;else if(s===un.bool)d=1;else if(s===un.null||s===un.undefined||s===un.maxKey||s===un.minKey)d=0;else if(s===un.regex)d=iy(e,iy(e,a)+1)+1-a;else if(s===un.object||s===un.array||s===un.javascriptWithScope)d=ry(e,a);else if(s===un.string||s===un.binData||s===un.dbPointer||s===un.javascript||s===un.symbol)d=ry(e,a)+4,s===un.binData&&(d+=1),s===un.dbPointer&&(d+=12);else throw new Lo(`Invalid 0x${s.toString(16).padStart(2,"0")} type byte`,a);if(d>n)throw new Lo("value reports length larger than document",a);r.push([s,u,f,a,d]),a+=d}return r}const Id=Object.create(null);Id.parseToElements=nU,Id.ByteUtils=Le,Id.NumberUtils=Ra,Object.freeze(Id);const rU=1024*1024*17;Le.allocate(rU);const iU=({directive:e,setDirective:t})=>{if(!e)return null;const[n,r]=I.useState(null),a=I.useCallback(s=>{p8(s).then(u=>{const f=u.events;if(f.length==0)return null;let d=f[0];const p=JSON.parse(d.value);if(d.value=p,d.value.kind==pi.OperationValidationFailed){r(d);return}t(d)}).catch(()=>t(null))},[e]);switch(e.value.kind){case pi.verificationForm:return e.value?.payload?.channels?.includes("email")?L.jsx(d8,{send:a,cancel:()=>t(null)}):L.jsx(u8,{send:a});case pi.OtpForm:const s=e?.value?.payload;return L.jsx(h8,{valueRecieved:s,failedValidationOperation:n,send:a,cancel:()=>t(null)});case pi.OperationError:return L.jsx(Tr,{color:"error",children:e.value.payload.message});case pi.OperationSuccess:const u={id:new Jn().toString(),role:"assistant",text:e.value.payload?.message,sentAt:void 0,seen:!1,status:void 0,errorText:void 0};return L.jsxs(pn,{sx:{display:"flex",justifyContent:"flex-start",gap:1,mb:1.2,overflowAnchor:"none"},children:[L.jsx(Yw,{msg:u,isMe:!1}),L.jsx(Gw,{msg:u,isMe:!1,showSeenIndicator:!1,isSeen:!1,send:()=>null})]});default:return null}},oU=()=>L.jsxs(pn,{sx:{display:"flex",alignItems:"flex-end",gap:1,mb:1.2},children:[L.jsx(bf,{sx:{width:30,height:30,bgcolor:"primary.main"},children:L.jsx(pg,{sx:{fontSize:18}})}),L.jsxs(pn,{sx:{px:1.4,py:1.1,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 10px 30px rgba(0,0,0,.10)",display:"flex",alignItems:"center",gap:.6},children:[L.jsx(pn,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}}),L.jsx(pn,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out",animationDelay:"0.15s","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}}),L.jsx(pn,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out",animationDelay:"0.3s","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}})]})]}),aU={display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"auto",px:1.5,pt:1.5,backgroundImage:"radial-gradient(circle at 20% 10%, rgba(25,118,210,.10), transparent 45%),radial-gradient(circle at 80% 20%, rgba(156,39,176,.10), transparent 50%),radial-gradient(circle at 40% 90%, rgba(0,200,83,.08), transparent 45%)","&::-webkit-scrollbar":{width:10},"&::-webkit-scrollbar-thumb":{backgroundColor:"rgba(0,0,0,.18)",borderRadius:999,border:"3px solid transparent",backgroundClip:"content-box"}};function sU({msgs:e,isMessageSeen:t,send:n,sending:r,items:a,endRef:s,directive:u,setDirective:f}){return L.jsxs(pn,{sx:aU,children:[L.jsx(l8,{msgs:e,isMessageSeen:t,reSend:n}),L.jsx("div",{style:{paddingBottom:2},children:r&&L.jsx(oU,{})}),a.map(d=>L.jsx(qB,{error:d.message,onClose:()=>yd.getState().remove(d.id)},d.id)),L.jsx(iU,{directive:u,setDirective:f}),L.jsx(x4,{ref:s,href:"https://x-bot.ro",target:"_blank",rel:"noreferrer",underline:"none",sx:{pb:1,marginTop:"auto",alignSelf:"center",fontSize:12,color:"text.secondary",opacity:.75,"&:hover":{opacity:1,color:"text.primary"},justifyContent:"center"},children:"Chat oferit de X-bot.ro"})]})}function lU({inputRef:e,input:t,sending:n,setInput:r,send:a}){return L.jsx(pn,{sx:{p:1.25,borderTop:"1px solid",borderColor:"divider",display:"flex",gap:1,bgcolor:"background.paper",flexShrink:0},children:L.jsx(Cf,{inputRef:e,focused:!0,size:"small",fullWidth:!0,value:t,disabled:n||t.length>=xB,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a())},placeholder:"Scrie un mesaj",multiline:!0,maxRows:4,sx:{"& .MuiOutlinedInput-root":{borderRadius:3,pr:.75,backgroundColor:"rgba(0,0,0,.02)"}},InputProps:{endAdornment:L.jsx(Co,{size:"small",onClick:()=>a(),disabled:n||!t.trim(),sx:{ml:.5,borderRadius:999},children:L.jsx(XB,{})})}})})}function uU({open:e,setOpen:t,msgs:n,input:r,setInput:a,sending:s,send:u,anchorSx:f,conversationMode:d,directive:p,setDirective:m}){const y=yd(O=>O.items),b=I.useRef(null),v=I.useRef(null),E=us(),S=v5(E.breakpoints.down("md"));HB(),I.useEffect(()=>{v.current?.scrollIntoView({behavior:"smooth",block:"end"}),requestAnimationFrame(()=>b.current?.focus())},[n.length,s]),I.useEffect(()=>{e&&v.current?.scrollIntoView({behavior:"auto",block:"end"})},[e]),I.useEffect(()=>{if(!(e&&S))return;const O=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${O}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,O)}},[e,S]);const w=I.useCallback((O,T,C,N)=>{const k=O===C.length-1,z=C[C.length-1],H=k&&T&&z?.seen,j=H&&z?.id===N.id;return{showSeenIndicator:H,isSeen:j}},[]),_=O=>O?!(O.value.kind==pi.OperationError||O.value.kind==pi.OperationSuccess):!1;return L.jsxs(pn,{sx:f,children:[!e&&L.jsx(dm,{variant:"contained",onClick:()=>t(!0),startIcon:L.jsx(UB,{}),sx:{borderRadius:999,px:2,py:1,textTransform:"none",boxShadow:"0 10px 30px rgba(0,0,0,.18)"},children:"Chat"}),e&&L.jsx(Xh,{elevation:S?0:10,sx:{width:S?"100vw":380,height:S?"calc(var(--vh, 1vh) * 100)":560,"@supports (height: 100dvh)":{height:S?"100dvh":560},maxWidth:"100vw",maxHeight:"100dvh",borderRadius:S?0:4,position:S?"fixed":"relative",inset:S?0:"auto",overflow:"hidden",border:S?"none":"1px solid",borderColor:"divider",boxShadow:S?"none":"0 18px 60px rgba(0,0,0,.28)"},children:L.jsxs(pn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[L.jsx(FB,{isMobile:S,conversationMode:d,setOpen:t}),L.jsx(sU,{msgs:n,isMessageSeen:w,send:u,sending:s,items:y,endRef:v,directive:p,setDirective:m}),L.jsx(lU,{inputRef:b,input:r,sending:s||_(p),setInput:a,send:u})]})})]})}class Ia extends Error{constructor(t,n){const r=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class oy extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class gi extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class cU extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class fU extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class dU extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class E_ extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class pU extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=r}}class w_{constructor(t,n,r){this.statusCode=t,this.statusText=n,this.content=r}}class Md{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var ue;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(ue||(ue={}));class Bu{constructor(){}log(t,n){}}Bu.instance=new Bu;const hU="10.0.0";class On{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,r){if(!(t in n))throw new Error(`Unknown ${r} value: ${t}.`)}}class cn{static get isBrowser(){return!cn.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!cn.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!cn.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function zu(e,t){let n="";return Ma(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${mU(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function mU(e){const t=new Uint8Array(e);let n="";return t.forEach(r=>{const a=r<16?"0":"";n+=`0x${a}${r.toString(16)} `}),n.substring(0,n.length-1)}function Ma(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function __(e,t,n,r,a,s){const u={},[f,d]=js();u[f]=d,e.log(ue.Trace,`(${t} transport) sending data. ${zu(a,s.logMessageContent)}.`);const p=Ma(a)?"arraybuffer":"text",m=await n.post(r,{content:a,headers:{...u,...s.headers},responseType:p,timeout:s.timeout,withCredentials:s.withCredentials});e.log(ue.Trace,`(${t} transport) request complete. Response status: ${m.statusCode}.`)}function gU(e){return e===void 0?new Dd(ue.Information):e===null?Bu.instance:e.log!==void 0?e:new Dd(e)}class yU{constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Dd{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const r=`[${new Date().toISOString()}] ${ue[t]}: ${n}`;switch(t){case ue.Critical:case ue.Error:this.out.error(r);break;case ue.Warning:this.out.warn(r);break;case ue.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function js(){let e="X-SignalR-User-Agent";return cn.isNode&&(e="User-Agent"),[e,vU(hU,bU(),xU(),SU())]}function vU(e,t,n,r){let a="Microsoft SignalR/";const s=e.split(".");return a+=`${s[0]}.${s[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${n}`,r?a+=`; ${r}`:a+="; Unknown Runtime Version",a+=")",a}function bU(){if(cn.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function SU(){if(cn.isNode)return process.versions.node}function xU(){return cn.isNode?"NodeJS":"Browser"}function ay(e){return e.stack?e.stack:e.message?e.message:`${e}`}function EU(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class wU extends Md{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||cn.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(EU());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new gi;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),r=new gi});let a=null;if(t.timeout){const d=t.timeout;a=setTimeout(()=>{n.abort(),this._logger.log(ue.Warning,"Timeout from HTTP request."),r=new oy},d)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},Ma(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(d){throw r||(this._logger.log(ue.Warning,`Error from HTTP request. ${d}.`),d)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const d=await T_(s,"text");throw new Ia(d||s.statusText,s.status)}const f=await T_(s,t.responseType);return new w_(s.status,s.statusText,f)}getCookieString(t){let n="";return cn.isNode&&this._jar&&this._jar.getCookies(t,(r,a)=>n=a.join("; ")),n}}function T_(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:n=e.text();break}return n}class _U extends Md{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new gi):t.method?t.url?new Promise((n,r)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(Ma(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(u=>{a.setRequestHeader(u,s[u])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),r(new gi)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?n(new w_(a.status,a.statusText,a.response||a.responseText)):r(new Ia(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(ue.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),r(new Ia(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(ue.Warning,"Timeout from HTTP request."),r(new oy)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class TU extends Md{constructor(t){if(super(),typeof fetch<"u"||cn.isNode)this._httpClient=new wU(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new _U(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new gi):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class Ir{static write(t){return`${t}${Ir.RecordSeparator}`}static parse(t){if(t[t.length-1]!==Ir.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(Ir.RecordSeparator);return n.pop(),n}}Ir.RecordSeparatorCode=30,Ir.RecordSeparator=String.fromCharCode(Ir.RecordSeparatorCode);class CU{writeHandshakeRequest(t){return Ir.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,r;if(Ma(t)){const f=new Uint8Array(t),d=f.indexOf(Ir.RecordSeparatorCode);if(d===-1)throw new Error("Message is incomplete.");const p=d+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(f.slice(0,p))),r=f.byteLength>p?f.slice(p).buffer:null}else{const f=t,d=f.indexOf(Ir.RecordSeparator);if(d===-1)throw new Error("Message is incomplete.");const p=d+1;n=f.substring(0,p),r=f.length>p?f.substring(p):null}const a=Ir.parse(n),s=JSON.parse(a[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[r,s]}}var Qe;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(Qe||(Qe={}));class AU{constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new yU(this,t)}}class kU{constructor(t,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=n,this._bufferSize=r}async _send(t){const n=this._protocol.writeMessage(t);let r=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let a=()=>{},s=()=>{};Ma(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((u,f)=>{a=u,s=f})),this._messages.push(new OU(n,this._totalMessageCount,a,s))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(t){let n=-1;for(let r=0;r<this._messages.length;r++){const a=this._messages[r];if(a._id<=t.sequenceId)n=r,Ma(a._message)?this._bufferedByteCount-=a._message.byteLength:this._bufferedByteCount-=a._message.length,a._resolver();else if(this._bufferedByteCount<this._bufferSize)a._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==Qe.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Qe.Sequence,sequenceId:t}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(t)}_isInvocationMessage(t){switch(t.type){case Qe.Invocation:case Qe.StreamItem:case Qe.Completion:case Qe.StreamInvocation:case Qe.CancelInvocation:return!0;case Qe.Close:case Qe.Sequence:case Qe.Ping:case Qe.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Qe.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class OU{constructor(t,n,r,a){this._message=t,this._id=n,this._resolver=r,this._rejector=a}}const RU=30*1e3,NU=15*1e3,IU=1e5;var Pt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Pt||(Pt={}));class sy{static create(t,n,r,a,s,u,f){return new sy(t,n,r,a,s,u,f)}constructor(t,n,r,a,s,u,f){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(ue.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},On.isRequired(t,"connection"),On.isRequired(n,"logger"),On.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=s??RU,this.keepAliveIntervalInMilliseconds=u??NU,this._statefulReconnectBufferSize=f??IU,this._logger=n,this._protocol=r,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new CU,this.connection.onreceive=d=>this._processIncomingData(d),this.connection.onclose=d=>this._connectionClosed(d),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Pt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Qe.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Pt.Disconnected&&this._connectionState!==Pt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Pt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Pt.Connecting,this._logger.log(ue.Debug,"Starting HubConnection.");try{await this._startInternal(),cn.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Pt.Connected,this._connectionStarted=!0,this._logger.log(ue.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Pt.Disconnected,this._logger.log(ue.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(ue.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(ue.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.reconnect&&(this._messageBuffer=new kU(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(ue.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===Pt.Disconnected)return this._logger.log(ue.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Pt.Disconnecting)return this._logger.log(ue.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Pt.Disconnecting,this._logger.log(ue.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(ue.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Pt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new gi("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._createStreamInvocation(t,n,a);let u;const f=new AU;return f.cancelCallback=()=>{const d=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],u.then(()=>this._sendWithProtocol(d))},this._callbacks[s.invocationId]=(d,p)=>{if(p){f.error(p);return}else d&&(d.type===Qe.Completion?d.error?f.error(new Error(d.error)):f.complete():f.next(d.item))},u=this._sendWithProtocol(s).catch(d=>{f.error(d),delete this._callbacks[s.invocationId]}),this._launchStreams(r,u),f}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._sendWithProtocol(this._createInvocation(t,n,!0,a));return this._launchStreams(r,s),s}invoke(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._createInvocation(t,n,!1,a);return new Promise((f,d)=>{this._callbacks[s.invocationId]=(m,y)=>{if(y){d(y);return}else m&&(m.type===Qe.Completion?m.error?d(new Error(m.error)):f(m.result):d(new Error(`Unexpected message type: ${m.type}`)))};const p=this._sendWithProtocol(s).catch(m=>{d(m),delete this._callbacks[s.invocationId]});this._launchStreams(r,p)})}on(t,n){!t||!n||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const r=this._methods[t];if(r)if(n){const a=r.indexOf(n);a!==-1&&(r.splice(a,1),r.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case Qe.Invocation:this._invokeClientMethod(r).catch(a=>{this._logger.log(ue.Error,`Invoke client method threw error: ${ay(a)}`)});break;case Qe.StreamItem:case Qe.Completion:{const a=this._callbacks[r.invocationId];if(a){r.type===Qe.Completion&&delete this._callbacks[r.invocationId];try{a(r)}catch(s){this._logger.log(ue.Error,`Stream callback threw error: ${ay(s)}`)}}break}case Qe.Ping:break;case Qe.Close:{this._logger.log(ue.Information,"Close message received from server.");const a=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}case Qe.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case Qe.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(ue.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const s="Error parsing handshake response: "+a;this._logger.log(ue.Error,s);const u=new Error(s);throw this._handshakeRejecter(u),u}if(n.error){const a="Server returned handshake error: "+n.error;this._logger.log(ue.Error,a);const s=new Error(a);throw this._handshakeRejecter(s),s}else this._logger.log(ue.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===Pt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Pt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(ue.Warning,`No client method with the name '${n}' found.`),t.invocationId&&(this._logger.log(ue.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=r.slice(),s=!!t.invocationId;let u,f,d;for(const p of a)try{const m=u;u=await p.apply(this,t.arguments),s&&u&&m&&(this._logger.log(ue.Error,`Multiple results provided for '${n}'. Sending error to server.`),d=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),f=void 0}catch(m){f=m,this._logger.log(ue.Error,`A callback for the method '${n}' threw error '${m}'.`)}d?await this._sendWithProtocol(d):s?(f?d=this._createCompletionMessage(t.invocationId,`${f}`,null):u!==void 0?d=this._createCompletionMessage(t.invocationId,null,u):(this._logger.log(ue.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),d=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(d)):u&&this._logger.log(ue.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(ue.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new gi("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Pt.Disconnecting?this._completeClose(t):this._connectionState===Pt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Pt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Pt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),cn.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(ue.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let r=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(r,0,a);if(s===null){this._logger.log(ue.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Pt.Reconnecting,t?this._logger.log(ue.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(ue.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(u=>u.apply(this,[t]))}catch(u){this._logger.log(ue.Error,`An onreconnecting callback called with error '${t}' threw error '${u}'.`)}if(this._connectionState!==Pt.Reconnecting){this._logger.log(ue.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(ue.Information,`Reconnect attempt number ${r+1} will start in ${s} ms.`),await new Promise(u=>{this._reconnectDelayHandle=setTimeout(u,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==Pt.Reconnecting){this._logger.log(ue.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Pt.Connected,this._logger.log(ue.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(u=>u.apply(this,[this.connection.connectionId]))}catch(u){this._logger.log(ue.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${u}'.`)}return}catch(u){if(this._logger.log(ue.Information,`Reconnect attempt failed because of error '${u}'.`),this._connectionState!==Pt.Reconnecting){this._logger.log(ue.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Pt.Disconnecting&&this._completeClose();return}r++,a=u instanceof Error?u:new Error(u.toString()),s=this._getNextRetryDelay(r,Date.now()-n,a)}}this._logger.log(ue.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:r})}catch(a){return this._logger.log(ue.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const a=n[r];try{a(null,t)}catch(s){this._logger.log(ue.Error,`Stream 'error' callback called with '${t}' threw error: ${ay(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,r,a){if(r)return a.length!==0?{target:t,arguments:n,streamIds:a,type:Qe.Invocation}:{target:t,arguments:n,type:Qe.Invocation};{const s=this._invocationId;return this._invocationId++,a.length!==0?{target:t,arguments:n,invocationId:s.toString(),streamIds:a,type:Qe.Invocation}:{target:t,arguments:n,invocationId:s.toString(),type:Qe.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const r in t)t[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:a=>{let s;a instanceof Error?s=a.message:a&&a.toString?s=a.toString():s="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,s)))},next:a=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,a)))}})}}_replaceStreamingParams(t){const n=[],r=[];for(let a=0;a<t.length;a++){const s=t[a];if(this._isObservable(s)){const u=this._invocationId;this._invocationId++,n[u]=s,r.push(u.toString()),t.splice(a,1)}}return[n,r]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,r){const a=this._invocationId;return this._invocationId++,r.length!==0?{target:t,arguments:n,invocationId:a.toString(),streamIds:r,type:Qe.StreamInvocation}:{target:t,arguments:n,invocationId:a.toString(),type:Qe.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:Qe.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:Qe.StreamItem}}_createCompletionMessage(t,n,r){return n?{error:n,invocationId:t,type:Qe.Completion}:{invocationId:t,result:r,type:Qe.Completion}}_createCloseMessage(){return{type:Qe.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const MU=[0,2e3,1e4,3e4,null];class C_{constructor(t){this._retryDelays=t!==void 0?[...t,null]:MU}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class Da{}Da.Authorization="Authorization",Da.Cookie="Cookie";class DU extends Md{constructor(t,n){super(),this._innerClient=t,this._accessTokenFactory=n}async send(t){let n=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const r=await this._innerClient.send(t);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):r}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Da.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Da.Authorization]&&delete t.headers[Da.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Dn;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Dn||(Dn={}));var er;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(er||(er={}));let BU=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class A_{get pollAborted(){return this._pollAbort.aborted}constructor(t,n,r){this._httpClient=t,this._logger=n,this._pollAbort=new BU,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,n){if(On.isRequired(t,"url"),On.isRequired(n,"transferFormat"),On.isIn(n,er,"transferFormat"),this._url=t,this._logger.log(ue.Trace,"(LongPolling transport) Connecting."),n===er.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,a]=js(),s={[r]:a,...this._options.headers},u={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};n===er.Binary&&(u.responseType="arraybuffer");const f=`${t}&_=${Date.now()}`;this._logger.log(ue.Trace,`(LongPolling transport) polling: ${f}.`);const d=await this._httpClient.get(f,u);d.statusCode!==200?(this._logger.log(ue.Error,`(LongPolling transport) Unexpected response code: ${d.statusCode}.`),this._closeError=new Ia(d.statusText||"",d.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,u)}async _poll(t,n){try{for(;this._running;)try{const r=`${t}&_=${Date.now()}`;this._logger.log(ue.Trace,`(LongPolling transport) polling: ${r}.`);const a=await this._httpClient.get(r,n);a.statusCode===204?(this._logger.log(ue.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(ue.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Ia(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(ue.Trace,`(LongPolling transport) data received. ${zu(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(ue.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof oy?this._logger.log(ue.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(ue.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(ue.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?__(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(ue.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(ue.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,r]=js();t[n]=r;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,a)}catch(u){s=u}s?s instanceof Ia&&(s.statusCode===404?this._logger.log(ue.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(ue.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(ue.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(ue.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(ue.Trace,t),this.onclose(this._closeError)}}}class zU{constructor(t,n,r,a){this._httpClient=t,this._accessToken=n,this._logger=r,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,n){return On.isRequired(t,"url"),On.isRequired(n,"transferFormat"),On.isIn(n,er,"transferFormat"),this._logger.log(ue.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,a)=>{let s=!1;if(n!==er.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let u;if(cn.isBrowser||cn.isWebWorker)u=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const f=this._httpClient.getCookieString(t),d={};d.Cookie=f;const[p,m]=js();d[p]=m,u=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...d,...this._options.headers}})}try{u.onmessage=f=>{if(this.onreceive)try{this._logger.log(ue.Trace,`(SSE transport) data received. ${zu(f.data,this._options.logMessageContent)}.`),this.onreceive(f.data)}catch(d){this._close(d);return}},u.onerror=f=>{s?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},u.onopen=()=>{this._logger.log(ue.Information,`SSE connected to ${this._url}`),this._eventSource=u,s=!0,r()}}catch(f){a(f);return}})}async send(t){return this._eventSource?__(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class LU{constructor(t,n,r,a,s,u){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=a,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=u}async connect(t,n){On.isRequired(t,"url"),On.isRequired(n,"transferFormat"),On.isIn(n,er,"transferFormat"),this._logger.log(ue.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((a,s)=>{t=t.replace(/^http/,"ws");let u;const f=this._httpClient.getCookieString(t);let d=!1;if(cn.isNode||cn.isReactNative){const p={},[m,y]=js();p[m]=y,r&&(p[Da.Authorization]=`Bearer ${r}`),f&&(p[Da.Cookie]=f),u=new this._webSocketConstructor(t,void 0,{headers:{...p,...this._headers}})}else r&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);u||(u=new this._webSocketConstructor(t)),n===er.Binary&&(u.binaryType="arraybuffer"),u.onopen=p=>{this._logger.log(ue.Information,`WebSocket connected to ${t}.`),this._webSocket=u,d=!0,a()},u.onerror=p=>{let m=null;typeof ErrorEvent<"u"&&p instanceof ErrorEvent?m=p.error:m="There was an error with the transport",this._logger.log(ue.Information,`(WebSockets transport) ${m}.`)},u.onmessage=p=>{if(this._logger.log(ue.Trace,`(WebSockets transport) data received. ${zu(p.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(p.data)}catch(m){this._close(m);return}},u.onclose=p=>{if(d)this._close(p);else{let m=null;typeof ErrorEvent<"u"&&p instanceof ErrorEvent?m=p.error:m="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(m))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(ue.Trace,`(WebSockets transport) sending data. ${zu(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(ue.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const k_=100;class PU{constructor(t,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,On.isRequired(t,"url"),this._logger=gU(n.logger),this.baseUrl=this._resolveUrl(t),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,a=null;if(cn.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),a=s("eventsource")}!cn.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:cn.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!cn.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:cn.isNode&&!n.EventSource&&typeof a<"u"&&(n.EventSource=a),this._httpClient=new DU(n.httpClient||new TU(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||er.Binary,On.isIn(t,er,"transferFormat"),this._logger.log(ue.Debug,`Starting connection with transfer format '${er[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(ue.Error,n),await this._stopPromise,Promise.reject(new gi(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(ue.Error,n),Promise.reject(new gi(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ly(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(ue.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(ue.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(ue.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(ue.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Dn.WebSockets)this.transport=this._constructTransport(Dn.WebSockets),await this._startTransport(n,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,a=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new gi("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const s=r.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}a++}while(r.url&&a<k_);if(a===k_&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,t)}this.transport instanceof A_&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(ue.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(ue.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(t){const n={},[r,a]=js();n[r]=a;const s=this._resolveNegotiateUrl(t);this._logger.log(ue.Debug,`Sending negotiation request: ${s}.`);try{const u=await this._httpClient.post(s,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(u.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${u.statusCode}'`));const f=JSON.parse(u.content);return(!f.negotiateVersion||f.negotiateVersion<1)&&(f.connectionToken=f.connectionId),f.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new E_("Client didn't negotiate Stateful Reconnect but the server did.")):f}catch(u){let f="Failed to complete negotiation with the server: "+u;return u instanceof Ia&&u.statusCode===404&&(f=f+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(ue.Error,f),Promise.reject(new E_(f))}}_createConnectUrl(t,n){return n?t+(t.indexOf("?")===-1?"?":"&")+`id=${n}`:t}async _createTransport(t,n,r,a){let s=this._createConnectUrl(t,r.connectionToken);if(this._isITransport(n)){this._logger.log(ue.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(s,a),this.connectionId=r.connectionId;return}const u=[],f=r.availableTransports||[];let d=r;for(const p of f){const m=this._resolveTransportOrError(p,n,a,d?.useStatefulReconnect===!0);if(m instanceof Error)u.push(`${p.transport} failed:`),u.push(m);else if(this._isITransport(m)){if(this.transport=m,!d){try{d=await this._getNegotiationResponse(t)}catch(y){return Promise.reject(y)}s=this._createConnectUrl(t,d.connectionToken)}try{await this._startTransport(s,a),this.connectionId=d.connectionId;return}catch(y){if(this._logger.log(ue.Error,`Failed to start the transport '${p.transport}': ${y}`),d=void 0,u.push(new dU(`${p.transport} failed: ${y}`,Dn[p.transport])),this._connectionState!=="Connecting"){const b="Failed to select transport before stop() was called.";return this._logger.log(ue.Debug,b),Promise.reject(new gi(b))}}}}return u.length>0?Promise.reject(new pU(`Unable to connect to the server with any of the available transports. ${u.join(" ")}`,u)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Dn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new LU(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Dn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new zU(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Dn.LongPolling:return new A_(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let a=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,n),await this.features.resend()}catch{a=!0}else{this._stopConnection(r);return}a&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(t,n)}_resolveTransportOrError(t,n,r,a){const s=Dn[t.transport];if(s==null)return this._logger.log(ue.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if($U(n,s))if(t.transferFormats.map(f=>er[f]).indexOf(r)>=0){if(s===Dn.WebSockets&&!this._options.WebSocket||s===Dn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(ue.Debug,`Skipping transport '${Dn[s]}' because it is not supported in your environment.'`),new cU(`'${Dn[s]}' is not supported in your environment.`,s);this._logger.log(ue.Debug,`Selecting transport '${Dn[s]}'.`);try{return this.features.reconnect=s===Dn.WebSockets?a:void 0,this._constructTransport(s)}catch(f){return f}}else return this._logger.log(ue.Debug,`Skipping transport '${Dn[s]}' because it does not support the requested transfer format '${er[r]}'.`),new Error(`'${Dn[s]}' does not support ${er[r]}.`);else return this._logger.log(ue.Debug,`Skipping transport '${Dn[s]}' because it was disabled by the client.`),new fU(`'${Dn[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(ue.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(ue.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(ue.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(ue.Error,`Connection disconnected with error '${t}'.`):this._logger.log(ue.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(ue.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(ue.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!cn.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(ue.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=new URL(t);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function $U(e,t){return!e||(t&e)!==0}class ly{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Bd,this._transportResult=new Bd,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Bd),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Bd;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):ly._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(r){t.reject(r)}}}static _concatBuffers(t){const n=t.map(s=>s.byteLength).reduce((s,u)=>s+u),r=new Uint8Array(n);let a=0;for(const s of t)r.set(new Uint8Array(s),a),a+=s.byteLength;return r.buffer}}class Bd{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const UU="json";class jU{constructor(){this.name=UU,this.version=2,this.transferFormat=er.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=Bu.instance);const r=Ir.parse(t),a=[];for(const s of r){const u=JSON.parse(s);if(typeof u.type!="number")throw new Error("Invalid payload.");switch(u.type){case Qe.Invocation:this._isInvocationMessage(u);break;case Qe.StreamItem:this._isStreamItemMessage(u);break;case Qe.Completion:this._isCompletionMessage(u);break;case Qe.Ping:break;case Qe.Close:break;case Qe.Ack:this._isAckMessage(u);break;case Qe.Sequence:this._isSequenceMessage(u);break;default:n.log(ue.Information,"Unknown message type '"+u.type+"' ignored.");continue}a.push(u)}return a}writeMessage(t){return Ir.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const HU={trace:ue.Trace,debug:ue.Debug,info:ue.Information,information:ue.Information,warn:ue.Warning,warning:ue.Warning,error:ue.Error,critical:ue.Critical,none:ue.None};function VU(e){const t=HU[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class FU{configureLogging(t){if(On.isRequired(t,"logging"),qU(t))this.logger=t;else if(typeof t=="string"){const n=VU(t);this.logger=new Dd(n)}else this.logger=new Dd(t);return this}withUrl(t,n){return On.isRequired(t,"url"),On.isNotEmpty(t,"url"),this.url=t,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return On.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new C_(t):this.reconnectPolicy=t:this.reconnectPolicy=new C_,this}withServerTimeout(t){return On.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return On.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new PU(this.url,t);return sy.create(n,this.logger||Bu.instance,this.protocol||new jU,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function qU(e){return e.log!==void 0}function GU({url:e,accessToken:t,autoStart:n=!0}){const r=I.useRef(null),a=I.useRef(new Map),s=I.useRef(null),u=I.useRef(0),f=I.useRef(!1),[d,p]=I.useState("disconnected"),[m,y]=I.useState(null),b=I.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),v=I.useCallback(()=>{if(f.current||s.current)return;u.current+=1;const k=u.current,z=Math.min(3e4,1e3*Math.pow(2,k-1)),H=Math.floor(Math.random()*500),j=z+H;s.current=setTimeout(()=>{s.current=null,_()},j)},[b]),E=I.useCallback(k=>{a.current.forEach((z,H)=>{k.off(H),z.forEach(j=>{k.on(H,j)})})},[]),S=I.useCallback(async()=>fg(),[]),w=I.useCallback(()=>{const k=new FU().withUrl(e,{accessTokenFactory:S}).withAutomaticReconnect({nextRetryDelayInMilliseconds:z=>z.elapsedMilliseconds<6e4?Math.random()*1e4:null}).build();return k.onreconnecting(()=>{b(),p("reconnecting")}),k.onreconnected(()=>{b(),u.current=0,p("connected"),E(k)}),k.onclose(z=>{p("disconnected"),z&&y(z),f.current||v()}),k},[e,S,E,b,v]),_=I.useCallback(async()=>{f.current=!1,b(),r.current||(r.current=w());const k=r.current;if(k.state===Pt.Connected){p("connected");return}if(k.state===Pt.Connecting){p("connecting");return}if(k.state===Pt.Reconnecting){p("reconnecting");return}p("connecting");try{await k.start(),E(k),u.current=0,p("connected"),y(null)}catch(z){y(z),p("disconnected"),v()}},[E,w,b,v]),O=I.useCallback(async()=>{f.current=!0,b(),u.current=0;const k=r.current;if(r.current=null,!k){p("disconnected");return}try{await k.stop()}finally{p("disconnected")}},[b]),T=I.useCallback((k,z)=>{let H=a.current.get(k);H||(H=new Set,a.current.set(k,H)),H.add(z);const j=r.current;j&&j.on(k,z)},[]),C=I.useCallback((k,z)=>{const H=a.current.get(k);if(!H)return;H.delete(z),H.size===0&&a.current.delete(k);const j=r.current;j&&j.off(k,z)},[]),N=I.useCallback(async(k,...z)=>{const H=r.current;if(!H||H.state!==Pt.Connected)throw new Error("SignalR not connected");return H.invoke(k,...z)},[]);return I.useEffect(()=>(n&&_(),()=>{O()}),[n,_,O]),{status:d,connected:d==="connected",error:m,start:_,stop:O,on:T,off:C,invoke:N}}async function YU(e,t,n){vu(e.apiBaseUrl+gd+"/"+e.clientId+"/messages/",{method:"GET",headers:{"Content-Type":"application/json","X-Conversation-Id":t}}).then(r=>{if(!r.ok)throw new Error("Request failed");return r.json()}).then(r=>{n(r.map(a=>a))}).catch(r=>{console.error(r)})}async function XU(e,t){const n=await vu(e.apiBaseUrl+gd+"/"+e.clientId+"/conversation-status/",{method:"GET",headers:{"Content-Type":"application/json","X-Conversation-Id":t}});return n.ok,await n.json()}async function ZU(e){return(await vu(e.apiBaseUrl+"/api/health/"+e.clientId,{method:"GET",headers:{"Content-Type":"application/json"}})).ok}async function KU(e,t){const n=await vu(e.apiBaseUrl+gd+"/"+e.clientId+"/client-activity-status",{method:"GET",headers:{"Content-Type":"application/json",...t?{"X-Conversation-Id":t}:{}}});return n.ok?n.body?await n.json():{isActive:!1,hideForUrls:[]}:{isActive:!1,hideForUrls:[]}}function uy(e){return e?new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function WU({config:e}){const{connected:t,start:n,on:r,off:a}=GU({url:e.apiBaseUrl+`/ws?sessionId=${Su()}&clientId=${e.clientId}`,autoStart:!1}),[s,u]=I.useState(!1),[f,d]=I.useState(""),[p,m]=I.useState(Su()),[y,b]=I.useState(),[v,E]=I.useState([]),[S,w]=I.useState(!1),[_,O]=I.useState(!1),[T,C]=I.useState(null),N=I.useMemo(()=>({position:"fixed",right:16,bottom:16,zIndex:2147483647,fontFamily:"system-ui"}),[]);I.useEffect(()=>{const $=window.location.pathname;e.hideChatForUrls?.some(U=>$.startsWith(U))?O(!0):O(!1)}),I.useEffect(()=>{s&&v.length==0&&YU(e,Su()||e.conversationId||"",$=>{const U=$.map(D=>({id:D.id,role:D.role,text:D.text,sentAt:uy(D.sentAt),seen:D.seen}));E(D=>[...U])}),s&&p&&(async()=>{const U=await XU(e,p);b(U)})()},[s]);function k($){E(U=>{const D=U[U.length-1];if(!D||D.role!=="assistant"||D.id!==$.id)return[...U,{id:$.id,role:$.role,text:$.text,sentAt:uy(new Date().toISOString()),seen:!1}];const Y=U.slice();return Y[Y.length-1]={...D,text:D.text+$.text},Y})}const z=($,U,D,Y)=>{if($)return U.find(ae=>ae.id===$);const re=D.trim();if(!(!re||Y))return{id:new Jn().toString(),role:"User",text:re,seen:!1,sentAt:uy(new Date().toISOString()),status:"sending",errorText:void 0}};async function H($,U=null){A(),w(!0);const D=z($,v,f,S);!$&&D!=null&&U==null&&(d(""),E(re=>[...re.map(B=>({...B,status:B.status==="failed"?"ignored":B.status})),D]));let Y;try{await BB({url:e.apiBaseUrl+gd+"/"+e.clientId+"/send-message/",token:e.sessionToken,clientId:e.clientId,conversationId:p,messageId:D?.id,body:D?.text||null,directiveForAgent:U,onDelta:re=>{k(re)},onRunStarted:re=>{m(re),PB(re)},onAgentEvent:re=>C(re)}),Y="sent"}catch{Y="failed"}finally{U==null&&E(re=>re.map(ae=>ae.id===D.id?{...ae,status:Y,errorText:"Eroare la trimitere."}:ae)),w(!1)}}const j=I.useCallback(($,U)=>{k({id:U.messageId,role:"assistant",text:U.text})},[]),G=I.useCallback($=>{E(U=>U.map(D=>D.id===$?{...D,seen:!0}:D))},[]),F=I.useCallback($=>{b($),console.log($)},[]),A=I.useCallback(()=>{(T?.value.kind==pi.OperationSuccess||T?.value.kind==pi.OperationError)&&C(null)},[T]);I.useEffect(()=>{T?.name==bu.AgentDirective&&T?.value.kind==kB.ReplayMessagePendingActionAfterVerification&&H(void 0,T)},[T]),I.useEffect(()=>{p==""||p==null||n()},[p]),I.useEffect(()=>(r("ReceivedOperatorMessage",j),r("ReceivedSeenAtByOperator",G),r("RecievedConversationModeChanged",F),()=>{a("ReceivedOperatorMessage",j),a("ReceivedSeenAtByOperator",G),a("RecievedConversationModeChanged",F)}),[r,t,a]);const X=I.useCallback($=>p?t?$?.mode=="Bot"?"AI":$?.mode=="Human"?"Human":"AI":"Disconnected":"New",[p,t]);return _?L.jsx(L.Fragment,{}):L.jsx(uU,{anchorSx:N,open:s,setOpen:u,msgs:v,input:f,setInput:d,send:H,sending:S,conversationMode:X(y),directive:T,setDirective:C})}class QU extends HTMLElement{connectedCallback(){const t=yu();if(!t)return;const n=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
176
+ :host { all: initial; }
177
+ `,n.appendChild(r),this.mountEl=document.createElement("div"),n.appendChild(this.mountEl),jB();const a=F0({key:"chatbot",container:n}),s=ef();this.root=BA.createRoot(this.mountEl),this.root.render(L.jsx(Sk,{value:a,children:L.jsxs(cN,{theme:s,children:[L.jsx(TM,{}),L.jsx(WU,{config:t})]})}))}disconnectedCallback(){this.root?.unmount(),this.root=void 0}}function JU(){const e=document.currentScript;if(e)return e;const n=Array.from(document.getElementsByTagName("script")).filter(r=>(r.src||"").startsWith("http://localhost:5173/src/main.ts")||(r.src||"").includes("https://cdn.jsdelivr.net/npm/ss-support-widget"));return n.length?n[n.length-1]:null}const O_=JU(),R_=O_?.getAttribute("data-client-id")||"",ej=O_?.getAttribute("data-api-base-url")||"https://localhost:7352",zd=`chat-bot-${R_}`;customElements.get(zd)||customElements.define(zd,QU),(async function(){var t=yu();if(t||(t={clientId:R_,apiBaseUrl:ej,conversationId:void 0,userId:void 0,hideChatForUrls:void 0,sessionToken:null},AB(t)),document.querySelector(zd))return;var n=await ZU(t);if(!n)return;var r=await KU(t,Su());if(!r.isActive)return;t.hideChatForUrls=r.hideForUrls;const a=document.createElement(zd);document.body.appendChild(a)})()})();