@eka-care/medassist-widget 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/medassist-widget.js +16 -16
- package/dist/medassist-widget.js.map +1 -1
- package/package.json +1 -1
package/dist/medassist-widget.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var MedAssistWidget=(function(cs){"use strict";function Sb(n,i){for(var a=0;a<i.length;a++){const o=i[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in n)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function fs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ds={exports:{}},ri={};var Yf;function Eb(){if(Yf)return ri;Yf=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(o,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:n,type:o,key:f,ref:s!==void 0?s:null,props:c}}return ri.Fragment=i,ri.jsx=a,ri.jsxs=a,ri}var Vf;function xb(){return Vf||(Vf=1,ds.exports=Eb()),ds.exports}var x=xb(),hs={exports:{}},we={};var Gf;function Tb(){if(Gf)return we;Gf=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function b(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,U={};function R(_,G,T){this.props=_,this.context=G,this.refs=U,this.updater=T||k}R.prototype.isReactComponent={},R.prototype.setState=function(_,G){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,G,"setState")},R.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function D(){}D.prototype=R.prototype;function I(_,G,T){this.props=_,this.context=G,this.refs=U,this.updater=T||k}var $=I.prototype=new D;$.constructor=I,M($,R.prototype),$.isPureReactComponent=!0;var V=Array.isArray;function A(){}var j={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function K(_,G,T){var ne=T.ref;return{$$typeof:n,type:_,key:G,ref:ne!==void 0?ne:null,props:T}}function ae(_,G){return K(_.type,G,_.props)}function te(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function oe(_){var G={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(T){return G[T]})}var _e=/\/+/g;function ce(_,G){return typeof _=="object"&&_!==null&&_.key!=null?oe(""+_.key):G.toString(36)}function ee(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(A,A):(_.status="pending",_.then(function(G){_.status==="pending"&&(_.status="fulfilled",_.value=G)},function(G){_.status==="pending"&&(_.status="rejected",_.reason=G)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function B(_,G,T,ne,fe){var pe=typeof _;(pe==="undefined"||pe==="boolean")&&(_=null);var ge=!1;if(_===null)ge=!0;else switch(pe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(_.$$typeof){case n:case i:ge=!0;break;case g:return ge=_._init,B(ge(_._payload),G,T,ne,fe)}}if(ge)return fe=fe(_),ge=ne===""?"."+ce(_,0):ne,V(fe)?(T="",ge!=null&&(T=ge.replace(_e,"$&/")+"/"),B(fe,G,T,"",function(at){return at})):fe!=null&&(te(fe)&&(fe=ae(fe,T+(fe.key==null||_&&_.key===fe.key?"":(""+fe.key).replace(_e,"$&/")+"/")+ge)),G.push(fe)),1;ge=0;var Ie=ne===""?".":ne+":";if(V(_))for(var Me=0;Me<_.length;Me++)ne=_[Me],pe=Ie+ce(ne,Me),ge+=B(ne,G,T,pe,fe);else if(Me=b(_),typeof Me=="function")for(_=Me.call(_),Me=0;!(ne=_.next()).done;)ne=ne.value,pe=Ie+ce(ne,Me++),ge+=B(ne,G,T,pe,fe);else if(pe==="object"){if(typeof _.then=="function")return B(ee(_),G,T,ne,fe);throw G=String(_),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ge}function W(_,G,T){if(_==null)return _;var ne=[],fe=0;return B(_,ne,"","",function(pe){return G.call(T,pe,fe++)}),ne}function Z(_){if(_._status===-1){var G=_._result;G=G(),G.then(function(T){(_._status===0||_._status===-1)&&(_._status=1,_._result=T)},function(T){(_._status===0||_._status===-1)&&(_._status=2,_._result=T)}),_._status===-1&&(_._status=0,_._result=G)}if(_._status===1)return _._result.default;throw _._result}var le=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}},C={map:W,forEach:function(_,G,T){W(_,function(){G.apply(this,arguments)},T)},count:function(_){var G=0;return W(_,function(){G++}),G},toArray:function(_){return W(_,function(G){return G})||[]},only:function(_){if(!te(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return we.Activity=y,we.Children=C,we.Component=R,we.Fragment=a,we.Profiler=s,we.PureComponent=I,we.StrictMode=o,we.Suspense=p,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,we.__COMPILER_RUNTIME={__proto__:null,c:function(_){return j.H.useMemoCache(_)}},we.cache=function(_){return function(){return _.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(_,G,T){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ne=M({},_.props),fe=_.key;if(G!=null)for(pe in G.key!==void 0&&(fe=""+G.key),G)!z.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(ne[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)ne.children=T;else if(1<pe){for(var ge=Array(pe),Ie=0;Ie<pe;Ie++)ge[Ie]=arguments[Ie+2];ne.children=ge}return K(_.type,fe,ne)},we.createContext=function(_){return _={$$typeof:f,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:c,_context:_},_},we.createElement=function(_,G,T){var ne,fe={},pe=null;if(G!=null)for(ne in G.key!==void 0&&(pe=""+G.key),G)z.call(G,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(fe[ne]=G[ne]);var ge=arguments.length-2;if(ge===1)fe.children=T;else if(1<ge){for(var Ie=Array(ge),Me=0;Me<ge;Me++)Ie[Me]=arguments[Me+2];fe.children=Ie}if(_&&_.defaultProps)for(ne in ge=_.defaultProps,ge)fe[ne]===void 0&&(fe[ne]=ge[ne]);return K(_,pe,fe)},we.createRef=function(){return{current:null}},we.forwardRef=function(_){return{$$typeof:h,render:_}},we.isValidElement=te,we.lazy=function(_){return{$$typeof:g,_payload:{_status:-1,_result:_},_init:Z}},we.memo=function(_,G){return{$$typeof:m,type:_,compare:G===void 0?null:G}},we.startTransition=function(_){var G=j.T,T={};j.T=T;try{var ne=_(),fe=j.S;fe!==null&&fe(T,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(A,le)}catch(pe){le(pe)}finally{G!==null&&T.types!==null&&(G.types=T.types),j.T=G}},we.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},we.use=function(_){return j.H.use(_)},we.useActionState=function(_,G,T){return j.H.useActionState(_,G,T)},we.useCallback=function(_,G){return j.H.useCallback(_,G)},we.useContext=function(_){return j.H.useContext(_)},we.useDebugValue=function(){},we.useDeferredValue=function(_,G){return j.H.useDeferredValue(_,G)},we.useEffect=function(_,G){return j.H.useEffect(_,G)},we.useEffectEvent=function(_){return j.H.useEffectEvent(_)},we.useId=function(){return j.H.useId()},we.useImperativeHandle=function(_,G,T){return j.H.useImperativeHandle(_,G,T)},we.useInsertionEffect=function(_,G){return j.H.useInsertionEffect(_,G)},we.useLayoutEffect=function(_,G){return j.H.useLayoutEffect(_,G)},we.useMemo=function(_,G){return j.H.useMemo(_,G)},we.useOptimistic=function(_,G){return j.H.useOptimistic(_,G)},we.useReducer=function(_,G,T){return j.H.useReducer(_,G,T)},we.useRef=function(_){return j.H.useRef(_)},we.useState=function(_){return j.H.useState(_)},we.useSyncExternalStore=function(_,G,T){return j.H.useSyncExternalStore(_,G,T)},we.useTransition=function(){return j.H.useTransition()},we.version="19.2.0",we}var Pf;function _a(){return Pf||(Pf=1,hs.exports=Tb()),hs.exports}var w=_a();const ii=fs(w),Ff=Sb({__proto__:null,default:ii},[w]);var ms={exports:{}},ai={},ps={exports:{}},gs={};var Xf;function Cb(){return Xf||(Xf=1,(function(n){function i(B,W){var Z=B.length;B.push(W);e:for(;0<Z;){var le=Z-1>>>1,C=B[le];if(0<s(C,W))B[le]=W,B[Z]=C,Z=le;else break e}}function a(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var W=B[0],Z=B.pop();if(Z!==W){B[0]=Z;e:for(var le=0,C=B.length,_=C>>>1;le<_;){var G=2*(le+1)-1,T=B[G],ne=G+1,fe=B[ne];if(0>s(T,Z))ne<C&&0>s(fe,T)?(B[le]=fe,B[ne]=Z,le=ne):(B[le]=T,B[G]=Z,le=G);else if(ne<C&&0>s(fe,Z))B[le]=fe,B[ne]=Z,le=ne;else break e}}return W}function s(B,W){var Z=B.sortIndex-W.sortIndex;return Z!==0?Z:B.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],g=1,y=null,S=3,b=!1,k=!1,M=!1,U=!1,R=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function $(B){for(var W=a(m);W!==null;){if(W.callback===null)o(m);else if(W.startTime<=B)o(m),W.sortIndex=W.expirationTime,i(p,W);else break;W=a(m)}}function V(B){if(M=!1,$(B),!k)if(a(p)!==null)k=!0,A||(A=!0,oe());else{var W=a(m);W!==null&&ee(V,W.startTime-B)}}var A=!1,j=-1,z=5,K=-1;function ae(){return U?!0:!(n.unstable_now()-K<z)}function te(){if(U=!1,A){var B=n.unstable_now();K=B;var W=!0;try{e:{k=!1,M&&(M=!1,D(j),j=-1),b=!0;var Z=S;try{t:{for($(B),y=a(p);y!==null&&!(y.expirationTime>B&&ae());){var le=y.callback;if(typeof le=="function"){y.callback=null,S=y.priorityLevel;var C=le(y.expirationTime<=B);if(B=n.unstable_now(),typeof C=="function"){y.callback=C,$(B),W=!0;break t}y===a(p)&&o(p),$(B)}else o(p);y=a(p)}if(y!==null)W=!0;else{var _=a(m);_!==null&&ee(V,_.startTime-B),W=!1}}break e}finally{y=null,S=Z,b=!1}W=void 0}}finally{W?oe():A=!1}}}var oe;if(typeof I=="function")oe=function(){I(te)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,ce=_e.port2;_e.port1.onmessage=te,oe=function(){ce.postMessage(null)}}else oe=function(){R(te,0)};function ee(B,W){j=R(function(){B(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B||(z=0<B?Math.floor(1e3/B):5)},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(B){switch(S){case 1:case 2:case 3:var W=3;break;default:W=S}var Z=S;S=W;try{return B()}finally{S=Z}},n.unstable_requestPaint=function(){U=!0},n.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Z=S;S=B;try{return W()}finally{S=Z}},n.unstable_scheduleCallback=function(B,W,Z){var le=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?le+Z:le):Z=le,B){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=Z+C,B={id:g++,callback:W,priorityLevel:B,startTime:Z,expirationTime:C,sortIndex:-1},Z>le?(B.sortIndex=Z,i(m,B),a(p)===null&&B===a(m)&&(M?(D(j),j=-1):M=!0,ee(V,Z-le))):(B.sortIndex=C,i(p,B),k||b||(k=!0,A||(A=!0,oe()))),B},n.unstable_shouldYield=ae,n.unstable_wrapCallback=function(B){var W=S;return function(){var Z=S;S=W;try{return B.apply(this,arguments)}finally{S=Z}}}})(gs)),gs}var Kf;function wb(){return Kf||(Kf=1,ps.exports=Cb()),ps.exports}var ys={exports:{}},Mt={};var Qf;function _b(){if(Qf)return Mt;Qf=1;var n=_a();function i(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:g}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Mt.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return c(p,m,null,g)},Mt.flushSync=function(p){var m=f.T,g=o.p;try{if(f.T=null,o.p=2,p)return p()}finally{f.T=m,o.p=g,o.d.f()}},Mt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(p,m))},Mt.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},Mt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?o.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:b}):g==="script"&&o.d.X(p,{crossOrigin:y,integrity:S,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Mt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);o.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(p)},Mt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin);o.d.L(p,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Mt.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);o.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(p)},Mt.requestFormReset=function(p){o.d.r(p)},Mt.unstable_batchedUpdates=function(p,m){return p(m)},Mt.useFormState=function(p,m,g){return f.H.useFormState(p,m,g)},Mt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Mt.version="19.2.0",Mt}var Zf;function Jf(){if(Zf)return ys.exports;Zf=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch{}}return n(),ys.exports=_b(),ys.exports}var Wf;function Ab(){if(Wf)return ai;Wf=1;var n=wb(),i=_a(),a=Jf();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,r=t;;){var u=l.return;if(u===null)break;var d=u.alternate;if(d===null){if(r=u.return,r!==null){l=r;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===l)return p(u),e;if(d===r)return p(u),t;d=d.sibling}throw Error(o(188))}if(l.return!==r.return)l=u,r=d;else{for(var v=!1,E=u.child;E;){if(E===l){v=!0,l=u,r=d;break}if(E===r){v=!0,r=u,l=d;break}E=E.sibling}if(!v){for(E=d.child;E;){if(E===l){v=!0,l=d,r=u;break}if(E===r){v=!0,r=d,l=u;break}E=E.sibling}if(!v)throw Error(o(189))}}if(l.alternate!==r)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),I=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case R:return"Profiler";case U:return"StrictMode";case V:return"Suspense";case A:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case I:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case z:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var ee=Array.isArray,B=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},le=[],C=-1;function _(e){return{current:e}}function G(e){0>C||(e.current=le[C],le[C]=null,C--)}function T(e,t){C++,le[C]=e.current,e.current=t}var ne=_(null),fe=_(null),pe=_(null),ge=_(null);function Ie(e,t){switch(T(pe,t),T(fe,e),T(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vv(t),e=Gv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ne),T(ne,e)}function Me(){G(ne),G(fe),G(pe)}function at(e){e.memoizedState!==null&&T(ge,e);var t=ne.current,l=Gv(t,e.type);t!==l&&(T(fe,e),T(ne,l))}function vt(e){fe.current===e&&(G(ne),G(fe)),ge.current===e&&(G(ge),xa._currentValue=Z)}var Jt,cl;function un(e){if(Jt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Jt=t&&t[1]||"",cl=-1<l.stack.indexOf(`
|
|
1
|
+
var MedAssistWidget=(function(cs){"use strict";function Eb(n,i){for(var a=0;a<i.length;a++){const o=i[a];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in n)){const c=Object.getOwnPropertyDescriptor(o,s);c&&Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function fs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ds={exports:{}},ri={};var Vf;function xb(){if(Vf)return ri;Vf=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(o,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:n,type:o,key:f,ref:s!==void 0?s:null,props:c}}return ri.Fragment=i,ri.jsx=a,ri.jsxs=a,ri}var Gf;function Tb(){return Gf||(Gf=1,ds.exports=xb()),ds.exports}var x=Tb(),hs={exports:{}},we={};var Pf;function Cb(){if(Pf)return we;Pf=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,z={};function _(A,V,T){this.props=A,this.context=V,this.refs=z,this.updater=T||M}_.prototype.isReactComponent={},_.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,V,"setState")},_.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function q(){}q.prototype=_.prototype;function B(A,V,T){this.props=A,this.context=V,this.refs=z,this.updater=T||M}var $=B.prototype=new q;$.constructor=B,O($,_.prototype),$.isPureReactComponent=!0;var G=Array.isArray;function N(){}var D={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function K(A,V,T){var te=T.ref;return{$$typeof:n,type:A,key:V,ref:te!==void 0?te:null,props:T}}function ae(A,V){return K(A.type,V,A.props)}function le(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function oe(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(T){return V[T]})}var _e=/\/+/g;function ue(A,V){return typeof A=="object"&&A!==null&&A.key!=null?oe(""+A.key):V.toString(36)}function ee(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(N,N):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function U(A,V,T,te,ce){var ge=typeof A;(ge==="undefined"||ge==="boolean")&&(A=null);var pe=!1;if(A===null)pe=!0;else switch(ge){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(A.$$typeof){case n:case i:pe=!0;break;case g:return pe=A._init,U(pe(A._payload),V,T,te,ce)}}if(pe)return ce=ce(A),pe=te===""?"."+ue(A,0):te,G(ce)?(T="",pe!=null&&(T=pe.replace(_e,"$&/")+"/"),U(ce,V,T,"",function(at){return at})):ce!=null&&(le(ce)&&(ce=ae(ce,T+(ce.key==null||A&&A.key===ce.key?"":(""+ce.key).replace(_e,"$&/")+"/")+pe)),V.push(ce)),1;pe=0;var He=te===""?".":te+":";if(G(A))for(var Oe=0;Oe<A.length;Oe++)te=A[Oe],ge=He+ue(te,Oe),pe+=U(te,V,T,ge,ce);else if(Oe=b(A),typeof Oe=="function")for(A=Oe.call(A),Oe=0;!(te=A.next()).done;)te=te.value,ge=He+ue(te,Oe++),pe+=U(te,V,T,ge,ce);else if(ge==="object"){if(typeof A.then=="function")return U(ee(A),V,T,te,ce);throw V=String(A),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return pe}function W(A,V,T){if(A==null)return A;var te=[],ce=0;return U(A,te,"","",function(ge){return V.call(T,ge,ce++)}),te}function Z(A){if(A._status===-1){var V=A._result;V=V(),V.then(function(T){(A._status===0||A._status===-1)&&(A._status=1,A._result=T)},function(T){(A._status===0||A._status===-1)&&(A._status=2,A._result=T)}),A._status===-1&&(A._status=0,A._result=V)}if(A._status===1)return A._result.default;throw A._result}var ne=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}},C={map:W,forEach:function(A,V,T){W(A,function(){V.apply(this,arguments)},T)},count:function(A){var V=0;return W(A,function(){V++}),V},toArray:function(A){return W(A,function(V){return V})||[]},only:function(A){if(!le(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return we.Activity=y,we.Children=C,we.Component=_,we.Fragment=a,we.Profiler=s,we.PureComponent=B,we.StrictMode=o,we.Suspense=p,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,we.__COMPILER_RUNTIME={__proto__:null,c:function(A){return D.H.useMemoCache(A)}},we.cache=function(A){return function(){return A.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(A,V,T){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var te=O({},A.props),ce=A.key;if(V!=null)for(ge in V.key!==void 0&&(ce=""+V.key),V)!j.call(V,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&V.ref===void 0||(te[ge]=V[ge]);var ge=arguments.length-2;if(ge===1)te.children=T;else if(1<ge){for(var pe=Array(ge),He=0;He<ge;He++)pe[He]=arguments[He+2];te.children=pe}return K(A.type,ce,te)},we.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:c,_context:A},A},we.createElement=function(A,V,T){var te,ce={},ge=null;if(V!=null)for(te in V.key!==void 0&&(ge=""+V.key),V)j.call(V,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ce[te]=V[te]);var pe=arguments.length-2;if(pe===1)ce.children=T;else if(1<pe){for(var He=Array(pe),Oe=0;Oe<pe;Oe++)He[Oe]=arguments[Oe+2];ce.children=He}if(A&&A.defaultProps)for(te in pe=A.defaultProps,pe)ce[te]===void 0&&(ce[te]=pe[te]);return K(A,ge,ce)},we.createRef=function(){return{current:null}},we.forwardRef=function(A){return{$$typeof:h,render:A}},we.isValidElement=le,we.lazy=function(A){return{$$typeof:g,_payload:{_status:-1,_result:A},_init:Z}},we.memo=function(A,V){return{$$typeof:m,type:A,compare:V===void 0?null:V}},we.startTransition=function(A){var V=D.T,T={};D.T=T;try{var te=A(),ce=D.S;ce!==null&&ce(T,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(N,ne)}catch(ge){ne(ge)}finally{V!==null&&T.types!==null&&(V.types=T.types),D.T=V}},we.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},we.use=function(A){return D.H.use(A)},we.useActionState=function(A,V,T){return D.H.useActionState(A,V,T)},we.useCallback=function(A,V){return D.H.useCallback(A,V)},we.useContext=function(A){return D.H.useContext(A)},we.useDebugValue=function(){},we.useDeferredValue=function(A,V){return D.H.useDeferredValue(A,V)},we.useEffect=function(A,V){return D.H.useEffect(A,V)},we.useEffectEvent=function(A){return D.H.useEffectEvent(A)},we.useId=function(){return D.H.useId()},we.useImperativeHandle=function(A,V,T){return D.H.useImperativeHandle(A,V,T)},we.useInsertionEffect=function(A,V){return D.H.useInsertionEffect(A,V)},we.useLayoutEffect=function(A,V){return D.H.useLayoutEffect(A,V)},we.useMemo=function(A,V){return D.H.useMemo(A,V)},we.useOptimistic=function(A,V){return D.H.useOptimistic(A,V)},we.useReducer=function(A,V,T){return D.H.useReducer(A,V,T)},we.useRef=function(A){return D.H.useRef(A)},we.useState=function(A){return D.H.useState(A)},we.useSyncExternalStore=function(A,V,T){return D.H.useSyncExternalStore(A,V,T)},we.useTransition=function(){return D.H.useTransition()},we.version="19.2.0",we}var Ff;function _a(){return Ff||(Ff=1,hs.exports=Cb()),hs.exports}var w=_a();const ii=fs(w),Xf=Eb({__proto__:null,default:ii},[w]);var ms={exports:{}},ai={},ps={exports:{}},gs={};var Kf;function wb(){return Kf||(Kf=1,(function(n){function i(U,W){var Z=U.length;U.push(W);e:for(;0<Z;){var ne=Z-1>>>1,C=U[ne];if(0<s(C,W))U[ne]=W,U[Z]=C,Z=ne;else break e}}function a(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var W=U[0],Z=U.pop();if(Z!==W){U[0]=Z;e:for(var ne=0,C=U.length,A=C>>>1;ne<A;){var V=2*(ne+1)-1,T=U[V],te=V+1,ce=U[te];if(0>s(T,Z))te<C&&0>s(ce,T)?(U[ne]=ce,U[te]=Z,ne=te):(U[ne]=T,U[V]=Z,ne=V);else if(te<C&&0>s(ce,Z))U[ne]=ce,U[te]=Z,ne=te;else break e}}return W}function s(U,W){var Z=U.sortIndex-W.sortIndex;return Z!==0?Z:U.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],g=1,y=null,S=3,b=!1,M=!1,O=!1,z=!1,_=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function $(U){for(var W=a(m);W!==null;){if(W.callback===null)o(m);else if(W.startTime<=U)o(m),W.sortIndex=W.expirationTime,i(p,W);else break;W=a(m)}}function G(U){if(O=!1,$(U),!M)if(a(p)!==null)M=!0,N||(N=!0,oe());else{var W=a(m);W!==null&&ee(G,W.startTime-U)}}var N=!1,D=-1,j=5,K=-1;function ae(){return z?!0:!(n.unstable_now()-K<j)}function le(){if(z=!1,N){var U=n.unstable_now();K=U;var W=!0;try{e:{M=!1,O&&(O=!1,q(D),D=-1),b=!0;var Z=S;try{t:{for($(U),y=a(p);y!==null&&!(y.expirationTime>U&&ae());){var ne=y.callback;if(typeof ne=="function"){y.callback=null,S=y.priorityLevel;var C=ne(y.expirationTime<=U);if(U=n.unstable_now(),typeof C=="function"){y.callback=C,$(U),W=!0;break t}y===a(p)&&o(p),$(U)}else o(p);y=a(p)}if(y!==null)W=!0;else{var A=a(m);A!==null&&ee(G,A.startTime-U),W=!1}}break e}finally{y=null,S=Z,b=!1}W=void 0}}finally{W?oe():N=!1}}}var oe;if(typeof B=="function")oe=function(){B(le)};else if(typeof MessageChannel<"u"){var _e=new MessageChannel,ue=_e.port2;_e.port1.onmessage=le,oe=function(){ue.postMessage(null)}}else oe=function(){_(le,0)};function ee(U,W){D=_(function(){U(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U||(j=0<U?Math.floor(1e3/U):5)},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(U){switch(S){case 1:case 2:case 3:var W=3;break;default:W=S}var Z=S;S=W;try{return U()}finally{S=Z}},n.unstable_requestPaint=function(){z=!0},n.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var Z=S;S=U;try{return W()}finally{S=Z}},n.unstable_scheduleCallback=function(U,W,Z){var ne=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ne+Z:ne):Z=ne,U){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=Z+C,U={id:g++,callback:W,priorityLevel:U,startTime:Z,expirationTime:C,sortIndex:-1},Z>ne?(U.sortIndex=Z,i(m,U),a(p)===null&&U===a(m)&&(O?(q(D),D=-1):O=!0,ee(G,Z-ne))):(U.sortIndex=C,i(p,U),M||b||(M=!0,N||(N=!0,oe()))),U},n.unstable_shouldYield=ae,n.unstable_wrapCallback=function(U){var W=S;return function(){var Z=S;S=W;try{return U.apply(this,arguments)}finally{S=Z}}}})(gs)),gs}var Qf;function _b(){return Qf||(Qf=1,ps.exports=wb()),ps.exports}var ys={exports:{}},kt={};var Zf;function Ab(){if(Zf)return kt;Zf=1;var n=_a();function i(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:g}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,kt.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return c(p,m,null,g)},kt.flushSync=function(p){var m=f.T,g=o.p;try{if(f.T=null,o.p=2,p)return p()}finally{f.T=m,o.p=g,o.d.f()}},kt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(p,m))},kt.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},kt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?o.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:b}):g==="script"&&o.d.X(p,{crossOrigin:y,integrity:S,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},kt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);o.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(p)},kt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin);o.d.L(p,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},kt.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);o.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(p)},kt.requestFormReset=function(p){o.d.r(p)},kt.unstable_batchedUpdates=function(p,m){return p(m)},kt.useFormState=function(p,m,g){return f.H.useFormState(p,m,g)},kt.useFormStatus=function(){return f.H.useHostTransitionStatus()},kt.version="19.2.0",kt}var Jf;function Wf(){if(Jf)return ys.exports;Jf=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch{}}return n(),ys.exports=Ab(),ys.exports}var $f;function Nb(){if($f)return ai;$f=1;var n=_b(),i=_a(),a=Wf();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(c(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,r=t;;){var u=l.return;if(u===null)break;var d=u.alternate;if(d===null){if(r=u.return,r!==null){l=r;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===l)return p(u),e;if(d===r)return p(u),t;d=d.sibling}throw Error(o(188))}if(l.return!==r.return)l=u,r=d;else{for(var v=!1,E=u.child;E;){if(E===l){v=!0,l=u,r=d;break}if(E===r){v=!0,r=u,l=d;break}E=E.sibling}if(!v){for(E=d.child;E;){if(E===l){v=!0,l=d,r=u;break}if(E===r){v=!0,r=d,l=u;break}E=E.sibling}if(!v)throw Error(o(189))}}if(l.alternate!==r)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),B=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case _:return"Profiler";case z:return"StrictMode";case G:return"Suspense";case N:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case B:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var ee=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ne=[],C=-1;function A(e){return{current:e}}function V(e){0>C||(e.current=ne[C],ne[C]=null,C--)}function T(e,t){C++,ne[C]=e.current,e.current=t}var te=A(null),ce=A(null),ge=A(null),pe=A(null);function He(e,t){switch(T(ge,t),T(ce,e),T(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gv(t),e=Pv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(te),T(te,e)}function Oe(){V(te),V(ce),V(ge)}function at(e){e.memoizedState!==null&&T(pe,e);var t=te.current,l=Pv(t,e.type);t!==l&&(T(ce,e),T(te,l))}function vt(e){ce.current===e&&(V(te),V(ce)),pe.current===e&&(V(pe),xa._currentValue=Z)}var Qt,cl;function on(e){if(Qt===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Qt=t&&t[1]||"",cl=-1<l.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+
|
|
4
|
-
`),
|
|
5
|
-
`);for(u=r=0;r<
|
|
6
|
-
`+
|
|
3
|
+
`+Qt+e+cl}var Ln=!1;function Un(e,t){if(!e||Ln)return"";Ln=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(P){var Y=P}Reflect.construct(e,[],J)}else{try{J.call()}catch(P){Y=P}e.call(J.prototype)}}else{try{throw Error()}catch(P){Y=P}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(P){if(P&&Y&&typeof P.stack=="string")return[P.stack,Y.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=r.DetermineComponentFrameRoot(),v=d[0],E=d[1];if(v&&E){var R=v.split(`
|
|
4
|
+
`),H=E.split(`
|
|
5
|
+
`);for(u=r=0;r<R.length&&!R[r].includes("DetermineComponentFrameRoot");)r++;for(;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;if(r===R.length||u===H.length)for(r=R.length-1,u=H.length-1;1<=r&&0<=u&&R[r]!==H[u];)u--;for(;1<=r&&0<=u;r--,u--)if(R[r]!==H[u]){if(r!==1||u!==1)do if(r--,u--,0>u||R[r]!==H[u]){var X=`
|
|
6
|
+
`+R[r].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=r&&0<=u);break}}}finally{Ln=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?on(l):""}function fe(e,t){switch(e.tag){case 26:case 27:case 5:return on(e.type);case 16:return on("Lazy");case 13:return e.child!==t&&t!==null?on("Suspense Fallback"):on("Suspense");case 19:return on("SuspenseList");case 0:case 15:return Un(e.type,!1);case 11:return Un(e.type.render,!1);case 1:return Un(e.type,!0);case 31:return on("Activity");default:return""}}function se(e){try{var t="",l=null;do t+=fe(e,l),l=e,e=e.return;while(e);return t}catch(r){return`
|
|
7
7
|
Error generating stack: `+r.message+`
|
|
8
|
-
`+r.stack}}var Ve=Object.prototype.hasOwnProperty,Ee=n.unstable_scheduleCallback,Je=n.unstable_cancelCallback,Tt=n.unstable_shouldYield,Yl=n.unstable_requestPaint,ut=n.unstable_now,It=n.unstable_getCurrentPriorityLevel,F=n.unstable_ImmediatePriority,ie=n.unstable_UserBlockingPriority,xe=n.unstable_NormalPriority,ze=n.unstable_LowPriority,Pe=n.unstable_IdlePriority,Wt=n.log,Bn=n.unstable_setDisableYieldValue,Dt=null,bt=null;function Ht(e){if(typeof Wt=="function"&&Bn(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Dt,e)}catch{}}var We=Math.clz32?Math.clz32:PC,fl=Math.log,En=Math.LN2;function PC(e){return e>>>=0,e===0?32:31-(fl(e)/En|0)|0}var Xa=256,Ka=262144,Qa=4194304;function Vl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Za(e,t,l){var r=e.pendingLanes;if(r===0)return 0;var u=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var E=r&134217727;return E!==0?(r=E&~d,r!==0?u=Vl(r):(v&=E,v!==0?u=Vl(v):l||(l=E&~e,l!==0&&(u=Vl(l))))):(E=r&~d,E!==0?u=Vl(E):v!==0?u=Vl(v):l||(l=r&~e,l!==0&&(u=Vl(l)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,l=t&-t,d>=l||d===32&&(l&4194048)!==0)?t:u}function ji(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function FC(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Cp(){var e=Qa;return Qa<<=1,(Qa&62914560)===0&&(Qa=4194304),e}function Ru(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function XC(e,t,l,r,u,d){var v=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var E=e.entanglements,N=e.expirationTimes,q=e.hiddenUpdates;for(l=v&~l;0<l;){var X=31-We(l),J=1<<X;E[X]=0,N[X]=-1;var Y=q[X];if(Y!==null)for(q[X]=null,X=0;X<Y.length;X++){var P=Y[X];P!==null&&(P.lane&=-536870913)}l&=~J}r!==0&&wp(e,r,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~t))}function wp(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-We(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|l&261930}function _p(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var r=31-We(l),u=1<<r;u&t|e[r]&t&&(e[r]|=t),l&=~u}}function Ap(e,t){var l=t&-t;return l=(l&42)!==0?1:Ou(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ou(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ku(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Np(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:hb(e.type))}function Rp(e,t){var l=W.p;try{return W.p=e,t()}finally{W.p=l}}var dl=Math.random().toString(36).slice(2),At="__reactFiber$"+dl,qt="__reactProps$"+dl,Sr="__reactContainer$"+dl,Mu="__reactEvents$"+dl,KC="__reactListeners$"+dl,QC="__reactHandles$"+dl,Op="__reactResources$"+dl,Ui="__reactMarker$"+dl;function zu(e){delete e[At],delete e[qt],delete e[Mu],delete e[KC],delete e[QC]}function Er(e){var t=e[At];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Sr]||l[At]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Jv(e);e!==null;){if(l=e[At])return l;e=Jv(e)}return t}e=l,l=e.parentNode}return null}function xr(e){if(e=e[At]||e[Sr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Tr(e){var t=e[Op];return t||(t=e[Op]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ct(e){e[Ui]=!0}var kp=new Set,Mp={};function Gl(e,t){Cr(e,t),Cr(e+"Capture",t)}function Cr(e,t){for(Mp[e]=t,e=0;e<t.length;e++)kp.add(t[e])}var ZC=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]*$"),zp={},Dp={};function JC(e){return Ve.call(Dp,e)?!0:Ve.call(zp,e)?!1:ZC.test(e)?Dp[e]=!0:(zp[e]=!0,!1)}function Ja(e,t,l){if(JC(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Wa(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function In(e,t,l,r){if(r===null)e.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+r)}}function cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WC(e,t,l){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(v){l=""+v,d.call(this,v)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Du(e){if(!e._valueTracker){var t=jp(e)?"checked":"value";e._valueTracker=WC(e,t,""+e[t])}}function Lp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),r="";return e&&(r=jp(e)?e.checked?"true":"false":e.value),e=r,e!==l?(t.setValue(e),!0):!1}function $a(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var $C=/[\n"\\]/g;function fn(e){return e.replace($C,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ju(e,t,l,r,u,d,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+cn(t)):e.value!==""+cn(t)&&(e.value=""+cn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Lu(e,v,cn(t)):l!=null?Lu(e,v,cn(l)):r!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+cn(E):e.removeAttribute("name")}function Up(e,t,l,r,u,d,v,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Du(e);return}l=l!=null?""+cn(l):"",t=t!=null?""+cn(t):l,E||t===e.value||(e.value=t),e.defaultValue=t}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=E?e.checked:!!r,e.defaultChecked=!!r,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Du(e)}function Lu(e,t,l){t==="number"&&$a(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function wr(e,t,l,r){if(e=e.options,t){t={};for(var u=0;u<l.length;u++)t["$"+l[u]]=!0;for(l=0;l<e.length;l++)u=t.hasOwnProperty("$"+e[l].value),e[l].selected!==u&&(e[l].selected=u),u&&r&&(e[l].defaultSelected=!0)}else{for(l=""+cn(l),t=null,u=0;u<e.length;u++){if(e[u].value===l){e[u].selected=!0,r&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Bp(e,t,l){if(t!=null&&(t=""+cn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+cn(l):""}function Ip(e,t,l,r){if(t==null){if(r!=null){if(l!=null)throw Error(o(92));if(ee(r)){if(1<r.length)throw Error(o(93));r=r[0]}l=r}l==null&&(l=""),t=l}l=cn(t),e.defaultValue=l,r=e.textContent,r===l&&r!==""&&r!==null&&(e.value=r),Du(e)}function _r(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var ew=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Hp(e,t,l){var r=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,l):typeof l!="number"||l===0||ew.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function qp(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var u in t)r=t[u],t.hasOwnProperty(u)&&l[u]!==r&&Hp(e,u,r)}else for(var d in t)t.hasOwnProperty(d)&&Hp(e,d,t[d])}function Uu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tw=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"]]),nw=/^[\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 eo(e){return nw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Hn(){}var Bu=null;function Iu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ar=null,Nr=null;function Yp(e){var t=xr(e);if(t&&(e=t.stateNode)){var l=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ju(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+fn(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var r=l[t];if(r!==e&&r.form===e.form){var u=r[qt]||null;if(!u)throw Error(o(90));ju(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<l.length;t++)r=l[t],r.form===e.form&&Lp(r)}break e;case"textarea":Bp(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&wr(e,!!l.multiple,t,!1)}}}var Hu=!1;function Vp(e,t,l){if(Hu)return e(t,l);Hu=!0;try{var r=e(t);return r}finally{if(Hu=!1,(Ar!==null||Nr!==null)&&(Yo(),Ar&&(t=Ar,e=Nr,Nr=Ar=null,Yp(t),e)))for(t=0;t<e.length;t++)Yp(e[t])}}function Ii(e,t){var l=e.stateNode;if(l===null)return null;var r=l[qt]||null;if(r===null)return null;l=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=!1;if(qn)try{var Hi={};Object.defineProperty(Hi,"passive",{get:function(){qu=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{qu=!1}var hl=null,Yu=null,to=null;function Gp(){if(to)return to;var e,t=Yu,l=t.length,r,u="value"in hl?hl.value:hl.textContent,d=u.length;for(e=0;e<l&&t[e]===u[e];e++);var v=l-e;for(r=1;r<=v&&t[l-r]===u[d-r];r++);return to=u.slice(e,1<r?1-r:void 0)}function no(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function lo(){return!0}function Pp(){return!1}function Yt(e){function t(l,r,u,d,v){this._reactName=l,this._targetInst=u,this.type=r,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(l=e[E],this[E]=l?l(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?lo:Pp,this.isPropagationStopped=Pp,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),t}var Pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ro=Yt(Pl),qi=y({},Pl,{view:0,detail:0}),lw=Yt(qi),Vu,Gu,Yi,io=y({},qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yi&&(Yi&&e.type==="mousemove"?(Vu=e.screenX-Yi.screenX,Gu=e.screenY-Yi.screenY):Gu=Vu=0,Yi=e),Vu)},movementY:function(e){return"movementY"in e?e.movementY:Gu}}),Fp=Yt(io),rw=y({},io,{dataTransfer:0}),iw=Yt(rw),aw=y({},qi,{relatedTarget:0}),Pu=Yt(aw),ow=y({},Pl,{animationName:0,elapsedTime:0,pseudoElement:0}),sw=Yt(ow),uw=y({},Pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cw=Yt(uw),fw=y({},Pl,{data:0}),Xp=Yt(fw),dw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hw={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"},mw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mw[e])?!!t[e]:!1}function Fu(){return pw}var gw=y({},qi,{key:function(e){if(e.key){var t=dw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=no(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(e){return e.type==="keypress"?no(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?no(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yw=Yt(gw),vw=y({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kp=Yt(vw),bw=y({},qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),Sw=Yt(bw),Ew=y({},Pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),xw=Yt(Ew),Tw=y({},io,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Cw=Yt(Tw),ww=y({},Pl,{newState:0,oldState:0}),_w=Yt(ww),Aw=[9,13,27,32],Xu=qn&&"CompositionEvent"in window,Vi=null;qn&&"documentMode"in document&&(Vi=document.documentMode);var Nw=qn&&"TextEvent"in window&&!Vi,Qp=qn&&(!Xu||Vi&&8<Vi&&11>=Vi),Zp=" ",Jp=!1;function Wp(e,t){switch(e){case"keyup":return Aw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $p(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rr=!1;function Rw(e,t){switch(e){case"compositionend":return $p(t);case"keypress":return t.which!==32?null:(Jp=!0,Zp);case"textInput":return e=t.data,e===Zp&&Jp?null:e;default:return null}}function Ow(e,t){if(Rr)return e==="compositionend"||!Xu&&Wp(e,t)?(e=Gp(),to=Yu=hl=null,Rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Qp&&t.locale!=="ko"?null:t.data;default:return null}}var kw={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 eg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kw[e.type]:t==="textarea"}function tg(e,t,l,r){Ar?Nr?Nr.push(r):Nr=[r]:Ar=r,t=Qo(t,"onChange"),0<t.length&&(l=new ro("onChange","change",null,l,r),e.push({event:l,listeners:t}))}var Gi=null,Pi=null;function Mw(e){Uv(e,0)}function ao(e){var t=Bi(e);if(Lp(t))return e}function ng(e,t){if(e==="change")return t}var lg=!1;if(qn){var Ku;if(qn){var Qu="oninput"in document;if(!Qu){var rg=document.createElement("div");rg.setAttribute("oninput","return;"),Qu=typeof rg.oninput=="function"}Ku=Qu}else Ku=!1;lg=Ku&&(!document.documentMode||9<document.documentMode)}function ig(){Gi&&(Gi.detachEvent("onpropertychange",ag),Pi=Gi=null)}function ag(e){if(e.propertyName==="value"&&ao(Pi)){var t=[];tg(t,Pi,e,Iu(e)),Vp(Mw,t)}}function zw(e,t,l){e==="focusin"?(ig(),Gi=t,Pi=l,Gi.attachEvent("onpropertychange",ag)):e==="focusout"&&ig()}function Dw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ao(Pi)}function jw(e,t){if(e==="click")return ao(t)}function Lw(e,t){if(e==="input"||e==="change")return ao(t)}function Uw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:Uw;function Fi(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),r=Object.keys(t);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var u=l[r];if(!Ve.call(t,u)||!$t(e[u],t[u]))return!1}return!0}function og(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sg(e,t){var l=og(e);e=0;for(var r;l;){if(l.nodeType===3){if(r=e+l.textContent.length,e<=t&&r>=t)return{node:l,offset:t-e};e=r}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=og(l)}}function ug(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ug(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$a(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=$a(e.document)}return t}function Zu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Bw=qn&&"documentMode"in document&&11>=document.documentMode,Or=null,Ju=null,Xi=null,Wu=!1;function fg(e,t,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Wu||Or==null||Or!==$a(r)||(r=Or,"selectionStart"in r&&Zu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xi&&Fi(Xi,r)||(Xi=r,r=Qo(Ju,"onSelect"),0<r.length&&(t=new ro("onSelect","select",null,t,l),e.push({event:t,listeners:r}),t.target=Or)))}function Fl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var kr={animationend:Fl("Animation","AnimationEnd"),animationiteration:Fl("Animation","AnimationIteration"),animationstart:Fl("Animation","AnimationStart"),transitionrun:Fl("Transition","TransitionRun"),transitionstart:Fl("Transition","TransitionStart"),transitioncancel:Fl("Transition","TransitionCancel"),transitionend:Fl("Transition","TransitionEnd")},$u={},dg={};qn&&(dg=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function Xl(e){if($u[e])return $u[e];if(!kr[e])return e;var t=kr[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in dg)return $u[e]=t[l];return e}var hg=Xl("animationend"),mg=Xl("animationiteration"),pg=Xl("animationstart"),Iw=Xl("transitionrun"),Hw=Xl("transitionstart"),qw=Xl("transitioncancel"),gg=Xl("transitionend"),yg=new Map,ec="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(" ");ec.push("scrollEnd");function xn(e,t){yg.set(e,t),Gl(t,[e])}var oo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},dn=[],Mr=0,tc=0;function so(){for(var e=Mr,t=tc=Mr=0;t<e;){var l=dn[t];dn[t++]=null;var r=dn[t];dn[t++]=null;var u=dn[t];dn[t++]=null;var d=dn[t];if(dn[t++]=null,r!==null&&u!==null){var v=r.pending;v===null?u.next=u:(u.next=v.next,v.next=u),r.pending=u}d!==0&&vg(l,u,d)}}function uo(e,t,l,r){dn[Mr++]=e,dn[Mr++]=t,dn[Mr++]=l,dn[Mr++]=r,tc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function nc(e,t,l,r){return uo(e,t,l,r),co(e)}function Kl(e,t){return uo(e,null,null,t),co(e)}function vg(e,t,l){e.lanes|=l;var r=e.alternate;r!==null&&(r.lanes|=l);for(var u=!1,d=e.return;d!==null;)d.childLanes|=l,r=d.alternate,r!==null&&(r.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-We(l),e=d.hiddenUpdates,r=e[u],r===null?e[u]=[t]:r.push(t),t.lane=l|536870912),d):null}function co(e){if(50<pa)throw pa=0,df=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zr={};function Yw(e,t,l,r){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function en(e,t,l,r){return new Yw(e,t,l,r)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var l=e.alternate;return l===null?(l=en(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function bg(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fo(e,t,l,r,u,d){var v=0;if(r=e,typeof e=="function")lc(e)&&(v=1);else if(typeof e=="string")v=X_(e,l,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=en(31,l,t,u),e.elementType=K,e.lanes=d,e;case M:return Ql(l.children,u,d,t);case U:v=8,u|=24;break;case R:return e=en(12,l,t,u|2),e.elementType=R,e.lanes=d,e;case V:return e=en(13,l,t,u),e.elementType=V,e.lanes=d,e;case A:return e=en(19,l,t,u),e.elementType=A,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I:v=10;break e;case D:v=9;break e;case $:v=11;break e;case j:v=14;break e;case z:v=16,r=null;break e}v=29,l=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=en(v,l,t,u),t.elementType=e,t.type=r,t.lanes=d,t}function Ql(e,t,l,r){return e=en(7,e,r,t),e.lanes=l,e}function rc(e,t,l){return e=en(6,e,null,t),e.lanes=l,e}function Sg(e){var t=en(18,null,null,0);return t.stateNode=e,t}function ic(e,t,l){return t=en(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Eg=new WeakMap;function hn(e,t){if(typeof e=="object"&&e!==null){var l=Eg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:rt(t)},Eg.set(e,t),t)}return{value:e,source:t,stack:rt(t)}}var Dr=[],jr=0,ho=null,Ki=0,mn=[],pn=0,ml=null,On=1,kn="";function Vn(e,t){Dr[jr++]=Ki,Dr[jr++]=ho,ho=e,Ki=t}function xg(e,t,l){mn[pn++]=On,mn[pn++]=kn,mn[pn++]=ml,ml=e;var r=On;e=kn;var u=32-We(r)-1;r&=~(1<<u),l+=1;var d=32-We(t)+u;if(30<d){var v=u-u%5;d=(r&(1<<v)-1).toString(32),r>>=v,u-=v,On=1<<32-We(t)+u|l<<u|r,kn=d+e}else On=1<<d|l<<u|r,kn=e}function ac(e){e.return!==null&&(Vn(e,1),xg(e,1,0))}function oc(e){for(;e===ho;)ho=Dr[--jr],Dr[jr]=null,Ki=Dr[--jr],Dr[jr]=null;for(;e===ml;)ml=mn[--pn],mn[pn]=null,kn=mn[--pn],mn[pn]=null,On=mn[--pn],mn[pn]=null}function Tg(e,t){mn[pn++]=On,mn[pn++]=kn,mn[pn++]=ml,On=t.id,kn=t.overflow,ml=e}var Nt=null,nt=null,Be=!1,pl=null,gn=!1,sc=Error(o(519));function gl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(hn(t,e)),sc}function Cg(e){var t=e.stateNode,l=e.type,r=e.memoizedProps;switch(t[At]=e,t[qt]=r,l){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(l=0;l<ya.length;l++)je(ya[l],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),Up(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),Ip(t,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||r.suppressHydrationWarning===!0||qv(t.textContent,l)?(r.popover!=null&&(je("beforetoggle",t),je("toggle",t)),r.onScroll!=null&&je("scroll",t),r.onScrollEnd!=null&&je("scrollend",t),r.onClick!=null&&(t.onclick=Hn),t=!0):t=!1,t||gl(e,!0)}function wg(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Nt=Nt.return}}function Lr(e){if(e!==Nt)return!1;if(!Be)return wg(e),Be=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Af(e.type,e.memoizedProps)),l=!l),l&&nt&&gl(e),wg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=Zv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=Zv(e)}else t===27?(t=nt,Ol(e.type)?(e=Mf,Mf=null,nt=e):nt=t):nt=Nt?vn(e.stateNode.nextSibling):null;return!0}function Zl(){nt=Nt=null,Be=!1}function uc(){var e=pl;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),pl=null),e}function Qi(e){pl===null?pl=[e]:pl.push(e)}var cc=_(null),Jl=null,Gn=null;function yl(e,t,l){T(cc,t._currentValue),t._currentValue=l}function Pn(e){e._currentValue=cc.current,G(cc)}function fc(e,t,l){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===l)break;e=e.return}}function dc(e,t,l,r){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var v=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var N=0;N<t.length;N++)if(E.context===t[N]){d.lanes|=l,E=d.alternate,E!==null&&(E.lanes|=l),fc(d.return,l,e),r||(v=null);break e}d=E.next}}else if(u.tag===18){if(v=u.return,v===null)throw Error(o(341));v.lanes|=l,d=v.alternate,d!==null&&(d.lanes|=l),fc(v,l,e),v=null}else v=u.child;if(v!==null)v.return=u;else for(v=u;v!==null;){if(v===e){v=null;break}if(u=v.sibling,u!==null){u.return=v.return,v=u;break}v=v.return}u=v}}function Ur(e,t,l,r){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var v=u.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var E=u.type;$t(u.pendingProps.value,v.value)||(e!==null?e.push(E):e=[E])}}else if(u===ge.current){if(v=u.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(xa):e=[xa])}u=u.return}e!==null&&dc(t,e,l,r),t.flags|=262144}function mo(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wl(e){Jl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return _g(Jl,e)}function po(e,t){return Jl===null&&Wl(e),_g(e,t)}function _g(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Gn===null){if(e===null)throw Error(o(308));Gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gn=Gn.next=t;return l}var Vw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Gw=n.unstable_scheduleCallback,Pw=n.unstable_NormalPriority,ht={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hc(){return{controller:new Vw,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&Gw(Pw,function(){e.controller.abort()})}var Ji=null,mc=0,Br=0,Ir=null;function Fw(e,t){if(Ji===null){var l=Ji=[];mc=0,Br=vf(),Ir={status:"pending",value:void 0,then:function(r){l.push(r)}}}return mc++,t.then(Ag,Ag),t}function Ag(){if(--mc===0&&Ji!==null){Ir!==null&&(Ir.status="fulfilled");var e=Ji;Ji=null,Br=0,Ir=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Xw(e,t){var l=[],r={status:"pending",value:null,reason:null,then:function(u){l.push(u)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var u=0;u<l.length;u++)(0,l[u])(t)},function(u){for(r.status="rejected",r.reason=u,u=0;u<l.length;u++)(0,l[u])(void 0)}),r}var Ng=B.S;B.S=function(e,t){fv=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fw(e,t),Ng!==null&&Ng(e,t)};var $l=_(null);function pc(){var e=$l.current;return e!==null?e:$e.pooledCache}function go(e,t){t===null?T($l,$l.current):T($l,t.pool)}function Rg(){var e=pc();return e===null?null:{parent:ht._currentValue,pool:e}}var Hr=Error(o(460)),gc=Error(o(474)),yo=Error(o(542)),vo={then:function(){}};function Og(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Hn,Hn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zg(e),e;default:if(typeof t.status=="string")t.then(Hn,Hn);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=r}},function(r){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zg(e),e}throw tr=t,Hr}}function er(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(tr=l,Hr):l}}var tr=null;function Mg(){if(tr===null)throw Error(o(459));var e=tr;return tr=null,e}function zg(e){if(e===Hr||e===yo)throw Error(o(483))}var qr=null,Wi=0;function bo(e){var t=Wi;return Wi+=1,qr===null&&(qr=[]),kg(qr,e,t)}function $i(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function So(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Dg(e){function t(L,O){if(e){var H=L.deletions;H===null?(L.deletions=[O],L.flags|=16):H.push(O)}}function l(L,O){if(!e)return null;for(;O!==null;)t(L,O),O=O.sibling;return null}function r(L){for(var O=new Map;L!==null;)L.key!==null?O.set(L.key,L):O.set(L.index,L),L=L.sibling;return O}function u(L,O){return L=Yn(L,O),L.index=0,L.sibling=null,L}function d(L,O,H){return L.index=H,e?(H=L.alternate,H!==null?(H=H.index,H<O?(L.flags|=67108866,O):H):(L.flags|=67108866,O)):(L.flags|=1048576,O)}function v(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function E(L,O,H,Q){return O===null||O.tag!==6?(O=rc(H,L.mode,Q),O.return=L,O):(O=u(O,H),O.return=L,O)}function N(L,O,H,Q){var ve=H.type;return ve===M?X(L,O,H.props.children,Q,H.key):O!==null&&(O.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===z&&er(ve)===O.type)?(O=u(O,H.props),$i(O,H),O.return=L,O):(O=fo(H.type,H.key,H.props,null,L.mode,Q),$i(O,H),O.return=L,O)}function q(L,O,H,Q){return O===null||O.tag!==4||O.stateNode.containerInfo!==H.containerInfo||O.stateNode.implementation!==H.implementation?(O=ic(H,L.mode,Q),O.return=L,O):(O=u(O,H.children||[]),O.return=L,O)}function X(L,O,H,Q,ve){return O===null||O.tag!==7?(O=Ql(H,L.mode,Q,ve),O.return=L,O):(O=u(O,H),O.return=L,O)}function J(L,O,H){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=rc(""+O,L.mode,H),O.return=L,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case b:return H=fo(O.type,O.key,O.props,null,L.mode,H),$i(H,O),H.return=L,H;case k:return O=ic(O,L.mode,H),O.return=L,O;case z:return O=er(O),J(L,O,H)}if(ee(O)||oe(O))return O=Ql(O,L.mode,H,null),O.return=L,O;if(typeof O.then=="function")return J(L,bo(O),H);if(O.$$typeof===I)return J(L,po(L,O),H);So(L,O)}return null}function Y(L,O,H,Q){var ve=O!==null?O.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return ve!==null?null:E(L,O,""+H,Q);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===ve?N(L,O,H,Q):null;case k:return H.key===ve?q(L,O,H,Q):null;case z:return H=er(H),Y(L,O,H,Q)}if(ee(H)||oe(H))return ve!==null?null:X(L,O,H,Q,null);if(typeof H.then=="function")return Y(L,O,bo(H),Q);if(H.$$typeof===I)return Y(L,O,po(L,H),Q);So(L,H)}return null}function P(L,O,H,Q,ve){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return L=L.get(H)||null,E(O,L,""+Q,ve);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return L=L.get(Q.key===null?H:Q.key)||null,N(O,L,Q,ve);case k:return L=L.get(Q.key===null?H:Q.key)||null,q(O,L,Q,ve);case z:return Q=er(Q),P(L,O,H,Q,ve)}if(ee(Q)||oe(Q))return L=L.get(H)||null,X(O,L,Q,ve,null);if(typeof Q.then=="function")return P(L,O,H,bo(Q),ve);if(Q.$$typeof===I)return P(L,O,H,po(O,Q),ve);So(O,Q)}return null}function de(L,O,H,Q){for(var ve=null,He=null,ye=O,Re=O=0,Ue=null;ye!==null&&Re<H.length;Re++){ye.index>Re?(Ue=ye,ye=null):Ue=ye.sibling;var qe=Y(L,ye,H[Re],Q);if(qe===null){ye===null&&(ye=Ue);break}e&&ye&&qe.alternate===null&&t(L,ye),O=d(qe,O,Re),He===null?ve=qe:He.sibling=qe,He=qe,ye=Ue}if(Re===H.length)return l(L,ye),Be&&Vn(L,Re),ve;if(ye===null){for(;Re<H.length;Re++)ye=J(L,H[Re],Q),ye!==null&&(O=d(ye,O,Re),He===null?ve=ye:He.sibling=ye,He=ye);return Be&&Vn(L,Re),ve}for(ye=r(ye);Re<H.length;Re++)Ue=P(ye,L,Re,H[Re],Q),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Re:Ue.key),O=d(Ue,O,Re),He===null?ve=Ue:He.sibling=Ue,He=Ue);return e&&ye.forEach(function(jl){return t(L,jl)}),Be&&Vn(L,Re),ve}function be(L,O,H,Q){if(H==null)throw Error(o(151));for(var ve=null,He=null,ye=O,Re=O=0,Ue=null,qe=H.next();ye!==null&&!qe.done;Re++,qe=H.next()){ye.index>Re?(Ue=ye,ye=null):Ue=ye.sibling;var jl=Y(L,ye,qe.value,Q);if(jl===null){ye===null&&(ye=Ue);break}e&&ye&&jl.alternate===null&&t(L,ye),O=d(jl,O,Re),He===null?ve=jl:He.sibling=jl,He=jl,ye=Ue}if(qe.done)return l(L,ye),Be&&Vn(L,Re),ve;if(ye===null){for(;!qe.done;Re++,qe=H.next())qe=J(L,qe.value,Q),qe!==null&&(O=d(qe,O,Re),He===null?ve=qe:He.sibling=qe,He=qe);return Be&&Vn(L,Re),ve}for(ye=r(ye);!qe.done;Re++,qe=H.next())qe=P(ye,L,Re,qe.value,Q),qe!==null&&(e&&qe.alternate!==null&&ye.delete(qe.key===null?Re:qe.key),O=d(qe,O,Re),He===null?ve=qe:He.sibling=qe,He=qe);return e&&ye.forEach(function(rA){return t(L,rA)}),Be&&Vn(L,Re),ve}function Ze(L,O,H,Q){if(typeof H=="object"&&H!==null&&H.type===M&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var ve=H.key;O!==null;){if(O.key===ve){if(ve=H.type,ve===M){if(O.tag===7){l(L,O.sibling),Q=u(O,H.props.children),Q.return=L,L=Q;break e}}else if(O.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===z&&er(ve)===O.type){l(L,O.sibling),Q=u(O,H.props),$i(Q,H),Q.return=L,L=Q;break e}l(L,O);break}else t(L,O);O=O.sibling}H.type===M?(Q=Ql(H.props.children,L.mode,Q,H.key),Q.return=L,L=Q):(Q=fo(H.type,H.key,H.props,null,L.mode,Q),$i(Q,H),Q.return=L,L=Q)}return v(L);case k:e:{for(ve=H.key;O!==null;){if(O.key===ve)if(O.tag===4&&O.stateNode.containerInfo===H.containerInfo&&O.stateNode.implementation===H.implementation){l(L,O.sibling),Q=u(O,H.children||[]),Q.return=L,L=Q;break e}else{l(L,O);break}else t(L,O);O=O.sibling}Q=ic(H,L.mode,Q),Q.return=L,L=Q}return v(L);case z:return H=er(H),Ze(L,O,H,Q)}if(ee(H))return de(L,O,H,Q);if(oe(H)){if(ve=oe(H),typeof ve!="function")throw Error(o(150));return H=ve.call(H),be(L,O,H,Q)}if(typeof H.then=="function")return Ze(L,O,bo(H),Q);if(H.$$typeof===I)return Ze(L,O,po(L,H),Q);So(L,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,O!==null&&O.tag===6?(l(L,O.sibling),Q=u(O,H),Q.return=L,L=Q):(l(L,O),Q=rc(H,L.mode,Q),Q.return=L,L=Q),v(L)):l(L,O)}return function(L,O,H,Q){try{Wi=0;var ve=Ze(L,O,H,Q);return qr=null,ve}catch(ye){if(ye===Hr||ye===yo)throw ye;var He=en(29,ye,null,L.mode);return He.lanes=Q,He.return=L,He}finally{}}}var nr=Dg(!0),jg=Dg(!1),vl=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sl(e,t,l){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ge&2)!==0){var u=r.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),r.pending=t,t=co(e),vg(e,null,l),t}return uo(e,r,t,l),co(e)}function ea(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,_p(e,l)}}function bc(e,t){var l=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var u=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?u=d=v:d=d.next=v,l=l.next}while(l!==null);d===null?u=d=t:d=d.next=t}else u=d=t;l={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Sc=!1;function ta(){if(Sc){var e=Ir;if(e!==null)throw e}}function na(e,t,l,r){Sc=!1;var u=e.updateQueue;vl=!1;var d=u.firstBaseUpdate,v=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var N=E,q=N.next;N.next=null,v===null?d=q:v.next=q,v=N;var X=e.alternate;X!==null&&(X=X.updateQueue,E=X.lastBaseUpdate,E!==v&&(E===null?X.firstBaseUpdate=q:E.next=q,X.lastBaseUpdate=N))}if(d!==null){var J=u.baseState;v=0,X=q=N=null,E=d;do{var Y=E.lane&-536870913,P=Y!==E.lane;if(P?(Le&Y)===Y:(r&Y)===Y){Y!==0&&Y===Br&&(Sc=!0),X!==null&&(X=X.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=e,be=E;Y=t;var Ze=l;switch(be.tag){case 1:if(de=be.payload,typeof de=="function"){J=de.call(Ze,J,Y);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=be.payload,Y=typeof de=="function"?de.call(Ze,J,Y):de,Y==null)break e;J=y({},J,Y);break e;case 2:vl=!0}}Y=E.callback,Y!==null&&(e.flags|=64,P&&(e.flags|=8192),P=u.callbacks,P===null?u.callbacks=[Y]:P.push(Y))}else P={lane:Y,tag:E.tag,payload:E.payload,callback:E.callback,next:null},X===null?(q=X=P,N=J):X=X.next=P,v|=Y;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;P=E,E=P.next,P.next=null,u.lastBaseUpdate=P,u.shared.pending=null}}while(!0);X===null&&(N=J),u.baseState=N,u.firstBaseUpdate=q,u.lastBaseUpdate=X,d===null&&(u.shared.lanes=0),wl|=v,e.lanes=v,e.memoizedState=J}}function Lg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Ug(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Lg(l[e],t)}var Yr=_(null),Eo=_(0);function Bg(e,t){e=el,T(Eo,e),T(Yr,t),el=e|t.baseLanes}function Ec(){T(Eo,el),T(Yr,Yr.current)}function xc(){el=Eo.current,G(Yr),G(Eo)}var tn=_(null),yn=null;function El(e){var t=e.alternate;T(ct,ct.current&1),T(tn,e),yn===null&&(t===null||Yr.current!==null||t.memoizedState!==null)&&(yn=e)}function Tc(e){T(ct,ct.current),T(tn,e),yn===null&&(yn=e)}function Ig(e){e.tag===22?(T(ct,ct.current),T(tn,e),yn===null&&(yn=e)):xl()}function xl(){T(ct,ct.current),T(tn,tn.current)}function nn(e){G(tn),yn===e&&(yn=null),G(ct)}var ct=_(0);function xo(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Of(l)||kf(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,Ae=null,Ke=null,mt=null,To=!1,Vr=!1,lr=!1,Co=0,la=0,Gr=null,Kw=0;function ot(){throw Error(o(321))}function Cc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!$t(e[l],t[l]))return!1;return!0}function wc(e,t,l,r,u,d){return Fn=d,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?xy:Hc,lr=!1,d=l(r,u),lr=!1,Vr&&(d=qg(t,l,r,u)),Hg(e),d}function Hg(e){B.H=aa;var t=Ke!==null&&Ke.next!==null;if(Fn=0,mt=Ke=Ae=null,To=!1,la=0,Gr=null,t)throw Error(o(300));e===null||pt||(e=e.dependencies,e!==null&&mo(e)&&(pt=!0))}function qg(e,t,l,r){Ae=e;var u=0;do{if(Vr&&(Gr=null),la=0,Vr=!1,25<=u)throw Error(o(301));if(u+=1,mt=Ke=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}B.H=Ty,d=t(l,r)}while(Vr);return d}function Qw(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?ra(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(Ae.flags|=1024),t}function _c(){var e=Co!==0;return Co=0,e}function Ac(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Nc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}Fn=0,mt=Ke=Ae=null,Vr=!1,la=Co=0,Gr=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Ae.memoizedState=mt=e:mt=mt.next=e,mt}function ft(){if(Ke===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=mt===null?Ae.memoizedState:mt.next;if(t!==null)mt=t,Ke=e;else{if(e===null)throw Ae.alternate===null?Error(o(467)):Error(o(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},mt===null?Ae.memoizedState=mt=e:mt=mt.next=e}return mt}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ra(e){var t=la;return la+=1,Gr===null&&(Gr=[]),e=kg(Gr,e,t),t=Ae,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?xy:Hc),e}function _o(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ra(e);if(e.$$typeof===I)return Rt(e)}throw Error(o(438,String(e)))}function Rc(e){var t=null,l=Ae.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var r=Ae.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=wo(),Ae.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),r=0;r<e;r++)l[r]=ae;return t.index++,l}function Xn(e,t){return typeof t=="function"?t(e):t}function Ao(e){var t=ft();return Oc(t,Ke,e)}function Oc(e,t,l){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=l;var u=e.baseQueue,d=r.pending;if(d!==null){if(u!==null){var v=u.next;u.next=d.next,d.next=v}t.baseQueue=u=d,r.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=v=null,N=null,q=t,X=!1;do{var J=q.lane&-536870913;if(J!==q.lane?(Le&J)===J:(Fn&J)===J){var Y=q.revertLane;if(Y===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),J===Br&&(X=!0);else if((Fn&Y)===Y){q=q.next,Y===Br&&(X=!0);continue}else J={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(E=N=J,v=d):N=N.next=J,Ae.lanes|=Y,wl|=Y;J=q.action,lr&&l(d,J),d=q.hasEagerState?q.eagerState:l(d,J)}else Y={lane:J,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(E=N=Y,v=d):N=N.next=Y,Ae.lanes|=J,wl|=J;q=q.next}while(q!==null&&q!==t);if(N===null?v=d:N.next=E,!$t(d,e.memoizedState)&&(pt=!0,X&&(l=Ir,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=N,r.lastRenderedState=d}return u===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function kc(e){var t=ft(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var r=l.dispatch,u=l.pending,d=t.memoizedState;if(u!==null){l.pending=null;var v=u=u.next;do d=e(d,v.action),v=v.next;while(v!==u);$t(d,t.memoizedState)||(pt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),l.lastRenderedState=d}return[d,r]}function Yg(e,t,l){var r=Ae,u=ft(),d=Be;if(d){if(l===void 0)throw Error(o(407));l=l()}else l=t();var v=!$t((Ke||u).memoizedState,l);if(v&&(u.memoizedState=l,pt=!0),u=u.queue,Dc(Pg.bind(null,r,u,e),[e]),u.getSnapshot!==t||v||mt!==null&&mt.memoizedState.tag&1){if(r.flags|=2048,Pr(9,{destroy:void 0},Gg.bind(null,r,u,l,t),null),$e===null)throw Error(o(349));d||(Fn&127)!==0||Vg(r,t,l)}return l}function Vg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ae.updateQueue,t===null?(t=wo(),Ae.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Gg(e,t,l,r){t.value=l,t.getSnapshot=r,Fg(t)&&Xg(e)}function Pg(e,t,l){return l(function(){Fg(t)&&Xg(e)})}function Fg(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!$t(e,l)}catch{return!0}}function Xg(e){var t=Kl(e,2);t!==null&&Xt(t,e,2)}function Mc(e){var t=jt();if(typeof e=="function"){var l=e;if(e=l(),lr){Ht(!0);try{l()}finally{Ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:e},t}function Kg(e,t,l,r){return e.baseState=l,Oc(e,Ke,typeof r=="function"?r:Xn)}function Zw(e,t,l,r,u){if(Oo(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};B.T!==null?l(!0):d.isTransition=!1,r(d),l=t.pending,l===null?(d.next=t.pending=d,Qg(t,d)):(d.next=l.next,t.pending=l.next=d)}}function Qg(e,t){var l=t.action,r=t.payload,u=e.state;if(t.isTransition){var d=B.T,v={};B.T=v;try{var E=l(u,r),N=B.S;N!==null&&N(v,E),Zg(e,t,E)}catch(q){zc(e,t,q)}finally{d!==null&&v.types!==null&&(d.types=v.types),B.T=d}}else try{d=l(u,r),Zg(e,t,d)}catch(q){zc(e,t,q)}}function Zg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){Jg(e,t,r)},function(r){return zc(e,t,r)}):Jg(e,t,l)}function Jg(e,t,l){t.status="fulfilled",t.value=l,Wg(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Qg(e,l)))}function zc(e,t,l){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=l,Wg(t),t=t.next;while(t!==r)}e.action=null}function Wg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $g(e,t){return t}function ey(e,t){if(Be){var l=$e.formState;if(l!==null){e:{var r=Ae;if(Be){if(nt){t:{for(var u=nt,d=gn;u.nodeType!==8;){if(!d){u=null;break t}if(u=vn(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){nt=vn(u.nextSibling),r=u.data==="F!";break e}}gl(r)}r=!1}r&&(t=l[0])}}return l=jt(),l.memoizedState=l.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$g,lastRenderedState:t},l.queue=r,l=by.bind(null,Ae,r),r.dispatch=l,r=Mc(!1),d=Ic.bind(null,Ae,!1,r.queue),r=jt(),u={state:t,dispatch:null,action:e,pending:null},r.queue=u,l=Zw.bind(null,Ae,u,d,l),u.dispatch=l,r.memoizedState=e,[t,l,!1]}function ty(e){var t=ft();return ny(t,Ke,e)}function ny(e,t,l){if(t=Oc(e,t,$g)[0],e=Ao(Xn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ra(t)}catch(v){throw v===Hr?yo:v}else r=t;t=ft();var u=t.queue,d=u.dispatch;return l!==t.memoizedState&&(Ae.flags|=2048,Pr(9,{destroy:void 0},Jw.bind(null,u,l),null)),[r,d,e]}function Jw(e,t){e.action=t}function ly(e){var t=ft(),l=Ke;if(l!==null)return ny(t,l,e);ft(),t=t.memoizedState,l=ft();var r=l.queue.dispatch;return l.memoizedState=e,[t,r,!1]}function Pr(e,t,l,r){return e={tag:e,create:l,deps:r,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=wo(),Ae.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(r=l.next,l.next=e,e.next=r,t.lastEffect=e),e}function ry(){return ft().memoizedState}function No(e,t,l,r){var u=jt();Ae.flags|=e,u.memoizedState=Pr(1|t,{destroy:void 0},l,r===void 0?null:r)}function Ro(e,t,l,r){var u=ft();r=r===void 0?null:r;var d=u.memoizedState.inst;Ke!==null&&r!==null&&Cc(r,Ke.memoizedState.deps)?u.memoizedState=Pr(t,d,l,r):(Ae.flags|=e,u.memoizedState=Pr(1|t,d,l,r))}function iy(e,t){No(8390656,8,e,t)}function Dc(e,t){Ro(2048,8,e,t)}function Ww(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=wo(),Ae.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function ay(e){var t=ft().memoizedState;return Ww({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function oy(e,t){return Ro(4,2,e,t)}function sy(e,t){return Ro(4,4,e,t)}function uy(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cy(e,t,l){l=l!=null?l.concat([e]):null,Ro(4,4,uy.bind(null,t,e),l)}function jc(){}function fy(e,t){var l=ft();t=t===void 0?null:t;var r=l.memoizedState;return t!==null&&Cc(t,r[1])?r[0]:(l.memoizedState=[e,t],e)}function dy(e,t){var l=ft();t=t===void 0?null:t;var r=l.memoizedState;if(t!==null&&Cc(t,r[1]))return r[0];if(r=e(),lr){Ht(!0);try{e()}finally{Ht(!1)}}return l.memoizedState=[r,t],r}function Lc(e,t,l){return l===void 0||(Fn&1073741824)!==0&&(Le&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=hv(),Ae.lanes|=e,wl|=e,l)}function hy(e,t,l,r){return $t(l,t)?l:Yr.current!==null?(e=Lc(e,l,r),$t(e,t)||(pt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Le&261930)===0?(pt=!0,e.memoizedState=l):(e=hv(),Ae.lanes|=e,wl|=e,t)}function my(e,t,l,r,u){var d=W.p;W.p=d!==0&&8>d?d:8;var v=B.T,E={};B.T=E,Ic(e,!1,t,l);try{var N=u(),q=B.S;if(q!==null&&q(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var X=Xw(N,r);ia(e,t,X,an(e))}else ia(e,t,r,an(e))}catch(J){ia(e,t,{then:function(){},status:"rejected",reason:J},an())}finally{W.p=d,v!==null&&E.types!==null&&(v.types=E.types),B.T=v}}function $w(){}function Uc(e,t,l,r){if(e.tag!==5)throw Error(o(476));var u=py(e).queue;my(e,u,t,Z,l===null?$w:function(){return gy(e),l(r)})}function py(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:Z},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gy(e){var t=py(e);t.next===null&&(t=e.alternate.memoizedState),ia(e,t.next.queue,{},an())}function Bc(){return Rt(xa)}function yy(){return ft().memoizedState}function vy(){return ft().memoizedState}function e_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=an();e=bl(l);var r=Sl(t,e,l);r!==null&&(Xt(r,t,l),ea(r,t,l)),t={cache:hc()},e.payload=t;return}t=t.return}}function t_(e,t,l){var r=an();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Oo(e)?Sy(t,l):(l=nc(e,t,l,r),l!==null&&(Xt(l,e,r),Ey(l,t,r)))}function by(e,t,l){var r=an();ia(e,t,l,r)}function ia(e,t,l,r){var u={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Oo(e))Sy(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var v=t.lastRenderedState,E=d(v,l);if(u.hasEagerState=!0,u.eagerState=E,$t(E,v))return uo(e,t,u,0),$e===null&&so(),!1}catch{}finally{}if(l=nc(e,t,u,r),l!==null)return Xt(l,e,r),Ey(l,t,r),!0}return!1}function Ic(e,t,l,r){if(r={lane:2,revertLane:vf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Oo(e)){if(t)throw Error(o(479))}else t=nc(e,l,r,2),t!==null&&Xt(t,e,2)}function Oo(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Sy(e,t){Vr=To=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ey(e,t,l){if((l&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,_p(e,l)}}var aa={readContext:Rt,use:_o,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};aa.useEffectEvent=ot;var xy={readContext:Rt,use:_o,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:iy,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,No(4194308,4,uy.bind(null,t,e),l)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var l=jt();t=t===void 0?null:t;var r=e();if(lr){Ht(!0);try{e()}finally{Ht(!1)}}return l.memoizedState=[r,t],r},useReducer:function(e,t,l){var r=jt();if(l!==void 0){var u=l(t);if(lr){Ht(!0);try{l(t)}finally{Ht(!1)}}}else u=t;return r.memoizedState=r.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},r.queue=e,e=e.dispatch=t_.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:function(e){e=Mc(e);var t=e.queue,l=by.bind(null,Ae,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:jc,useDeferredValue:function(e,t){var l=jt();return Lc(l,e,t)},useTransition:function(){var e=Mc(!1);return e=my.bind(null,Ae,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var r=Ae,u=jt();if(Be){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),$e===null)throw Error(o(349));(Le&127)!==0||Vg(r,t,l)}u.memoizedState=l;var d={value:l,getSnapshot:t};return u.queue=d,iy(Pg.bind(null,r,d,e),[e]),r.flags|=2048,Pr(9,{destroy:void 0},Gg.bind(null,r,d,l,t),null),l},useId:function(){var e=jt(),t=$e.identifierPrefix;if(Be){var l=kn,r=On;l=(r&~(1<<32-We(r)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Co++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Kw++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bc,useFormState:ey,useActionState:ey,useOptimistic:function(e){var t=jt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ic.bind(null,Ae,!0,l),l.dispatch=t,[e,t]},useMemoCache:Rc,useCacheRefresh:function(){return jt().memoizedState=e_.bind(null,Ae)},useEffectEvent:function(e){var t=jt(),l={impl:e};return t.memoizedState=l,function(){if((Ge&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Hc={readContext:Rt,use:_o,useCallback:fy,useContext:Rt,useEffect:Dc,useImperativeHandle:cy,useInsertionEffect:oy,useLayoutEffect:sy,useMemo:dy,useReducer:Ao,useRef:ry,useState:function(){return Ao(Xn)},useDebugValue:jc,useDeferredValue:function(e,t){var l=ft();return hy(l,Ke.memoizedState,e,t)},useTransition:function(){var e=Ao(Xn)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:ra(e),t]},useSyncExternalStore:Yg,useId:yy,useHostTransitionStatus:Bc,useFormState:ty,useActionState:ty,useOptimistic:function(e,t){var l=ft();return Kg(l,Ke,e,t)},useMemoCache:Rc,useCacheRefresh:vy};Hc.useEffectEvent=ay;var Ty={readContext:Rt,use:_o,useCallback:fy,useContext:Rt,useEffect:Dc,useImperativeHandle:cy,useInsertionEffect:oy,useLayoutEffect:sy,useMemo:dy,useReducer:kc,useRef:ry,useState:function(){return kc(Xn)},useDebugValue:jc,useDeferredValue:function(e,t){var l=ft();return Ke===null?Lc(l,e,t):hy(l,Ke.memoizedState,e,t)},useTransition:function(){var e=kc(Xn)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:ra(e),t]},useSyncExternalStore:Yg,useId:yy,useHostTransitionStatus:Bc,useFormState:ly,useActionState:ly,useOptimistic:function(e,t){var l=ft();return Ke!==null?Kg(l,Ke,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Rc,useCacheRefresh:vy};Ty.useEffectEvent=ay;function qc(e,t,l,r){t=e.memoizedState,l=l(r,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Yc={enqueueSetState:function(e,t,l){e=e._reactInternals;var r=an(),u=bl(r);u.payload=t,l!=null&&(u.callback=l),t=Sl(e,u,r),t!==null&&(Xt(t,e,r),ea(t,e,r))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var r=an(),u=bl(r);u.tag=1,u.payload=t,l!=null&&(u.callback=l),t=Sl(e,u,r),t!==null&&(Xt(t,e,r),ea(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=an(),r=bl(l);r.tag=2,t!=null&&(r.callback=t),t=Sl(e,r,l),t!==null&&(Xt(t,e,l),ea(t,e,l))}};function Cy(e,t,l,r,u,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,v):t.prototype&&t.prototype.isPureReactComponent?!Fi(l,r)||!Fi(u,d):!0}function wy(e,t,l,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,r),t.state!==e&&Yc.enqueueReplaceState(t,t.state,null)}function rr(e,t){var l=t;if("ref"in t){l={};for(var r in t)r!=="ref"&&(l[r]=t[r])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var u in e)l[u]===void 0&&(l[u]=e[u])}return l}function _y(e){oo(e)}function Ay(e){}function Ny(e){oo(e)}function ko(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Ry(e,t,l){try{var r=e.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Vc(e,t,l){return l=bl(l),l.tag=3,l.payload={element:null},l.callback=function(){ko(e,t)},l}function Oy(e){return e=bl(e),e.tag=3,e}function ky(e,t,l,r){var u=l.type.getDerivedStateFromError;if(typeof u=="function"){var d=r.value;e.payload=function(){return u(d)},e.callback=function(){Ry(t,l,r)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Ry(t,l,r),typeof u!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var E=r.stack;this.componentDidCatch(r.value,{componentStack:E!==null?E:""})})}function n_(e,t,l,r,u){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=l.alternate,t!==null&&Ur(t,l,u,!0),l=tn.current,l!==null){switch(l.tag){case 31:case 13:return yn===null?Vo():l.alternate===null&&st===0&&(st=3),l.flags&=-257,l.flags|=65536,l.lanes=u,r===vo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([r]):t.add(r),pf(e,r,u)),!1;case 22:return l.flags|=65536,r===vo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([r]):l.add(r)),pf(e,r,u)),!1}throw Error(o(435,l.tag))}return pf(e,r,u),Vo(),!1}if(Be)return t=tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,r!==sc&&(e=Error(o(422),{cause:r}),Qi(hn(e,l)))):(r!==sc&&(t=Error(o(423),{cause:r}),Qi(hn(t,l))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,r=hn(r,l),u=Vc(e.stateNode,r,u),bc(e,u),st!==4&&(st=2)),!1;var d=Error(o(520),{cause:r});if(d=hn(d,l),ma===null?ma=[d]:ma.push(d),st!==4&&(st=2),t===null)return!0;r=hn(r,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=u&-u,l.lanes|=e,e=Vc(l.stateNode,r,e),bc(l,e),!1;case 1:if(t=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(_l===null||!_l.has(d))))return l.flags|=65536,u&=-u,l.lanes|=u,u=Oy(u),ky(u,e,l,r),bc(l,u),!1}l=l.return}while(l!==null);return!1}var Gc=Error(o(461)),pt=!1;function Ot(e,t,l,r){t.child=e===null?jg(t,null,l,r):nr(t,e.child,l,r)}function My(e,t,l,r,u){l=l.render;var d=t.ref;if("ref"in r){var v={};for(var E in r)E!=="ref"&&(v[E]=r[E])}else v=r;return Wl(t),r=wc(e,t,l,v,d,u),E=_c(),e!==null&&!pt?(Ac(e,t,u),Kn(e,t,u)):(Be&&E&&ac(t),t.flags|=1,Ot(e,t,r,u),t.child)}function zy(e,t,l,r,u){if(e===null){var d=l.type;return typeof d=="function"&&!lc(d)&&d.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=d,Dy(e,t,d,r,u)):(e=fo(l.type,null,r,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Wc(e,u)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:Fi,l(v,r)&&e.ref===t.ref)return Kn(e,t,u)}return t.flags|=1,e=Yn(d,r),e.ref=t.ref,e.return=t,t.child=e}function Dy(e,t,l,r,u){if(e!==null){var d=e.memoizedProps;if(Fi(d,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=d,Wc(e,u))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,Kn(e,t,u)}return Pc(e,t,l,r,u)}function jy(e,t,l,r){var u=r.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(r=t.child=e.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;r=u&~d}else r=0,t.child=null;return Ly(e,t,d,l,r)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&go(t,d!==null?d.cachePool:null),d!==null?Bg(t,d):Ec(),Ig(t);else return r=t.lanes=536870912,Ly(e,t,d!==null?d.baseLanes|l:l,l,r)}else d!==null?(go(t,d.cachePool),Bg(t,d),xl(),t.memoizedState=null):(e!==null&&go(t,null),Ec(),xl());return Ot(e,t,u,l),t.child}function oa(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ly(e,t,l,r,u){var d=pc();return d=d===null?null:{parent:ht._currentValue,pool:d},t.memoizedState={baseLanes:l,cachePool:d},e!==null&&go(t,null),Ec(),Ig(t),e!==null&&Ur(e,t,r,!0),t.childLanes=u,null}function Mo(e,t){return t=Do({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Uy(e,t,l){return nr(t,e.child,null,l),e=Mo(t,t.pendingProps),e.flags|=2,nn(t),t.memoizedState=null,e}function l_(e,t,l){var r=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(r.mode==="hidden")return e=Mo(t,r),t.lanes=536870912,oa(null,e);if(Tc(t),(e=nt)?(e=Qv(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ml!==null?{id:On,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=Sg(e),l.return=t,t.child=l,Nt=t,nt=null)):e=null,e===null)throw gl(t);return t.lanes=536870912,null}return Mo(t,r)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(Tc(t),u)if(t.flags&256)t.flags&=-257,t=Uy(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(pt||Ur(e,t,l,!1),u=(l&e.childLanes)!==0,pt||u){if(r=$e,r!==null&&(v=Ap(r,l),v!==0&&v!==d.retryLane))throw d.retryLane=v,Kl(e,v),Xt(r,e,v),Gc;Vo(),t=Uy(e,t,l)}else e=d.treeContext,nt=vn(v.nextSibling),Nt=t,Be=!0,pl=null,gn=!1,e!==null&&Tg(t,e),t=Mo(t,r),t.flags|=4096;return t}return e=Yn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zo(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Pc(e,t,l,r,u){return Wl(t),l=wc(e,t,l,r,void 0,u),r=_c(),e!==null&&!pt?(Ac(e,t,u),Kn(e,t,u)):(Be&&r&&ac(t),t.flags|=1,Ot(e,t,l,u),t.child)}function By(e,t,l,r,u,d){return Wl(t),t.updateQueue=null,l=qg(t,r,l,u),Hg(e),r=_c(),e!==null&&!pt?(Ac(e,t,d),Kn(e,t,d)):(Be&&r&&ac(t),t.flags|=1,Ot(e,t,l,d),t.child)}function Iy(e,t,l,r,u){if(Wl(t),t.stateNode===null){var d=zr,v=l.contextType;typeof v=="object"&&v!==null&&(d=Rt(v)),d=new l(r,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Yc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=r,d.state=t.memoizedState,d.refs={},yc(t),v=l.contextType,d.context=typeof v=="object"&&v!==null?Rt(v):zr,d.state=t.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(qc(t,l,v,r),d.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Yc.enqueueReplaceState(d,d.state,null),na(t,r,d,u),ta(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,N=rr(l,E);d.props=N;var q=d.context,X=l.contextType;v=zr,typeof X=="object"&&X!==null&&(v=Rt(X));var J=l.getDerivedStateFromProps;X=typeof J=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||q!==v)&&wy(t,d,r,v),vl=!1;var Y=t.memoizedState;d.state=Y,na(t,r,d,u),ta(),q=t.memoizedState,E||Y!==q||vl?(typeof J=="function"&&(qc(t,l,J,r),q=t.memoizedState),(N=vl||Cy(t,l,N,r,Y,q,v))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=q),d.props=r,d.state=q,d.context=v,r=N):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{d=t.stateNode,vc(e,t),v=t.memoizedProps,X=rr(l,v),d.props=X,J=t.pendingProps,Y=d.context,q=l.contextType,N=zr,typeof q=="object"&&q!==null&&(N=Rt(q)),E=l.getDerivedStateFromProps,(q=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==J||Y!==N)&&wy(t,d,r,N),vl=!1,Y=t.memoizedState,d.state=Y,na(t,r,d,u),ta();var P=t.memoizedState;v!==J||Y!==P||vl||e!==null&&e.dependencies!==null&&mo(e.dependencies)?(typeof E=="function"&&(qc(t,l,E,r),P=t.memoizedState),(X=vl||Cy(t,l,X,r,Y,P,N)||e!==null&&e.dependencies!==null&&mo(e.dependencies))?(q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,P,N),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,P,N)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=P),d.props=r,d.state=P,d.context=N,r=X):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),r=!1)}return d=r,zo(e,t),r=(t.flags&128)!==0,d||r?(d=t.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&r?(t.child=nr(t,e.child,null,u),t.child=nr(t,null,l,u)):Ot(e,t,l,u),t.memoizedState=d.state,e=t.child):e=Kn(e,t,u),e}function Hy(e,t,l,r){return Zl(),t.flags|=256,Ot(e,t,l,r),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Rg()}}function Kc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=rn),e}function qy(e,t,l){var r=t.pendingProps,u=!1,d=(t.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(ct.current&2)!==0),v&&(u=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(u?El(t):xl(),(e=nt)?(e=Qv(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ml!==null?{id:On,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=Sg(e),l.return=t,t.child=l,Nt=t,nt=null)):e=null,e===null)throw gl(t);return kf(e)?t.lanes=32:t.lanes=536870912,null}var E=r.children;return r=r.fallback,u?(xl(),u=t.mode,E=Do({mode:"hidden",children:E},u),r=Ql(r,u,l,null),E.return=t,r.return=t,E.sibling=r,t.child=E,r=t.child,r.memoizedState=Xc(l),r.childLanes=Kc(e,v,l),t.memoizedState=Fc,oa(null,r)):(El(t),Qc(t,E))}var N=e.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(d)t.flags&256?(El(t),t.flags&=-257,t=Zc(e,t,l)):t.memoizedState!==null?(xl(),t.child=e.child,t.flags|=128,t=null):(xl(),E=r.fallback,u=t.mode,r=Do({mode:"visible",children:r.children},u),E=Ql(E,u,l,null),E.flags|=2,r.return=t,E.return=t,r.sibling=E,t.child=r,nr(t,e.child,null,l),r=t.child,r.memoizedState=Xc(l),r.childLanes=Kc(e,v,l),t.memoizedState=Fc,t=oa(null,r));else if(El(t),kf(E)){if(v=E.nextSibling&&E.nextSibling.dataset,v)var q=v.dgst;v=q,r=Error(o(419)),r.stack="",r.digest=v,Qi({value:r,source:null,stack:null}),t=Zc(e,t,l)}else if(pt||Ur(e,t,l,!1),v=(l&e.childLanes)!==0,pt||v){if(v=$e,v!==null&&(r=Ap(v,l),r!==0&&r!==N.retryLane))throw N.retryLane=r,Kl(e,r),Xt(v,e,r),Gc;Of(E)||Vo(),t=Zc(e,t,l)}else Of(E)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,nt=vn(E.nextSibling),Nt=t,Be=!0,pl=null,gn=!1,e!==null&&Tg(t,e),t=Qc(t,r.children),t.flags|=4096);return t}return u?(xl(),E=r.fallback,u=t.mode,N=e.child,q=N.sibling,r=Yn(N,{mode:"hidden",children:r.children}),r.subtreeFlags=N.subtreeFlags&65011712,q!==null?E=Yn(q,E):(E=Ql(E,u,l,null),E.flags|=2),E.return=t,r.return=t,r.sibling=E,t.child=r,oa(null,r),r=t.child,E=e.child.memoizedState,E===null?E=Xc(l):(u=E.cachePool,u!==null?(N=ht._currentValue,u=u.parent!==N?{parent:N,pool:N}:u):u=Rg(),E={baseLanes:E.baseLanes|l,cachePool:u}),r.memoizedState=E,r.childLanes=Kc(e,v,l),t.memoizedState=Fc,oa(e.child,r)):(El(t),l=e.child,e=l.sibling,l=Yn(l,{mode:"visible",children:r.children}),l.return=t,l.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=l,t.memoizedState=null,l)}function Qc(e,t){return t=Do({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Do(e,t){return e=en(22,e,null,t),e.lanes=0,e}function Zc(e,t,l){return nr(t,e.child,null,l),e=Qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yy(e,t,l){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fc(e.return,t,l)}function Jc(e,t,l,r,u,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:u,treeForkCount:d}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=r,v.tail=l,v.tailMode=u,v.treeForkCount=d)}function Vy(e,t,l){var r=t.pendingProps,u=r.revealOrder,d=r.tail;r=r.children;var v=ct.current,E=(v&2)!==0;if(E?(v=v&1|2,t.flags|=128):v&=1,T(ct,v),Ot(e,t,r,l),r=Be?Ki:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yy(e,l,t);else if(e.tag===19)Yy(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(l=t.child,u=null;l!==null;)e=l.alternate,e!==null&&xo(e)===null&&(u=l),l=l.sibling;l=u,l===null?(u=t.child,t.child=null):(u=l.sibling,l.sibling=null),Jc(t,!1,u,l,d,r);break;case"backwards":case"unstable_legacy-backwards":for(l=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&xo(e)===null){t.child=u;break}e=u.sibling,u.sibling=l,l=u,u=e}Jc(t,!0,l,null,d,r);break;case"together":Jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Kn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),wl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ur(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=Yn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Yn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Wc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&mo(e)))}function r_(e,t,l){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),yl(t,ht,e.memoizedState.cache),Zl();break;case 27:case 5:at(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:yl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Tc(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(El(t),t.flags|=128,null):(l&t.child.childLanes)!==0?qy(e,t,l):(El(t),e=Kn(e,t,l),e!==null?e.sibling:null);El(t);break;case 19:var u=(e.flags&128)!==0;if(r=(l&t.childLanes)!==0,r||(Ur(e,t,l,!1),r=(l&t.childLanes)!==0),u){if(r)return Vy(e,t,l);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),T(ct,ct.current),r)break;return null;case 22:return t.lanes=0,jy(e,t,l,t.pendingProps);case 24:yl(t,ht,e.memoizedState.cache)}return Kn(e,t,l)}function Gy(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!Wc(e,l)&&(t.flags&128)===0)return pt=!1,r_(e,t,l);pt=(e.flags&131072)!==0}else pt=!1,Be&&(t.flags&1048576)!==0&&xg(t,Ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=er(t.elementType),t.type=e,typeof e=="function")lc(e)?(r=rr(e,r),t.tag=1,t=Iy(null,t,e,r,l)):(t.tag=0,t=Pc(null,t,e,r,l));else{if(e!=null){var u=e.$$typeof;if(u===$){t.tag=11,t=My(null,t,e,r,l);break e}else if(u===j){t.tag=14,t=zy(null,t,e,r,l);break e}}throw t=ce(e)||e,Error(o(306,t,""))}}return t;case 0:return Pc(e,t,t.type,t.pendingProps,l);case 1:return r=t.type,u=rr(r,t.pendingProps),Iy(e,t,r,u,l);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var d=t.memoizedState;u=d.element,vc(e,t),na(t,r,null,l);var v=t.memoizedState;if(r=v.cache,yl(t,ht,r),r!==d.cache&&dc(t,[ht],l,!0),ta(),r=v.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Hy(e,t,r,l);break e}else if(r!==u){u=hn(Error(o(424)),t),Qi(u),t=Hy(e,t,r,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=vn(e.firstChild),Nt=t,Be=!0,pl=null,gn=!0,l=jg(t,null,r,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Zl(),r===u){t=Kn(e,t,l);break e}Ot(e,t,r,l)}t=t.child}return t;case 26:return zo(e,t),e===null?(l=tb(t.type,null,t.pendingProps,null))?t.memoizedState=l:Be||(l=t.type,e=t.pendingProps,r=Zo(pe.current).createElement(l),r[At]=t,r[qt]=e,kt(r,l,e),Ct(r),t.stateNode=r):t.memoizedState=tb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return at(t),e===null&&Be&&(r=t.stateNode=Wv(t.type,t.pendingProps,pe.current),Nt=t,gn=!0,u=nt,Ol(t.type)?(Mf=u,nt=vn(r.firstChild)):nt=u),Ot(e,t,t.pendingProps.children,l),zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((u=r=nt)&&(r=D_(r,t.type,t.pendingProps,gn),r!==null?(t.stateNode=r,Nt=t,nt=vn(r.firstChild),gn=!1,u=!0):u=!1),u||gl(t)),at(t),u=t.type,d=t.pendingProps,v=e!==null?e.memoizedProps:null,r=d.children,Af(u,d)?r=null:v!==null&&Af(u,v)&&(t.flags|=32),t.memoizedState!==null&&(u=wc(e,t,Qw,null,null,l),xa._currentValue=u),zo(e,t),Ot(e,t,r,l),t.child;case 6:return e===null&&Be&&((e=l=nt)&&(l=j_(l,t.pendingProps,gn),l!==null?(t.stateNode=l,Nt=t,nt=null,e=!0):e=!1),e||gl(t)),null;case 13:return qy(e,t,l);case 4:return Ie(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nr(t,null,r,l):Ot(e,t,r,l),t.child;case 11:return My(e,t,t.type,t.pendingProps,l);case 7:return Ot(e,t,t.pendingProps,l),t.child;case 8:return Ot(e,t,t.pendingProps.children,l),t.child;case 12:return Ot(e,t,t.pendingProps.children,l),t.child;case 10:return r=t.pendingProps,yl(t,t.type,r.value),Ot(e,t,r.children,l),t.child;case 9:return u=t.type._context,r=t.pendingProps.children,Wl(t),u=Rt(u),r=r(u),t.flags|=1,Ot(e,t,r,l),t.child;case 14:return zy(e,t,t.type,t.pendingProps,l);case 15:return Dy(e,t,t.type,t.pendingProps,l);case 19:return Vy(e,t,l);case 31:return l_(e,t,l);case 22:return jy(e,t,l,t.pendingProps);case 24:return Wl(t),r=Rt(ht),e===null?(u=pc(),u===null&&(u=$e,d=hc(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=l),u=d),t.memoizedState={parent:r,cache:u},yc(t),yl(t,ht,u)):((e.lanes&l)!==0&&(vc(e,t),na(t,null,null,l),ta()),u=e.memoizedState,d=t.memoizedState,u.parent!==r?(u={parent:r,cache:r},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),yl(t,ht,r)):(r=d.cache,yl(t,ht,r),r!==u.cache&&dc(t,[ht],l,!0))),Ot(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Qn(e){e.flags|=4}function $c(e,t,l,r,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(yv())e.flags|=8192;else throw tr=vo,gc}else e.flags&=-16777217}function Py(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ab(t))if(yv())e.flags|=8192;else throw tr=vo,gc}function jo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Cp():536870912,e.lanes|=t,Qr|=t)}function sa(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,r=0;if(t)for(var u=e.child;u!==null;)l|=u.lanes|u.childLanes,r|=u.subtreeFlags&65011712,r|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)l|=u.lanes|u.childLanes,r|=u.subtreeFlags,r|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=r,e.childLanes=l,t}function i_(e,t,l){var r=t.pendingProps;switch(oc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return l=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Pn(ht),Me(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Lr(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,uc())),lt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(lt(t),Py(t,d)):(lt(t),$c(t,u,null,r,l))):d?d!==e.memoizedState?(Qn(t),lt(t),Py(t,d)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Qn(t),lt(t),$c(t,u,e,r,l)),null;case 27:if(vt(t),l=pe.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return lt(t),null}e=ne.current,Lr(t)?Cg(t):(e=Wv(u,r,l),t.stateNode=e,Qn(t))}return lt(t),null;case 5:if(vt(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return lt(t),null}if(d=ne.current,Lr(t))Cg(t);else{var v=Zo(pe.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?v.createElement("select",{is:r.is}):v.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?v.createElement(u,{is:r.is}):v.createElement(u)}}d[At]=t,d[qt]=r;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=d;e:switch(kt(d,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Qn(t)}}return lt(t),$c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=pe.current,Lr(t)){if(e=t.stateNode,l=t.memoizedProps,r=null,u=Nt,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}e[At]=t,e=!!(e.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||qv(e.nodeValue,l)),e||gl(t,!0)}else e=Zo(e).createTextNode(r),e[At]=t,t.stateNode=e}return lt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(r=Lr(t),l!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[At]=t}else Zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else l=uc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(nn(t),t):(nn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return lt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Lr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[At]=t}else Zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),u=!1}else u=uc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(nn(t),t):(nn(t),null)}return nn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=r!==null,e=e!==null&&e.memoizedState!==null,l&&(r=t.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==u&&(r.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),jo(t,t.updateQueue),lt(t),null);case 4:return Me(),e===null&&xf(t.stateNode.containerInfo),lt(t),null;case 10:return Pn(t.type),lt(t),null;case 19:if(G(ct),r=t.memoizedState,r===null)return lt(t),null;if(u=(t.flags&128)!==0,d=r.rendering,d===null)if(u)sa(r,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=xo(e),d!==null){for(t.flags|=128,sa(r,!1),e=d.updateQueue,t.updateQueue=e,jo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)bg(l,e),l=l.sibling;return T(ct,ct.current&1|2),Be&&Vn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ut()>Ho&&(t.flags|=128,u=!0,sa(r,!1),t.lanes=4194304)}else{if(!u)if(e=xo(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,jo(t,e),sa(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!Be)return lt(t),null}else 2*ut()-r.renderingStartTime>Ho&&l!==536870912&&(t.flags|=128,u=!0,sa(r,!1),t.lanes=4194304);r.isBackwards?(d.sibling=t.child,t.child=d):(e=r.last,e!==null?e.sibling=d:t.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ut(),e.sibling=null,l=ct.current,T(ct,u?l&1|2:l&1),Be&&Vn(t,r.treeForkCount),e):(lt(t),null);case 22:case 23:return nn(t),xc(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(l&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),l=t.updateQueue,l!==null&&jo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==l&&(t.flags|=2048),e!==null&&G($l),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Pn(ht),lt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function a_(e,t){switch(oc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(ht),Me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return vt(t),null;case 31:if(t.memoizedState!==null){if(nn(t),t.alternate===null)throw Error(o(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(nn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(ct),null;case 4:return Me(),null;case 10:return Pn(t.type),null;case 22:case 23:return nn(t),xc(),e!==null&&G($l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pn(ht),null;case 25:return null;default:return null}}function Fy(e,t){switch(oc(t),t.tag){case 3:Pn(ht),Me();break;case 26:case 27:case 5:vt(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&nn(t);break;case 13:nn(t);break;case 19:G(ct);break;case 10:Pn(t.type);break;case 22:case 23:nn(t),xc(),e!==null&&G($l);break;case 24:Pn(ht)}}function ua(e,t){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var u=r.next;l=u;do{if((l.tag&e)===e){r=void 0;var d=l.create,v=l.inst;r=d(),v.destroy=r}l=l.next}while(l!==u)}}catch(E){Xe(t,t.return,E)}}function Tl(e,t,l){try{var r=t.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var d=u.next;r=d;do{if((r.tag&e)===e){var v=r.inst,E=v.destroy;if(E!==void 0){v.destroy=void 0,u=t;var N=l,q=E;try{q()}catch(X){Xe(u,N,X)}}}r=r.next}while(r!==d)}}catch(X){Xe(t,t.return,X)}}function Xy(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Ug(t,l)}catch(r){Xe(e,e.return,r)}}}function Ky(e,t,l){l.props=rr(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(r){Xe(e,t,r)}}function ca(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof l=="function"?e.refCleanup=l(r):l.current=r}}catch(u){Xe(e,t,u)}}function Mn(e,t){var l=e.ref,r=e.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(u){Xe(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Xe(e,t,u)}else l.current=null}function Qy(e){var t=e.type,l=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break e;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(u){Xe(e,e.return,u)}}function ef(e,t,l){try{var r=e.stateNode;N_(r,e.type,l,t),r[qt]=t}catch(u){Xe(e,e.return,u)}}function Zy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ol(e.type)||e.tag===4}function tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ol(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nf(e,t,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Hn));else if(r!==4&&(r===27&&Ol(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(nf(e,t,l),e=e.sibling;e!==null;)nf(e,t,l),e=e.sibling}function Lo(e,t,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(r!==4&&(r===27&&Ol(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Lo(e,t,l),e=e.sibling;e!==null;)Lo(e,t,l),e=e.sibling}function Jy(e){var t=e.stateNode,l=e.memoizedProps;try{for(var r=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);kt(t,r,l),t[At]=e,t[qt]=l}catch(d){Xe(e,e.return,d)}}var Zn=!1,gt=!1,lf=!1,Wy=typeof WeakSet=="function"?WeakSet:Set,wt=null;function o_(e,t){if(e=e.containerInfo,wf=ls,e=cg(e),Zu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var u=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var v=0,E=-1,N=-1,q=0,X=0,J=e,Y=null;t:for(;;){for(var P;J!==l||u!==0&&J.nodeType!==3||(E=v+u),J!==d||r!==0&&J.nodeType!==3||(N=v+r),J.nodeType===3&&(v+=J.nodeValue.length),(P=J.firstChild)!==null;)Y=J,J=P;for(;;){if(J===e)break t;if(Y===l&&++q===u&&(E=v),Y===d&&++X===r&&(N=v),(P=J.nextSibling)!==null)break;J=Y,Y=J.parentNode}J=P}l=E===-1||N===-1?null:{start:E,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(_f={focusedElem:e,selectionRange:l},ls=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)u=e[l],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=t,u=d.memoizedProps,d=d.memoizedState,r=l.stateNode;try{var de=rr(l.type,u);e=r.getSnapshotBeforeUpdate(de,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(be){Xe(l,l.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Rf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,wt=e;break}wt=t.return}}function $y(e,t,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Wn(e,l),r&4&&ua(5,l);break;case 1:if(Wn(e,l),r&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(v){Xe(l,l.return,v)}else{var u=rr(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Xe(l,l.return,v)}}r&64&&Xy(l),r&512&&ca(l,l.return);break;case 3:if(Wn(e,l),r&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Ug(e,t)}catch(v){Xe(l,l.return,v)}}break;case 27:t===null&&r&4&&Jy(l);case 26:case 5:Wn(e,l),t===null&&r&4&&Qy(l),r&512&&ca(l,l.return);break;case 12:Wn(e,l);break;case 31:Wn(e,l),r&4&&nv(e,l);break;case 13:Wn(e,l),r&4&&lv(e,l),r&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=g_.bind(null,l),L_(e,l))));break;case 22:if(r=l.memoizedState!==null||Zn,!r){t=t!==null&&t.memoizedState!==null||gt,u=Zn;var d=gt;Zn=r,(gt=t)&&!d?$n(e,l,(l.subtreeFlags&8772)!==0):Wn(e,l),Zn=u,gt=d}break;case 30:break;default:Wn(e,l)}}function ev(e){var t=e.alternate;t!==null&&(e.alternate=null,ev(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&zu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var it=null,Vt=!1;function Jn(e,t,l){for(l=l.child;l!==null;)tv(e,t,l),l=l.sibling}function tv(e,t,l){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Dt,l)}catch{}switch(l.tag){case 26:gt||Mn(l,t),Jn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:gt||Mn(l,t);var r=it,u=Vt;Ol(l.type)&&(it=l.stateNode,Vt=!1),Jn(e,t,l),ba(l.stateNode),it=r,Vt=u;break;case 5:gt||Mn(l,t);case 6:if(r=it,u=Vt,it=null,Jn(e,t,l),it=r,Vt=u,it!==null)if(Vt)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(l.stateNode)}catch(d){Xe(l,t,d)}else try{it.removeChild(l.stateNode)}catch(d){Xe(l,t,d)}break;case 18:it!==null&&(Vt?(e=it,Xv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),li(e)):Xv(it,l.stateNode));break;case 4:r=it,u=Vt,it=l.stateNode.containerInfo,Vt=!0,Jn(e,t,l),it=r,Vt=u;break;case 0:case 11:case 14:case 15:Tl(2,l,t),gt||Tl(4,l,t),Jn(e,t,l);break;case 1:gt||(Mn(l,t),r=l.stateNode,typeof r.componentWillUnmount=="function"&&Ky(l,t,r)),Jn(e,t,l);break;case 21:Jn(e,t,l);break;case 22:gt=(r=gt)||l.memoizedState!==null,Jn(e,t,l),gt=r;break;default:Jn(e,t,l)}}function nv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{li(e)}catch(l){Xe(t,t.return,l)}}}function lv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(l){Xe(t,t.return,l)}}function s_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wy),t;default:throw Error(o(435,e.tag))}}function Uo(e,t){var l=s_(e);t.forEach(function(r){if(!l.has(r)){l.add(r);var u=y_.bind(null,e,r);r.then(u,u)}})}function Gt(e,t){var l=t.deletions;if(l!==null)for(var r=0;r<l.length;r++){var u=l[r],d=e,v=t,E=v;e:for(;E!==null;){switch(E.tag){case 27:if(Ol(E.type)){it=E.stateNode,Vt=!1;break e}break;case 5:it=E.stateNode,Vt=!1;break e;case 3:case 4:it=E.stateNode.containerInfo,Vt=!0;break e}E=E.return}if(it===null)throw Error(o(160));tv(d,v,u),it=null,Vt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rv(t,e),t=t.sibling}var Tn=null;function rv(e,t){var l=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),Pt(e),r&4&&(Tl(3,e,e.return),ua(3,e),Tl(5,e,e.return));break;case 1:Gt(t,e),Pt(e),r&512&&(gt||l===null||Mn(l,l.return)),r&64&&Zn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:var u=Tn;if(Gt(t,e),Pt(e),r&512&&(gt||l===null||Mn(l,l.return)),r&4){var d=l!==null?l.memoizedState:null;if(r=e.memoizedState,l===null)if(r===null)if(e.stateNode===null){e:{r=e.type,l=e.memoizedProps,u=u.ownerDocument||u;t:switch(r){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Ui]||d[At]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(r),u.head.insertBefore(d,u.querySelector("head > title"))),kt(d,r,l),d[At]=e,Ct(d),r=d;break e;case"link":var v=rb("link","href",u).get(r+(l.href||""));if(v){for(var E=0;E<v.length;E++)if(d=v[E],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(E,1);break t}}d=u.createElement(r),kt(d,r,l),u.head.appendChild(d);break;case"meta":if(v=rb("meta","content",u).get(r+(l.content||""))){for(E=0;E<v.length;E++)if(d=v[E],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(E,1);break t}}d=u.createElement(r),kt(d,r,l),u.head.appendChild(d);break;default:throw Error(o(468,r))}d[At]=e,Ct(d),r=d}e.stateNode=r}else ib(u,e.type,e.stateNode);else e.stateNode=lb(u,r,e.memoizedProps);else d!==r?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,r===null?ib(u,e.type,e.stateNode):lb(u,r,e.memoizedProps)):r===null&&e.stateNode!==null&&ef(e,e.memoizedProps,l.memoizedProps)}break;case 27:Gt(t,e),Pt(e),r&512&&(gt||l===null||Mn(l,l.return)),l!==null&&r&4&&ef(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Gt(t,e),Pt(e),r&512&&(gt||l===null||Mn(l,l.return)),e.flags&32){u=e.stateNode;try{_r(u,"")}catch(de){Xe(e,e.return,de)}}r&4&&e.stateNode!=null&&(u=e.memoizedProps,ef(e,u,l!==null?l.memoizedProps:u)),r&1024&&(lf=!0);break;case 6:if(Gt(t,e),Pt(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,l=e.stateNode;try{l.nodeValue=r}catch(de){Xe(e,e.return,de)}}break;case 3:if($o=null,u=Tn,Tn=Jo(t.containerInfo),Gt(t,e),Tn=u,Pt(e),r&4&&l!==null&&l.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(de){Xe(e,e.return,de)}lf&&(lf=!1,iv(e));break;case 4:r=Tn,Tn=Jo(e.stateNode.containerInfo),Gt(t,e),Pt(e),Tn=r;break;case 12:Gt(t,e),Pt(e);break;case 31:Gt(t,e),Pt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uo(e,r)));break;case 13:Gt(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Io=ut()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uo(e,r)));break;case 22:u=e.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,q=Zn,X=gt;if(Zn=q||u,gt=X||N,Gt(t,e),gt=X,Zn=q,Pt(e),r&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(l===null||N||Zn||gt||ir(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){N=l=t;try{if(d=N.stateNode,u)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{E=N.stateNode;var J=N.memoizedProps.style,Y=J!=null&&J.hasOwnProperty("display")?J.display:null;E.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(de){Xe(N,N.return,de)}}}else if(t.tag===6){if(l===null){N=t;try{N.stateNode.nodeValue=u?"":N.memoizedProps}catch(de){Xe(N,N.return,de)}}}else if(t.tag===18){if(l===null){N=t;try{var P=N.stateNode;u?Kv(P,!0):Kv(N.stateNode,!1)}catch(de){Xe(N,N.return,de)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,Uo(e,l))));break;case 19:Gt(t,e),Pt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uo(e,r)));break;case 30:break;case 21:break;default:Gt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var l,r=e.return;r!==null;){if(Zy(r)){l=r;break}r=r.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var u=l.stateNode,d=tf(e);Lo(e,d,u);break;case 5:var v=l.stateNode;l.flags&32&&(_r(v,""),l.flags&=-33);var E=tf(e);Lo(e,E,v);break;case 3:case 4:var N=l.stateNode.containerInfo,q=tf(e);nf(e,q,N);break;default:throw Error(o(161))}}catch(X){Xe(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function iv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;iv(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$y(e,t.alternate,t),t=t.sibling}function ir(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tl(4,t,t.return),ir(t);break;case 1:Mn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ky(t,t.return,l),ir(t);break;case 27:ba(t.stateNode);case 26:case 5:Mn(t,t.return),ir(t);break;case 22:t.memoizedState===null&&ir(t);break;case 30:ir(t);break;default:ir(t)}e=e.sibling}}function $n(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,u=e,d=t,v=d.flags;switch(d.tag){case 0:case 11:case 15:$n(u,d,l),ua(4,d);break;case 1:if($n(u,d,l),r=d,u=r.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(q){Xe(r,r.return,q)}if(r=d,u=r.updateQueue,u!==null){var E=r.stateNode;try{var N=u.shared.hiddenCallbacks;if(N!==null)for(u.shared.hiddenCallbacks=null,u=0;u<N.length;u++)Lg(N[u],E)}catch(q){Xe(r,r.return,q)}}l&&v&64&&Xy(d),ca(d,d.return);break;case 27:Jy(d);case 26:case 5:$n(u,d,l),l&&r===null&&v&4&&Qy(d),ca(d,d.return);break;case 12:$n(u,d,l);break;case 31:$n(u,d,l),l&&v&4&&nv(u,d);break;case 13:$n(u,d,l),l&&v&4&&lv(u,d);break;case 22:d.memoizedState===null&&$n(u,d,l),ca(d,d.return);break;case 30:break;default:$n(u,d,l)}t=t.sibling}}function rf(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Zi(l))}function af(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function Cn(e,t,l,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)av(e,t,l,r),t=t.sibling}function av(e,t,l,r){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Cn(e,t,l,r),u&2048&&ua(9,t);break;case 1:Cn(e,t,l,r);break;case 3:Cn(e,t,l,r),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(u&2048){Cn(e,t,l,r),e=t.stateNode;try{var d=t.memoizedProps,v=d.id,E=d.onPostCommit;typeof E=="function"&&E(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Xe(t,t.return,N)}}else Cn(e,t,l,r);break;case 31:Cn(e,t,l,r);break;case 13:Cn(e,t,l,r);break;case 23:break;case 22:d=t.stateNode,v=t.alternate,t.memoizedState!==null?d._visibility&2?Cn(e,t,l,r):fa(e,t):d._visibility&2?Cn(e,t,l,r):(d._visibility|=2,Fr(e,t,l,r,(t.subtreeFlags&10256)!==0||!1)),u&2048&&rf(v,t);break;case 24:Cn(e,t,l,r),u&2048&&af(t.alternate,t);break;default:Cn(e,t,l,r)}}function Fr(e,t,l,r,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,v=t,E=l,N=r,q=v.flags;switch(v.tag){case 0:case 11:case 15:Fr(d,v,E,N,u),ua(8,v);break;case 23:break;case 22:var X=v.stateNode;v.memoizedState!==null?X._visibility&2?Fr(d,v,E,N,u):fa(d,v):(X._visibility|=2,Fr(d,v,E,N,u)),u&&q&2048&&rf(v.alternate,v);break;case 24:Fr(d,v,E,N,u),u&&q&2048&&af(v.alternate,v);break;default:Fr(d,v,E,N,u)}t=t.sibling}}function fa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,r=t,u=r.flags;switch(r.tag){case 22:fa(l,r),u&2048&&rf(r.alternate,r);break;case 24:fa(l,r),u&2048&&af(r.alternate,r);break;default:fa(l,r)}t=t.sibling}}var da=8192;function Xr(e,t,l){if(e.subtreeFlags&da)for(e=e.child;e!==null;)ov(e,t,l),e=e.sibling}function ov(e,t,l){switch(e.tag){case 26:Xr(e,t,l),e.flags&da&&e.memoizedState!==null&&K_(l,Tn,e.memoizedState,e.memoizedProps);break;case 5:Xr(e,t,l);break;case 3:case 4:var r=Tn;Tn=Jo(e.stateNode.containerInfo),Xr(e,t,l),Tn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=da,da=16777216,Xr(e,t,l),da=r):Xr(e,t,l));break;default:Xr(e,t,l)}}function sv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ha(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];wt=r,cv(r,e)}sv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)uv(e),e=e.sibling}function uv(e){switch(e.tag){case 0:case 11:case 15:ha(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:ha(e);break;case 12:ha(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bo(e)):ha(e);break;default:ha(e)}}function Bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];wt=r,cv(r,e)}sv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),Bo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Bo(t));break;default:Bo(t)}e=e.sibling}}function cv(e,t){for(;wt!==null;){var l=wt;switch(l.tag){case 0:case 11:case 15:Tl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,wt=r;else e:for(l=e;wt!==null;){r=wt;var u=r.sibling,d=r.return;if(ev(r),r===l){wt=null;break e}if(u!==null){u.return=d,wt=u;break e}wt=d}}}var u_={getCacheForType:function(e){var t=Rt(ht),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Rt(ht).controller.signal}},c_=typeof WeakMap=="function"?WeakMap:Map,Ge=0,$e=null,De=null,Le=0,Fe=0,ln=null,Cl=!1,Kr=!1,of=!1,el=0,st=0,wl=0,ar=0,sf=0,rn=0,Qr=0,ma=null,Ft=null,uf=!1,Io=0,fv=0,Ho=1/0,qo=null,_l=null,St=0,Al=null,Zr=null,tl=0,cf=0,ff=null,dv=null,pa=0,df=null;function an(){return(Ge&2)!==0&&Le!==0?Le&-Le:B.T!==null?vf():Np()}function hv(){if(rn===0)if((Le&536870912)===0||Be){var e=Ka;Ka<<=1,(Ka&3932160)===0&&(Ka=262144),rn=e}else rn=536870912;return e=tn.current,e!==null&&(e.flags|=32),rn}function Xt(e,t,l){(e===$e&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(Jr(e,0),Nl(e,Le,rn,!1)),Li(e,l),((Ge&2)===0||e!==$e)&&(e===$e&&((Ge&2)===0&&(ar|=l),st===4&&Nl(e,Le,rn,!1)),zn(e))}function mv(e,t,l){if((Ge&6)!==0)throw Error(o(327));var r=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ji(e,t),u=r?h_(e,t):mf(e,t,!0),d=r;do{if(u===0){Kr&&!r&&Nl(e,t,0,!1);break}else{if(l=e.current.alternate,d&&!f_(l)){u=mf(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var E=e;u=ma;var N=E.current.memoizedState.isDehydrated;if(N&&(Jr(E,v).flags|=256),v=mf(E,v,!1),v!==2){if(of&&!N){E.errorRecoveryDisabledLanes|=d,ar|=d,u=4;break e}d=Ft,Ft=u,d!==null&&(Ft===null?Ft=d:Ft.push.apply(Ft,d))}u=v}if(d=!1,u!==2)continue}}if(u===1){Jr(e,0),Nl(e,t,0,!0);break}e:{switch(r=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Nl(r,t,rn,!Cl);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=Io+300-ut(),10<u)){if(Nl(r,t,rn,!Cl),Za(r,0,!0)!==0)break e;tl=t,r.timeoutHandle=Pv(pv.bind(null,r,l,Ft,qo,uf,t,rn,ar,Qr,Cl,d,"Throttled",-0,0),u);break e}pv(r,l,Ft,qo,uf,t,rn,ar,Qr,Cl,d,null,-0,0)}}break}while(!0);zn(e)}function pv(e,t,l,r,u,d,v,E,N,q,X,J,Y,P){if(e.timeoutHandle=-1,J=t.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},ov(t,d,J);var de=(d&62914560)===d?Io-ut():(d&4194048)===d?fv-ut():0;if(de=Q_(J,de),de!==null){tl=d,e.cancelPendingCommit=de(Tv.bind(null,e,t,d,l,r,u,v,E,N,X,J,null,Y,P)),Nl(e,d,v,!q);return}}Tv(e,t,d,l,r,u,v,E,N)}function f_(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var u=l[r],d=u.getSnapshot;u=u.value;try{if(!$t(d(),u))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nl(e,t,l,r){t&=~sf,t&=~ar,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var u=t;0<u;){var d=31-We(u),v=1<<d;r[d]=-1,u&=~v}l!==0&&wp(e,l,t)}function Yo(){return(Ge&6)===0?(ga(0),!1):!0}function hf(){if(De!==null){if(Fe===0)var e=De.return;else e=De,Gn=Jl=null,Nc(e),qr=null,Wi=0,e=De;for(;e!==null;)Fy(e.alternate,e),e=e.return;De=null}}function Jr(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,k_(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,hf(),$e=e,De=l=Yn(e.current,null),Le=t,Fe=0,ln=null,Cl=!1,Kr=ji(e,t),of=!1,Qr=rn=sf=ar=wl=st=0,Ft=ma=null,uf=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var u=31-We(r),d=1<<u;t|=e[u],r&=~d}return el=t,so(),l}function gv(e,t){Ae=null,B.H=aa,t===Hr||t===yo?(t=Mg(),Fe=3):t===gc?(t=Mg(),Fe=4):Fe=t===Gc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,De===null&&(st=1,ko(e,hn(t,e.current)))}function yv(){var e=tn.current;return e===null?!0:(Le&4194048)===Le?yn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===yn:!1}function vv(){var e=B.H;return B.H=aa,e===null?aa:e}function bv(){var e=B.A;return B.A=u_,e}function Vo(){st=4,Cl||(Le&4194048)!==Le&&tn.current!==null||(Kr=!0),(wl&134217727)===0&&(ar&134217727)===0||$e===null||Nl($e,Le,rn,!1)}function mf(e,t,l){var r=Ge;Ge|=2;var u=vv(),d=bv();($e!==e||Le!==t)&&(qo=null,Jr(e,t)),t=!1;var v=st;e:do try{if(Fe!==0&&De!==null){var E=De,N=ln;switch(Fe){case 8:hf(),v=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(t=!0);var q=Fe;if(Fe=0,ln=null,Wr(e,E,N,q),l&&Kr){v=0;break e}break;default:q=Fe,Fe=0,ln=null,Wr(e,E,N,q)}}d_(),v=st;break}catch(X){gv(e,X)}while(!0);return t&&e.shellSuspendCounter++,Gn=Jl=null,Ge=r,B.H=u,B.A=d,De===null&&($e=null,Le=0,so()),v}function d_(){for(;De!==null;)Sv(De)}function h_(e,t){var l=Ge;Ge|=2;var r=vv(),u=bv();$e!==e||Le!==t?(qo=null,Ho=ut()+500,Jr(e,t)):Kr=ji(e,t);e:do try{if(Fe!==0&&De!==null){t=De;var d=ln;t:switch(Fe){case 1:Fe=0,ln=null,Wr(e,t,d,1);break;case 2:case 9:if(Og(d)){Fe=0,ln=null,Ev(t);break}t=function(){Fe!==2&&Fe!==9||$e!==e||(Fe=7),zn(e)},d.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:Og(d)?(Fe=0,ln=null,Ev(t)):(Fe=0,ln=null,Wr(e,t,d,7));break;case 5:var v=null;switch(De.tag){case 26:v=De.memoizedState;case 5:case 27:var E=De;if(v?ab(v):E.stateNode.complete){Fe=0,ln=null;var N=E.sibling;if(N!==null)De=N;else{var q=E.return;q!==null?(De=q,Go(q)):De=null}break t}}Fe=0,ln=null,Wr(e,t,d,5);break;case 6:Fe=0,ln=null,Wr(e,t,d,6);break;case 8:hf(),st=6;break e;default:throw Error(o(462))}}m_();break}catch(X){gv(e,X)}while(!0);return Gn=Jl=null,B.H=r,B.A=u,Ge=l,De!==null?0:($e=null,Le=0,so(),st)}function m_(){for(;De!==null&&!Tt();)Sv(De)}function Sv(e){var t=Gy(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Go(e):De=t}function Ev(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=By(l,t,t.pendingProps,t.type,void 0,Le);break;case 11:t=By(l,t,t.pendingProps,t.type.render,t.ref,Le);break;case 5:Nc(t);default:Fy(l,t),t=De=bg(t,el),t=Gy(l,t,el)}e.memoizedProps=e.pendingProps,t===null?Go(e):De=t}function Wr(e,t,l,r){Gn=Jl=null,Nc(t),qr=null,Wi=0;var u=t.return;try{if(n_(e,u,t,l,Le)){st=1,ko(e,hn(l,e.current)),De=null;return}}catch(d){if(u!==null)throw De=u,d;st=1,ko(e,hn(l,e.current)),De=null;return}t.flags&32768?(Be||r===1?e=!0:Kr||(Le&536870912)!==0?e=!1:(Cl=e=!0,(r===2||r===9||r===3||r===6)&&(r=tn.current,r!==null&&r.tag===13&&(r.flags|=16384))),xv(t,e)):Go(t)}function Go(e){var t=e;do{if((t.flags&32768)!==0){xv(t,Cl);return}e=t.return;var l=i_(t.alternate,t,el);if(l!==null){De=l;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);st===0&&(st=5)}function xv(e,t){do{var l=a_(e.alternate,e);if(l!==null){l.flags&=32767,De=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=l}while(e!==null);st=6,De=null}function Tv(e,t,l,r,u,d,v,E,N){e.cancelPendingCommit=null;do Po();while(St!==0);if((Ge&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=tc,XC(e,l,d,v,E,N),e===$e&&(De=$e=null,Le=0),Zr=t,Al=e,tl=l,cf=d,ff=u,dv=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,v_(xe,function(){return Nv(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=B.T,B.T=null,u=W.p,W.p=2,v=Ge,Ge|=4;try{o_(e,t,l)}finally{Ge=v,W.p=u,B.T=r}}St=1,Cv(),wv(),_v()}}function Cv(){if(St===1){St=0;var e=Al,t=Zr,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=B.T,B.T=null;var r=W.p;W.p=2;var u=Ge;Ge|=4;try{rv(t,e);var d=_f,v=cg(e.containerInfo),E=d.focusedElem,N=d.selectionRange;if(v!==E&&E&&E.ownerDocument&&ug(E.ownerDocument.documentElement,E)){if(N!==null&&Zu(E)){var q=N.start,X=N.end;if(X===void 0&&(X=q),"selectionStart"in E)E.selectionStart=q,E.selectionEnd=Math.min(X,E.value.length);else{var J=E.ownerDocument||document,Y=J&&J.defaultView||window;if(Y.getSelection){var P=Y.getSelection(),de=E.textContent.length,be=Math.min(N.start,de),Ze=N.end===void 0?be:Math.min(N.end,de);!P.extend&&be>Ze&&(v=Ze,Ze=be,be=v);var L=sg(E,be),O=sg(E,Ze);if(L&&O&&(P.rangeCount!==1||P.anchorNode!==L.node||P.anchorOffset!==L.offset||P.focusNode!==O.node||P.focusOffset!==O.offset)){var H=J.createRange();H.setStart(L.node,L.offset),P.removeAllRanges(),be>Ze?(P.addRange(H),P.extend(O.node,O.offset)):(H.setEnd(O.node,O.offset),P.addRange(H))}}}}for(J=[],P=E;P=P.parentNode;)P.nodeType===1&&J.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<J.length;E++){var Q=J[E];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}ls=!!wf,_f=wf=null}finally{Ge=u,W.p=r,B.T=l}}e.current=t,St=2}}function wv(){if(St===2){St=0;var e=Al,t=Zr,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=B.T,B.T=null;var r=W.p;W.p=2;var u=Ge;Ge|=4;try{$y(e,t.alternate,t)}finally{Ge=u,W.p=r,B.T=l}}St=3}}function _v(){if(St===4||St===3){St=0,Yl();var e=Al,t=Zr,l=tl,r=dv;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?St=5:(St=0,Zr=Al=null,Av(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(_l=null),ku(l),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Dt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=B.T,u=W.p,W.p=2,B.T=null;try{for(var d=e.onRecoverableError,v=0;v<r.length;v++){var E=r[v];d(E.value,{componentStack:E.stack})}}finally{B.T=t,W.p=u}}(tl&3)!==0&&Po(),zn(e),u=e.pendingLanes,(l&261930)!==0&&(u&42)!==0?e===df?pa++:(pa=0,df=e):pa=0,ga(0)}}function Av(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function Po(){return Cv(),wv(),_v(),Nv()}function Nv(){if(St!==5)return!1;var e=Al,t=cf;cf=0;var l=ku(tl),r=B.T,u=W.p;try{W.p=32>l?32:l,B.T=null,l=ff,ff=null;var d=Al,v=tl;if(St=0,Zr=Al=null,tl=0,(Ge&6)!==0)throw Error(o(331));var E=Ge;if(Ge|=4,uv(d.current),av(d,d.current,v,l),Ge=E,ga(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Dt,d)}catch{}return!0}finally{W.p=u,B.T=r,Av(e,t)}}function Rv(e,t,l){t=hn(l,t),t=Vc(e.stateNode,t,2),e=Sl(e,t,2),e!==null&&(Li(e,2),zn(e))}function Xe(e,t,l){if(e.tag===3)Rv(e,e,l);else for(;t!==null;){if(t.tag===3){Rv(t,e,l);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(_l===null||!_l.has(r))){e=hn(l,e),l=Oy(2),r=Sl(t,l,2),r!==null&&(ky(l,r,t,e),Li(r,2),zn(r));break}}t=t.return}}function pf(e,t,l){var r=e.pingCache;if(r===null){r=e.pingCache=new c_;var u=new Set;r.set(t,u)}else u=r.get(t),u===void 0&&(u=new Set,r.set(t,u));u.has(l)||(of=!0,u.add(l),e=p_.bind(null,e,t,l),t.then(e,e))}function p_(e,t,l){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Le&l)===l&&(st===4||st===3&&(Le&62914560)===Le&&300>ut()-Io?(Ge&2)===0&&Jr(e,0):sf|=l,Qr===Le&&(Qr=0)),zn(e)}function Ov(e,t){t===0&&(t=Cp()),e=Kl(e,t),e!==null&&(Li(e,t),zn(e))}function g_(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Ov(e,l)}function y_(e,t){var l=0;switch(e.tag){case 31:case 13:var r=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Ov(e,l)}function v_(e,t){return Ee(e,t)}var Fo=null,$r=null,gf=!1,Xo=!1,yf=!1,Rl=0;function zn(e){e!==$r&&e.next===null&&($r===null?Fo=$r=e:$r=$r.next=e),Xo=!0,gf||(gf=!0,S_())}function ga(e,t){if(!yf&&Xo){yf=!0;do for(var l=!1,r=Fo;r!==null;){if(e!==0){var u=r.pendingLanes;if(u===0)var d=0;else{var v=r.suspendedLanes,E=r.pingedLanes;d=(1<<31-We(42|e)+1)-1,d&=u&~(v&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,Dv(r,d))}else d=Le,d=Za(r,r===$e?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||ji(r,d)||(l=!0,Dv(r,d));r=r.next}while(l);yf=!1}}function b_(){kv()}function kv(){Xo=gf=!1;var e=0;Rl!==0&&O_()&&(e=Rl);for(var t=ut(),l=null,r=Fo;r!==null;){var u=r.next,d=Mv(r,t);d===0?(r.next=null,l===null?Fo=u:l.next=u,u===null&&($r=l)):(l=r,(e!==0||(d&3)!==0)&&(Xo=!0)),r=u}St!==0&&St!==5||ga(e),Rl!==0&&(Rl=0)}function Mv(e,t){for(var l=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-We(d),E=1<<v,N=u[v];N===-1?((E&l)===0||(E&r)!==0)&&(u[v]=FC(E,t)):N<=t&&(e.expiredLanes|=E),d&=~E}if(t=$e,l=Le,l=Za(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,l===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Je(r),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ji(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(r!==null&&Je(r),ku(l)){case 2:case 8:l=ie;break;case 32:l=xe;break;case 268435456:l=Pe;break;default:l=xe}return r=zv.bind(null,e),l=Ee(l,r),e.callbackPriority=t,e.callbackNode=l,t}return r!==null&&r!==null&&Je(r),e.callbackPriority=2,e.callbackNode=null,2}function zv(e,t){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Po()&&e.callbackNode!==l)return null;var r=Le;return r=Za(e,e===$e?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mv(e,r,t),Mv(e,ut()),e.callbackNode!=null&&e.callbackNode===l?zv.bind(null,e):null)}function Dv(e,t){if(Po())return null;mv(e,t,!0)}function S_(){M_(function(){(Ge&6)!==0?Ee(F,b_):kv()})}function vf(){if(Rl===0){var e=Br;e===0&&(e=Xa,Xa<<=1,(Xa&261888)===0&&(Xa=256)),Rl=e}return Rl}function jv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:eo(""+e)}function Lv(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function E_(e,t,l,r,u){if(t==="submit"&&l&&l.stateNode===u){var d=jv((u[qt]||null).action),v=r.submitter;v&&(t=(t=v[qt]||null)?jv(t.formAction):v.getAttribute("formAction"),t!==null&&(d=t,v=null));var E=new ro("action","action",null,r,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Rl!==0){var N=v?Lv(u,v):new FormData(u);Uc(l,{pending:!0,data:N,method:u.method,action:d},null,N)}}else typeof d=="function"&&(E.preventDefault(),N=v?Lv(u,v):new FormData(u),Uc(l,{pending:!0,data:N,method:u.method,action:d},d,N))},currentTarget:u}]})}}for(var bf=0;bf<ec.length;bf++){var Sf=ec[bf],x_=Sf.toLowerCase(),T_=Sf[0].toUpperCase()+Sf.slice(1);xn(x_,"on"+T_)}xn(hg,"onAnimationEnd"),xn(mg,"onAnimationIteration"),xn(pg,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(Iw,"onTransitionRun"),xn(Hw,"onTransitionStart"),xn(qw,"onTransitionCancel"),xn(gg,"onTransitionEnd"),Cr("onMouseEnter",["mouseout","mouseover"]),Cr("onMouseLeave",["mouseout","mouseover"]),Cr("onPointerEnter",["pointerout","pointerover"]),Cr("onPointerLeave",["pointerout","pointerover"]),Gl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ya="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(" "),C_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ya));function Uv(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var r=e[l],u=r.event;r=r.listeners;e:{var d=void 0;if(t)for(var v=r.length-1;0<=v;v--){var E=r[v],N=E.instance,q=E.currentTarget;if(E=E.listener,N!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=q;try{d(u)}catch(X){oo(X)}u.currentTarget=null,d=N}else for(v=0;v<r.length;v++){if(E=r[v],N=E.instance,q=E.currentTarget,E=E.listener,N!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=q;try{d(u)}catch(X){oo(X)}u.currentTarget=null,d=N}}}}function je(e,t){var l=t[Mu];l===void 0&&(l=t[Mu]=new Set);var r=e+"__bubble";l.has(r)||(Bv(t,e,2,!1),l.add(r))}function Ef(e,t,l){var r=0;t&&(r|=4),Bv(l,e,r,t)}var Ko="_reactListening"+Math.random().toString(36).slice(2);function xf(e){if(!e[Ko]){e[Ko]=!0,kp.forEach(function(l){l!=="selectionchange"&&(C_.has(l)||Ef(l,!1,e),Ef(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ko]||(t[Ko]=!0,Ef("selectionchange",!1,t))}}function Bv(e,t,l,r){switch(hb(t)){case 2:var u=W_;break;case 8:u=$_;break;default:u=Uf}l=u.bind(null,t,l,e),u=void 0,!qu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),r?u!==void 0?e.addEventListener(t,l,{capture:!0,passive:u}):e.addEventListener(t,l,!0):u!==void 0?e.addEventListener(t,l,{passive:u}):e.addEventListener(t,l,!1)}function Tf(e,t,l,r,u){var d=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var v=r.tag;if(v===3||v===4){var E=r.stateNode.containerInfo;if(E===u)break;if(v===4)for(v=r.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===u)return;v=v.return}for(;E!==null;){if(v=Er(E),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){r=d=v;continue e}E=E.parentNode}}r=r.return}Vp(function(){var q=d,X=Iu(l),J=[];e:{var Y=yg.get(e);if(Y!==void 0){var P=ro,de=e;switch(e){case"keypress":if(no(l)===0)break e;case"keydown":case"keyup":P=yw;break;case"focusin":de="focus",P=Pu;break;case"focusout":de="blur",P=Pu;break;case"beforeblur":case"afterblur":P=Pu;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":P=Fp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Sw;break;case hg:case mg:case pg:P=sw;break;case gg:P=xw;break;case"scroll":case"scrollend":P=lw;break;case"wheel":P=Cw;break;case"copy":case"cut":case"paste":P=cw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Kp;break;case"toggle":case"beforetoggle":P=_w}var be=(t&4)!==0,Ze=!be&&(e==="scroll"||e==="scrollend"),L=be?Y!==null?Y+"Capture":null:Y;be=[];for(var O=q,H;O!==null;){var Q=O;if(H=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||H===null||L===null||(Q=Ii(O,L),Q!=null&&be.push(va(O,Q,H))),Ze)break;O=O.return}0<be.length&&(Y=new P(Y,de,null,l,X),J.push({event:Y,listeners:be}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",Y&&l!==Bu&&(de=l.relatedTarget||l.fromElement)&&(Er(de)||de[Sr]))break e;if((P||Y)&&(Y=X.window===X?X:(Y=X.ownerDocument)?Y.defaultView||Y.parentWindow:window,P?(de=l.relatedTarget||l.toElement,P=q,de=de?Er(de):null,de!==null&&(Ze=c(de),be=de.tag,de!==Ze||be!==5&&be!==27&&be!==6)&&(de=null)):(P=null,de=q),P!==de)){if(be=Fp,Q="onMouseLeave",L="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(be=Kp,Q="onPointerLeave",L="onPointerEnter",O="pointer"),Ze=P==null?Y:Bi(P),H=de==null?Y:Bi(de),Y=new be(Q,O+"leave",P,l,X),Y.target=Ze,Y.relatedTarget=H,Q=null,Er(X)===q&&(be=new be(L,O+"enter",de,l,X),be.target=H,be.relatedTarget=Ze,Q=be),Ze=Q,P&&de)t:{for(be=w_,L=P,O=de,H=0,Q=L;Q;Q=be(Q))H++;Q=0;for(var ve=O;ve;ve=be(ve))Q++;for(;0<H-Q;)L=be(L),H--;for(;0<Q-H;)O=be(O),Q--;for(;H--;){if(L===O||O!==null&&L===O.alternate){be=L;break t}L=be(L),O=be(O)}be=null}else be=null;P!==null&&Iv(J,Y,P,be,!1),de!==null&&Ze!==null&&Iv(J,Ze,de,be,!0)}}e:{if(Y=q?Bi(q):window,P=Y.nodeName&&Y.nodeName.toLowerCase(),P==="select"||P==="input"&&Y.type==="file")var He=ng;else if(eg(Y))if(lg)He=Lw;else{He=Dw;var ye=zw}else P=Y.nodeName,!P||P.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?q&&Uu(q.elementType)&&(He=ng):He=jw;if(He&&(He=He(e,q))){tg(J,He,l,X);break e}ye&&ye(e,Y,q),e==="focusout"&&q&&Y.type==="number"&&q.memoizedProps.value!=null&&Lu(Y,"number",Y.value)}switch(ye=q?Bi(q):window,e){case"focusin":(eg(ye)||ye.contentEditable==="true")&&(Or=ye,Ju=q,Xi=null);break;case"focusout":Xi=Ju=Or=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,fg(J,l,X);break;case"selectionchange":if(Bw)break;case"keydown":case"keyup":fg(J,l,X)}var Re;if(Xu)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Rr?Wp(e,l)&&(Ue="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ue="onCompositionStart");Ue&&(Qp&&l.locale!=="ko"&&(Rr||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Rr&&(Re=Gp()):(hl=X,Yu="value"in hl?hl.value:hl.textContent,Rr=!0)),ye=Qo(q,Ue),0<ye.length&&(Ue=new Xp(Ue,e,null,l,X),J.push({event:Ue,listeners:ye}),Re?Ue.data=Re:(Re=$p(l),Re!==null&&(Ue.data=Re)))),(Re=Nw?Rw(e,l):Ow(e,l))&&(Ue=Qo(q,"onBeforeInput"),0<Ue.length&&(ye=new Xp("onBeforeInput","beforeinput",null,l,X),J.push({event:ye,listeners:Ue}),ye.data=Re)),E_(J,e,q,l,X)}Uv(J,t)})}function va(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Qo(e,t){for(var l=t+"Capture",r=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=Ii(e,l),u!=null&&r.unshift(va(e,u,d)),u=Ii(e,t),u!=null&&r.push(va(e,u,d))),e.tag===3)return r;e=e.return}return[]}function w_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Iv(e,t,l,r,u){for(var d=t._reactName,v=[];l!==null&&l!==r;){var E=l,N=E.alternate,q=E.stateNode;if(E=E.tag,N!==null&&N===r)break;E!==5&&E!==26&&E!==27||q===null||(N=q,u?(q=Ii(l,d),q!=null&&v.unshift(va(l,q,N))):u||(q=Ii(l,d),q!=null&&v.push(va(l,q,N)))),l=l.return}v.length!==0&&e.push({event:t,listeners:v})}var __=/\r\n?/g,A_=/\u0000|\uFFFD/g;function Hv(e){return(typeof e=="string"?e:""+e).replace(__,`
|
|
9
|
-
`).replace(A_,"")}function qv(e,t){return t=Hv(t),Hv(e)===t}function Qe(e,t,l,r,u,d){switch(l){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||_r(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&_r(e,""+r);break;case"className":Wa(e,"class",r);break;case"tabIndex":Wa(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Wa(e,l,r);break;case"style":qp(e,r,d);break;case"data":if(t!=="object"){Wa(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=eo(""+r),e.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(t!=="input"&&Qe(e,t,"name",u.name,u,null),Qe(e,t,"formEncType",u.formEncType,u,null),Qe(e,t,"formMethod",u.formMethod,u,null),Qe(e,t,"formTarget",u.formTarget,u,null)):(Qe(e,t,"encType",u.encType,u,null),Qe(e,t,"method",u.method,u,null),Qe(e,t,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=eo(""+r),e.setAttribute(l,r);break;case"onClick":r!=null&&(e.onclick=Hn);break;case"onScroll":r!=null&&je("scroll",e);break;case"onScrollEnd":r!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(l=r.__html,l!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}l=eo(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""+r):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":r===!0?e.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,r):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(l,r):e.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(l):e.setAttribute(l,r);break;case"popover":je("beforetoggle",e),je("toggle",e),Ja(e,"popover",r);break;case"xlinkActuate":In(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":In(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":In(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":In(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":In(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":In(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":In(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":In(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":In(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ja(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=tw.get(l)||l,Ja(e,l,r))}}function Cf(e,t,l,r,u,d){switch(l){case"style":qp(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(l=r.__html,l!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof r=="string"?_r(e,r):(typeof r=="number"||typeof r=="bigint")&&_r(e,""+r);break;case"onScroll":r!=null&&je("scroll",e);break;case"onScrollEnd":r!=null&&je("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mp.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(u=l.endsWith("Capture"),t=l.slice(2,u?l.length-7:void 0),d=e[qt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof r=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,r,u);break e}l in e?e[l]=r:r===!0?e.setAttribute(l,""):Ja(e,l,r)}}}function kt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var r=!1,u=!1,d;for(d in l)if(l.hasOwnProperty(d)){var v=l[d];if(v!=null)switch(d){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,d,v,l,null)}}u&&Qe(e,t,"srcSet",l.srcSet,l,null),r&&Qe(e,t,"src",l.src,l,null);return;case"input":je("invalid",e);var E=d=v=u=null,N=null,q=null;for(r in l)if(l.hasOwnProperty(r)){var X=l[r];if(X!=null)switch(r){case"name":u=X;break;case"type":v=X;break;case"checked":N=X;break;case"defaultChecked":q=X;break;case"value":d=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:Qe(e,t,r,X,l,null)}}Up(e,d,E,N,q,v,u,!1);return;case"select":je("invalid",e),r=v=d=null;for(u in l)if(l.hasOwnProperty(u)&&(E=l[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":v=E;break;case"multiple":r=E;default:Qe(e,t,u,E,l,null)}t=d,l=v,e.multiple=!!r,t!=null?wr(e,!!r,t,!1):l!=null&&wr(e,!!r,l,!0);return;case"textarea":je("invalid",e),d=u=r=null;for(v in l)if(l.hasOwnProperty(v)&&(E=l[v],E!=null))switch(v){case"value":r=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(91));break;default:Qe(e,t,v,E,l,null)}Ip(e,r,u,d);return;case"option":for(N in l)if(l.hasOwnProperty(N)&&(r=l[N],r!=null))switch(N){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Qe(e,t,N,r,l,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(r=0;r<ya.length;r++)je(ya[r],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in l)if(l.hasOwnProperty(q)&&(r=l[q],r!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,q,r,l,null)}return;default:if(Uu(t)){for(X in l)l.hasOwnProperty(X)&&(r=l[X],r!==void 0&&Cf(e,t,X,r,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(r=l[E],r!=null&&Qe(e,t,E,r,l,null))}function N_(e,t,l,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,v=null,E=null,N=null,q=null,X=null;for(P in l){var J=l[P];if(l.hasOwnProperty(P)&&J!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":N=J;default:r.hasOwnProperty(P)||Qe(e,t,P,null,r,J)}}for(var Y in r){var P=r[Y];if(J=l[Y],r.hasOwnProperty(Y)&&(P!=null||J!=null))switch(Y){case"type":d=P;break;case"name":u=P;break;case"checked":q=P;break;case"defaultChecked":X=P;break;case"value":v=P;break;case"defaultValue":E=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==J&&Qe(e,t,Y,P,r,J)}}ju(e,v,E,N,q,X,d,u);return;case"select":P=v=E=Y=null;for(d in l)if(N=l[d],l.hasOwnProperty(d)&&N!=null)switch(d){case"value":break;case"multiple":P=N;default:r.hasOwnProperty(d)||Qe(e,t,d,null,r,N)}for(u in r)if(d=r[u],N=l[u],r.hasOwnProperty(u)&&(d!=null||N!=null))switch(u){case"value":Y=d;break;case"defaultValue":E=d;break;case"multiple":v=d;default:d!==N&&Qe(e,t,u,d,r,N)}t=E,l=v,r=P,Y!=null?wr(e,!!l,Y,!1):!!r!=!!l&&(t!=null?wr(e,!!l,t,!0):wr(e,!!l,l?[]:"",!1));return;case"textarea":P=Y=null;for(E in l)if(u=l[E],l.hasOwnProperty(E)&&u!=null&&!r.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Qe(e,t,E,null,r,u)}for(v in r)if(u=r[v],d=l[v],r.hasOwnProperty(v)&&(u!=null||d!=null))switch(v){case"value":Y=u;break;case"defaultValue":P=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&Qe(e,t,v,u,r,d)}Bp(e,Y,P);return;case"option":for(var de in l)if(Y=l[de],l.hasOwnProperty(de)&&Y!=null&&!r.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Qe(e,t,de,null,r,Y)}for(N in r)if(Y=r[N],P=l[N],r.hasOwnProperty(N)&&Y!==P&&(Y!=null||P!=null))switch(N){case"selected":e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:Qe(e,t,N,Y,r,P)}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 be in l)Y=l[be],l.hasOwnProperty(be)&&Y!=null&&!r.hasOwnProperty(be)&&Qe(e,t,be,null,r,Y);for(q in r)if(Y=r[q],P=l[q],r.hasOwnProperty(q)&&Y!==P&&(Y!=null||P!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(o(137,t));break;default:Qe(e,t,q,Y,r,P)}return;default:if(Uu(t)){for(var Ze in l)Y=l[Ze],l.hasOwnProperty(Ze)&&Y!==void 0&&!r.hasOwnProperty(Ze)&&Cf(e,t,Ze,void 0,r,Y);for(X in r)Y=r[X],P=l[X],!r.hasOwnProperty(X)||Y===P||Y===void 0&&P===void 0||Cf(e,t,X,Y,r,P);return}}for(var L in l)Y=l[L],l.hasOwnProperty(L)&&Y!=null&&!r.hasOwnProperty(L)&&Qe(e,t,L,null,r,Y);for(J in r)Y=r[J],P=l[J],!r.hasOwnProperty(J)||Y===P||Y==null&&P==null||Qe(e,t,J,Y,r,P)}function Yv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function R_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var u=l[r],d=u.transferSize,v=u.initiatorType,E=u.duration;if(d&&E&&Yv(v)){for(v=0,E=u.responseEnd,r+=1;r<l.length;r++){var N=l[r],q=N.startTime;if(q>E)break;var X=N.transferSize,J=N.initiatorType;X&&Yv(J)&&(N=N.responseEnd,v+=X*(N<E?1:(E-q)/(N-q)))}if(--r,t+=8*(d+v)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var wf=null,_f=null;function Zo(e){return e.nodeType===9?e:e.ownerDocument}function Vv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Af(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Nf=null;function O_(){var e=window.event;return e&&e.type==="popstate"?e===Nf?!1:(Nf=e,!0):(Nf=null,!1)}var Pv=typeof setTimeout=="function"?setTimeout:void 0,k_=typeof clearTimeout=="function"?clearTimeout:void 0,Fv=typeof Promise=="function"?Promise:void 0,M_=typeof queueMicrotask=="function"?queueMicrotask:typeof Fv<"u"?function(e){return Fv.resolve(null).then(e).catch(z_)}:Pv;function z_(e){setTimeout(function(){throw e})}function Ol(e){return e==="head"}function Xv(e,t){var l=t,r=0;do{var u=l.nextSibling;if(e.removeChild(l),u&&u.nodeType===8)if(l=u.data,l==="/$"||l==="/&"){if(r===0){e.removeChild(u),li(t);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")ba(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ba(l);for(var d=l.firstChild;d;){var v=d.nextSibling,E=d.nodeName;d[Ui]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=v}}else l==="body"&&ba(e.ownerDocument.body);l=u}while(l);li(t)}function Kv(e,t){var l=e;e=0;do{var r=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=r}while(l)}function Rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Rf(l),zu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function D_(e,t,l,r){for(;e.nodeType===1;){var u=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ui])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function j_(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=vn(e.nextSibling),e===null))return null;return e}function Qv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=vn(e.nextSibling),e===null))return null;return e}function Of(e){return e.data==="$?"||e.data==="$~"}function kf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function L_(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var r=function(){t(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Mf=null;function Zv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return vn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Jv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Wv(e,t,l){switch(t=Zo(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ba(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zu(e)}var bn=new Map,$v=new Set;function Jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=W.d;W.d={f:U_,r:B_,D:I_,C:H_,L:q_,m:Y_,X:G_,S:V_,M:P_};function U_(){var e=nl.f(),t=Yo();return e||t}function B_(e){var t=xr(e);t!==null&&t.tag===5&&t.type==="form"?gy(t):nl.r(e)}var ei=typeof document>"u"?null:document;function eb(e,t,l){var r=ei;if(r&&typeof t=="string"&&t){var u=fn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),$v.has(u)||($v.add(u),e={rel:e,crossOrigin:l,href:t},r.querySelector(u)===null&&(t=r.createElement("link"),kt(t,"link",e),Ct(t),r.head.appendChild(t)))}}function I_(e){nl.D(e),eb("dns-prefetch",e,null)}function H_(e,t){nl.C(e,t),eb("preconnect",e,t)}function q_(e,t,l){nl.L(e,t,l);var r=ei;if(r&&e&&t){var u='link[rel="preload"][as="'+fn(t)+'"]';t==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+fn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+fn(l.imageSizes)+'"]')):u+='[href="'+fn(e)+'"]';var d=u;switch(t){case"style":d=ti(e);break;case"script":d=ni(e)}bn.has(d)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),bn.set(d,e),r.querySelector(u)!==null||t==="style"&&r.querySelector(Sa(d))||t==="script"&&r.querySelector(Ea(d))||(t=r.createElement("link"),kt(t,"link",e),Ct(t),r.head.appendChild(t)))}}function Y_(e,t){nl.m(e,t);var l=ei;if(l&&e){var r=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+fn(r)+'"][href="'+fn(e)+'"]',d=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ni(e)}if(!bn.has(d)&&(e=y({rel:"modulepreload",href:e},t),bn.set(d,e),l.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ea(d)))return}r=l.createElement("link"),kt(r,"link",e),Ct(r),l.head.appendChild(r)}}}function V_(e,t,l){nl.S(e,t,l);var r=ei;if(r&&e){var u=Tr(r).hoistableStyles,d=ti(e);t=t||"default";var v=u.get(d);if(!v){var E={loading:0,preload:null};if(v=r.querySelector(Sa(d)))E.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=bn.get(d))&&zf(e,l);var N=v=r.createElement("link");Ct(N),kt(N,"link",e),N._p=new Promise(function(q,X){N.onload=q,N.onerror=X}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Wo(v,t,r)}v={type:"stylesheet",instance:v,count:1,state:E},u.set(d,v)}}}function G_(e,t){nl.X(e,t);var l=ei;if(l&&e){var r=Tr(l).hoistableScripts,u=ni(e),d=r.get(u);d||(d=l.querySelector(Ea(u)),d||(e=y({src:e,async:!0},t),(t=bn.get(u))&&Df(e,t),d=l.createElement("script"),Ct(d),kt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(u,d))}}function P_(e,t){nl.M(e,t);var l=ei;if(l&&e){var r=Tr(l).hoistableScripts,u=ni(e),d=r.get(u);d||(d=l.querySelector(Ea(u)),d||(e=y({src:e,async:!0,type:"module"},t),(t=bn.get(u))&&Df(e,t),d=l.createElement("script"),Ct(d),kt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(u,d))}}function tb(e,t,l,r){var u=(u=pe.current)?Jo(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ti(l.href),l=Tr(u).hoistableStyles,r=l.get(t),r||(r={type:"style",instance:null,count:0,state:null},l.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ti(l.href);var d=Tr(u).hoistableStyles,v=d.get(e);if(v||(u=u.ownerDocument||u,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=u.querySelector(Sa(e)))&&!d._p&&(v.instance=d,v.state.loading=5),bn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},bn.set(e,l),d||F_(u,e,l,v.state))),t&&r===null)throw Error(o(528,""));return v}if(t&&r!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ni(l),l=Tr(u).hoistableScripts,r=l.get(t),r||(r={type:"script",instance:null,count:0,state:null},l.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ti(e){return'href="'+fn(e)+'"'}function Sa(e){return'link[rel="stylesheet"]['+e+"]"}function nb(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function F_(e,t,l,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),kt(t,"link",l),Ct(t),e.head.appendChild(t))}function ni(e){return'[src="'+fn(e)+'"]'}function Ea(e){return"script[async]"+e}function lb(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+fn(l.href)+'"]');if(r)return t.instance=r,Ct(r),r;var u=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Ct(r),kt(r,"style",u),Wo(r,l.precedence,e),t.instance=r;case"stylesheet":u=ti(l.href);var d=e.querySelector(Sa(u));if(d)return t.state.loading|=4,t.instance=d,Ct(d),d;r=nb(l),(u=bn.get(u))&&zf(r,u),d=(e.ownerDocument||e).createElement("link"),Ct(d);var v=d;return v._p=new Promise(function(E,N){v.onload=E,v.onerror=N}),kt(d,"link",r),t.state.loading|=4,Wo(d,l.precedence,e),t.instance=d;case"script":return d=ni(l.src),(u=e.querySelector(Ea(d)))?(t.instance=u,Ct(u),u):(r=l,(u=bn.get(d))&&(r=y({},l),Df(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),Ct(u),kt(u,"link",r),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Wo(r,l.precedence,e));return t.instance}function Wo(e,t,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,d=u,v=0;v<r.length;v++){var E=r[v];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Df(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $o=null;function rb(e,t,l){if($o===null){var r=new Map,u=$o=new Map;u.set(l,r)}else u=$o,r=u.get(l),r||(r=new Map,u.set(l,r));if(r.has(e))return r;for(r.set(e,null),l=l.getElementsByTagName(e),u=0;u<l.length;u++){var d=l[u];if(!(d[Ui]||d[At]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(t)||"";v=e+v;var E=r.get(v);E?E.push(d):r.set(v,[d])}}return r}function ib(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function X_(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ab(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function K_(e,t,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var u=ti(r.href),d=t.querySelector(Sa(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=es.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=d,Ct(d);return}d=t.ownerDocument||t,r=nb(r),(u=bn.get(u))&&zf(r,u),d=d.createElement("link"),Ct(d);var v=d;v._p=new Promise(function(E,N){v.onload=E,v.onerror=N}),kt(d,"link",r),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=es.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var jf=0;function Q_(e,t){return e.stylesheets&&e.count===0&&ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var r=setTimeout(function(){if(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&jf===0&&(jf=62500*R_());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>jf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function es(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ts=null;function ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ts=new Map,t.forEach(Z_,e),ts=null,es.call(e))}function Z_(e,t){if(!(t.state.loading&4)){var l=ts.get(e);if(l)var r=l.get(null);else{l=new Map,ts.set(e,l);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var v=u[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),r=v)}r&&l.set(null,r)}u=t.instance,v=u.getAttribute("data-precedence"),d=l.get(v)||r,d===r&&l.set(null,u),l.set(v,u),this.count++,r=es.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var xa={$$typeof:I,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function J_(e,t,l,r,u,d,v,E,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ru(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ru(0),this.hiddenUpdates=Ru(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function ob(e,t,l,r,u,d,v,E,N,q,X,J){return e=new J_(e,t,l,v,N,q,X,J,E),t=1,d===!0&&(t|=24),d=en(3,null,null,t),e.current=d,d.stateNode=e,t=hc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:r,isDehydrated:l,cache:t},yc(d),e}function sb(e){return e?(e=zr,e):zr}function ub(e,t,l,r,u,d){u=sb(u),r.context===null?r.context=u:r.pendingContext=u,r=bl(t),r.payload={element:l},d=d===void 0?null:d,d!==null&&(r.callback=d),l=Sl(e,r,t),l!==null&&(Xt(l,e,t),ea(l,e,t))}function cb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Lf(e,t){cb(e,t),(e=e.alternate)&&cb(e,t)}function fb(e){if(e.tag===13||e.tag===31){var t=Kl(e,67108864);t!==null&&Xt(t,e,67108864),Lf(e,67108864)}}function db(e){if(e.tag===13||e.tag===31){var t=an();t=Ou(t);var l=Kl(e,t);l!==null&&Xt(l,e,t),Lf(e,t)}}var ls=!0;function W_(e,t,l,r){var u=B.T;B.T=null;var d=W.p;try{W.p=2,Uf(e,t,l,r)}finally{W.p=d,B.T=u}}function $_(e,t,l,r){var u=B.T;B.T=null;var d=W.p;try{W.p=8,Uf(e,t,l,r)}finally{W.p=d,B.T=u}}function Uf(e,t,l,r){if(ls){var u=Bf(r);if(u===null)Tf(e,t,r,rs,l),mb(e,r);else if(tA(u,e,t,l,r))r.stopPropagation();else if(mb(e,r),t&4&&-1<eA.indexOf(e)){for(;u!==null;){var d=xr(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=Vl(d.pendingLanes);if(v!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;v;){var N=1<<31-We(v);E.entanglements[1]|=N,v&=~N}zn(d),(Ge&6)===0&&(Ho=ut()+500,ga(0))}}break;case 31:case 13:E=Kl(d,2),E!==null&&Xt(E,d,2),Yo(),Lf(d,2)}if(d=Bf(r),d===null&&Tf(e,t,r,rs,l),d===u)break;u=d}u!==null&&r.stopPropagation()}else Tf(e,t,r,null,l)}}function Bf(e){return e=Iu(e),If(e)}var rs=null;function If(e){if(rs=null,e=Er(e),e!==null){var t=c(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return rs=e,null}function hb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(It()){case F:return 2;case ie:return 8;case xe:case ze:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Hf=!1,kl=null,Ml=null,zl=null,Ta=new Map,Ca=new Map,Dl=[],eA="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 mb(e,t){switch(e){case"focusin":case"focusout":kl=null;break;case"dragenter":case"dragleave":Ml=null;break;case"mouseover":case"mouseout":zl=null;break;case"pointerover":case"pointerout":Ta.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(t.pointerId)}}function wa(e,t,l,r,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:l,eventSystemFlags:r,nativeEvent:d,targetContainers:[u]},t!==null&&(t=xr(t),t!==null&&fb(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function tA(e,t,l,r,u){switch(t){case"focusin":return kl=wa(kl,e,t,l,r,u),!0;case"dragenter":return Ml=wa(Ml,e,t,l,r,u),!0;case"mouseover":return zl=wa(zl,e,t,l,r,u),!0;case"pointerover":var d=u.pointerId;return Ta.set(d,wa(Ta.get(d)||null,e,t,l,r,u)),!0;case"gotpointercapture":return d=u.pointerId,Ca.set(d,wa(Ca.get(d)||null,e,t,l,r,u)),!0}return!1}function pb(e){var t=Er(e.target);if(t!==null){var l=c(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Rp(e.priority,function(){db(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Rp(e.priority,function(){db(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function is(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Bf(e.nativeEvent);if(l===null){l=e.nativeEvent;var r=new l.constructor(l.type,l);Bu=r,l.target.dispatchEvent(r),Bu=null}else return t=xr(l),t!==null&&fb(t),e.blockedOn=l,!1;t.shift()}return!0}function gb(e,t,l){is(e)&&l.delete(t)}function nA(){Hf=!1,kl!==null&&is(kl)&&(kl=null),Ml!==null&&is(Ml)&&(Ml=null),zl!==null&&is(zl)&&(zl=null),Ta.forEach(gb),Ca.forEach(gb)}function as(e,t){e.blockedOn===t&&(e.blockedOn=null,Hf||(Hf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,nA)))}var os=null;function yb(e){os!==e&&(os=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){os===e&&(os=null);for(var t=0;t<e.length;t+=3){var l=e[t],r=e[t+1],u=e[t+2];if(typeof r!="function"){if(If(r||l)===null)continue;break}var d=xr(l);d!==null&&(e.splice(t,3),t-=3,Uc(d,{pending:!0,data:u,method:l.method,action:r},r,u))}}))}function li(e){function t(N){return as(N,e)}kl!==null&&as(kl,e),Ml!==null&&as(Ml,e),zl!==null&&as(zl,e),Ta.forEach(t),Ca.forEach(t);for(var l=0;l<Dl.length;l++){var r=Dl[l];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Dl.length&&(l=Dl[0],l.blockedOn===null);)pb(l),l.blockedOn===null&&Dl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var u=l[r],d=l[r+1],v=u[qt]||null;if(typeof d=="function")v||yb(l);else if(v){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,v=d[qt]||null)E=v.formAction;else if(If(u)!==null)continue}else E=v.action;typeof E=="function"?l[r+1]=E:(l.splice(r,3),r-=3),yb(l)}}}function vb(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return u=v})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function qf(e){this._internalRoot=e}ss.prototype.render=qf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,r=an();ub(l,r,e,t,null,null)},ss.prototype.unmount=qf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ub(e.current,2,null,e,null,null),Yo(),t[Sr]=null}};function ss(e){this._internalRoot=e}ss.prototype.unstable_scheduleHydration=function(e){if(e){var t=Np();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Dl.length&&t!==0&&t<Dl[l].priority;l++);Dl.splice(l,0,e),l===0&&pb(e)}};var bb=i.version;if(bb!=="19.2.0")throw Error(o(527,bb,"19.2.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var lA={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!us.isDisabled&&us.supportsFiber)try{Dt=us.inject(lA),bt=us}catch{}}return ai.createRoot=function(e,t){if(!s(e))throw Error(o(299));var l=!1,r="",u=_y,d=Ay,v=Ny;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=ob(e,1,!1,null,null,l,r,null,u,d,v,vb),e[Sr]=t.current,xf(e),new qf(t)},ai.hydrateRoot=function(e,t,l){if(!s(e))throw Error(o(299));var r=!1,u="",d=_y,v=Ay,E=Ny,N=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(u=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),t=ob(e,1,!0,t,l??null,r,u,N,d,v,E,vb),t.context=sb(null),l=t.current,r=an(),r=Ou(r),u=bl(r),u.callback=null,Sl(l,u,r),l=r,t.current.lanes=l,Li(t,l),zn(t),e[Sr]=t.current,xf(e),new ss(t)},ai.version="19.2.0",ai}var $f;function Nb(){if($f)return ms.exports;$f=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch{}}return n(),ms.exports=Ab(),ms.exports}var Rb=Nb();Jf();function ed(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function vs(...n){return i=>{let a=!1;const o=n.map(s=>{const c=ed(s,i);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let s=0;s<o.length;s++){const c=o[s];typeof c=="function"?c():ed(n[s],null)}}}}function Dn(...n){return w.useCallback(vs(...n),n)}function Ob(n){const i=kb(n),a=w.forwardRef((o,s)=>{const{children:c,...f}=o,h=w.Children.toArray(c),p=h.find(zb);if(p){const m=p.props.children,g=h.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return x.jsx(i,{...f,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return x.jsx(i,{...f,ref:s,children:c})});return a.displayName=`${n}.Slot`,a}function kb(n){const i=w.forwardRef((a,o)=>{const{children:s,...c}=a;if(w.isValidElement(s)){const f=jb(s),h=Db(c,s.props);return s.type!==w.Fragment&&(h.ref=o?vs(o,f):f),w.cloneElement(s,h)}return w.Children.count(s)>1?w.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var Mb=Symbol("radix.slottable");function zb(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Mb}function Db(n,i){const a={...i};for(const o in i){const s=n[o],c=i[o];/^on[A-Z]/.test(o)?s&&c?a[o]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[o]=s):o==="style"?a[o]={...s,...c}:o==="className"&&(a[o]=[s,c].filter(Boolean).join(" "))}return{...n,...a}}function jb(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}var Lb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ll=Lb.reduce((n,i)=>{const a=Ob(`Primitive.${i}`),o=w.forwardRef((s,c)=>{const{asChild:f,...h}=s,p=f?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...h,ref:c})});return o.displayName=`Primitive.${i}`,{...n,[i]:o}},{}),rl=globalThis?.document?w.useLayoutEffect:()=>{};function Ub(n,i){return w.useReducer((a,o)=>i[a][o]??a,n)}var or=n=>{const{present:i,children:a}=n,o=Bb(i),s=typeof a=="function"?a({present:o.isPresent}):w.Children.only(a),c=Dn(o.ref,Ib(s));return typeof a=="function"||o.isPresent?w.cloneElement(s,{ref:c}):null};or.displayName="Presence";function Bb(n){const[i,a]=w.useState(),o=w.useRef(null),s=w.useRef(n),c=w.useRef("none"),f=n?"mounted":"unmounted",[h,p]=Ub(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=Aa(o.current);c.current=h==="mounted"?m:"none"},[h]),rl(()=>{const m=o.current,g=s.current;if(g!==n){const S=c.current,b=Aa(m);n?p("MOUNT"):b==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&S!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),rl(()=>{if(i){let m;const g=i.ownerDocument.defaultView??window,y=b=>{const M=Aa(o.current).includes(CSS.escape(b.animationName));if(b.target===i&&M&&(p("ANIMATION_END"),!s.current)){const U=i.style.animationFillMode;i.style.animationFillMode="forwards",m=g.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=U)})}},S=b=>{b.target===i&&(c.current=Aa(o.current))};return i.addEventListener("animationstart",S),i.addEventListener("animationcancel",y),i.addEventListener("animationend",y),()=>{g.clearTimeout(m),i.removeEventListener("animationstart",S),i.removeEventListener("animationcancel",y),i.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:w.useCallback(m=>{o.current=m?getComputedStyle(m):null,a(m)},[])}}function Aa(n){return n?.animationName||"none"}function Ib(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}function td(n,i=[]){let a=[];function o(c,f){const h=w.createContext(f),p=a.length;a=[...a,f];const m=y=>{const{scope:S,children:b,...k}=y,M=S?.[n]?.[p]||h,U=w.useMemo(()=>k,Object.values(k));return x.jsx(M.Provider,{value:U,children:b})};m.displayName=c+"Provider";function g(y,S){const b=S?.[n]?.[p]||h,k=w.useContext(b);if(k)return k;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[m,g]}const s=()=>{const c=a.map(f=>w.createContext(f));return function(h){const p=h?.[n]||c;return w.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[o,Hb(s,...i)]}function Hb(...n){const i=n[0];if(n.length===1)return i;const a=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((h,{useScope:p,scopeName:m})=>{const y=p(c)[`__scope${m}`];return{...h,...y}},{});return w.useMemo(()=>({[`__scope${i.scopeName}`]:f}),[f])}};return a.scopeName=i.scopeName,a}function il(n){const i=w.useRef(n);return w.useEffect(()=>{i.current=n}),w.useMemo(()=>(...a)=>i.current?.(...a),[])}var qb=w.createContext(void 0);function Yb(n){const i=w.useContext(qb);return n||i||"ltr"}function Vb(n,[i,a]){return Math.min(a,Math.max(i,n))}function jn(n,i,{checkForDefaultPrevented:a=!0}={}){return function(s){if(n?.(s),a===!1||!s.defaultPrevented)return i?.(s)}}function Gb(n,i){return w.useReducer((a,o)=>i[a][o]??a,n)}var bs="ScrollArea",[nd]=td(bs),[Pb,on]=nd(bs),ld=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,type:o="hover",dir:s,scrollHideDelay:c=600,...f}=n,[h,p]=w.useState(null),[m,g]=w.useState(null),[y,S]=w.useState(null),[b,k]=w.useState(null),[M,U]=w.useState(null),[R,D]=w.useState(0),[I,$]=w.useState(0),[V,A]=w.useState(!1),[j,z]=w.useState(!1),K=Dn(i,te=>p(te)),ae=Yb(s);return x.jsx(Pb,{scope:a,type:o,dir:ae,scrollHideDelay:c,scrollArea:h,viewport:m,onViewportChange:g,content:y,onContentChange:S,scrollbarX:b,onScrollbarXChange:k,scrollbarXEnabled:V,onScrollbarXEnabledChange:A,scrollbarY:M,onScrollbarYChange:U,scrollbarYEnabled:j,onScrollbarYEnabledChange:z,onCornerWidthChange:D,onCornerHeightChange:$,children:x.jsx(ll.div,{dir:ae,...f,ref:K,style:{position:"relative","--radix-scroll-area-corner-width":R+"px","--radix-scroll-area-corner-height":I+"px",...n.style}})})});ld.displayName=bs;var rd="ScrollAreaViewport",id=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,children:o,nonce:s,...c}=n,f=on(rd,a),h=w.useRef(null),p=Dn(i,h,f.onViewportChange);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),x.jsx(ll.div,{"data-radix-scroll-area-viewport":"",...c,ref:p,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...n.style},children:x.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});id.displayName=rd;var wn="ScrollAreaScrollbar",Ss=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=on(wn,n.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:f}=s,h=n.orientation==="horizontal";return w.useEffect(()=>(h?c(!0):f(!0),()=>{h?c(!1):f(!1)}),[h,c,f]),s.type==="hover"?x.jsx(Fb,{...o,ref:i,forceMount:a}):s.type==="scroll"?x.jsx(Xb,{...o,ref:i,forceMount:a}):s.type==="auto"?x.jsx(ad,{...o,ref:i,forceMount:a}):s.type==="always"?x.jsx(Es,{...o,ref:i}):null});Ss.displayName=wn;var Fb=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=on(wn,n.__scopeScrollArea),[c,f]=w.useState(!1);return w.useEffect(()=>{const h=s.scrollArea;let p=0;if(h){const m=()=>{window.clearTimeout(p),f(!0)},g=()=>{p=window.setTimeout(()=>f(!1),s.scrollHideDelay)};return h.addEventListener("pointerenter",m),h.addEventListener("pointerleave",g),()=>{window.clearTimeout(p),h.removeEventListener("pointerenter",m),h.removeEventListener("pointerleave",g)}}},[s.scrollArea,s.scrollHideDelay]),x.jsx(or,{present:a||c,children:x.jsx(ad,{"data-state":c?"visible":"hidden",...o,ref:i})})}),Xb=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=on(wn,n.__scopeScrollArea),c=n.orientation==="horizontal",f=ka(()=>p("SCROLL_END"),100),[h,p]=Gb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(h==="idle"){const m=window.setTimeout(()=>p("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(m)}},[h,s.scrollHideDelay,p]),w.useEffect(()=>{const m=s.viewport,g=c?"scrollLeft":"scrollTop";if(m){let y=m[g];const S=()=>{const b=m[g];y!==b&&(p("SCROLL"),f()),y=b};return m.addEventListener("scroll",S),()=>m.removeEventListener("scroll",S)}},[s.viewport,c,p,f]),x.jsx(or,{present:a||h!=="hidden",children:x.jsx(Es,{"data-state":h==="hidden"?"hidden":"visible",...o,ref:i,onPointerEnter:jn(n.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:jn(n.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),ad=w.forwardRef((n,i)=>{const a=on(wn,n.__scopeScrollArea),{forceMount:o,...s}=n,[c,f]=w.useState(!1),h=n.orientation==="horizontal",p=ka(()=>{if(a.viewport){const m=a.viewport.offsetWidth<a.viewport.scrollWidth,g=a.viewport.offsetHeight<a.viewport.scrollHeight;f(h?m:g)}},10);return sr(a.viewport,p),sr(a.content,p),x.jsx(or,{present:o||c,children:x.jsx(Es,{"data-state":c?"visible":"hidden",...s,ref:i})})}),Es=w.forwardRef((n,i)=>{const{orientation:a="vertical",...o}=n,s=on(wn,n.__scopeScrollArea),c=w.useRef(null),f=w.useRef(0),[h,p]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=fd(h.viewport,h.content),g={...o,sizes:h,onSizesChange:p,hasThumb:m>0&&m<1,onThumbChange:S=>c.current=S,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:S=>f.current=S};function y(S,b){return $b(S,f.current,h,b)}return a==="horizontal"?x.jsx(Kb,{...g,ref:i,onThumbPositionChange:()=>{if(s.viewport&&c.current){const S=s.viewport.scrollLeft,b=dd(S,h,s.dir);c.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:S=>{s.viewport&&(s.viewport.scrollLeft=S)},onDragScroll:S=>{s.viewport&&(s.viewport.scrollLeft=y(S,s.dir))}}):a==="vertical"?x.jsx(Qb,{...g,ref:i,onThumbPositionChange:()=>{if(s.viewport&&c.current){const S=s.viewport.scrollTop,b=dd(S,h);c.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:S=>{s.viewport&&(s.viewport.scrollTop=S)},onDragScroll:S=>{s.viewport&&(s.viewport.scrollTop=y(S))}}):null}),Kb=w.forwardRef((n,i)=>{const{sizes:a,onSizesChange:o,...s}=n,c=on(wn,n.__scopeScrollArea),[f,h]=w.useState(),p=w.useRef(null),m=Dn(i,p,c.onScrollbarXChange);return w.useEffect(()=>{p.current&&h(getComputedStyle(p.current))},[p]),x.jsx(sd,{"data-orientation":"horizontal",...s,ref:m,sizes:a,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oa(a)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.x),onDragScroll:g=>n.onDragScroll(g.x),onWheelScroll:(g,y)=>{if(c.viewport){const S=c.viewport.scrollLeft+g.deltaX;n.onWheelScroll(S),md(S,y)&&g.preventDefault()}},onResize:()=>{p.current&&c.viewport&&f&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Ra(f.paddingLeft),paddingEnd:Ra(f.paddingRight)}})}})}),Qb=w.forwardRef((n,i)=>{const{sizes:a,onSizesChange:o,...s}=n,c=on(wn,n.__scopeScrollArea),[f,h]=w.useState(),p=w.useRef(null),m=Dn(i,p,c.onScrollbarYChange);return w.useEffect(()=>{p.current&&h(getComputedStyle(p.current))},[p]),x.jsx(sd,{"data-orientation":"vertical",...s,ref:m,sizes:a,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oa(a)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.y),onDragScroll:g=>n.onDragScroll(g.y),onWheelScroll:(g,y)=>{if(c.viewport){const S=c.viewport.scrollTop+g.deltaY;n.onWheelScroll(S),md(S,y)&&g.preventDefault()}},onResize:()=>{p.current&&c.viewport&&f&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Ra(f.paddingTop),paddingEnd:Ra(f.paddingBottom)}})}})}),[Zb,od]=nd(wn),sd=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,sizes:o,hasThumb:s,onThumbChange:c,onThumbPointerUp:f,onThumbPointerDown:h,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:g,onResize:y,...S}=n,b=on(wn,a),[k,M]=w.useState(null),U=Dn(i,K=>M(K)),R=w.useRef(null),D=w.useRef(""),I=b.viewport,$=o.content-o.viewport,V=il(g),A=il(p),j=ka(y,10);function z(K){if(R.current){const ae=K.clientX-R.current.left,te=K.clientY-R.current.top;m({x:ae,y:te})}}return w.useEffect(()=>{const K=ae=>{const te=ae.target;k?.contains(te)&&V(ae,$)};return document.addEventListener("wheel",K,{passive:!1}),()=>document.removeEventListener("wheel",K,{passive:!1})},[I,k,$,V]),w.useEffect(A,[o,A]),sr(k,j),sr(b.content,j),x.jsx(Zb,{scope:a,scrollbar:k,hasThumb:s,onThumbChange:il(c),onThumbPointerUp:il(f),onThumbPositionChange:A,onThumbPointerDown:il(h),children:x.jsx(ll.div,{...S,ref:U,style:{position:"absolute",...S.style},onPointerDown:jn(n.onPointerDown,K=>{K.button===0&&(K.target.setPointerCapture(K.pointerId),R.current=k.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),z(K))}),onPointerMove:jn(n.onPointerMove,z),onPointerUp:jn(n.onPointerUp,K=>{const ae=K.target;ae.hasPointerCapture(K.pointerId)&&ae.releasePointerCapture(K.pointerId),document.body.style.webkitUserSelect=D.current,b.viewport&&(b.viewport.style.scrollBehavior=""),R.current=null})})})}),Na="ScrollAreaThumb",ud=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=od(Na,n.__scopeScrollArea);return x.jsx(or,{present:a||s.hasThumb,children:x.jsx(Jb,{ref:i,...o})})}),Jb=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,style:o,...s}=n,c=on(Na,a),f=od(Na,a),{onThumbPositionChange:h}=f,p=Dn(i,y=>f.onThumbChange(y)),m=w.useRef(void 0),g=ka(()=>{m.current&&(m.current(),m.current=void 0)},100);return w.useEffect(()=>{const y=c.viewport;if(y){const S=()=>{if(g(),!m.current){const b=e0(y,h);m.current=b,h()}};return h(),y.addEventListener("scroll",S),()=>y.removeEventListener("scroll",S)}},[c.viewport,g,h]),x.jsx(ll.div,{"data-state":f.hasThumb?"visible":"hidden",...s,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:jn(n.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),k=y.clientX-b.left,M=y.clientY-b.top;f.onThumbPointerDown({x:k,y:M})}),onPointerUp:jn(n.onPointerUp,f.onThumbPointerUp)})});ud.displayName=Na;var xs="ScrollAreaCorner",cd=w.forwardRef((n,i)=>{const a=on(xs,n.__scopeScrollArea),o=!!(a.scrollbarX&&a.scrollbarY);return a.type!=="scroll"&&o?x.jsx(Wb,{...n,ref:i}):null});cd.displayName=xs;var Wb=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,...o}=n,s=on(xs,a),[c,f]=w.useState(0),[h,p]=w.useState(0),m=!!(c&&h);return sr(s.scrollbarX,()=>{const g=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(g),p(g)}),sr(s.scrollbarY,()=>{const g=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(g),f(g)}),m?x.jsx(ll.div,{...o,ref:i,style:{width:c,height:h,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Ra(n){return n?parseInt(n,10):0}function fd(n,i){const a=n/i;return isNaN(a)?0:a}function Oa(n){const i=fd(n.viewport,n.content),a=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-a)*i;return Math.max(o,18)}function $b(n,i,a,o="ltr"){const s=Oa(a),c=s/2,f=i||c,h=s-f,p=a.scrollbar.paddingStart+f,m=a.scrollbar.size-a.scrollbar.paddingEnd-h,g=a.content-a.viewport,y=o==="ltr"?[0,g]:[g*-1,0];return hd([p,m],y)(n)}function dd(n,i,a="ltr"){const o=Oa(i),s=i.scrollbar.paddingStart+i.scrollbar.paddingEnd,c=i.scrollbar.size-s,f=i.content-i.viewport,h=c-o,p=a==="ltr"?[0,f]:[f*-1,0],m=Vb(n,p);return hd([0,f],[0,h])(m)}function hd(n,i){return a=>{if(n[0]===n[1]||i[0]===i[1])return i[0];const o=(i[1]-i[0])/(n[1]-n[0]);return i[0]+o*(a-n[0])}}function md(n,i){return n>0&&n<i}var e0=(n,i=()=>{})=>{let a={left:n.scrollLeft,top:n.scrollTop},o=0;return(function s(){const c={left:n.scrollLeft,top:n.scrollTop},f=a.left!==c.left,h=a.top!==c.top;(f||h)&&i(),a=c,o=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(o)};function ka(n,i){const a=il(n),o=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(o.current),[]),w.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(a,i)},[a,i])}function sr(n,i){const a=il(i);rl(()=>{let o=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(a)});return s.observe(n),()=>{window.cancelAnimationFrame(o),s.unobserve(n)}}},[n,a])}var pd=ld,t0=id,n0=cd;function gd(n){var i,a,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(i=0;i<s;i++)n[i]&&(a=gd(n[i]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}function yd(){for(var n,i,a=0,o="",s=arguments.length;a<s;a++)(n=arguments[a])&&(i=gd(n))&&(o&&(o+=" "),o+=i);return o}const l0=(n,i)=>{const a=new Array(n.length+i.length);for(let o=0;o<n.length;o++)a[o]=n[o];for(let o=0;o<i.length;o++)a[n.length+o]=i[o];return a},r0=(n,i)=>({classGroupId:n,validator:i}),vd=(n=new Map,i=null,a)=>({nextPart:n,validators:i,classGroupId:a}),Ma="-",bd=[],i0="arbitrary..",a0=n=>{const i=s0(n),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return o0(f);const h=f.split(Ma),p=h[0]===""&&h.length>1?1:0;return Sd(h,p,i)},getConflictingClassGroupIds:(f,h)=>{if(h){const p=o[f],m=a[f];return p?m?l0(m,p):p:m||bd}return a[f]||bd}}},Sd=(n,i,a)=>{if(n.length-i===0)return a.classGroupId;const s=n[i],c=a.nextPart.get(s);if(c){const m=Sd(n,i+1,c);if(m)return m}const f=a.validators;if(f===null)return;const h=i===0?n.join(Ma):n.slice(i).join(Ma),p=f.length;for(let m=0;m<p;m++){const g=f[m];if(g.validator(h))return g.classGroupId}},o0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),a=i.indexOf(":"),o=i.slice(0,a);return o?i0+o:void 0})(),s0=n=>{const{theme:i,classGroups:a}=n;return u0(a,i)},u0=(n,i)=>{const a=vd();for(const o in n){const s=n[o];Ts(s,a,o,i)}return a},Ts=(n,i,a,o)=>{const s=n.length;for(let c=0;c<s;c++){const f=n[c];c0(f,i,a,o)}},c0=(n,i,a,o)=>{if(typeof n=="string"){f0(n,i,a);return}if(typeof n=="function"){d0(n,i,a,o);return}h0(n,i,a,o)},f0=(n,i,a)=>{const o=n===""?i:Ed(i,n);o.classGroupId=a},d0=(n,i,a,o)=>{if(m0(n)){Ts(n(o),i,a,o);return}i.validators===null&&(i.validators=[]),i.validators.push(r0(a,n))},h0=(n,i,a,o)=>{const s=Object.entries(n),c=s.length;for(let f=0;f<c;f++){const[h,p]=s[f];Ts(p,Ed(i,h),a,o)}},Ed=(n,i)=>{let a=n;const o=i.split(Ma),s=o.length;for(let c=0;c<s;c++){const f=o[c];let h=a.nextPart.get(f);h||(h=vd(),a.nextPart.set(f,h)),a=h}return a},m0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,p0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,a=Object.create(null),o=Object.create(null);const s=(c,f)=>{a[c]=f,i++,i>n&&(i=0,o=a,a=Object.create(null))};return{get(c){let f=a[c];if(f!==void 0)return f;if((f=o[c])!==void 0)return s(c,f),f},set(c,f){c in a?a[c]=f:s(c,f)}}},Cs="!",xd=":",g0=[],Td=(n,i,a,o,s)=>({modifiers:n,hasImportantModifier:i,baseClassName:a,maybePostfixModifierPosition:o,isExternal:s}),y0=n=>{const{prefix:i,experimentalParseClassName:a}=n;let o=s=>{const c=[];let f=0,h=0,p=0,m;const g=s.length;for(let M=0;M<g;M++){const U=s[M];if(f===0&&h===0){if(U===xd){c.push(s.slice(p,M)),p=M+1;continue}if(U==="/"){m=M;continue}}U==="["?f++:U==="]"?f--:U==="("?h++:U===")"&&h--}const y=c.length===0?s:s.slice(p);let S=y,b=!1;y.endsWith(Cs)?(S=y.slice(0,-1),b=!0):y.startsWith(Cs)&&(S=y.slice(1),b=!0);const k=m&&m>p?m-p:void 0;return Td(c,b,S,k)};if(i){const s=i+xd,c=o;o=f=>f.startsWith(s)?c(f.slice(s.length)):Td(g0,!1,f,void 0,!0)}if(a){const s=o;o=c=>a({className:c,parseClassName:s})}return o},v0=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((a,o)=>{i.set(a,1e6+o)}),a=>{const o=[];let s=[];for(let c=0;c<a.length;c++){const f=a[c],h=f[0]==="[",p=i.has(f);h||p?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(f)):s.push(f)}return s.length>0&&(s.sort(),o.push(...s)),o}},b0=n=>({cache:p0(n.cacheSize),parseClassName:y0(n),sortModifiers:v0(n),...a0(n)}),S0=/\s+/,E0=(n,i)=>{const{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:c}=i,f=[],h=n.trim().split(S0);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:y,modifiers:S,hasImportantModifier:b,baseClassName:k,maybePostfixModifierPosition:M}=a(g);if(y){p=g+(p.length>0?" "+p:p);continue}let U=!!M,R=o(U?k.substring(0,M):k);if(!R){if(!U){p=g+(p.length>0?" "+p:p);continue}if(R=o(k),!R){p=g+(p.length>0?" "+p:p);continue}U=!1}const D=S.length===0?"":S.length===1?S[0]:c(S).join(":"),I=b?D+Cs:D,$=I+R;if(f.indexOf($)>-1)continue;f.push($);const V=s(R,U);for(let A=0;A<V.length;++A){const j=V[A];f.push(I+j)}p=g+(p.length>0?" "+p:p)}return p},x0=(...n)=>{let i=0,a,o,s="";for(;i<n.length;)(a=n[i++])&&(o=Cd(a))&&(s&&(s+=" "),s+=o);return s},Cd=n=>{if(typeof n=="string")return n;let i,a="";for(let o=0;o<n.length;o++)n[o]&&(i=Cd(n[o]))&&(a&&(a+=" "),a+=i);return a},T0=(n,...i)=>{let a,o,s,c;const f=p=>{const m=i.reduce((g,y)=>y(g),n());return a=b0(m),o=a.cache.get,s=a.cache.set,c=h,h(p)},h=p=>{const m=o(p);if(m)return m;const g=E0(p,a);return s(p,g),g};return c=f,(...p)=>c(x0(...p))},C0=[],yt=n=>{const i=a=>a[n]||C0;return i.isThemeGetter=!0,i},wd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_d=/^\((?:(\w[\w-]*):)?(.+)\)$/i,w0=/^\d+\/\d+$/,_0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,R0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=n=>w0.test(n),Oe=n=>!!n&&!Number.isNaN(Number(n)),al=n=>!!n&&Number.isInteger(Number(n)),ws=n=>n.endsWith("%")&&Oe(n.slice(0,-1)),Ln=n=>_0.test(n),k0=()=>!0,M0=n=>A0.test(n)&&!N0.test(n),Ad=()=>!1,z0=n=>R0.test(n),D0=n=>O0.test(n),j0=n=>!he(n)&&!me(n),L0=n=>cr(n,Md,Ad),he=n=>wd.test(n),Ll=n=>cr(n,zd,M0),_s=n=>cr(n,q0,Oe),Nd=n=>cr(n,Od,Ad),U0=n=>cr(n,kd,D0),za=n=>cr(n,Dd,z0),me=n=>_d.test(n),oi=n=>fr(n,zd),B0=n=>fr(n,Y0),Rd=n=>fr(n,Od),I0=n=>fr(n,Md),H0=n=>fr(n,kd),Da=n=>fr(n,Dd,!0),cr=(n,i,a)=>{const o=wd.exec(n);return o?o[1]?i(o[1]):a(o[2]):!1},fr=(n,i,a=!1)=>{const o=_d.exec(n);return o?o[1]?i(o[1]):a:!1},Od=n=>n==="position"||n==="percentage",kd=n=>n==="image"||n==="url",Md=n=>n==="length"||n==="size"||n==="bg-size",zd=n=>n==="length",q0=n=>n==="number",Y0=n=>n==="family-name",Dd=n=>n==="shadow",V0=T0(()=>{const n=yt("color"),i=yt("font"),a=yt("text"),o=yt("font-weight"),s=yt("tracking"),c=yt("leading"),f=yt("breakpoint"),h=yt("container"),p=yt("spacing"),m=yt("radius"),g=yt("shadow"),y=yt("inset-shadow"),S=yt("text-shadow"),b=yt("drop-shadow"),k=yt("blur"),M=yt("perspective"),U=yt("aspect"),R=yt("ease"),D=yt("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...$(),me,he],A=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],z=()=>[me,he,p],K=()=>[ur,"full","auto",...z()],ae=()=>[al,"none","subgrid",me,he],te=()=>["auto",{span:["full",al,me,he]},al,me,he],oe=()=>[al,"auto",me,he],_e=()=>["auto","min","max","fr",me,he],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...z()],W=()=>[ur,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],Z=()=>[n,me,he],le=()=>[...$(),Rd,Nd,{position:[me,he]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",I0,L0,{size:[me,he]}],G=()=>[ws,oi,Ll],T=()=>["","none","full",m,me,he],ne=()=>["",Oe,oi,Ll],fe=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Oe,ws,Rd,Nd],Ie=()=>["","none",k,me,he],Me=()=>["none",Oe,me,he],at=()=>["none",Oe,me,he],vt=()=>[Oe,me,he],Jt=()=>[ur,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[k0],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[j0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",Oe],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ur,he,me,U]}],container:["container"],columns:[{columns:[Oe,he,me,h]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[al,"auto",me,he]}],basis:[{basis:[ur,"full","auto",h,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,ur,"auto","initial","none",he]}],grow:[{grow:["",Oe,me,he]}],shrink:[{shrink:["",Oe,me,he]}],order:[{order:[al,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_e()}],"auto-rows":[{"auto-rows":_e()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[h,"screen",...W()]}],"min-w":[{"min-w":[h,"screen","none",...W()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",a,oi,Ll]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,me,_s]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ws,he]}],"font-family":[{font:[B0,he,i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,me,he]}],"line-clamp":[{"line-clamp":[Oe,"none",me,_s]}],leading:[{leading:[c,...z()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",me,Ll]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Oe,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},al,me,he],radial:["",me,he],conic:[al,me,he]},H0,U0]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,me,he]}],"outline-w":[{outline:["",Oe,oi,Ll]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",g,Da,za]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",y,Da,za]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Oe,Ll]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",S,Da,za]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Oe,me,he]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[me,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:Ie()}],brightness:[{brightness:[Oe,me,he]}],contrast:[{contrast:[Oe,me,he]}],"drop-shadow":[{"drop-shadow":["","none",b,Da,za]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Oe,me,he]}],"hue-rotate":[{"hue-rotate":[Oe,me,he]}],invert:[{invert:["",Oe,me,he]}],saturate:[{saturate:[Oe,me,he]}],sepia:[{sepia:["",Oe,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Oe,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",me,he]}],ease:[{ease:["linear","initial",R,me,he]}],delay:[{delay:[Oe,me,he]}],animate:[{animate:["none",D,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,me,he]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:at()}],"scale-x":[{"scale-x":at()}],"scale-y":[{"scale-y":at()}],"scale-z":[{"scale-z":at()}],"scale-3d":["scale-3d"],skew:[{skew:vt()}],"skew-x":[{"skew-x":vt()}],"skew-y":[{"skew-y":vt()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Jt()}],"translate-x":[{"translate-x":Jt()}],"translate-y":[{"translate-y":Jt()}],"translate-z":[{"translate-z":Jt()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,he]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Oe,oi,Ll,_s]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ce(...n){return V0(yd(n))}function dr(n){if(!n&&n!==0)return"";const i=n instanceof Date?n:new Date(typeof n=="number"?n:Number(n)||n);return Number.isNaN(i.getTime())?"":i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const G0=n=>new Promise(i=>setTimeout(i,n)),jd=w.forwardRef(({className:n,children:i,...a},o)=>x.jsxs(pd,{ref:o,className:Ce("relative overflow-hidden",n),...a,children:[x.jsx(t0,{className:"h-full w-full rounded-[inherit]",children:i}),x.jsx(Ld,{}),x.jsx(n0,{})]}));jd.displayName=pd.displayName;const Ld=w.forwardRef(({className:n,orientation:i="vertical",...a},o)=>x.jsx(Ss,{ref:o,orientation:i,className:Ce("flex touch-none select-none transition-colors",i==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",i==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...a,children:x.jsx(ud,{className:"relative flex-1 rounded-full bg-border"})}));Ld.displayName=Ss.displayName;var P0=Symbol.for("react.lazy"),ja=Ff[" use ".trim().toString()];function F0(n){return typeof n=="object"&&n!==null&&"then"in n}function Ud(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===P0&&"_payload"in n&&F0(n._payload)}function Bd(n){const i=K0(n),a=w.forwardRef((o,s)=>{let{children:c,...f}=o;Ud(c)&&typeof ja=="function"&&(c=ja(c._payload));const h=w.Children.toArray(c),p=h.find(Z0);if(p){const m=p.props.children,g=h.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return x.jsx(i,{...f,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return x.jsx(i,{...f,ref:s,children:c})});return a.displayName=`${n}.Slot`,a}var X0=Bd("Slot");function K0(n){const i=w.forwardRef((a,o)=>{let{children:s,...c}=a;if(Ud(s)&&typeof ja=="function"&&(s=ja(s._payload)),w.isValidElement(s)){const f=W0(s),h=J0(c,s.props);return s.type!==w.Fragment&&(h.ref=o?vs(o,f):f),w.cloneElement(s,h)}return w.Children.count(s)>1?w.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var Q0=Symbol("radix.slottable");function Z0(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Q0}function J0(n,i){const a={...i};for(const o in i){const s=n[o],c=i[o];/^on[A-Z]/.test(o)?s&&c?a[o]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[o]=s):o==="style"?a[o]={...s,...c}:o==="className"&&(a[o]=[s,c].filter(Boolean).join(" "))}return{...n,...a}}function W0(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}const Id=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Hd=yd,$0=((n,i)=>a=>{var o;if(i?.variants==null)return Hd(n,a?.class,a?.className);const{variants:s,defaultVariants:c}=i,f=Object.keys(s).map(m=>{const g=a?.[m],y=c?.[m];if(g===null)return null;const S=Id(g)||Id(y);return s[m][S]}),h=a&&Object.entries(a).reduce((m,g)=>{let[y,S]=g;return S===void 0||(m[y]=S),m},{}),p=i==null||(o=i.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:y,className:S,...b}=g;return Object.entries(b).every(k=>{let[M,U]=k;return Array.isArray(U)?U.includes({...c,...h}[M]):{...c,...h}[M]===U})?[...m,y,S]:m},[]);return Hd(n,f,p,a?.class,a?.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Et=w.forwardRef(({className:n,variant:i,size:a,asChild:o=!1,...s},c)=>{const f=o?X0:"button";return x.jsx(f,{className:Ce($0({variant:i,size:a,className:n})),ref:c,...s})});Et.displayName="Button";const eS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,a,o)=>o?o.toUpperCase():a.toLowerCase()),qd=n=>{const i=tS(n);return i.charAt(0).toUpperCase()+i.slice(1)},Yd=(...n)=>n.filter((i,a,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===a).join(" ").trim(),nS=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};var lS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const rS=w.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:s="",children:c,iconNode:f,...h},p)=>w.createElement("svg",{ref:p,...lS,width:i,height:i,stroke:n,strokeWidth:o?Number(a)*24/Number(i):a,className:Yd("lucide",s),...!c&&!nS(h)&&{"aria-hidden":"true"},...h},[...f.map(([m,g])=>w.createElement(m,g)),...Array.isArray(c)?c:[c]]));const xt=(n,i)=>{const a=w.forwardRef(({className:o,...s},c)=>w.createElement(rS,{ref:c,iconNode:i,className:Yd(`lucide-${eS(qd(n))}`,`lucide-${n}`,o),...s}));return a.displayName=qd(n),a};const iS=xt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Vd=xt("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const Gd=xt("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);const aS=xt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Pd=xt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const As=xt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const oS=xt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const sS=xt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const uS=xt("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const cS=xt("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const fS=xt("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);const Fd=xt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const dS=xt("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);const hS=xt("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);const mS=xt("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);const pS=xt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const gS=xt("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Ns=xt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),si=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Ce("rounded-xl border bg-card text-card-foreground shadow",n),...i}));si.displayName="Card";const Xd=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Ce("flex flex-col space-y-1.5 p-6",n),...i}));Xd.displayName="CardHeader";const yS=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Ce("font-semibold leading-none tracking-tight",n),...i}));yS.displayName="CardTitle";const vS=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Ce("text-sm text-muted-foreground",n),...i}));vS.displayName="CardDescription";const Kd=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Ce("p-6 pt-0",n),...i}));Kd.displayName="CardContent";const bS=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Ce("flex items-center p-6 pt-0",n),...i}));bS.displayName="CardFooter";function SS(n,i=[]){let a=[];function o(c,f){const h=w.createContext(f);h.displayName=c+"Context";const p=a.length;a=[...a,f];const m=y=>{const{scope:S,children:b,...k}=y,M=S?.[n]?.[p]||h,U=w.useMemo(()=>k,Object.values(k));return x.jsx(M.Provider,{value:U,children:b})};m.displayName=c+"Provider";function g(y,S){const b=S?.[n]?.[p]||h,k=w.useContext(b);if(k)return k;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[m,g]}const s=()=>{const c=a.map(f=>w.createContext(f));return function(h){const p=h?.[n]||c;return w.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[o,ES(s,...i)]}function ES(...n){const i=n[0];if(n.length===1)return i;const a=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((h,{useScope:p,scopeName:m})=>{const y=p(c)[`__scope${m}`];return{...h,...y}},{});return w.useMemo(()=>({[`__scope${i.scopeName}`]:f}),[f])}};return a.scopeName=i.scopeName,a}var xS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rs=xS.reduce((n,i)=>{const a=Bd(`Primitive.${i}`),o=w.forwardRef((s,c)=>{const{asChild:f,...h}=s,p=f?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...h,ref:c})});return o.displayName=`Primitive.${i}`,{...n,[i]:o}},{}),Os={exports:{}},ks={};var Qd;function TS(){if(Qd)return ks;Qd=1;var n=_a();function i(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var a=typeof Object.is=="function"?Object.is:i,o=n.useState,s=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function h(y,S){var b=S(),k=o({inst:{value:b,getSnapshot:S}}),M=k[0].inst,U=k[1];return c(function(){M.value=b,M.getSnapshot=S,p(M)&&U({inst:M})},[y,b,S]),s(function(){return p(M)&&U({inst:M}),y(function(){p(M)&&U({inst:M})})},[y]),f(b),b}function p(y){var S=y.getSnapshot;y=y.value;try{var b=S();return!a(y,b)}catch{return!0}}function m(y,S){return S()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return ks.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,ks}var Zd;function CS(){return Zd||(Zd=1,Os.exports=TS()),Os.exports}var wS=CS();function _S(){return wS.useSyncExternalStore(AS,()=>!0,()=>!1)}function AS(){return()=>{}}var Ms="Avatar",[NS]=SS(Ms),[RS,Jd]=NS(Ms),Wd=w.forwardRef((n,i)=>{const{__scopeAvatar:a,...o}=n,[s,c]=w.useState("idle");return x.jsx(RS,{scope:a,imageLoadingStatus:s,onImageLoadingStatusChange:c,children:x.jsx(Rs.span,{...o,ref:i})})});Wd.displayName=Ms;var $d="AvatarImage",eh=w.forwardRef((n,i)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:s=()=>{},...c}=n,f=Jd($d,a),h=OS(o,c),p=il(m=>{s(m),f.onImageLoadingStatusChange(m)});return rl(()=>{h!=="idle"&&p(h)},[h,p]),h==="loaded"?x.jsx(Rs.img,{...c,ref:i,src:o}):null});eh.displayName=$d;var th="AvatarFallback",nh=w.forwardRef((n,i)=>{const{__scopeAvatar:a,delayMs:o,...s}=n,c=Jd(th,a),[f,h]=w.useState(o===void 0);return w.useEffect(()=>{if(o!==void 0){const p=window.setTimeout(()=>h(!0),o);return()=>window.clearTimeout(p)}},[o]),f&&c.imageLoadingStatus!=="loaded"?x.jsx(Rs.span,{...s,ref:i}):null});nh.displayName=th;function lh(n,i){return n?i?(n.src!==i&&(n.src=i),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function OS(n,{referrerPolicy:i,crossOrigin:a}){const o=_S(),s=w.useRef(null),c=o?(s.current||(s.current=new window.Image),s.current):null,[f,h]=w.useState(()=>lh(c,n));return rl(()=>{h(lh(c,n))},[c,n]),rl(()=>{const p=y=>()=>{h(y)};if(!c)return;const m=p("loaded"),g=p("error");return c.addEventListener("load",m),c.addEventListener("error",g),i&&(c.referrerPolicy=i),typeof a=="string"&&(c.crossOrigin=a),()=>{c.removeEventListener("load",m),c.removeEventListener("error",g)}},[c,a,i]),f}var rh=Wd,ih=eh,ah=nh;const ui=w.forwardRef(({className:n,...i},a)=>x.jsx(rh,{ref:a,className:Ce("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...i}));ui.displayName=rh.displayName;const oh=w.forwardRef(({className:n,...i},a)=>x.jsx(ih,{ref:a,className:Ce("aspect-square h-full w-full",n),...i}));oh.displayName=ih.displayName;const ci=w.forwardRef(({className:n,...i},a)=>x.jsx(ah,{ref:a,className:Ce("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...i}));ci.displayName=ah.displayName;var Ul={},fi={},zs={},di={},hi={},mi={},sh;function kS(){if(sh)return mi;sh=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.EventEmitter=void 0;let n=class{eventListeners=new Map;on(a,o){const s=this.eventListeners.get(a)||new Set;s.add(o),this.eventListeners.set(a,s)}off(a,o){const s=this.eventListeners.get(a);s&&(s.delete(o),s.size===0&&this.eventListeners.delete(a))}emit(a,...o){const s=this.eventListeners.get(a);s&&s.forEach(c=>c(...o))}};return mi.EventEmitter=n,mi}var Bl={},uh;function Ds(){return uh||(uh=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.DisconnectionReason=Bl.ConnectionStatus=void 0,Bl.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},Bl.DisconnectionReason={CLIENT_CLOSED:"client_closed",SERVER_CLOSED:"server_closed",CONNECTION_ERROR:"connection_error",AUTHENTICATION_ERROR:"authentication_error",MAX_RECONNECT_ATTEMPTS:"max_reconnect_attempts",TIMEOUT:"timeout",NETWORK_ERROR:"network_error"}),Bl}var ch;function fh(){if(ch)return hi;ch=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.BaseConnection=void 0;const n=kS(),i=Ds();let a=class{status=i.ConnectionStatus.CONNECTING;queue=[];eventEmitter=new n.EventEmitter;disconnectionDetails=null;onErrorCallback=null;onDisconnectCallback=null;onMessageCallback=null;onOpenCallback=null;onStatusChangeCallback=null;getStatus(){return this.status}onOpen(s){this.onOpenCallback=s}onMessage(s){if(this.onMessageCallback=s,this.queue.length>0){const c=[...this.queue];this.queue.length=0,queueMicrotask(()=>{c.forEach(f=>{this.onMessageCallback?.(f)})})}}onDisconnect(s){this.onDisconnectCallback=s;const c=this.disconnectionDetails;c&&queueMicrotask(()=>{this.onDisconnectCallback?.(c)})}onError(s){this.onErrorCallback=s}on(s,c){this.eventEmitter.on(s,c)}off(s,c){this.eventEmitter.off(s,c)}emit(s,...c){this.eventEmitter.emit(s,...c)}onStatusChange(s){this.onStatusChangeCallback=s,queueMicrotask(()=>{s(this.status)})}disconnect(s){this.disconnectionDetails||(this.disconnectionDetails=s,this.updateStatus(i.ConnectionStatus.NOT_CONNECTED),this.onDisconnectCallback?.(s))}handleMessage(s){this.onMessageCallback?this.onMessageCallback(s):this.queue.push(s)}updateStatus(s){this.status!==s&&(this.status=s,this.onStatusChangeCallback?.(s))}};return hi.BaseConnection=a,hi}var js={},dh;function _n(){return dh||(dh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValidationError=n.ConfigurationError=n.StoreError=n.MessageError=n.SessionError=n.FileError=n.RecordingError=n.ConnectionError=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.SynapseErrorCode=void 0,n.normalizeError=$,n.SynapseErrorCode={API:"API_ERROR",CONNECTION:"CONNECTION_ERROR",RECORDING:"RECORDING_ERROR",FILE:"FILE_ERROR",SESSION:"SESSION_ERROR",MESSAGE:"MESSAGE_ERROR",STORE:"STORE_ERROR",CONFIGURATION:"CONFIGURATION_ERROR",VALIDATION:"VALIDATION_ERROR",AUTH:"AUTH_ERROR",UNKNOWN:"UNKNOWN_ERROR"};class i extends Error{code;timestamp;cause;context;hint;displayMessage;constructor(A,j=n.SynapseErrorCode.UNKNOWN,z={}){super(A),this.name="SynapseError",this.code=j,this.timestamp=new Date,this.cause=z.cause,this.context=z.context,this.hint=z.hint,this.displayMessage=z.displayMessage||z?.hint||A,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=i;class a extends i{status;error;headers;constructor(A,j,z,K){const ae=a.makeMessage(j,z,A);super(ae,n.SynapseErrorCode.API,{cause:z,context:{status:j,hasBody:!!z},hint:j&&j>=500?"Retry the request or contact support if the issue persists.":void 0,displayMessage:A||"Something went wrong"}),this.name="APIError",this.status=j,this.error=z,this.headers=K}static makeMessage(A,j,z){const K=j instanceof Error?j.message:z;return A&&K?`HTTP ${A}: ${K}`:A?`${A} status code (no body)`:K||"(no status code or body)"}static generate(A,j,z,K){if(!A)return new o({message:z});const ae=j?.error,te=ae&&typeof ae=="object"&&!Array.isArray(ae)?ae:void 0;switch(A){case 400:return new c(z||"Bad Request",A,te,K);case 401:return new f(z||"Unauthorized",A,te,K);case 403:return new h(z||"Permission Denied",A,te,K);case 404:return new p(z||"Not Found",A,te,K);case 405:return new m(z||"Method Not Allowed",A,te,K);case 429:return new g(z||"Rate Limit Exceeded",A,te,K);case 500:return new y(z||"Internal Server Error",A,te,K);default:return new a(z||"API Error",A,te,K)}}}n.APIError=a;class o extends a{constructor({message:A}={}){super(A||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class s extends a{constructor({message:A}={}){super(A||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=s;class c extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="BadRequestError"}}n.BadRequestError=c;class f extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="UnauthorizedError"}}n.UnauthorizedError=f;class h extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="PermissionDeniedError"}}n.PermissionDeniedError=h;class p extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="NotFoundError"}}n.NotFoundError=p;class m extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=m;class g extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="RateLimitError"}}n.RateLimitError=g;class y extends a{constructor(A,j,z,K){super(A,j,z,K),this.name="InternalServerError"}}n.InternalServerError=y;class S extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.CONNECTION,j),this.name="ConnectionError"}}n.ConnectionError=S;class b extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.RECORDING,j),this.name="RecordingError"}}n.RecordingError=b;class k extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.FILE,j),this.name="FileError"}}n.FileError=k;class M extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.SESSION,j),this.name="SessionError"}}n.SessionError=M;class U extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.MESSAGE,j),this.name="MessageError"}}n.MessageError=U;class R extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.STORE,j),this.name="StoreError"}}n.StoreError=R;class D extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.CONFIGURATION,j),this.name="ConfigurationError"}}n.ConfigurationError=D;class I extends i{constructor(A,j={}){super(A,n.SynapseErrorCode.VALIDATION,j),this.name="ValidationError"}}n.ValidationError=I;function $(V,A,j,z={}){if(V instanceof A)return V;const K={...z,context:{...V instanceof i?V.context:void 0,...z.context},hint:z.hint??(V instanceof i?V.hint:void 0),cause:z.cause??V};if(V instanceof i)return new A(V.message,K);const ae=V instanceof Error&&V.message?V.message:j;return new A(ae,K)}})(js)),js}var hh;function mh(){if(hh)return di;hh=1,Object.defineProperty(di,"__esModule",{value:!0}),di.WebSocketConnection=void 0;const n=fh(),i=Ds(),a=_n();class o extends n.BaseConnection{conversationId;socket=null;config;reconnectCount=0;constructor(c){super(),this.config={...c,reconnect:c.reconnect||!0,reconnectAttempts:c.reconnectAttempts||3,reconnectDelay:c.reconnectDelay||1e3},this.conversationId=c.auth.sessionId,this.connect()}connect(){try{this.updateStatus(i.ConnectionStatus.CONNECTING);const c=this.buildConnectionUrl();this.socket=new WebSocket(c),this.socket.onopen=this.handleOpen.bind(this),this.socket.onmessage=this.handleSocketMessage.bind(this),this.socket.onerror=this.handleError.bind(this),this.socket.onclose=this.handleClose.bind(this)}catch(c){const f=(0,a.normalizeError)(c,a.ConnectionError,"Failed to establish WebSocket connection",{context:{stage:"connect"}});this.onErrorCallback?.(f),this.disconnect({reason:i.DisconnectionReason.CONNECTION_ERROR,message:f.message,timestamp:new Date})}}buildConnectionUrl(){const c=new URL(this.config.serverUrl);return c.pathname=`/reloaded/ws/med-assist/session/${this.config.auth.sessionId}/`,c.toString()}handleOpen(){this.onOpenCallback?.()}handleSocketMessage(c){try{const f=JSON.parse(c.data);this.handleMessage(f)}catch(f){const h=(0,a.normalizeError)(f,a.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(h)}}handleError(c){const f=new a.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:c});this.onErrorCallback?.(f)}handleClose(c){const f=c.wasClean,h=c.code,p=c.reason;let m,g;h===1e3?(m=i.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):h===1001||h===1006?(m=i.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):h===4001?(m=i.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):f?(m=i.DisconnectionReason.SERVER_CLOSED,g=p||"Server closed connection"):(m=i.DisconnectionReason.CONNECTION_ERROR,g=p||"Connection closed unexpectedly"),this.config.reconnect&&m!==i.DisconnectionReason.AUTHENTICATION_ERROR&&m!==i.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:m,message:g,code:h,timestamp:new Date})}sendMessage(c){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new a.ConnectionError("Cannot send message: connection not open",{context:{stage:"sendMessage",readyState:this.socket?.readyState},hint:"Ensure the WebSocket is open before sending messages."});try{this.socket.send(JSON.stringify(c))}catch(f){const h=(0,a.normalizeError)(f,a.ConnectionError,"Failed to send WebSocket message",{context:{stage:"sendMessage"}});throw this.onErrorCallback?.(h),h}}close(){this.socket&&(this.updateStatus(i.ConnectionStatus.NOT_CONNECTED),this.socket.close(1e3,"Client closed connection"),this.socket=null)}isConnected(){return this.socket?.readyState===WebSocket.OPEN}handleConnected(){this.updateStatus(i.ConnectionStatus.CONNECTED),this.reconnectCount=0}}return di.WebSocketConnection=o,di}var ph;function gh(){return ph||(ph=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const i=mh(),a=_n();n.ConnectionType={SOCKET:"socket"};class o{static async createConnection(c,f){switch(c){case n.ConnectionType.SOCKET:return new i.WebSocketConnection(f);default:throw new a.ConnectionError(`Unsupported connection type: ${c}`,{context:{type:c}})}}}n.ConnectionFactory=o})(zs)),zs}var Il={},yh;function MS(){if(yh)return Il;yh=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.SYNAPSE_TOOL_NAME=Il.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care/reloaded",BASE_API_URL:"https://matrix.eka.care/reloaded"},i={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care/reloaded",BASE_API_URL:"https://matrix.dev.eka.care/reloaded"},a={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},o=(c="production")=>c==="development"?i:c==="production"?n:c==="staging"?a:n;Il.getConfig=o;var s;return(function(c){c.MOBILE_VERIFICATION="mobile_verification",c.AVAILABILITY_DATES="availability_dates",c.AVAILABILITY_SLOTS="availability_slots",c.DOCTOR_DETAILS="doctor_details",c.GET_LOCATION="get_location"})(s||(Il.SYNAPSE_TOOL_NAME=s={})),Il}var pi={},gi={},vh;function bh(){if(vh)return gi;vh=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.HttpClient=void 0;const n=_n();let i=class{baseUrl;headers;timeout;maxRetries;constructor(o){this.baseUrl=o.baseUrl.replace(/\/$/,""),this.timeout=o.timeout||3e4,this.maxRetries=o.maxRetries||3,this.headers={"Content-Type":"application/json",...o.headers},o.authorization&&(this.headers.Authorization=o.authorization)}async request(o,s,c){const f=c?.retries??this.maxRetries;let h;for(let p=0;p<=f;p++)try{const m=this.buildUrl(s,c?.params),g=await fetch(m,{method:o,headers:{...this.headers,...c?.headers},body:c?.body?JSON.stringify(c.body):void 0,signal:AbortSignal.timeout(this.timeout)});return g.ok||await this.handleError(g),g.json()}catch(m){if(h=m,p===f||!(m instanceof TypeError&&m.message==="Failed to fetch"||m instanceof DOMException&&m.name==="AbortError"||m instanceof SyntaxError))break;const y=Math.pow(2,p)*100;await new Promise(S=>setTimeout(S,y))}throw h?h instanceof TypeError&&h.message==="Failed to fetch"?new n.APIError("Network error: Unable to connect to the server. Please check your internet connection.",0,{type:"NETWORK_ERROR",originalError:h.message}):h instanceof DOMException&&h.name==="AbortError"?new n.APIConnectionTimeoutError({message:`Request timed out after ${this.timeout}ms`}):h instanceof SyntaxError?new n.APIError("Invalid response format from server",502,{type:"PARSE_ERROR",originalError:h.message}):h instanceof n.APIError?h:new n.APIError(`Request failed: ${h.message||"Unknown error"}`,500,{type:"UNKNOWN_ERROR",originalError:h}):new n.APIError("Unknown error occurred",500,{type:"UNKNOWN_ERROR"})}async get(o,s,c){return this.request("GET",o,{params:s,...c})}async post(o,s,c){return this.request("POST",o,{body:s,...c})}async put(o,s,c){return this.request("PUT",o,{body:s,...c})}async delete(o,s){return this.request("DELETE",o,{...s})}async patch(o,s,c){return this.request("PATCH",o,{body:s,...c})}buildUrl(o,s){let c=`${this.baseUrl}${o}`;if(s){const f=new URLSearchParams(s).toString();c+=`?${f}`}return c}async handleError(o){let s,c;try{c=await o.json(),s=c.message||c?.msg||o.statusText}catch{s=o.statusText}throw n.APIError.generate(o.status,c,s,o.headers)}};return gi.HttpClient=i,gi}var yi={},vi={},Sh;function Eh(){if(Sh)return vi;Sh=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.BaseResource=void 0;let n=class{client;constructor(a){this.client=a}async get(a,o,s){return this.client.get(a,o,s)}async post(a,o,s){return this.client.post(a,o,s)}async put(a,o,s){return this.client.put(a,o,s)}async delete(a,o){return this.client.delete(a,o)}async patch(a,o,s){return this.client.patch(a,o,s)}buildPath(a,o){let s=a;for(const[c,f]of Object.entries(o))s=s.replace(`:${c}`,encodeURIComponent(f));return s}};return vi.BaseResource=n,vi}var xh;function Th(){if(xh)return yi;xh=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.Session=void 0;const n=Eh();let i=class extends n.BaseResource{basePath="/med-assist/session";async create(o){return this.post(this.basePath,o)}async retrieve(o){return this.get(`${this.basePath}/${o}`)}async refresh(o,s){return this.get(`${this.basePath}/${o}/refresh`,void 0,{headers:{"x-sess-token":s}})}async feedback(o,s,c,f){return this.patch(`${this.basePath}/${o}/${s}`,{feedback:c,feedback_reason:f})}};return yi.Session=i,yi}var bi={},Un={},Ch;function wh(){if(Ch)return Un;Ch=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.SYNAPSE_TOOL_CALLBACK_NAME=Un.SYNAPSE_COMPONENTS=Un.SYNAPSE_TOOL_NAME=void 0;var n;(function(a){a.MOBILE_VERIFICATION="mobile_verification",a.AVAILABILITY_DATES="availability_dates",a.AVAILABILITY_SLOTS="availability_slots",a.DOCTOR_AVAILABILITY="doctor_availability",a.DOCTOR_DETAILS="doctor_details",a.GET_LOCATION="get_location"})(n||(Un.SYNAPSE_TOOL_NAME=n={})),Un.SYNAPSE_COMPONENTS={MOBILE_VERIFICATION:"mobile_verification",PILL:"pills",MULTI:"multi",DOCTOR_CARD:"doctor_card"};var i;return(function(a){a.DOCTOR_AVAILABILITY="tool_callback_doctor_availability",a.AVAILABILITY_DATES="tool_callback_availability_dates",a.AVAILABILITY_SLOTS="tool_callback_availability_slots",a.MOBILE_VERIFICATION="tool_callback_mobile_verification",a.DOCTOR_DETAILS="tool_callback_doctor_details"})(i||(Un.SYNAPSE_TOOL_CALLBACK_NAME=i={})),Un}var _h;function Ah(){if(_h)return bi;_h=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.ToolCall=void 0;const n=Eh(),i=wh();let a=class extends n.BaseResource{basePath="/med-assist/api-call-tool";async callTool(s,c,f){return c===i.SYNAPSE_TOOL_NAME.GET_LOCATION?this.requestLocation():this.post(`${this.basePath}?session_id=${s}&tool_name=${c}`,{tool_params:f})}async requestLocation(){return new Promise((s,c)=>{if(typeof navigator>"u"||!navigator.geolocation){c({code:500,message:"Geolocation is not supported by this browser",status:500,type:"GEOLOCATION_ERROR",originalError:new Error("Geolocation is not supported by this browser")});return}navigator.geolocation.getCurrentPosition(f=>{s({latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords?.accuracy??void 0})},f=>{c({code:f.code,message:f.message,status:500,type:"GEOLOCATION_ERROR",originalError:f})},{timeout:1e4,maximumAge:0,enableHighAccuracy:!0})})}};return bi.ToolCall=a,bi}var Nh;function Rh(){if(Nh)return pi;Nh=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.ResourceManager=void 0;const n=bh(),i=Th(),a=_n(),o=Ah();class s{resourceConfig;httpClient;session;toolCall=null;constructor(f){this.resourceConfig=f,this.httpClient=new n.HttpClient({baseUrl:this.resourceConfig.serverUrl,headers:{"X-agent-id":this.resourceConfig.agentId}}),this.session=new i.Session(this.httpClient)}async createSession(f,h){try{const p={user_id:f,...h?.profile&&{user_context:h?.profile},...h?.intent&&{session_context:{intent:h.intent,...h?.user_location&&{user_location:h.user_location}}},...h?.referer&&{referer:h?.referer}},m=await this.session.create(p);if(!m?.session_id||!m?.session_token)throw new a.APIError("Failed to start session.",500,void 0,void 0);return m}catch(p){throw p instanceof a.APIError?p:new a.APIError("Failed to start session.",500,void 0,void 0)}}async validateSession(f){try{const h=await this.session.retrieve(f);return h.msg&&h.msg==="Session Active"?{expired:!1,active:!0}:{expired:!0,active:!1}}catch(h){if(h instanceof a.APIError)switch(h.status){case 404:return{expired:!1,active:!1};case 500:return{expired:!1,active:!1};case 401:return{expired:!0,active:!1};default:return{expired:!1,active:!1}}throw new a.APIError("Failed to validate session.",500,void 0,void 0)}}async refreshSession(f,h){return await this.session.refresh(f,h)}async sendFeedback(f,h,p,m){return await this.session.feedback(f,h,p,m)}async callTool(f,h,p){return this.toolCall||(this.toolCall=new o.ToolCall(this.httpClient)),await this.toolCall.callTool(f,h,p)}}return pi.ResourceManager=s,pi}var Si={},Ls={},Oh;function Us(){return Oh||(Oh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.MULTI_SELECT_ADDITIONAL_OPTION=n.SOCKET_EVENTS=n.SOCKET_CONTENT_TYPES=void 0,n.IsValidSocketMesssage=i,n.SOCKET_CONTENT_TYPES={TEXT:"text",AUDIO:"audio",FILE:"file",TOOL_CALL:"tool",TIPS:"tips",AUDIO_TRANSCRIPT:"audio_transcript",TOOL_START:"tool_start",TOOL_END:"tool_end"},n.SOCKET_EVENTS={PING:"ping",PONG:"pong",CHAT:"chat",STREAM:"stream",AUTH:"auth",END_OF_STREAM:"eos",SYNC:"sync",ERROR:"err",CONNECTION_ESTABLISHED:"conn"},n.MULTI_SELECT_ADDITIONAL_OPTION={NOTA:"none_of_the_above",AOTA:"all_of_the_above"};function i(a){return[n.SOCKET_EVENTS.PING,n.SOCKET_EVENTS.PONG,n.SOCKET_EVENTS.ERROR,n.SOCKET_EVENTS.SYNC,n.SOCKET_EVENTS.CONNECTION_ESTABLISHED,n.SOCKET_EVENTS.CHAT,n.SOCKET_EVENTS.STREAM,n.SOCKET_EVENTS.END_OF_STREAM].includes(a.ev)}})(Ls)),Ls}var Bs={},kh;function zS(){return kh||(kh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Filemanager=n.MAX_FILE_SIZE=void 0;const i=_n();n.MAX_FILE_SIZE=3145728;class a{pendingFiles=[];pendingMessage="";pendingFormats=[];setFilesForUpload(s,c){this.pendingFiles.length>0&&this.clearPendingFilesState();const f=s.filter(h=>this.validateFile(h));if(f.length===0)throw new i.FileError("File not supported",{context:{stage:"setFilesForUpload"}});this.pendingFiles=f,c&&c.trim()&&(this.pendingMessage=c),this.pendingFormats=f.map(h=>h.type)}getPendingFileState(){return{files:this.pendingFiles,message:this.pendingMessage||"",formats:this.pendingFormats||[]}}async uploadFilesToPresignedUrl(s){let c=[];const f=s.filter(h=>h.url&&h.url.trim());try{if(f.length===0)throw new i.FileError("No valid presigned URLs provided",{context:{stage:"uploadFilesToPresignedUrl"}});if(!this.pendingFiles.length)throw new i.FileError("No files to upload",{context:{stage:"uploadFilesToPresignedUrl"}});for(let h=0;h<f.length;h++){const p=f[h].url,m=await fetch(p,{method:"PUT",body:this.pendingFiles[h],headers:{"Content-Type":this.pendingFiles[h].type,"x-ms-blob-type":"BlockBlob"}});if(!m.ok)throw new i.FileError(`Failed to upload ${this.pendingFiles[h].name} to URL ${h+1}: ${m.status} ${m.statusText}`,{context:{stage:"uploadFilesToPresignedUrl"}});c.push(f[h].id)}return c}catch(h){if(c.length>0)return c;throw(0,i.normalizeError)(h,i.FileError,"Failed to upload files to presigned URL",{context:{stage:"uploadFilesToPresignedUrl"}})}}blobToFile(s,c){return new File([s],c,{type:s.type})}validateFile(s){return["application/pdf","image/jpeg","image/png","image/jpg"].includes(s.type)&&s.size<n.MAX_FILE_SIZE}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormats=[]}}n.Filemanager=a})(Bs)),Bs}var Sn={},Mh;function La(){if(Mh)return Sn;Mh=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.SYNAPSE_REALTIME_RESERVED_EVENTS=Sn.SYNAPSE_REALTIME_ERROR_CODES=Sn.SYNAPSE_REALTIME_EVENTS=Sn.SYNAPSE_MESSAGE_TYPES=void 0;const n=Us();return Sn.SYNAPSE_MESSAGE_TYPES=n.SOCKET_CONTENT_TYPES,Sn.SYNAPSE_REALTIME_EVENTS={CONNECTED:"connected",DISCONNECTED:"disconnected",PROGRESS_MESSAGE:"progress_message",MESSAGE_CHUNK:"message_chunk",TIPS_MESSAGE:"tips_message",END_OF_STREAM:"end_of_stream",ERROR:"error",TOOL_CALL:"tool_call",AUDIO_TRANSCRIPT:"audio_transcript",TOOL_START:"tool_start",TOOL_END:"tool_end"},Sn.SYNAPSE_REALTIME_ERROR_CODES={SESSION_INACTIVE:"session_not_found",SESSION_EXPIRED:"session_expired",INVALID_EVENT:"invalid_event",INVALID_CONTENT_TYPE:"invalid_content",PARSING_ERROR:"parsing",FILE_UPLOAD_INPROGRESS:"file_upload_inprogress",TIMEOUT:"timeout",SERVER_ERROR:"server_error",SESSION_TOKEN_MISMATCH:"session_token_mismatch"},Sn.SYNAPSE_REALTIME_RESERVED_EVENTS={SESSION_EXPIRED:"session_expired"},Sn}var Ei={},zh;function DS(){if(zh)return Ei;zh=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.AudioManager=void 0;const n=_n();class i{mediaRecorder=null;mediaStream=null;recordingStartTime=0;autoPauseTimer=null;config;onAudioData=null;onAudioError=null;suppressCallbacks=!1;constructor(o={}){this.config={mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:128e3,maxRecordingDuration:9e5,autoPauseEnabled:!0,...o}}async checkCurrentPermissionState(){const o=await navigator.permissions.query({name:"microphone"});if(o.state==="denied")throw new n.RecordingError("Microphone permission denied",{context:{permissionState:o.state},hint:"Ensure the browser has microphone access enabled for this site."});return o.state}async start(o,s){try{if(!navigator.mediaDevices)throw new n.RecordingError("Media devices API is not available. This usually means the page is not served over HTTPS or there are browser restrictions.",{context:{feature:"mediaDevices"},hint:"Serve the app over HTTPS and verify browser/device microphone support.",displayMessage:"Microphone access is unavailable."});if(!window.MediaRecorder)throw new n.RecordingError("MediaRecorder is not supported in this browser",{context:{feature:"MediaRecorder"},hint:"Use a browser that supports the MediaRecorder API.",displayMessage:"Microphone access is unavailable."});const c=["audio/mp3","audio/ogg;codecs=opus","audio/mp4","audio/ogg","audio/wav"].filter(f=>MediaRecorder.isTypeSupported(f));if(c.length===0)throw new n.RecordingError("No supported audio formats found in this browser",{context:{requestedTypes:c},hint:"Verify codec support or adjust the requested MIME types.",displayMessage:"Microphone access is unavailable."});if(this.config.mimeType=c[0],await this.checkCurrentPermissionState(),this.onAudioData=o,this.onAudioError=s??null,this.suppressCallbacks=!1,this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1,sampleRate:44100,channelCount:1}}),this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.config.mimeType,audioBitsPerSecond:this.config.audioBitsPerSecond}),this.mediaRecorder.state!=="inactive")throw new n.RecordingError("MediaRecorder is in an invalid state for start()",{context:{recorderState:this.mediaRecorder.state},displayMessage:"Failed to start recording"});this.setupMediaRecorderEvents(),this.mediaRecorder.start(),this.recordingStartTime=Date.now(),this.config.autoPauseEnabled&&this.setupAutoPauseTimer()}catch(c){throw this.toRecordingError(c,"Failed to start audio recording",{stage:"start"})}}async processAudioChunk(o){try{const s=await this.blobToBase64(o),c=Date.now();if(!this.onAudioData)return;const f={audio:s,format:this.config.mimeType,duration:this.recordingStartTime>0?c-this.recordingStartTime:0,timestamp:this.recordingStartTime>0?this.recordingStartTime:c};this.onAudioData(f)}catch(s){this.handleError(s,{stage:"process_audio_chunk"})}}toRecordingError(o,s,c){if(o instanceof n.RecordingError)return o;if(o instanceof n.SynapseError)return new n.RecordingError(o.message,{cause:o,context:{...o.context,...c},hint:o.hint});const f=o instanceof Error&&o.message?o.message:s;return new n.RecordingError(f,{cause:o,context:c})}handleError(o,s){const c=this.toRecordingError(o,"Unexpected recording error",s);if(this.onAudioError)try{this.onAudioError(c)}catch{}}setupAutoPauseTimer(){this.autoPauseTimer&&clearTimeout(this.autoPauseTimer),this.autoPauseTimer=setTimeout(()=>{this.stop()},this.config.maxRecordingDuration)}setupMediaRecorderEvents(){this.mediaRecorder&&(this.mediaRecorder.ondataavailable=o=>{this.suppressCallbacks||o.data.size<=0||this.processAudioChunk(o.data).catch(s=>this.handleError(s,{stage:"media_recorder_ondataavailable",hasData:o.data.size>0}))},this.mediaRecorder.onstop=async()=>{this.recordingStartTime=0},this.mediaRecorder.onerror=o=>{this.handleError(o.error instanceof Error?o.error:new Error("MediaRecorder encountered an unknown error"),{stage:"media_recorder_onerror"})},this.mediaRecorder.onstart=()=>{this.mediaRecorder})}blobToBase64(o){return new Promise((s,c)=>{const f=new FileReader;f.onload=()=>{if(typeof f.result=="string"){const h=f.result.split(",")[1];s(h)}else c(new n.RecordingError("Failed to convert blob to base64",{context:{stage:"blob_to_base64"}}))},f.onerror=()=>c(new n.RecordingError("FileReader error while converting audio chunk to base64",{cause:f.error??void 0,context:{stage:"blob_to_base64"}})),f.readAsDataURL(o)})}stop(){if(this.mediaRecorder)try{this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to stop audio recording",{stage:"stop"})}}cancel(){if(this.mediaRecorder)try{this.suppressCallbacks=!0,this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.ondataavailable=null,this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to cancel audio recording",{stage:"cancel"})}}destroy(){try{this.cancel(),this.mediaRecorder&&(this.mediaRecorder=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to destroy audio resources",{stage:"destroy"})}}}return Ei.AudioManager=i,Ei}var Dh;function jh(){if(Dh)return Si;Dh=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.MessageManager=void 0;const n=Us(),i=zS(),a=La(),o=DS(),s=_n();let c=class{connection=null;callbacks=null;fileManager=null;audioManager=null;constructor(h,p){this.connection=h||null,this.callbacks=p||null}handleFileUploadProcess({files:h,message:p,urls:m}){this.fileManager||(this.fileManager=new i.Filemanager);let g;if(h&&h.length>0)this.fileManager.setFilesForUpload(h,p),g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{extensions:this.fileManager.getPendingFileState().formats}};else if(m&&m.length>0){const y=this.fileManager.getPendingFileState().message;g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{urls:m,...y&&{text:y}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:h,files:p,audio:m,urls:g,tool_declined:y,tool_id:S,initial_prompts:b}){const k=this.assertConnection("sendSocketChatMessage");let M;if(p&&p.length>0||g&&g.length>0){if(p&&p.length>3){const U=new s.MessageError("Maximum 3 files are allowed to be sent at a time",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(U),U}M=this.handleFileUploadProcess({files:p,message:h,urls:g})}else h?M={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.TEXT,_id:Date.now().toString(),ts:Date.now(),data:{text:h,...y&&{tool_declined:y},...S&&{tool_id:S},...b&&{initial_prompts:b}}}:m&&m?.audio&&m?.format&&(M={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:m?.audio,format:m?.format}});if(!M){const U=new s.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(U),U}k.sendMessage(M)}handleIncomingSocketChatMessage(h){const p=this.assertConnection("handleIncomingSocketChatMessage");switch(h.ct){case n.SOCKET_CONTENT_TYPES.FILE:{h?.data?.urls&&h.data.urls?.length>0&&this.fileManager?.uploadFilesToPresignedUrl(h.data.urls).then(m=>{this.sendSocketMessage({urls:m})}).catch(m=>{const g=this.toFileError(m,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:h.data?.urls?.length});this.emitError(g)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(h.data.text&&h.data.text.trim()===""&&h._id){const m={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,m)}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(h?.data?.tool_id&&h._id){const m={data:{...h.data},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,m)}break;case n.SOCKET_CONTENT_TYPES.AUDIO_TRANSCRIPT:if(h?.data?.text){const m={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,m)}break}}handleIncomingSocketStreamMessage(h){const p=this.assertConnection("handleIncomingSocketStreamMessage");switch(h.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(h?.data?.progress_msg){const S={data:{text:h.data.progress_msg},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,S);return}if(h?.data?.text){const S={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,S)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(h?.data?.tips){const S={data:{tips:h.data.tips},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,S);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(h?.data?.tool_id&&h._id){const S={data:{...h.data},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,S);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_START:const m={data:h?.data,messageId:h._id||Date.now().toString()};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_START,m);break;case n.SOCKET_CONTENT_TYPES.TOOL_END:const g={data:h?.data,messageId:h._id||Date.now().toString()};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_END,g);break;default:const y=new s.MessageError(`Unsupported content type ${h?.ct}`,{context:{stage:"handleIncomingSocketStreamMessage",contentType:h.ct}});throw this.emitError(y),y}}handleDisconnect(h){this.connection?.emit?.(a.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,h)}handleIncomingSocketEndOfStreamMessage(h){this.assertConnection("handleIncomingSocketEndOfStreamMessage").emit(a.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM)}handleIncomingSocketErrorMessage(h){const p=this.assertConnection("handleIncomingSocketErrorMessage");switch(h.code){case a.SYNAPSE_REALTIME_ERROR_CODES.SESSION_EXPIRED:p.emit(a.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED);break;default:const m=new s.MessageError(h.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:h.code}});p.emit(a.SYNAPSE_REALTIME_EVENTS.ERROR,m),this.emitError(m)}}sendSocketAuthMessage(h){const p=this.assertConnection("sendSocketAuthMessage"),m={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:h}};p.sendMessage(m)}sendSocketPingMessage(){const h=this.assertConnection("sendSocketPingMessage"),p={ev:n.SOCKET_EVENTS.PING,_id:Date.now().toString(),ts:Date.now()};h.sendMessage(p)}async startRecording({onChunks:h,onError:p}){if(!h){const m=new s.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(m),m}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(h,m=>{const g=this.toRecordingError(m,"Failed to start audio recording",{stage:"startRecording"});p?.(g),this.emitError(g)})}catch(m){const g=this.toRecordingError(m,"Failed to start audio recording",{stage:"startRecording"});throw p?.(g),this.emitError(g),g}}endRecordingWithSocket(){if(!this.audioManager){const h=new s.RecordingError("Audio manager not set. Call startRecording() first.",{context:{stage:"stopRecording"}});throw this.emitError(h),h}try{this.audioManager.stop()}catch(h){const p=this.toRecordingError(h,"Failed to stop audio recording",{stage:"stopRecording"});throw this.emitError(p),p}}sendSocketPongMessage(){const h=this.assertConnection("sendSocketPongMessage"),p={ev:n.SOCKET_EVENTS.PONG,_id:Date.now().toString(),ts:Date.now()};h.sendMessage(p)}handleConnectionEstablished(){this.connection?.handleConnected(),this.connection?.emit(a.SYNAPSE_REALTIME_EVENTS.CONNECTED)}cleanupMessageServerState(){this.fileManager&&(this.fileManager.clearPendingFilesState(),this.fileManager=null),this.audioManager&&(this.audioManager.destroy(),this.audioManager=null)}emitError(h){this.callbacks?.onError?.(h)}toFileError(h,p,m,g){return(0,s.normalizeError)(h,s.FileError,p,{context:m,hint:g})}toRecordingError(h,p,m,g){return(0,s.normalizeError)(h,s.RecordingError,p,{context:m,hint:g})}assertConnection(h){if(!this.connection){const p=new s.ConnectionError("Connection not set. Please ensure the connection is established before calling this method.",{context:{stage:h}});throw this.emitError(p),p}return this.connection}};return Si.MessageManager=c,Si}var xi={},Lh;function Uh(){if(Lh)return xi;Lh=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.ErrorUtils=void 0;const n=_n();class i{static isAPIError(o){return o instanceof n.APIError}static isNetworkError(o){return o instanceof n.APIError&&(o.status===0||o.status===void 0)}static isTimeoutError(o){return o instanceof n.APIConnectionTimeoutError}static isAuthError(o){return o instanceof n.UnauthorizedError||o instanceof n.PermissionDeniedError}static isClientError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=400&&o.status<500}static isServerError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=500}static getUserFriendlyMessage(o){return i.isNetworkError(o)?"Unable to connect to the server. Please check your internet connection.":i.isTimeoutError(o)?"Request timed out. Please try again.":i.isAuthError(o)?"Authentication failed. Please log in again.":i.isServerError(o)?"Server error occurred. Please try again later.":i.isAPIError(o)||o instanceof Error?o.message:"An unexpected error occurred."}static getErrorDetails(o){return i.isAPIError(o)?{type:o.name,message:o.message,code:o.code,status:o.status,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof n.SynapseError?{type:o.name,message:o.message,code:o.code,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof Error?{type:o.name,message:o.message,stack:o.stack}:{type:"Unknown",message:String(o)}}}return xi.ErrorUtils=i,xi}var Bh;function jS(){if(Bh)return fi;Bh=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.SynapseSDK=void 0;const n=gh(),i=MS(),a=Rh(),o=jh(),s=La(),c=Uh(),f=_n(),h=Us();class p{connection=null;messageManager;resourceManager;sessionConfig=null;config;connectionType;constructor(g){this.config={...g,environment:g.environment||"production"},this.connectionType=g.connectionType||n.ConnectionType.SOCKET;const y=(0,i.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new a.ResourceManager({agentId:this.config.agentId,serverUrl:this.config.serverUrl||y})}async startSession(g){try{const y=await this.manageSession(g);return await this.initializeConnection(y),this.setupEventHandlers(),y}catch(y){const S=c.ErrorUtils.getUserFriendlyMessage(y),b=c.ErrorUtils.getErrorDetails(y),k=this.toSessionError(y,S||"Failed to start session",{stage:"startSession",details:b},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(k),k}}async sendMessage({message:g,files:y,audio:S,tool_declined:b,tool_id:k,initial_prompts:M}){if(!this.connection){const U=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendChatMessage"},hint:"Call startSession() and wait for connection before sending messages."});throw this.emitError(U),U}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketMessage({message:g,files:y,audio:S,...b&&{tool_declined:b},...k&&{tool_id:k},...M?.length&&{initial_prompts:M}});break;default:const U=new f.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(U),U}}on(g,y){this.connection?.on(g,y)}off(g,y){this.connection?.off(g,y)}getSessionConfig(){if(!this.sessionConfig?.session_id||!this.sessionConfig?.session_token)throw new f.SessionError("Session ID or token not found",{context:{stage:"getSessionConfig"},hint:"Ensure the session API returns both identifiers."});return this.sessionConfig}async callTool(g,y){if(!this.connection){const S=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(S),S}if(!this.sessionConfig?.session_id){const S=new f.SessionError("Session ID not found",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(S),S}switch(this.connectionType){case n.ConnectionType.SOCKET:try{const b=await this.resourceManager.callTool(this.sessionConfig.session_id,g,y);if(b.err)throw new f.APIError(b.err.msg,500,b.err);return b}catch(b){if(b instanceof f.APIError&&b?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,y);throw b}default:const S=new f.ConnectionError("Unsupported connection type",{context:{stage:"callTool",connectionType:this.connectionType}});throw this.emitError(S),S}}async startRecording({onChunks:g,onError:y}){if(!this.connection){const S=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendAudio"},hint:"Call startSession() before attempting to send audio."});throw this.emitError(S),S}switch(this.connectionType){case n.ConnectionType.SOCKET:try{await this.messageManager.startRecording({onChunks:g,onError:y})}catch(b){throw b}break;default:const S=new f.ConnectionError("Unsupported connection type",{context:{stage:"sendAudio",connectionType:this.connectionType}});throw this.emitError(S),S}}endRecording(){if(!this.connection){const g=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"endRecording"},hint:"Call startRecording() before attempting to stop recording."});throw this.emitError(g),g}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.endRecordingWithSocket();break;default:const g=new f.ConnectionError("Unsupported connection type",{context:{stage:"endRecording",connectionType:this.connectionType}});throw this.emitError(g),g}}isConnected(){return this.connection?.isConnected()??!1}endSession(){this.connection&&(this.connection.close(),this.connection=null),this.messageManager&&this.messageManager.cleanupMessageServerState()}emitError(g){this.config.callbacks?.onError?.(g)}toSessionError(g,y,S,b){return(0,f.normalizeError)(g,f.SessionError,y,{context:S,hint:b})}async initializeConnection(g){if(this.connection&&(this.connection.close(),this.connection=null),!g.session_id||!g.session_token)throw new f.SessionError("Session ID or token not found",{context:{stage:"initializeConnection"},hint:"Ensure the session API returns both identifiers."});this.sessionConfig=g;const y=(0,i.getConfig)(this.config?.environment).WEBSOCKET_URL,S=this.config.serverUrl?`wss://${this.config.serverUrl.split("://")[1]}`:null,b=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(b,{serverUrl:S||y,auth:{sessionId:g.session_id,sessionToken:g.session_token},agentId:this.config.agentId,userId:this.config.userId,overrides:this.config.overrides}),this.messageManager=new o.MessageManager(this.connection,this.config?.callbacks)}async manageSession(g){try{if(!g?.session_id)return this.createNewSession();const y=await this.resourceManager.validateSession(g.session_id);return y.active?g:y.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(y){if(y instanceof f.APIError){const S=y.status;if(S===404||S===500)return this.createNewSession()}throw this.toSessionError(y,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,y){try{return await this.resourceManager.refreshSession(g,y)}catch(S){if(S instanceof f.APIError){this.emitError(S);const b=S.status;if(b===404||b===500)return this.createNewSession()}throw this.toSessionError(S,"Failed to refresh session",{stage:"refreshSession",sessionId:g})}}async createNewSession(){return await this.resourceManager.createSession(this.config.userId||Date.now().toString(),this.config.context)}setupEventHandlers(){if(this.connection){switch(this.connectionType){case n.ConnectionType.SOCKET:this.connection.onOpen(()=>{this.onSocketConnectionOpen()}),this.connection.onMessage(g=>{this.onIncomingSocketMessage(g)}),this.connection.onError(g=>{this.onSocketConnectionError(g)}),this.connection.on(s.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED,()=>{this.handleSessionExpiry()});break;default:throw new f.ConnectionError("Unsupported connection type",{context:{stage:"setupEventHandlers",connectionType:this.connectionType},hint:"Use ConnectionType.SOCKET or provide a custom handler."})}this.connection.onDisconnect(g=>{this.messageManager.handleDisconnect(g)})}}onSocketConnectionError(g){this.connection?.emit(s.SYNAPSE_REALTIME_EVENTS.ERROR,g);const y=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(y)}onSocketConnectionOpen(){if(!this.sessionConfig?.session_token){const g=new f.SessionError("Session token not set. Call startSession() first.",{context:{stage:"onSocketConnectionOpen"},hint:"Ensure startSession() completes successfully before socket opens."});throw this.emitError(g),g}this.messageManager.sendSocketAuthMessage(this.sessionConfig.session_token)}onIncomingSocketMessage(g){switch(g.ev){case h.SOCKET_EVENTS.CHAT:this.messageManager.handleIncomingSocketChatMessage(g);break;case h.SOCKET_EVENTS.CONNECTION_ESTABLISHED:this.messageManager.handleConnectionEstablished();break;case h.SOCKET_EVENTS.STREAM:this.messageManager.handleIncomingSocketStreamMessage(g);break;case h.SOCKET_EVENTS.END_OF_STREAM:this.messageManager.handleIncomingSocketEndOfStreamMessage(g);break;case h.SOCKET_EVENTS.PING:this.messageManager.sendSocketPongMessage();break;case h.SOCKET_EVENTS.PONG:this.messageManager.sendSocketPingMessage();break;case h.SOCKET_EVENTS.SYNC:break;case h.SOCKET_EVENTS.ERROR:this.messageManager.handleIncomingSocketErrorMessage(g);break;default:const y=new f.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(y);return}}async handleSessionExpiry(){try{if(this.endSession(),!this.sessionConfig?.session_id||!this.sessionConfig?.session_token){const y=new f.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(y),y}const g=await this.refreshSession(this.sessionConfig.session_id,this.sessionConfig.session_token);if(!g.session_id||!g.session_token)throw new f.SessionError("Session refresh failed",{context:{stage:"handleSessionExpiry"}});this.sessionConfig.session_id=g.session_id,this.sessionConfig.session_token=g.session_token,await this.initializeConnection(g),this.setupEventHandlers(),this.config.callbacks?.onSessionRefreshed?.(g)}catch(g){const y=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(y)}}toConnectionError(g,y,S,b){return(0,f.normalizeError)(g,f.ConnectionError,y,{context:S,hint:b})}}return fi.SynapseSDK=p,fi}var Is={},Ih;function LS(){return Ih||(Ih=1,Object.defineProperty(Is,"__esModule",{value:!0})),Is}var Ti={},Hh;function US(){return Hh||(Hh=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.USER_FEEDBACK=void 0,Ti.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Ti}var Hs={},qh;function BS(){return qh||(qh=1,Object.defineProperty(Hs,"__esModule",{value:!0})),Hs}var Ci={},Yh;function IS(){return Yh||(Yh=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.ErrorType=void 0,Ci.ErrorType={NETWORK_ERROR:"NETWORK_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",API_ERROR:"API_ERROR",RATE_LIMIT_ERROR:"RATE_LIMIT_ERROR",SERVER_ERROR:"SERVER_ERROR",PARSE_ERROR:"PARSE_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"}),Ci}var qs={},Vh;function HS(){return Vh||(Vh=1,Object.defineProperty(qs,"__esModule",{value:!0})),qs}var Gh;function qS(){return Gh||(Gh=1,(function(n){var i=Ul&&Ul.__createBinding||(Object.create?(function(U,R,D,I){I===void 0&&(I=D);var $=Object.getOwnPropertyDescriptor(R,D);(!$||("get"in $?!R.__esModule:$.writable||$.configurable))&&($={enumerable:!0,get:function(){return R[D]}}),Object.defineProperty(U,I,$)}):(function(U,R,D,I){I===void 0&&(I=D),U[I]=R[D]})),a=Ul&&Ul.__exportStar||function(U,R){for(var D in U)D!=="default"&&!Object.prototype.hasOwnProperty.call(R,D)&&i(R,U,D)};Object.defineProperty(n,"__esModule",{value:!0}),n.SYNAPSE_MESSAGE_TYPES=n.ErrorUtils=n.ErrorType=n.SynapseErrorCode=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.HttpClient=n.MessageManager=n.ToolCall=n.Session=n.ResourceManager=n.ConnectionType=n.ConnectionFactory=n.WebSocketConnection=n.BaseConnection=n.SynapseSDK=void 0;var o=jS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var s=fh();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return s.BaseConnection}});var c=mh();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return c.WebSocketConnection}});var f=gh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return f.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return f.ConnectionType}}),a(Ds(),n);var h=Rh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return h.ResourceManager}}),a(LS(),n);var p=Th();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return p.Session}}),a(US(),n);var m=Ah();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return m.ToolCall}}),a(wh(),n);var g=jh();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return g.MessageManager}}),a(La(),n),a(BS(),n);var y=bh();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return y.HttpClient}});var S=_n();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return S.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return S.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return S.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return S.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return S.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return S.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return S.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return S.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return S.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return S.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return S.InternalServerError}}),Object.defineProperty(n,"SynapseErrorCode",{enumerable:!0,get:function(){return S.SynapseErrorCode}});var b=IS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var k=Uh();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return k.ErrorUtils}}),a(HS(),n);var M=La();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return M.SYNAPSE_MESSAGE_TYPES}})})(Ul)),Ul}var ke=qS();const Ph=n=>{let i;const a=new Set,o=(m,g)=>{const y=typeof m=="function"?m(i):m;if(!Object.is(y,i)){const S=i;i=g??(typeof y!="object"||y===null)?y:Object.assign({},i,y),a.forEach(b=>b(i,S))}},s=()=>i,h={setState:o,getState:s,getInitialState:()=>p,subscribe:m=>(a.add(m),()=>a.delete(m))},p=i=n(o,s,h);return h},YS=(n=>n?Ph(n):Ph),VS=n=>n;function GS(n,i=VS){const a=ii.useSyncExternalStore(n.subscribe,ii.useCallback(()=>i(n.getState()),[n,i]),ii.useCallback(()=>i(n.getInitialState()),[n,i]));return ii.useDebugValue(a),a}const PS=n=>{const i=YS(n),a=o=>GS(i,o);return Object.assign(a,i),a},FS=(n=>PS);function Fh(n,i){let a;try{a=n()}catch{return}return{getItem:s=>{var c;const f=p=>p===null?null:JSON.parse(p,void 0),h=(c=a.getItem(s))!=null?c:null;return h instanceof Promise?h.then(f):f(h)},setItem:(s,c)=>a.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>a.removeItem(s)}}const Ys=n=>i=>{try{const a=n(i);return a instanceof Promise?a:{then(o){return Ys(o)(a)},catch(o){return this}}}catch(a){return{then(o){return this},catch(o){return Ys(o)(a)}}}},XS=(n,i)=>(a,o,s)=>{let c={storage:Fh(()=>localStorage),partialize:M=>M,version:0,merge:(M,U)=>({...U,...M}),...i},f=!1;const h=new Set,p=new Set;let m=c.storage;if(!m)return n((...M)=>{a(...M)},o,s);const g=()=>{const M=c.partialize({...o()});return m.setItem(c.name,{state:M,version:c.version})},y=s.setState;s.setState=(M,U)=>(y(M,U),g());const S=n((...M)=>(a(...M),g()),o,s);s.getInitialState=()=>S;let b;const k=()=>{var M,U;if(!m)return;f=!1,h.forEach(D=>{var I;return D((I=o())!=null?I:S)});const R=((U=c.onRehydrateStorage)==null?void 0:U.call(c,(M=o())!=null?M:S))||void 0;return Ys(m.getItem.bind(m))(c.name).then(D=>{if(D)if(typeof D.version=="number"&&D.version!==c.version){if(c.migrate){const I=c.migrate(D.state,D.version);return I instanceof Promise?I.then($=>[!0,$]):[!0,I]}}else return[!1,D.state];return[!1,void 0]}).then(D=>{var I;const[$,V]=D;if(b=c.merge(V,(I=o())!=null?I:S),a(b,!0),$)return g()}).then(()=>{R?.(b,void 0),b=o(),f=!0,p.forEach(D=>D(b))}).catch(D=>{R?.(void 0,D)})};return s.persist={setOptions:M=>{c={...c,...M},M.storage&&(m=M.storage)},clearStorage:()=>{m?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>k(),hasHydrated:()=>f,onHydrate:M=>(h.add(M),()=>{h.delete(M)}),onFinishHydration:M=>(p.add(M),()=>{p.delete(M)})},c.skipHydration||k(),b||S},Kt={USER:"user",ASSISTANT:"assistant"};var _t=(n=>(n.IDLE="idle",n.LISTENING="listening",n.ERROR="error",n.PROCESSING="processing",n.TRANSCRIBING="transcribing",n))(_t||{});const KS={sessionId:"",sessionToken:"",isStreaming:!1,recordingStatus:_t.IDLE,isWaitingForResponse:!1,error:null,isTimeoutError:!1,startNewConnection:!1,showRetryButton:!1,chats:{},inlineText:null,isRefreshingSession:!1,ConnectionStatus:ke.ConnectionStatus.CONNECTING,streamingTimeoutId:null,responseTimeoutId:null,lastStreamingActivity:null,progressMessage:null},hr=FS()(XS((n,i)=>({sessionId:"",setSessionId:a=>n({sessionId:a}),sessionToken:"",setSessionToken:a=>n({sessionToken:a}),initialMessage:null,setInitialMessage:a=>n({initialMessage:a}),agentId:"",setAgentId:a=>n({agentId:a}),userId:"",setUserId:a=>n({userId:a}),context:null,setContext:a=>n({context:a}),connectionStatus:ke.ConnectionStatus.CONNECTING,setConnectionStatus:a=>n({connectionStatus:a}),isStreaming:!1,setIsStreaming:a=>n({isStreaming:a}),isWaitingForResponse:!1,setIsWaitingForResponse:a=>n({isWaitingForResponse:a}),progressMessage:null,setProgressMessage:a=>n({progressMessage:a}),recordingStatus:_t.IDLE,setRecordingStatus:a=>n({recordingStatus:a}),startNewConnection:!1,setStartNewConnection:a=>n({startNewConnection:a}),inlineText:null,setInlineText:a=>n({inlineText:a}),isBotIconAnimating:!1,setIsBotIconAnimating:a=>n({isBotIconAnimating:a}),chats:{},addMessageToSession:(a,o)=>{n(s=>({chats:{...s.chats,[a]:[...s.chats[a]||[],o]}}))},updateMessageInSession:(a,o,s)=>n(c=>({chats:{...c.chats,[a]:(c.chats[a]||[]).map(f=>f.id===o?{...f,...s}:f)}})),getMessagesForSession:a=>i().chats[a]||[],clearMessagesForSession:a=>n(o=>({chats:{...o.chats,[a]:[]}})),clearAllChats:()=>n({chats:{}}),error:null,setError:a=>n({error:a}),clearError:()=>n({error:null,isTimeoutError:!1,showRetryButton:!1,startNewConnection:!1}),showRetryButton:!1,setShowRetryButton:a=>n({showRetryButton:a}),isTimeoutError:!1,setTimeoutError:a=>n({isTimeoutError:a}),clearSession:async()=>{n(KS),await localStorage.removeItem("med-assist-store")},streamingTimeoutId:null,setStreamingTimeoutId:a=>n({streamingTimeoutId:a}),clearStreamingTimeout:()=>{const a=i();a.streamingTimeoutId&&(clearTimeout(a.streamingTimeoutId),n({streamingTimeoutId:null}))},responseTimeoutId:null,setResponseTimeoutId:a=>n({responseTimeoutId:a}),clearResponseTimeout:()=>{const a=i();a.responseTimeoutId&&(clearTimeout(a.responseTimeoutId),n({responseTimeoutId:null}))},lastStreamingActivity:null,setLastStreamingActivity:a=>n({lastStreamingActivity:a})}),{name:"med-assist-store",storage:Fh(()=>localStorage),partialize:n=>({agentId:n.agentId,userId:n.userId,context:n.context,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,initialMessage:n.initialMessage,connectionStatus:n.connectionStatus})}));function QS({onClose:n,title:i,iconUrl:a,startNewConversation:o}){const s=hr(h=>h.connectionStatus),f=(()=>{switch(s){case ke.ConnectionStatus.CONNECTED:return{dotColor:"bg-green-500",text:"Connected",textColor:"text-green-600"};case ke.ConnectionStatus.CONNECTING:return{dotColor:"bg-amber-500",text:"Connecting",textColor:"text-amber-600"};case ke.ConnectionStatus.NOT_CONNECTED:return{dotColor:"bg-red-500",text:"Not Connected",textColor:"text-red-600"};default:return{dotColor:"bg-gray-400",text:"Not Connected",textColor:"text-gray-600"}}})();return x.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("div",{className:"relative flex-shrink-0",children:[x.jsx(ui,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:x.jsx(ci,{className:"text-white font-bold text-lg bg-transparent",children:a?x.jsx("img",{src:a,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):x.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),x.jsx("div",{className:Ce("absolute bottom-0 right-0 w-3.5 h-3.5 rounded-full border-2 border-white shadow-sm",f.dotColor,s===ke.ConnectionStatus.CONNECTING&&"animate-pulse")})]}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("p",{className:"text-lg font-semibold text-slate-900",children:i||"Health Assist"}),x.jsx("div",{className:"flex items-center gap-1.5",children:x.jsx("span",{className:Ce("text-xs font-medium",f.textColor),children:f.text})})]})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Et,{type:"button",variant:"ghost",size:"icon",title:"Start New Chat",onClick:o,className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:x.jsx(dS,{className:"w-8 h-8"})}),x.jsx(Et,{onClick:n,type:"button",variant:"ghost",size:"icon",title:"Close",className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:x.jsx(Ns,{className:"w-8 h-8"})})]})]})})}function ZS({storageKey:n,defaultPosition:i={x:0,y:0},enabled:a=!0,onDragStart:o,onDragEnd:s}={}){const[c,f]=w.useState(()=>{if(n&&typeof window<"u")try{const R=localStorage.getItem(n);if(R){const D=JSON.parse(R);return{x:D.x??i.x,y:D.y??i.y}}}catch{}return i}),[h,p]=w.useState(()=>n&&typeof window<"u"?localStorage.getItem(n)!==null:!1),[m,g]=w.useState(!1),y=w.useRef({x:0,y:0}),S=w.useRef(null),b=w.useCallback(R=>{if(n&&typeof window<"u")try{localStorage.setItem(n,JSON.stringify(R))}catch{}},[n]),k=w.useCallback(R=>{if(!a)return;const D=R.target;if(D.tagName==="BUTTON"||D.tagName==="INPUT"||D.tagName==="TEXTAREA"||D.tagName==="SELECT"||D.closest("button")||D.closest("input")||D.closest("textarea")||D.closest("select")||D.closest("a"))return;R.preventDefault(),g(!0);const I=S.current;if(I){const $=I.getBoundingClientRect();y.current={x:R.clientX-$.left,y:R.clientY-$.top}}else y.current={x:R.clientX-c.x,y:R.clientY-c.y};o?.()},[a,c.x,c.y,o]),M=w.useCallback(R=>{if(!a||!m)return;const D=R.clientX-y.current.x,I=R.clientY-y.current.y,$=window.innerWidth-(S.current?.offsetWidth||0),V=window.innerHeight-(S.current?.offsetHeight||0),A=Math.max(0,Math.min(D,$)),j=Math.max(0,Math.min(I,V)),z={x:A,y:j};f(z),b(z),p(!0)},[m,a,b]),U=w.useCallback(()=>{!a||!m||(g(!1),s?.())},[m,s]);return w.useEffect(()=>{if(!a)return;const R=S.current;if(R)return R.addEventListener("mousedown",k),()=>{R.removeEventListener("mousedown",k)}},[a,k]),w.useEffect(()=>{if(m)return document.addEventListener("mousemove",M),document.addEventListener("mouseup",U),document.body.style.cursor="grabbing",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",U),document.body.style.cursor="",document.body.style.userSelect=""}},[m,M,U]),{position:c,isDragging:m,elementRef:S,hasSavedPosition:h,setPosition:R=>{f(R),b(R),p(!0)}}}const JS=w.lazy(()=>Promise.resolve().then(()=>oE));function WS({isOpen:n,onClose:i,iconUrl:a,onStartNewSession:o,children:s,title:c,sessionId:f,chatComposer:h,environment:p,displayMode:m}){const[g,y]=w.useState(!1),S=w.useRef(null);w.useEffect(()=>{const D=()=>{const I=window?.innerWidth??0,$=navigator?.userAgent?.toLowerCase()??"",V=I<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test($)||m==="full";y(V)};return D(),window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[m]),w.useEffect(()=>{if(!n||!g||!S.current)return;const D=S.current;let I=null,$=null;if(window.visualViewport){const V=()=>{if(D&&window.visualViewport){const z=window.visualViewport.height,K=window.visualViewport.offsetTop;I=requestAnimationFrame(()=>{D.style.transition="none",D.style.top=`${K}px`,D.style.left="0",D.style.right="0",D.style.bottom="auto",D.style.width="100vw",D.style.height=`${z}px`,D.style.maxHeight=`${z}px`,D.style.minHeight=`${z}px`,$&&clearTimeout($),$=setTimeout(()=>{D.style.transition=""},100)})}},A=()=>{V()},j=()=>{if(D&&window.visualViewport){const z=window.visualViewport.offsetTop;I=requestAnimationFrame(()=>{D.style.transition="none",D.style.top=`${z}px`,setTimeout(()=>{D.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",A),window.visualViewport.addEventListener("scroll",j),V(),()=>{I&&cancelAnimationFrame(I),$&&clearTimeout($),window.visualViewport?.removeEventListener("resize",A),window.visualViewport?.removeEventListener("scroll",j)}}else{const V=()=>{D&&(D.style.transition="none",D.style.top="0",D.style.left="0",D.style.right="0",D.style.bottom="auto",D.style.width="100vw",D.style.height="100svh",D.style.maxHeight="100svh",setTimeout(()=>{D.style.transition=""},100))};return window.addEventListener("resize",V),V(),()=>{window.removeEventListener("resize",V)}}},[n,g]),w.useEffect(()=>{if(n){const D=document.body.style.overflow,I=document.body.style.paddingRight,$=document.documentElement.style.overflow,V=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",V>0&&!g&&(document.body.style.paddingRight=`${V}px`),()=>{document.body.style.overflow=D,document.body.style.paddingRight=I,document.documentElement.style.overflow=$}}},[n,g]);const{position:b,elementRef:k,hasSavedPosition:M}=ZS({storageKey:"medassist-widget-position",defaultPosition:{x:0,y:0},enabled:n&&!g});w.useEffect(()=>{S.current&&(k.current=S.current)},[k]);const U=Ce("synapse-chat-widget-container","fixed m-0 p-0","box-border",g?"":"transition-all duration-300",g?"w-screen h-[100svh]":"w-96 h-[600px]","z-[2147483647]",n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none scale-95"),R=Ce("w-full h-full",g?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",g?"rounded-none":"rounded-3xl");return x.jsxs("div",{ref:S,className:U,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...!g&&{...M?{left:`${b.x}px`,top:`${b.y}px`,bottom:"auto",right:"auto"}:{bottom:"1rem",right:"1rem"},cursor:n?"grab":"default"},...g&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",backgroundColor:"white"}},children:[x.jsx("style",{children:`
|
|
8
|
+
`+r.stack}}var ve=Object.prototype.hasOwnProperty,Ce=n.unstable_scheduleCallback,Me=n.unstable_cancelCallback,Ge=n.unstable_shouldYield,dt=n.unstable_requestPaint,nt=n.unstable_now,br=n.unstable_getCurrentPriorityLevel,F=n.unstable_ImmediatePriority,re=n.unstable_UserBlockingPriority,Se=n.unstable_NormalPriority,De=n.unstable_LowPriority,Fe=n.unstable_IdlePriority,Zt=n.log,Bn=n.unstable_setDisableYieldValue,zt=null,bt=null;function Bt(e){if(typeof Zt=="function"&&Bn(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(zt,e)}catch{}}var We=Math.clz32?Math.clz32:XC,fl=Math.log,bn=Math.LN2;function XC(e){return e>>>=0,e===0?32:31-(fl(e)/bn|0)|0}var Xa=256,Ka=262144,Qa=4194304;function Yl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Za(e,t,l){var r=e.pendingLanes;if(r===0)return 0;var u=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var E=r&134217727;return E!==0?(r=E&~d,r!==0?u=Yl(r):(v&=E,v!==0?u=Yl(v):l||(l=E&~e,l!==0&&(u=Yl(l))))):(E=r&~d,E!==0?u=Yl(E):v!==0?u=Yl(v):l||(l=r&~e,l!==0&&(u=Yl(l)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,l=t&-t,d>=l||d===32&&(l&4194048)!==0)?t:u}function ji(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function KC(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wp(){var e=Qa;return Qa<<=1,(Qa&62914560)===0&&(Qa=4194304),e}function Ou(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function QC(e,t,l,r,u,d){var v=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var E=e.entanglements,R=e.expirationTimes,H=e.hiddenUpdates;for(l=v&~l;0<l;){var X=31-We(l),J=1<<X;E[X]=0,R[X]=-1;var Y=H[X];if(Y!==null)for(H[X]=null,X=0;X<Y.length;X++){var P=Y[X];P!==null&&(P.lane&=-536870913)}l&=~J}r!==0&&_p(e,r,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~t))}function _p(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-We(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|l&261930}function Ap(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var r=31-We(l),u=1<<r;u&t|e[r]&t&&(e[r]|=t),l&=~u}}function Np(e,t){var l=t&-t;return l=(l&42)!==0?1:ku(l),(l&(e.suspendedLanes|t))!==0?0:l}function ku(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Mu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rp(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:mb(e.type))}function Op(e,t){var l=W.p;try{return W.p=e,t()}finally{W.p=l}}var dl=Math.random().toString(36).slice(2),_t="__reactFiber$"+dl,It="__reactProps$"+dl,Sr="__reactContainer$"+dl,zu="__reactEvents$"+dl,ZC="__reactListeners$"+dl,JC="__reactHandles$"+dl,kp="__reactResources$"+dl,Ui="__reactMarker$"+dl;function Du(e){delete e[_t],delete e[It],delete e[zu],delete e[ZC],delete e[JC]}function Er(e){var t=e[_t];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Sr]||l[_t]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Wv(e);e!==null;){if(l=e[_t])return l;e=Wv(e)}return t}e=l,l=e.parentNode}return null}function xr(e){if(e=e[_t]||e[Sr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Tr(e){var t=e[kp];return t||(t=e[kp]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[Ui]=!0}var Mp=new Set,zp={};function Vl(e,t){Cr(e,t),Cr(e+"Capture",t)}function Cr(e,t){for(zp[e]=t,e=0;e<t.length;e++)Mp.add(t[e])}var WC=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Dp={},jp={};function $C(e){return ve.call(jp,e)?!0:ve.call(Dp,e)?!1:WC.test(e)?jp[e]=!0:(Dp[e]=!0,!1)}function Ja(e,t,l){if($C(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Wa(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function In(e,t,l,r){if(r===null)e.removeAttribute(l);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+r)}}function sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ew(e,t,l){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(v){l=""+v,d.call(this,v)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ju(e){if(!e._valueTracker){var t=Lp(e)?"checked":"value";e._valueTracker=ew(e,t,""+e[t])}}function Up(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),r="";return e&&(r=Lp(e)?e.checked?"true":"false":e.value),e=r,e!==l?(t.setValue(e),!0):!1}function $a(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var tw=/[\n"\\]/g;function un(e){return e.replace(tw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Lu(e,t,l,r,u,d,v,E){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+sn(t)):e.value!==""+sn(t)&&(e.value=""+sn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Uu(e,v,sn(t)):l!=null?Uu(e,v,sn(l)):r!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+sn(E):e.removeAttribute("name")}function Bp(e,t,l,r,u,d,v,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ju(e);return}l=l!=null?""+sn(l):"",t=t!=null?""+sn(t):l,E||t===e.value||(e.value=t),e.defaultValue=t}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=E?e.checked:!!r,e.defaultChecked=!!r,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),ju(e)}function Uu(e,t,l){t==="number"&&$a(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function wr(e,t,l,r){if(e=e.options,t){t={};for(var u=0;u<l.length;u++)t["$"+l[u]]=!0;for(l=0;l<e.length;l++)u=t.hasOwnProperty("$"+e[l].value),e[l].selected!==u&&(e[l].selected=u),u&&r&&(e[l].defaultSelected=!0)}else{for(l=""+sn(l),t=null,u=0;u<e.length;u++){if(e[u].value===l){e[u].selected=!0,r&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Ip(e,t,l){if(t!=null&&(t=""+sn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+sn(l):""}function Hp(e,t,l,r){if(t==null){if(r!=null){if(l!=null)throw Error(o(92));if(ee(r)){if(1<r.length)throw Error(o(93));r=r[0]}l=r}l==null&&(l=""),t=l}l=sn(t),e.defaultValue=l,r=e.textContent,r===l&&r!==""&&r!==null&&(e.value=r),ju(e)}function _r(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var nw=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 qp(e,t,l){var r=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,l):typeof l!="number"||l===0||nw.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Yp(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var r in l)!l.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var u in t)r=t[u],t.hasOwnProperty(u)&&l[u]!==r&&qp(e,u,r)}else for(var d in t)t.hasOwnProperty(d)&&qp(e,d,t[d])}function Bu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lw=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"]]),rw=/^[\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 eo(e){return rw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Hn(){}var Iu=null;function Hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ar=null,Nr=null;function Vp(e){var t=xr(e);if(t&&(e=t.stateNode)){var l=e[It]||null;e:switch(e=t.stateNode,t.type){case"input":if(Lu(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+un(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var r=l[t];if(r!==e&&r.form===e.form){var u=r[It]||null;if(!u)throw Error(o(90));Lu(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<l.length;t++)r=l[t],r.form===e.form&&Up(r)}break e;case"textarea":Ip(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&wr(e,!!l.multiple,t,!1)}}}var qu=!1;function Gp(e,t,l){if(qu)return e(t,l);qu=!0;try{var r=e(t);return r}finally{if(qu=!1,(Ar!==null||Nr!==null)&&(Yo(),Ar&&(t=Ar,e=Nr,Nr=Ar=null,Vp(t),e)))for(t=0;t<e.length;t++)Vp(e[t])}}function Ii(e,t){var l=e.stateNode;if(l===null)return null;var r=l[It]||null;if(r===null)return null;l=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(qn)try{var Hi={};Object.defineProperty(Hi,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{Yu=!1}var hl=null,Vu=null,to=null;function Pp(){if(to)return to;var e,t=Vu,l=t.length,r,u="value"in hl?hl.value:hl.textContent,d=u.length;for(e=0;e<l&&t[e]===u[e];e++);var v=l-e;for(r=1;r<=v&&t[l-r]===u[d-r];r++);return to=u.slice(e,1<r?1-r:void 0)}function no(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function lo(){return!0}function Fp(){return!1}function Ht(e){function t(l,r,u,d,v){this._reactName=l,this._targetInst=u,this.type=r,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(l=e[E],this[E]=l?l(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?lo:Fp,this.isPropagationStopped=Fp,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),t}var Gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ro=Ht(Gl),qi=y({},Gl,{view:0,detail:0}),iw=Ht(qi),Gu,Pu,Yi,io=y({},qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yi&&(Yi&&e.type==="mousemove"?(Gu=e.screenX-Yi.screenX,Pu=e.screenY-Yi.screenY):Pu=Gu=0,Yi=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Pu}}),Xp=Ht(io),aw=y({},io,{dataTransfer:0}),ow=Ht(aw),sw=y({},qi,{relatedTarget:0}),Fu=Ht(sw),uw=y({},Gl,{animationName:0,elapsedTime:0,pseudoElement:0}),cw=Ht(uw),fw=y({},Gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dw=Ht(fw),hw=y({},Gl,{data:0}),Kp=Ht(hw),mw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pw={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"},gw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gw[e])?!!t[e]:!1}function Xu(){return yw}var vw=y({},qi,{key:function(e){if(e.key){var t=mw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=no(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(e){return e.type==="keypress"?no(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?no(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bw=Ht(vw),Sw=y({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qp=Ht(Sw),Ew=y({},qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),xw=Ht(Ew),Tw=y({},Gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cw=Ht(Tw),ww=y({},io,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_w=Ht(ww),Aw=y({},Gl,{newState:0,oldState:0}),Nw=Ht(Aw),Rw=[9,13,27,32],Ku=qn&&"CompositionEvent"in window,Vi=null;qn&&"documentMode"in document&&(Vi=document.documentMode);var Ow=qn&&"TextEvent"in window&&!Vi,Zp=qn&&(!Ku||Vi&&8<Vi&&11>=Vi),Jp=" ",Wp=!1;function $p(e,t){switch(e){case"keyup":return Rw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rr=!1;function kw(e,t){switch(e){case"compositionend":return eg(t);case"keypress":return t.which!==32?null:(Wp=!0,Jp);case"textInput":return e=t.data,e===Jp&&Wp?null:e;default:return null}}function Mw(e,t){if(Rr)return e==="compositionend"||!Ku&&$p(e,t)?(e=Pp(),to=Vu=hl=null,Rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zp&&t.locale!=="ko"?null:t.data;default:return null}}var zw={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 tg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zw[e.type]:t==="textarea"}function ng(e,t,l,r){Ar?Nr?Nr.push(r):Nr=[r]:Ar=r,t=Qo(t,"onChange"),0<t.length&&(l=new ro("onChange","change",null,l,r),e.push({event:l,listeners:t}))}var Gi=null,Pi=null;function Dw(e){Bv(e,0)}function ao(e){var t=Bi(e);if(Up(t))return e}function lg(e,t){if(e==="change")return t}var rg=!1;if(qn){var Qu;if(qn){var Zu="oninput"in document;if(!Zu){var ig=document.createElement("div");ig.setAttribute("oninput","return;"),Zu=typeof ig.oninput=="function"}Qu=Zu}else Qu=!1;rg=Qu&&(!document.documentMode||9<document.documentMode)}function ag(){Gi&&(Gi.detachEvent("onpropertychange",og),Pi=Gi=null)}function og(e){if(e.propertyName==="value"&&ao(Pi)){var t=[];ng(t,Pi,e,Hu(e)),Gp(Dw,t)}}function jw(e,t,l){e==="focusin"?(ag(),Gi=t,Pi=l,Gi.attachEvent("onpropertychange",og)):e==="focusout"&&ag()}function Lw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ao(Pi)}function Uw(e,t){if(e==="click")return ao(t)}function Bw(e,t){if(e==="input"||e==="change")return ao(t)}function Iw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:Iw;function Fi(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),r=Object.keys(t);if(l.length!==r.length)return!1;for(r=0;r<l.length;r++){var u=l[r];if(!ve.call(t,u)||!Jt(e[u],t[u]))return!1}return!0}function sg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ug(e,t){var l=sg(e);e=0;for(var r;l;){if(l.nodeType===3){if(r=e+l.textContent.length,e<=t&&r>=t)return{node:l,offset:t-e};e=r}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=sg(l)}}function cg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$a(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=$a(e.document)}return t}function Ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Hw=qn&&"documentMode"in document&&11>=document.documentMode,Or=null,Wu=null,Xi=null,$u=!1;function dg(e,t,l){var r=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$u||Or==null||Or!==$a(r)||(r=Or,"selectionStart"in r&&Ju(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xi&&Fi(Xi,r)||(Xi=r,r=Qo(Wu,"onSelect"),0<r.length&&(t=new ro("onSelect","select",null,t,l),e.push({event:t,listeners:r}),t.target=Or)))}function Pl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var kr={animationend:Pl("Animation","AnimationEnd"),animationiteration:Pl("Animation","AnimationIteration"),animationstart:Pl("Animation","AnimationStart"),transitionrun:Pl("Transition","TransitionRun"),transitionstart:Pl("Transition","TransitionStart"),transitioncancel:Pl("Transition","TransitionCancel"),transitionend:Pl("Transition","TransitionEnd")},ec={},hg={};qn&&(hg=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function Fl(e){if(ec[e])return ec[e];if(!kr[e])return e;var t=kr[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in hg)return ec[e]=t[l];return e}var mg=Fl("animationend"),pg=Fl("animationiteration"),gg=Fl("animationstart"),qw=Fl("transitionrun"),Yw=Fl("transitionstart"),Vw=Fl("transitioncancel"),yg=Fl("transitionend"),vg=new Map,tc="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(" ");tc.push("scrollEnd");function Sn(e,t){vg.set(e,t),Vl(t,[e])}var oo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},cn=[],Mr=0,nc=0;function so(){for(var e=Mr,t=nc=Mr=0;t<e;){var l=cn[t];cn[t++]=null;var r=cn[t];cn[t++]=null;var u=cn[t];cn[t++]=null;var d=cn[t];if(cn[t++]=null,r!==null&&u!==null){var v=r.pending;v===null?u.next=u:(u.next=v.next,v.next=u),r.pending=u}d!==0&&bg(l,u,d)}}function uo(e,t,l,r){cn[Mr++]=e,cn[Mr++]=t,cn[Mr++]=l,cn[Mr++]=r,nc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function lc(e,t,l,r){return uo(e,t,l,r),co(e)}function Xl(e,t){return uo(e,null,null,t),co(e)}function bg(e,t,l){e.lanes|=l;var r=e.alternate;r!==null&&(r.lanes|=l);for(var u=!1,d=e.return;d!==null;)d.childLanes|=l,r=d.alternate,r!==null&&(r.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-We(l),e=d.hiddenUpdates,r=e[u],r===null?e[u]=[t]:r.push(t),t.lane=l|536870912),d):null}function co(e){if(50<pa)throw pa=0,hf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zr={};function Gw(e,t,l,r){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,t,l,r){return new Gw(e,t,l,r)}function rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(e,t){var l=e.alternate;return l===null?(l=Wt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Sg(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fo(e,t,l,r,u,d){var v=0;if(r=e,typeof e=="function")rc(e)&&(v=1);else if(typeof e=="string")v=Q_(e,l,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=Wt(31,l,t,u),e.elementType=K,e.lanes=d,e;case O:return Kl(l.children,u,d,t);case z:v=8,u|=24;break;case _:return e=Wt(12,l,t,u|2),e.elementType=_,e.lanes=d,e;case G:return e=Wt(13,l,t,u),e.elementType=G,e.lanes=d,e;case N:return e=Wt(19,l,t,u),e.elementType=N,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:v=10;break e;case q:v=9;break e;case $:v=11;break e;case D:v=14;break e;case j:v=16,r=null;break e}v=29,l=Error(o(130,e===null?"null":typeof e,"")),r=null}return t=Wt(v,l,t,u),t.elementType=e,t.type=r,t.lanes=d,t}function Kl(e,t,l,r){return e=Wt(7,e,r,t),e.lanes=l,e}function ic(e,t,l){return e=Wt(6,e,null,t),e.lanes=l,e}function Eg(e){var t=Wt(18,null,null,0);return t.stateNode=e,t}function ac(e,t,l){return t=Wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xg=new WeakMap;function fn(e,t){if(typeof e=="object"&&e!==null){var l=xg.get(e);return l!==void 0?l:(t={value:e,source:t,stack:se(t)},xg.set(e,t),t)}return{value:e,source:t,stack:se(t)}}var Dr=[],jr=0,ho=null,Ki=0,dn=[],hn=0,ml=null,Nn=1,Rn="";function Vn(e,t){Dr[jr++]=Ki,Dr[jr++]=ho,ho=e,Ki=t}function Tg(e,t,l){dn[hn++]=Nn,dn[hn++]=Rn,dn[hn++]=ml,ml=e;var r=Nn;e=Rn;var u=32-We(r)-1;r&=~(1<<u),l+=1;var d=32-We(t)+u;if(30<d){var v=u-u%5;d=(r&(1<<v)-1).toString(32),r>>=v,u-=v,Nn=1<<32-We(t)+u|l<<u|r,Rn=d+e}else Nn=1<<d|l<<u|r,Rn=e}function oc(e){e.return!==null&&(Vn(e,1),Tg(e,1,0))}function sc(e){for(;e===ho;)ho=Dr[--jr],Dr[jr]=null,Ki=Dr[--jr],Dr[jr]=null;for(;e===ml;)ml=dn[--hn],dn[hn]=null,Rn=dn[--hn],dn[hn]=null,Nn=dn[--hn],dn[hn]=null}function Cg(e,t){dn[hn++]=Nn,dn[hn++]=Rn,dn[hn++]=ml,Nn=t.id,Rn=t.overflow,ml=e}var At=null,lt=null,Ie=!1,pl=null,mn=!1,uc=Error(o(519));function gl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(fn(t,e)),uc}function wg(e){var t=e.stateNode,l=e.type,r=e.memoizedProps;switch(t[_t]=e,t[It]=r,l){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(l=0;l<ya.length;l++)Le(ya[l],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),Bp(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),Hp(t,r.value,r.defaultValue,r.children)}l=r.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||r.suppressHydrationWarning===!0||Yv(t.textContent,l)?(r.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),r.onScroll!=null&&Le("scroll",t),r.onScrollEnd!=null&&Le("scrollend",t),r.onClick!=null&&(t.onclick=Hn),t=!0):t=!1,t||gl(e,!0)}function _g(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:At=At.return}}function Lr(e){if(e!==At)return!1;if(!Ie)return _g(e),Ie=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Nf(e.type,e.memoizedProps)),l=!l),l&<&&gl(e),_g(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));lt=Jv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));lt=Jv(e)}else t===27?(t=lt,Ol(e.type)?(e=zf,zf=null,lt=e):lt=t):lt=At?gn(e.stateNode.nextSibling):null;return!0}function Ql(){lt=At=null,Ie=!1}function cc(){var e=pl;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),pl=null),e}function Qi(e){pl===null?pl=[e]:pl.push(e)}var fc=A(null),Zl=null,Gn=null;function yl(e,t,l){T(fc,t._currentValue),t._currentValue=l}function Pn(e){e._currentValue=fc.current,V(fc)}function dc(e,t,l){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===l)break;e=e.return}}function hc(e,t,l,r){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var v=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var R=0;R<t.length;R++)if(E.context===t[R]){d.lanes|=l,E=d.alternate,E!==null&&(E.lanes|=l),dc(d.return,l,e),r||(v=null);break e}d=E.next}}else if(u.tag===18){if(v=u.return,v===null)throw Error(o(341));v.lanes|=l,d=v.alternate,d!==null&&(d.lanes|=l),dc(v,l,e),v=null}else v=u.child;if(v!==null)v.return=u;else for(v=u;v!==null;){if(v===e){v=null;break}if(u=v.sibling,u!==null){u.return=v.return,v=u;break}v=v.return}u=v}}function Ur(e,t,l,r){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var v=u.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var E=u.type;Jt(u.pendingProps.value,v.value)||(e!==null?e.push(E):e=[E])}}else if(u===pe.current){if(v=u.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(xa):e=[xa])}u=u.return}e!==null&&hc(t,e,l,r),t.flags|=262144}function mo(e){for(e=e.firstContext;e!==null;){if(!Jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Jl(e){Zl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return Ag(Zl,e)}function po(e,t){return Zl===null&&Jl(e),Ag(e,t)}function Ag(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Gn===null){if(e===null)throw Error(o(308));Gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gn=Gn.next=t;return l}var Pw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Fw=n.unstable_scheduleCallback,Xw=n.unstable_NormalPriority,ht={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mc(){return{controller:new Pw,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&Fw(Xw,function(){e.controller.abort()})}var Ji=null,pc=0,Br=0,Ir=null;function Kw(e,t){if(Ji===null){var l=Ji=[];pc=0,Br=bf(),Ir={status:"pending",value:void 0,then:function(r){l.push(r)}}}return pc++,t.then(Ng,Ng),t}function Ng(){if(--pc===0&&Ji!==null){Ir!==null&&(Ir.status="fulfilled");var e=Ji;Ji=null,Br=0,Ir=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qw(e,t){var l=[],r={status:"pending",value:null,reason:null,then:function(u){l.push(u)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var u=0;u<l.length;u++)(0,l[u])(t)},function(u){for(r.status="rejected",r.reason=u,u=0;u<l.length;u++)(0,l[u])(void 0)}),r}var Rg=U.S;U.S=function(e,t){dv=nt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Kw(e,t),Rg!==null&&Rg(e,t)};var Wl=A(null);function gc(){var e=Wl.current;return e!==null?e:$e.pooledCache}function go(e,t){t===null?T(Wl,Wl.current):T(Wl,t.pool)}function Og(){var e=gc();return e===null?null:{parent:ht._currentValue,pool:e}}var Hr=Error(o(460)),yc=Error(o(474)),yo=Error(o(542)),vo={then:function(){}};function kg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Mg(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Hn,Hn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dg(e),e;default:if(typeof t.status=="string")t.then(Hn,Hn);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=r}},function(r){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dg(e),e}throw er=t,Hr}}function $l(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(er=l,Hr):l}}var er=null;function zg(){if(er===null)throw Error(o(459));var e=er;return er=null,e}function Dg(e){if(e===Hr||e===yo)throw Error(o(483))}var qr=null,Wi=0;function bo(e){var t=Wi;return Wi+=1,qr===null&&(qr=[]),Mg(qr,e,t)}function $i(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function So(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jg(e){function t(L,k){if(e){var I=L.deletions;I===null?(L.deletions=[k],L.flags|=16):I.push(k)}}function l(L,k){if(!e)return null;for(;k!==null;)t(L,k),k=k.sibling;return null}function r(L){for(var k=new Map;L!==null;)L.key!==null?k.set(L.key,L):k.set(L.index,L),L=L.sibling;return k}function u(L,k){return L=Yn(L,k),L.index=0,L.sibling=null,L}function d(L,k,I){return L.index=I,e?(I=L.alternate,I!==null?(I=I.index,I<k?(L.flags|=67108866,k):I):(L.flags|=67108866,k)):(L.flags|=1048576,k)}function v(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function E(L,k,I,Q){return k===null||k.tag!==6?(k=ic(I,L.mode,Q),k.return=L,k):(k=u(k,I),k.return=L,k)}function R(L,k,I,Q){var be=I.type;return be===O?X(L,k,I.props.children,Q,I.key):k!==null&&(k.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&$l(be)===k.type)?(k=u(k,I.props),$i(k,I),k.return=L,k):(k=fo(I.type,I.key,I.props,null,L.mode,Q),$i(k,I),k.return=L,k)}function H(L,k,I,Q){return k===null||k.tag!==4||k.stateNode.containerInfo!==I.containerInfo||k.stateNode.implementation!==I.implementation?(k=ac(I,L.mode,Q),k.return=L,k):(k=u(k,I.children||[]),k.return=L,k)}function X(L,k,I,Q,be){return k===null||k.tag!==7?(k=Kl(I,L.mode,Q,be),k.return=L,k):(k=u(k,I),k.return=L,k)}function J(L,k,I){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=ic(""+k,L.mode,I),k.return=L,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case b:return I=fo(k.type,k.key,k.props,null,L.mode,I),$i(I,k),I.return=L,I;case M:return k=ac(k,L.mode,I),k.return=L,k;case j:return k=$l(k),J(L,k,I)}if(ee(k)||oe(k))return k=Kl(k,L.mode,I,null),k.return=L,k;if(typeof k.then=="function")return J(L,bo(k),I);if(k.$$typeof===B)return J(L,po(L,k),I);So(L,k)}return null}function Y(L,k,I,Q){var be=k!==null?k.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return be!==null?null:E(L,k,""+I,Q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case b:return I.key===be?R(L,k,I,Q):null;case M:return I.key===be?H(L,k,I,Q):null;case j:return I=$l(I),Y(L,k,I,Q)}if(ee(I)||oe(I))return be!==null?null:X(L,k,I,Q,null);if(typeof I.then=="function")return Y(L,k,bo(I),Q);if(I.$$typeof===B)return Y(L,k,po(L,I),Q);So(L,I)}return null}function P(L,k,I,Q,be){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return L=L.get(I)||null,E(k,L,""+Q,be);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return L=L.get(Q.key===null?I:Q.key)||null,R(k,L,Q,be);case M:return L=L.get(Q.key===null?I:Q.key)||null,H(k,L,Q,be);case j:return Q=$l(Q),P(L,k,I,Q,be)}if(ee(Q)||oe(Q))return L=L.get(I)||null,X(k,L,Q,be,null);if(typeof Q.then=="function")return P(L,k,I,bo(Q),be);if(Q.$$typeof===B)return P(L,k,I,po(k,Q),be);So(k,Q)}return null}function de(L,k,I,Q){for(var be=null,qe=null,ye=k,Re=k=0,Be=null;ye!==null&&Re<I.length;Re++){ye.index>Re?(Be=ye,ye=null):Be=ye.sibling;var Ye=Y(L,ye,I[Re],Q);if(Ye===null){ye===null&&(ye=Be);break}e&&ye&&Ye.alternate===null&&t(L,ye),k=d(Ye,k,Re),qe===null?be=Ye:qe.sibling=Ye,qe=Ye,ye=Be}if(Re===I.length)return l(L,ye),Ie&&Vn(L,Re),be;if(ye===null){for(;Re<I.length;Re++)ye=J(L,I[Re],Q),ye!==null&&(k=d(ye,k,Re),qe===null?be=ye:qe.sibling=ye,qe=ye);return Ie&&Vn(L,Re),be}for(ye=r(ye);Re<I.length;Re++)Be=P(ye,L,Re,I[Re],Q),Be!==null&&(e&&Be.alternate!==null&&ye.delete(Be.key===null?Re:Be.key),k=d(Be,k,Re),qe===null?be=Be:qe.sibling=Be,qe=Be);return e&&ye.forEach(function(jl){return t(L,jl)}),Ie&&Vn(L,Re),be}function Ee(L,k,I,Q){if(I==null)throw Error(o(151));for(var be=null,qe=null,ye=k,Re=k=0,Be=null,Ye=I.next();ye!==null&&!Ye.done;Re++,Ye=I.next()){ye.index>Re?(Be=ye,ye=null):Be=ye.sibling;var jl=Y(L,ye,Ye.value,Q);if(jl===null){ye===null&&(ye=Be);break}e&&ye&&jl.alternate===null&&t(L,ye),k=d(jl,k,Re),qe===null?be=jl:qe.sibling=jl,qe=jl,ye=Be}if(Ye.done)return l(L,ye),Ie&&Vn(L,Re),be;if(ye===null){for(;!Ye.done;Re++,Ye=I.next())Ye=J(L,Ye.value,Q),Ye!==null&&(k=d(Ye,k,Re),qe===null?be=Ye:qe.sibling=Ye,qe=Ye);return Ie&&Vn(L,Re),be}for(ye=r(ye);!Ye.done;Re++,Ye=I.next())Ye=P(ye,L,Re,Ye.value,Q),Ye!==null&&(e&&Ye.alternate!==null&&ye.delete(Ye.key===null?Re:Ye.key),k=d(Ye,k,Re),qe===null?be=Ye:qe.sibling=Ye,qe=Ye);return e&&ye.forEach(function(aA){return t(L,aA)}),Ie&&Vn(L,Re),be}function Je(L,k,I,Q){if(typeof I=="object"&&I!==null&&I.type===O&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case b:e:{for(var be=I.key;k!==null;){if(k.key===be){if(be=I.type,be===O){if(k.tag===7){l(L,k.sibling),Q=u(k,I.props.children),Q.return=L,L=Q;break e}}else if(k.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&$l(be)===k.type){l(L,k.sibling),Q=u(k,I.props),$i(Q,I),Q.return=L,L=Q;break e}l(L,k);break}else t(L,k);k=k.sibling}I.type===O?(Q=Kl(I.props.children,L.mode,Q,I.key),Q.return=L,L=Q):(Q=fo(I.type,I.key,I.props,null,L.mode,Q),$i(Q,I),Q.return=L,L=Q)}return v(L);case M:e:{for(be=I.key;k!==null;){if(k.key===be)if(k.tag===4&&k.stateNode.containerInfo===I.containerInfo&&k.stateNode.implementation===I.implementation){l(L,k.sibling),Q=u(k,I.children||[]),Q.return=L,L=Q;break e}else{l(L,k);break}else t(L,k);k=k.sibling}Q=ac(I,L.mode,Q),Q.return=L,L=Q}return v(L);case j:return I=$l(I),Je(L,k,I,Q)}if(ee(I))return de(L,k,I,Q);if(oe(I)){if(be=oe(I),typeof be!="function")throw Error(o(150));return I=be.call(I),Ee(L,k,I,Q)}if(typeof I.then=="function")return Je(L,k,bo(I),Q);if(I.$$typeof===B)return Je(L,k,po(L,I),Q);So(L,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,k!==null&&k.tag===6?(l(L,k.sibling),Q=u(k,I),Q.return=L,L=Q):(l(L,k),Q=ic(I,L.mode,Q),Q.return=L,L=Q),v(L)):l(L,k)}return function(L,k,I,Q){try{Wi=0;var be=Je(L,k,I,Q);return qr=null,be}catch(ye){if(ye===Hr||ye===yo)throw ye;var qe=Wt(29,ye,null,L.mode);return qe.lanes=Q,qe.return=L,qe}finally{}}}var tr=jg(!0),Lg=jg(!1),vl=!1;function vc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sl(e,t,l){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var u=r.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),r.pending=t,t=co(e),bg(e,null,l),t}return uo(e,r,t,l),co(e)}function ea(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,Ap(e,l)}}function Sc(e,t){var l=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,l===r)){var u=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?u=d=v:d=d.next=v,l=l.next}while(l!==null);d===null?u=d=t:d=d.next=t}else u=d=t;l={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Ec=!1;function ta(){if(Ec){var e=Ir;if(e!==null)throw e}}function na(e,t,l,r){Ec=!1;var u=e.updateQueue;vl=!1;var d=u.firstBaseUpdate,v=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var R=E,H=R.next;R.next=null,v===null?d=H:v.next=H,v=R;var X=e.alternate;X!==null&&(X=X.updateQueue,E=X.lastBaseUpdate,E!==v&&(E===null?X.firstBaseUpdate=H:E.next=H,X.lastBaseUpdate=R))}if(d!==null){var J=u.baseState;v=0,X=H=R=null,E=d;do{var Y=E.lane&-536870913,P=Y!==E.lane;if(P?(Ue&Y)===Y:(r&Y)===Y){Y!==0&&Y===Br&&(Ec=!0),X!==null&&(X=X.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=e,Ee=E;Y=t;var Je=l;switch(Ee.tag){case 1:if(de=Ee.payload,typeof de=="function"){J=de.call(Je,J,Y);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Ee.payload,Y=typeof de=="function"?de.call(Je,J,Y):de,Y==null)break e;J=y({},J,Y);break e;case 2:vl=!0}}Y=E.callback,Y!==null&&(e.flags|=64,P&&(e.flags|=8192),P=u.callbacks,P===null?u.callbacks=[Y]:P.push(Y))}else P={lane:Y,tag:E.tag,payload:E.payload,callback:E.callback,next:null},X===null?(H=X=P,R=J):X=X.next=P,v|=Y;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;P=E,E=P.next,P.next=null,u.lastBaseUpdate=P,u.shared.pending=null}}while(!0);X===null&&(R=J),u.baseState=R,u.firstBaseUpdate=H,u.lastBaseUpdate=X,d===null&&(u.shared.lanes=0),wl|=v,e.lanes=v,e.memoizedState=J}}function Ug(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Bg(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ug(l[e],t)}var Yr=A(null),Eo=A(0);function Ig(e,t){e=el,T(Eo,e),T(Yr,t),el=e|t.baseLanes}function xc(){T(Eo,el),T(Yr,Yr.current)}function Tc(){el=Eo.current,V(Yr),V(Eo)}var $t=A(null),pn=null;function El(e){var t=e.alternate;T(ut,ut.current&1),T($t,e),pn===null&&(t===null||Yr.current!==null||t.memoizedState!==null)&&(pn=e)}function Cc(e){T(ut,ut.current),T($t,e),pn===null&&(pn=e)}function Hg(e){e.tag===22?(T(ut,ut.current),T($t,e),pn===null&&(pn=e)):xl()}function xl(){T(ut,ut.current),T($t,$t.current)}function en(e){V($t),pn===e&&(pn=null),V(ut)}var ut=A(0);function xo(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||kf(l)||Mf(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,Ae=null,Qe=null,mt=null,To=!1,Vr=!1,nr=!1,Co=0,la=0,Gr=null,Zw=0;function ot(){throw Error(o(321))}function wc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Jt(e[l],t[l]))return!1;return!0}function _c(e,t,l,r,u,d){return Fn=d,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Ty:qc,nr=!1,d=l(r,u),nr=!1,Vr&&(d=Yg(t,l,r,u)),qg(e),d}function qg(e){U.H=aa;var t=Qe!==null&&Qe.next!==null;if(Fn=0,mt=Qe=Ae=null,To=!1,la=0,Gr=null,t)throw Error(o(300));e===null||pt||(e=e.dependencies,e!==null&&mo(e)&&(pt=!0))}function Yg(e,t,l,r){Ae=e;var u=0;do{if(Vr&&(Gr=null),la=0,Vr=!1,25<=u)throw Error(o(301));if(u+=1,mt=Qe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}U.H=Cy,d=t(l,r)}while(Vr);return d}function Jw(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?ra(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(Ae.flags|=1024),t}function Ac(){var e=Co!==0;return Co=0,e}function Nc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Rc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}Fn=0,mt=Qe=Ae=null,Vr=!1,la=Co=0,Gr=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Ae.memoizedState=mt=e:mt=mt.next=e,mt}function ct(){if(Qe===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=mt===null?Ae.memoizedState:mt.next;if(t!==null)mt=t,Qe=e;else{if(e===null)throw Ae.alternate===null?Error(o(467)):Error(o(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},mt===null?Ae.memoizedState=mt=e:mt=mt.next=e}return mt}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ra(e){var t=la;return la+=1,Gr===null&&(Gr=[]),e=Mg(Gr,e,t),t=Ae,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Ty:qc),e}function _o(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ra(e);if(e.$$typeof===B)return Nt(e)}throw Error(o(438,String(e)))}function Oc(e){var t=null,l=Ae.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var r=Ae.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=wo(),Ae.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),r=0;r<e;r++)l[r]=ae;return t.index++,l}function Xn(e,t){return typeof t=="function"?t(e):t}function Ao(e){var t=ct();return kc(t,Qe,e)}function kc(e,t,l){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=l;var u=e.baseQueue,d=r.pending;if(d!==null){if(u!==null){var v=u.next;u.next=d.next,d.next=v}t.baseQueue=u=d,r.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=v=null,R=null,H=t,X=!1;do{var J=H.lane&-536870913;if(J!==H.lane?(Ue&J)===J:(Fn&J)===J){var Y=H.revertLane;if(Y===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),J===Br&&(X=!0);else if((Fn&Y)===Y){H=H.next,Y===Br&&(X=!0);continue}else J={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(E=R=J,v=d):R=R.next=J,Ae.lanes|=Y,wl|=Y;J=H.action,nr&&l(d,J),d=H.hasEagerState?H.eagerState:l(d,J)}else Y={lane:J,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},R===null?(E=R=Y,v=d):R=R.next=Y,Ae.lanes|=J,wl|=J;H=H.next}while(H!==null&&H!==t);if(R===null?v=d:R.next=E,!Jt(d,e.memoizedState)&&(pt=!0,X&&(l=Ir,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=R,r.lastRenderedState=d}return u===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Mc(e){var t=ct(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var r=l.dispatch,u=l.pending,d=t.memoizedState;if(u!==null){l.pending=null;var v=u=u.next;do d=e(d,v.action),v=v.next;while(v!==u);Jt(d,t.memoizedState)||(pt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),l.lastRenderedState=d}return[d,r]}function Vg(e,t,l){var r=Ae,u=ct(),d=Ie;if(d){if(l===void 0)throw Error(o(407));l=l()}else l=t();var v=!Jt((Qe||u).memoizedState,l);if(v&&(u.memoizedState=l,pt=!0),u=u.queue,jc(Fg.bind(null,r,u,e),[e]),u.getSnapshot!==t||v||mt!==null&&mt.memoizedState.tag&1){if(r.flags|=2048,Pr(9,{destroy:void 0},Pg.bind(null,r,u,l,t),null),$e===null)throw Error(o(349));d||(Fn&127)!==0||Gg(r,t,l)}return l}function Gg(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Ae.updateQueue,t===null?(t=wo(),Ae.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Pg(e,t,l,r){t.value=l,t.getSnapshot=r,Xg(t)&&Kg(e)}function Fg(e,t,l){return l(function(){Xg(t)&&Kg(e)})}function Xg(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Jt(e,l)}catch{return!0}}function Kg(e){var t=Xl(e,2);t!==null&&Pt(t,e,2)}function zc(e){var t=Dt();if(typeof e=="function"){var l=e;if(e=l(),nr){Bt(!0);try{l()}finally{Bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:e},t}function Qg(e,t,l,r){return e.baseState=l,kc(e,Qe,typeof r=="function"?r:Xn)}function Ww(e,t,l,r,u){if(Oo(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};U.T!==null?l(!0):d.isTransition=!1,r(d),l=t.pending,l===null?(d.next=t.pending=d,Zg(t,d)):(d.next=l.next,t.pending=l.next=d)}}function Zg(e,t){var l=t.action,r=t.payload,u=e.state;if(t.isTransition){var d=U.T,v={};U.T=v;try{var E=l(u,r),R=U.S;R!==null&&R(v,E),Jg(e,t,E)}catch(H){Dc(e,t,H)}finally{d!==null&&v.types!==null&&(d.types=v.types),U.T=d}}else try{d=l(u,r),Jg(e,t,d)}catch(H){Dc(e,t,H)}}function Jg(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(r){Wg(e,t,r)},function(r){return Dc(e,t,r)}):Wg(e,t,l)}function Wg(e,t,l){t.status="fulfilled",t.value=l,$g(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Zg(e,l)))}function Dc(e,t,l){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=l,$g(t),t=t.next;while(t!==r)}e.action=null}function $g(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ey(e,t){return t}function ty(e,t){if(Ie){var l=$e.formState;if(l!==null){e:{var r=Ae;if(Ie){if(lt){t:{for(var u=lt,d=mn;u.nodeType!==8;){if(!d){u=null;break t}if(u=gn(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){lt=gn(u.nextSibling),r=u.data==="F!";break e}}gl(r)}r=!1}r&&(t=l[0])}}return l=Dt(),l.memoizedState=l.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ey,lastRenderedState:t},l.queue=r,l=Sy.bind(null,Ae,r),r.dispatch=l,r=zc(!1),d=Hc.bind(null,Ae,!1,r.queue),r=Dt(),u={state:t,dispatch:null,action:e,pending:null},r.queue=u,l=Ww.bind(null,Ae,u,d,l),u.dispatch=l,r.memoizedState=e,[t,l,!1]}function ny(e){var t=ct();return ly(t,Qe,e)}function ly(e,t,l){if(t=kc(e,t,ey)[0],e=Ao(Xn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ra(t)}catch(v){throw v===Hr?yo:v}else r=t;t=ct();var u=t.queue,d=u.dispatch;return l!==t.memoizedState&&(Ae.flags|=2048,Pr(9,{destroy:void 0},$w.bind(null,u,l),null)),[r,d,e]}function $w(e,t){e.action=t}function ry(e){var t=ct(),l=Qe;if(l!==null)return ly(t,l,e);ct(),t=t.memoizedState,l=ct();var r=l.queue.dispatch;return l.memoizedState=e,[t,r,!1]}function Pr(e,t,l,r){return e={tag:e,create:l,deps:r,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=wo(),Ae.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(r=l.next,l.next=e,e.next=r,t.lastEffect=e),e}function iy(){return ct().memoizedState}function No(e,t,l,r){var u=Dt();Ae.flags|=e,u.memoizedState=Pr(1|t,{destroy:void 0},l,r===void 0?null:r)}function Ro(e,t,l,r){var u=ct();r=r===void 0?null:r;var d=u.memoizedState.inst;Qe!==null&&r!==null&&wc(r,Qe.memoizedState.deps)?u.memoizedState=Pr(t,d,l,r):(Ae.flags|=e,u.memoizedState=Pr(1|t,d,l,r))}function ay(e,t){No(8390656,8,e,t)}function jc(e,t){Ro(2048,8,e,t)}function e_(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=wo(),Ae.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function oy(e){var t=ct().memoizedState;return e_({ref:t,nextImpl:e}),function(){if((Pe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function sy(e,t){return Ro(4,2,e,t)}function uy(e,t){return Ro(4,4,e,t)}function cy(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fy(e,t,l){l=l!=null?l.concat([e]):null,Ro(4,4,cy.bind(null,t,e),l)}function Lc(){}function dy(e,t){var l=ct();t=t===void 0?null:t;var r=l.memoizedState;return t!==null&&wc(t,r[1])?r[0]:(l.memoizedState=[e,t],e)}function hy(e,t){var l=ct();t=t===void 0?null:t;var r=l.memoizedState;if(t!==null&&wc(t,r[1]))return r[0];if(r=e(),nr){Bt(!0);try{e()}finally{Bt(!1)}}return l.memoizedState=[r,t],r}function Uc(e,t,l){return l===void 0||(Fn&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=mv(),Ae.lanes|=e,wl|=e,l)}function my(e,t,l,r){return Jt(l,t)?l:Yr.current!==null?(e=Uc(e,l,r),Jt(e,t)||(pt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Ue&261930)===0?(pt=!0,e.memoizedState=l):(e=mv(),Ae.lanes|=e,wl|=e,t)}function py(e,t,l,r,u){var d=W.p;W.p=d!==0&&8>d?d:8;var v=U.T,E={};U.T=E,Hc(e,!1,t,l);try{var R=u(),H=U.S;if(H!==null&&H(E,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var X=Qw(R,r);ia(e,t,X,ln(e))}else ia(e,t,r,ln(e))}catch(J){ia(e,t,{then:function(){},status:"rejected",reason:J},ln())}finally{W.p=d,v!==null&&E.types!==null&&(v.types=E.types),U.T=v}}function t_(){}function Bc(e,t,l,r){if(e.tag!==5)throw Error(o(476));var u=gy(e).queue;py(e,u,t,Z,l===null?t_:function(){return yy(e),l(r)})}function gy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:Z},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function yy(e){var t=gy(e);t.next===null&&(t=e.alternate.memoizedState),ia(e,t.next.queue,{},ln())}function Ic(){return Nt(xa)}function vy(){return ct().memoizedState}function by(){return ct().memoizedState}function n_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=ln();e=bl(l);var r=Sl(t,e,l);r!==null&&(Pt(r,t,l),ea(r,t,l)),t={cache:mc()},e.payload=t;return}t=t.return}}function l_(e,t,l){var r=ln();l={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Oo(e)?Ey(t,l):(l=lc(e,t,l,r),l!==null&&(Pt(l,e,r),xy(l,t,r)))}function Sy(e,t,l){var r=ln();ia(e,t,l,r)}function ia(e,t,l,r){var u={lane:r,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Oo(e))Ey(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var v=t.lastRenderedState,E=d(v,l);if(u.hasEagerState=!0,u.eagerState=E,Jt(E,v))return uo(e,t,u,0),$e===null&&so(),!1}catch{}finally{}if(l=lc(e,t,u,r),l!==null)return Pt(l,e,r),xy(l,t,r),!0}return!1}function Hc(e,t,l,r){if(r={lane:2,revertLane:bf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Oo(e)){if(t)throw Error(o(479))}else t=lc(e,l,r,2),t!==null&&Pt(t,e,2)}function Oo(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Ey(e,t){Vr=To=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function xy(e,t,l){if((l&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,l|=r,t.lanes=l,Ap(e,l)}}var aa={readContext:Nt,use:_o,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};aa.useEffectEvent=ot;var Ty={readContext:Nt,use:_o,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:ay,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,No(4194308,4,cy.bind(null,t,e),l)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var l=Dt();t=t===void 0?null:t;var r=e();if(nr){Bt(!0);try{e()}finally{Bt(!1)}}return l.memoizedState=[r,t],r},useReducer:function(e,t,l){var r=Dt();if(l!==void 0){var u=l(t);if(nr){Bt(!0);try{l(t)}finally{Bt(!1)}}}else u=t;return r.memoizedState=r.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},r.queue=e,e=e.dispatch=l_.bind(null,Ae,e),[r.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:function(e){e=zc(e);var t=e.queue,l=Sy.bind(null,Ae,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Lc,useDeferredValue:function(e,t){var l=Dt();return Uc(l,e,t)},useTransition:function(){var e=zc(!1);return e=py.bind(null,Ae,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var r=Ae,u=Dt();if(Ie){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),$e===null)throw Error(o(349));(Ue&127)!==0||Gg(r,t,l)}u.memoizedState=l;var d={value:l,getSnapshot:t};return u.queue=d,ay(Fg.bind(null,r,d,e),[e]),r.flags|=2048,Pr(9,{destroy:void 0},Pg.bind(null,r,d,l,t),null),l},useId:function(){var e=Dt(),t=$e.identifierPrefix;if(Ie){var l=Rn,r=Nn;l=(r&~(1<<32-We(r)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Co++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Zw++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ic,useFormState:ty,useActionState:ty,useOptimistic:function(e){var t=Dt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Hc.bind(null,Ae,!0,l),l.dispatch=t,[e,t]},useMemoCache:Oc,useCacheRefresh:function(){return Dt().memoizedState=n_.bind(null,Ae)},useEffectEvent:function(e){var t=Dt(),l={impl:e};return t.memoizedState=l,function(){if((Pe&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},qc={readContext:Nt,use:_o,useCallback:dy,useContext:Nt,useEffect:jc,useImperativeHandle:fy,useInsertionEffect:sy,useLayoutEffect:uy,useMemo:hy,useReducer:Ao,useRef:iy,useState:function(){return Ao(Xn)},useDebugValue:Lc,useDeferredValue:function(e,t){var l=ct();return my(l,Qe.memoizedState,e,t)},useTransition:function(){var e=Ao(Xn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ra(e),t]},useSyncExternalStore:Vg,useId:vy,useHostTransitionStatus:Ic,useFormState:ny,useActionState:ny,useOptimistic:function(e,t){var l=ct();return Qg(l,Qe,e,t)},useMemoCache:Oc,useCacheRefresh:by};qc.useEffectEvent=oy;var Cy={readContext:Nt,use:_o,useCallback:dy,useContext:Nt,useEffect:jc,useImperativeHandle:fy,useInsertionEffect:sy,useLayoutEffect:uy,useMemo:hy,useReducer:Mc,useRef:iy,useState:function(){return Mc(Xn)},useDebugValue:Lc,useDeferredValue:function(e,t){var l=ct();return Qe===null?Uc(l,e,t):my(l,Qe.memoizedState,e,t)},useTransition:function(){var e=Mc(Xn)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:ra(e),t]},useSyncExternalStore:Vg,useId:vy,useHostTransitionStatus:Ic,useFormState:ry,useActionState:ry,useOptimistic:function(e,t){var l=ct();return Qe!==null?Qg(l,Qe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Oc,useCacheRefresh:by};Cy.useEffectEvent=oy;function Yc(e,t,l,r){t=e.memoizedState,l=l(r,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Vc={enqueueSetState:function(e,t,l){e=e._reactInternals;var r=ln(),u=bl(r);u.payload=t,l!=null&&(u.callback=l),t=Sl(e,u,r),t!==null&&(Pt(t,e,r),ea(t,e,r))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var r=ln(),u=bl(r);u.tag=1,u.payload=t,l!=null&&(u.callback=l),t=Sl(e,u,r),t!==null&&(Pt(t,e,r),ea(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=ln(),r=bl(l);r.tag=2,t!=null&&(r.callback=t),t=Sl(e,r,l),t!==null&&(Pt(t,e,l),ea(t,e,l))}};function wy(e,t,l,r,u,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,v):t.prototype&&t.prototype.isPureReactComponent?!Fi(l,r)||!Fi(u,d):!0}function _y(e,t,l,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,r),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function lr(e,t){var l=t;if("ref"in t){l={};for(var r in t)r!=="ref"&&(l[r]=t[r])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var u in e)l[u]===void 0&&(l[u]=e[u])}return l}function Ay(e){oo(e)}function Ny(e){}function Ry(e){oo(e)}function ko(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Oy(e,t,l){try{var r=e.onCaughtError;r(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Gc(e,t,l){return l=bl(l),l.tag=3,l.payload={element:null},l.callback=function(){ko(e,t)},l}function ky(e){return e=bl(e),e.tag=3,e}function My(e,t,l,r){var u=l.type.getDerivedStateFromError;if(typeof u=="function"){var d=r.value;e.payload=function(){return u(d)},e.callback=function(){Oy(t,l,r)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Oy(t,l,r),typeof u!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var E=r.stack;this.componentDidCatch(r.value,{componentStack:E!==null?E:""})})}function r_(e,t,l,r,u){if(l.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=l.alternate,t!==null&&Ur(t,l,u,!0),l=$t.current,l!==null){switch(l.tag){case 31:case 13:return pn===null?Vo():l.alternate===null&&st===0&&(st=3),l.flags&=-257,l.flags|=65536,l.lanes=u,r===vo?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([r]):t.add(r),gf(e,r,u)),!1;case 22:return l.flags|=65536,r===vo?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([r]):l.add(r)),gf(e,r,u)),!1}throw Error(o(435,l.tag))}return gf(e,r,u),Vo(),!1}if(Ie)return t=$t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,r!==uc&&(e=Error(o(422),{cause:r}),Qi(fn(e,l)))):(r!==uc&&(t=Error(o(423),{cause:r}),Qi(fn(t,l))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,r=fn(r,l),u=Gc(e.stateNode,r,u),Sc(e,u),st!==4&&(st=2)),!1;var d=Error(o(520),{cause:r});if(d=fn(d,l),ma===null?ma=[d]:ma.push(d),st!==4&&(st=2),t===null)return!0;r=fn(r,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=u&-u,l.lanes|=e,e=Gc(l.stateNode,r,e),Sc(l,e),!1;case 1:if(t=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(_l===null||!_l.has(d))))return l.flags|=65536,u&=-u,l.lanes|=u,u=ky(u),My(u,e,l,r),Sc(l,u),!1}l=l.return}while(l!==null);return!1}var Pc=Error(o(461)),pt=!1;function Rt(e,t,l,r){t.child=e===null?Lg(t,null,l,r):tr(t,e.child,l,r)}function zy(e,t,l,r,u){l=l.render;var d=t.ref;if("ref"in r){var v={};for(var E in r)E!=="ref"&&(v[E]=r[E])}else v=r;return Jl(t),r=_c(e,t,l,v,d,u),E=Ac(),e!==null&&!pt?(Nc(e,t,u),Kn(e,t,u)):(Ie&&E&&oc(t),t.flags|=1,Rt(e,t,r,u),t.child)}function Dy(e,t,l,r,u){if(e===null){var d=l.type;return typeof d=="function"&&!rc(d)&&d.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=d,jy(e,t,d,r,u)):(e=fo(l.type,null,r,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!$c(e,u)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:Fi,l(v,r)&&e.ref===t.ref)return Kn(e,t,u)}return t.flags|=1,e=Yn(d,r),e.ref=t.ref,e.return=t,t.child=e}function jy(e,t,l,r,u){if(e!==null){var d=e.memoizedProps;if(Fi(d,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=d,$c(e,u))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,Kn(e,t,u)}return Fc(e,t,l,r,u)}function Ly(e,t,l,r){var u=r.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(r=t.child=e.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;r=u&~d}else r=0,t.child=null;return Uy(e,t,d,l,r)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&go(t,d!==null?d.cachePool:null),d!==null?Ig(t,d):xc(),Hg(t);else return r=t.lanes=536870912,Uy(e,t,d!==null?d.baseLanes|l:l,l,r)}else d!==null?(go(t,d.cachePool),Ig(t,d),xl(),t.memoizedState=null):(e!==null&&go(t,null),xc(),xl());return Rt(e,t,u,l),t.child}function oa(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Uy(e,t,l,r,u){var d=gc();return d=d===null?null:{parent:ht._currentValue,pool:d},t.memoizedState={baseLanes:l,cachePool:d},e!==null&&go(t,null),xc(),Hg(t),e!==null&&Ur(e,t,r,!0),t.childLanes=u,null}function Mo(e,t){return t=Do({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function By(e,t,l){return tr(t,e.child,null,l),e=Mo(t,t.pendingProps),e.flags|=2,en(t),t.memoizedState=null,e}function i_(e,t,l){var r=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(r.mode==="hidden")return e=Mo(t,r),t.lanes=536870912,oa(null,e);if(Cc(t),(e=lt)?(e=Zv(e,mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ml!==null?{id:Nn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},l=Eg(e),l.return=t,t.child=l,At=t,lt=null)):e=null,e===null)throw gl(t);return t.lanes=536870912,null}return Mo(t,r)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(Cc(t),u)if(t.flags&256)t.flags&=-257,t=By(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(pt||Ur(e,t,l,!1),u=(l&e.childLanes)!==0,pt||u){if(r=$e,r!==null&&(v=Np(r,l),v!==0&&v!==d.retryLane))throw d.retryLane=v,Xl(e,v),Pt(r,e,v),Pc;Vo(),t=By(e,t,l)}else e=d.treeContext,lt=gn(v.nextSibling),At=t,Ie=!0,pl=null,mn=!1,e!==null&&Cg(t,e),t=Mo(t,r),t.flags|=4096;return t}return e=Yn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zo(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Fc(e,t,l,r,u){return Jl(t),l=_c(e,t,l,r,void 0,u),r=Ac(),e!==null&&!pt?(Nc(e,t,u),Kn(e,t,u)):(Ie&&r&&oc(t),t.flags|=1,Rt(e,t,l,u),t.child)}function Iy(e,t,l,r,u,d){return Jl(t),t.updateQueue=null,l=Yg(t,r,l,u),qg(e),r=Ac(),e!==null&&!pt?(Nc(e,t,d),Kn(e,t,d)):(Ie&&r&&oc(t),t.flags|=1,Rt(e,t,l,d),t.child)}function Hy(e,t,l,r,u){if(Jl(t),t.stateNode===null){var d=zr,v=l.contextType;typeof v=="object"&&v!==null&&(d=Nt(v)),d=new l(r,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Vc,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=r,d.state=t.memoizedState,d.refs={},vc(t),v=l.contextType,d.context=typeof v=="object"&&v!==null?Nt(v):zr,d.state=t.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(Yc(t,l,v,r),d.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Vc.enqueueReplaceState(d,d.state,null),na(t,r,d,u),ta(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,R=lr(l,E);d.props=R;var H=d.context,X=l.contextType;v=zr,typeof X=="object"&&X!==null&&(v=Nt(X));var J=l.getDerivedStateFromProps;X=typeof J=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||H!==v)&&_y(t,d,r,v),vl=!1;var Y=t.memoizedState;d.state=Y,na(t,r,d,u),ta(),H=t.memoizedState,E||Y!==H||vl?(typeof J=="function"&&(Yc(t,l,J,r),H=t.memoizedState),(R=vl||wy(t,l,R,r,Y,H,v))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=H),d.props=r,d.state=H,d.context=v,r=R):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{d=t.stateNode,bc(e,t),v=t.memoizedProps,X=lr(l,v),d.props=X,J=t.pendingProps,Y=d.context,H=l.contextType,R=zr,typeof H=="object"&&H!==null&&(R=Nt(H)),E=l.getDerivedStateFromProps,(H=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==J||Y!==R)&&_y(t,d,r,R),vl=!1,Y=t.memoizedState,d.state=Y,na(t,r,d,u),ta();var P=t.memoizedState;v!==J||Y!==P||vl||e!==null&&e.dependencies!==null&&mo(e.dependencies)?(typeof E=="function"&&(Yc(t,l,E,r),P=t.memoizedState),(X=vl||wy(t,l,X,r,Y,P,R)||e!==null&&e.dependencies!==null&&mo(e.dependencies))?(H||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,P,R),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,P,R)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=P),d.props=r,d.state=P,d.context=R,r=X):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),r=!1)}return d=r,zo(e,t),r=(t.flags&128)!==0,d||r?(d=t.stateNode,l=r&&typeof l.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&r?(t.child=tr(t,e.child,null,u),t.child=tr(t,null,l,u)):Rt(e,t,l,u),t.memoizedState=d.state,e=t.child):e=Kn(e,t,u),e}function qy(e,t,l,r){return Ql(),t.flags|=256,Rt(e,t,l,r),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:Og()}}function Qc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=nn),e}function Yy(e,t,l){var r=t.pendingProps,u=!1,d=(t.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),v&&(u=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(u?El(t):xl(),(e=lt)?(e=Zv(e,mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ml!==null?{id:Nn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},l=Eg(e),l.return=t,t.child=l,At=t,lt=null)):e=null,e===null)throw gl(t);return Mf(e)?t.lanes=32:t.lanes=536870912,null}var E=r.children;return r=r.fallback,u?(xl(),u=t.mode,E=Do({mode:"hidden",children:E},u),r=Kl(r,u,l,null),E.return=t,r.return=t,E.sibling=r,t.child=E,r=t.child,r.memoizedState=Kc(l),r.childLanes=Qc(e,v,l),t.memoizedState=Xc,oa(null,r)):(El(t),Zc(t,E))}var R=e.memoizedState;if(R!==null&&(E=R.dehydrated,E!==null)){if(d)t.flags&256?(El(t),t.flags&=-257,t=Jc(e,t,l)):t.memoizedState!==null?(xl(),t.child=e.child,t.flags|=128,t=null):(xl(),E=r.fallback,u=t.mode,r=Do({mode:"visible",children:r.children},u),E=Kl(E,u,l,null),E.flags|=2,r.return=t,E.return=t,r.sibling=E,t.child=r,tr(t,e.child,null,l),r=t.child,r.memoizedState=Kc(l),r.childLanes=Qc(e,v,l),t.memoizedState=Xc,t=oa(null,r));else if(El(t),Mf(E)){if(v=E.nextSibling&&E.nextSibling.dataset,v)var H=v.dgst;v=H,r=Error(o(419)),r.stack="",r.digest=v,Qi({value:r,source:null,stack:null}),t=Jc(e,t,l)}else if(pt||Ur(e,t,l,!1),v=(l&e.childLanes)!==0,pt||v){if(v=$e,v!==null&&(r=Np(v,l),r!==0&&r!==R.retryLane))throw R.retryLane=r,Xl(e,r),Pt(v,e,r),Pc;kf(E)||Vo(),t=Jc(e,t,l)}else kf(E)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,lt=gn(E.nextSibling),At=t,Ie=!0,pl=null,mn=!1,e!==null&&Cg(t,e),t=Zc(t,r.children),t.flags|=4096);return t}return u?(xl(),E=r.fallback,u=t.mode,R=e.child,H=R.sibling,r=Yn(R,{mode:"hidden",children:r.children}),r.subtreeFlags=R.subtreeFlags&65011712,H!==null?E=Yn(H,E):(E=Kl(E,u,l,null),E.flags|=2),E.return=t,r.return=t,r.sibling=E,t.child=r,oa(null,r),r=t.child,E=e.child.memoizedState,E===null?E=Kc(l):(u=E.cachePool,u!==null?(R=ht._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=Og(),E={baseLanes:E.baseLanes|l,cachePool:u}),r.memoizedState=E,r.childLanes=Qc(e,v,l),t.memoizedState=Xc,oa(e.child,r)):(El(t),l=e.child,e=l.sibling,l=Yn(l,{mode:"visible",children:r.children}),l.return=t,l.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=l,t.memoizedState=null,l)}function Zc(e,t){return t=Do({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Do(e,t){return e=Wt(22,e,null,t),e.lanes=0,e}function Jc(e,t,l){return tr(t,e.child,null,l),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vy(e,t,l){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dc(e.return,t,l)}function Wc(e,t,l,r,u,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:l,tailMode:u,treeForkCount:d}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=r,v.tail=l,v.tailMode=u,v.treeForkCount=d)}function Gy(e,t,l){var r=t.pendingProps,u=r.revealOrder,d=r.tail;r=r.children;var v=ut.current,E=(v&2)!==0;if(E?(v=v&1|2,t.flags|=128):v&=1,T(ut,v),Rt(e,t,r,l),r=Ie?Ki:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vy(e,l,t);else if(e.tag===19)Vy(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(l=t.child,u=null;l!==null;)e=l.alternate,e!==null&&xo(e)===null&&(u=l),l=l.sibling;l=u,l===null?(u=t.child,t.child=null):(u=l.sibling,l.sibling=null),Wc(t,!1,u,l,d,r);break;case"backwards":case"unstable_legacy-backwards":for(l=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&xo(e)===null){t.child=u;break}e=u.sibling,u.sibling=l,l=u,u=e}Wc(t,!0,l,null,d,r);break;case"together":Wc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Kn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),wl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ur(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=Yn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Yn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function $c(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&mo(e)))}function a_(e,t,l){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),yl(t,ht,e.memoizedState.cache),Ql();break;case 27:case 5:at(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:yl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cc(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(El(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Yy(e,t,l):(El(t),e=Kn(e,t,l),e!==null?e.sibling:null);El(t);break;case 19:var u=(e.flags&128)!==0;if(r=(l&t.childLanes)!==0,r||(Ur(e,t,l,!1),r=(l&t.childLanes)!==0),u){if(r)return Gy(e,t,l);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),T(ut,ut.current),r)break;return null;case 22:return t.lanes=0,Ly(e,t,l,t.pendingProps);case 24:yl(t,ht,e.memoizedState.cache)}return Kn(e,t,l)}function Py(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!$c(e,l)&&(t.flags&128)===0)return pt=!1,a_(e,t,l);pt=(e.flags&131072)!==0}else pt=!1,Ie&&(t.flags&1048576)!==0&&Tg(t,Ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=$l(t.elementType),t.type=e,typeof e=="function")rc(e)?(r=lr(e,r),t.tag=1,t=Hy(null,t,e,r,l)):(t.tag=0,t=Fc(null,t,e,r,l));else{if(e!=null){var u=e.$$typeof;if(u===$){t.tag=11,t=zy(null,t,e,r,l);break e}else if(u===D){t.tag=14,t=Dy(null,t,e,r,l);break e}}throw t=ue(e)||e,Error(o(306,t,""))}}return t;case 0:return Fc(e,t,t.type,t.pendingProps,l);case 1:return r=t.type,u=lr(r,t.pendingProps),Hy(e,t,r,u,l);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var d=t.memoizedState;u=d.element,bc(e,t),na(t,r,null,l);var v=t.memoizedState;if(r=v.cache,yl(t,ht,r),r!==d.cache&&hc(t,[ht],l,!0),ta(),r=v.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=qy(e,t,r,l);break e}else if(r!==u){u=fn(Error(o(424)),t),Qi(u),t=qy(e,t,r,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(lt=gn(e.firstChild),At=t,Ie=!0,pl=null,mn=!0,l=Lg(t,null,r,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ql(),r===u){t=Kn(e,t,l);break e}Rt(e,t,r,l)}t=t.child}return t;case 26:return zo(e,t),e===null?(l=nb(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ie||(l=t.type,e=t.pendingProps,r=Zo(ge.current).createElement(l),r[_t]=t,r[It]=e,Ot(r,l,e),Tt(r),t.stateNode=r):t.memoizedState=nb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return at(t),e===null&&Ie&&(r=t.stateNode=$v(t.type,t.pendingProps,ge.current),At=t,mn=!0,u=lt,Ol(t.type)?(zf=u,lt=gn(r.firstChild)):lt=u),Rt(e,t,t.pendingProps.children,l),zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((u=r=lt)&&(r=L_(r,t.type,t.pendingProps,mn),r!==null?(t.stateNode=r,At=t,lt=gn(r.firstChild),mn=!1,u=!0):u=!1),u||gl(t)),at(t),u=t.type,d=t.pendingProps,v=e!==null?e.memoizedProps:null,r=d.children,Nf(u,d)?r=null:v!==null&&Nf(u,v)&&(t.flags|=32),t.memoizedState!==null&&(u=_c(e,t,Jw,null,null,l),xa._currentValue=u),zo(e,t),Rt(e,t,r,l),t.child;case 6:return e===null&&Ie&&((e=l=lt)&&(l=U_(l,t.pendingProps,mn),l!==null?(t.stateNode=l,At=t,lt=null,e=!0):e=!1),e||gl(t)),null;case 13:return Yy(e,t,l);case 4:return He(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tr(t,null,r,l):Rt(e,t,r,l),t.child;case 11:return zy(e,t,t.type,t.pendingProps,l);case 7:return Rt(e,t,t.pendingProps,l),t.child;case 8:return Rt(e,t,t.pendingProps.children,l),t.child;case 12:return Rt(e,t,t.pendingProps.children,l),t.child;case 10:return r=t.pendingProps,yl(t,t.type,r.value),Rt(e,t,r.children,l),t.child;case 9:return u=t.type._context,r=t.pendingProps.children,Jl(t),u=Nt(u),r=r(u),t.flags|=1,Rt(e,t,r,l),t.child;case 14:return Dy(e,t,t.type,t.pendingProps,l);case 15:return jy(e,t,t.type,t.pendingProps,l);case 19:return Gy(e,t,l);case 31:return i_(e,t,l);case 22:return Ly(e,t,l,t.pendingProps);case 24:return Jl(t),r=Nt(ht),e===null?(u=gc(),u===null&&(u=$e,d=mc(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=l),u=d),t.memoizedState={parent:r,cache:u},vc(t),yl(t,ht,u)):((e.lanes&l)!==0&&(bc(e,t),na(t,null,null,l),ta()),u=e.memoizedState,d=t.memoizedState,u.parent!==r?(u={parent:r,cache:r},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),yl(t,ht,r)):(r=d.cache,yl(t,ht,r),r!==u.cache&&hc(t,[ht],l,!0))),Rt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Qn(e){e.flags|=4}function ef(e,t,l,r,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(vv())e.flags|=8192;else throw er=vo,yc}else e.flags&=-16777217}function Fy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ob(t))if(vv())e.flags|=8192;else throw er=vo,yc}function jo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?wp():536870912,e.lanes|=t,Qr|=t)}function sa(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var r=null;l!==null;)l.alternate!==null&&(r=l),l=l.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,r=0;if(t)for(var u=e.child;u!==null;)l|=u.lanes|u.childLanes,r|=u.subtreeFlags&65011712,r|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)l|=u.lanes|u.childLanes,r|=u.subtreeFlags,r|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=r,e.childLanes=l,t}function o_(e,t,l){var r=t.pendingProps;switch(sc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return l=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Pn(ht),Oe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Lr(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,cc())),rt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(rt(t),Fy(t,d)):(rt(t),ef(t,u,null,r,l))):d?d!==e.memoizedState?(Qn(t),rt(t),Fy(t,d)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Qn(t),rt(t),ef(t,u,e,r,l)),null;case 27:if(vt(t),l=ge.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return rt(t),null}e=te.current,Lr(t)?wg(t):(e=$v(u,r,l),t.stateNode=e,Qn(t))}return rt(t),null;case 5:if(vt(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return rt(t),null}if(d=te.current,Lr(t))wg(t);else{var v=Zo(ge.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?v.createElement("select",{is:r.is}):v.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?v.createElement(u,{is:r.is}):v.createElement(u)}}d[_t]=t,d[It]=r;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=d;e:switch(Ot(d,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Qn(t)}}return rt(t),ef(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Qn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(e=ge.current,Lr(t)){if(e=t.stateNode,l=t.memoizedProps,r=null,u=At,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}e[_t]=t,e=!!(e.nodeValue===l||r!==null&&r.suppressHydrationWarning===!0||Yv(e.nodeValue,l)),e||gl(t,!0)}else e=Zo(e).createTextNode(r),e[_t]=t,t.stateNode=e}return rt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(r=Lr(t),l!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[_t]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else l=cc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(en(t),t):(en(t),null);if((t.flags&128)!==0)throw Error(o(558))}return rt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Lr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[_t]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),u=!1}else u=cc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(en(t),t):(en(t),null)}return en(t),(t.flags&128)!==0?(t.lanes=l,t):(l=r!==null,e=e!==null&&e.memoizedState!==null,l&&(r=t.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==u&&(r.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),jo(t,t.updateQueue),rt(t),null);case 4:return Oe(),e===null&&Tf(t.stateNode.containerInfo),rt(t),null;case 10:return Pn(t.type),rt(t),null;case 19:if(V(ut),r=t.memoizedState,r===null)return rt(t),null;if(u=(t.flags&128)!==0,d=r.rendering,d===null)if(u)sa(r,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=xo(e),d!==null){for(t.flags|=128,sa(r,!1),e=d.updateQueue,t.updateQueue=e,jo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Sg(l,e),l=l.sibling;return T(ut,ut.current&1|2),Ie&&Vn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&nt()>Ho&&(t.flags|=128,u=!0,sa(r,!1),t.lanes=4194304)}else{if(!u)if(e=xo(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,jo(t,e),sa(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!Ie)return rt(t),null}else 2*nt()-r.renderingStartTime>Ho&&l!==536870912&&(t.flags|=128,u=!0,sa(r,!1),t.lanes=4194304);r.isBackwards?(d.sibling=t.child,t.child=d):(e=r.last,e!==null?e.sibling=d:t.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=nt(),e.sibling=null,l=ut.current,T(ut,u?l&1|2:l&1),Ie&&Vn(t,r.treeForkCount),e):(rt(t),null);case 22:case 23:return en(t),Tc(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(l&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),l=t.updateQueue,l!==null&&jo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==l&&(t.flags|=2048),e!==null&&V(Wl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Pn(ht),rt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function s_(e,t){switch(sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pn(ht),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return vt(t),null;case 31:if(t.memoizedState!==null){if(en(t),t.alternate===null)throw Error(o(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(en(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(ut),null;case 4:return Oe(),null;case 10:return Pn(t.type),null;case 22:case 23:return en(t),Tc(),e!==null&&V(Wl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Pn(ht),null;case 25:return null;default:return null}}function Xy(e,t){switch(sc(t),t.tag){case 3:Pn(ht),Oe();break;case 26:case 27:case 5:vt(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&en(t);break;case 13:en(t);break;case 19:V(ut);break;case 10:Pn(t.type);break;case 22:case 23:en(t),Tc(),e!==null&&V(Wl);break;case 24:Pn(ht)}}function ua(e,t){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var u=r.next;l=u;do{if((l.tag&e)===e){r=void 0;var d=l.create,v=l.inst;r=d(),v.destroy=r}l=l.next}while(l!==u)}}catch(E){Ke(t,t.return,E)}}function Tl(e,t,l){try{var r=t.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var d=u.next;r=d;do{if((r.tag&e)===e){var v=r.inst,E=v.destroy;if(E!==void 0){v.destroy=void 0,u=t;var R=l,H=E;try{H()}catch(X){Ke(u,R,X)}}}r=r.next}while(r!==d)}}catch(X){Ke(t,t.return,X)}}function Ky(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Bg(t,l)}catch(r){Ke(e,e.return,r)}}}function Qy(e,t,l){l.props=lr(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(r){Ke(e,t,r)}}function ca(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof l=="function"?e.refCleanup=l(r):l.current=r}}catch(u){Ke(e,t,u)}}function On(e,t){var l=e.ref,r=e.refCleanup;if(l!==null)if(typeof r=="function")try{r()}catch(u){Ke(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(u){Ke(e,t,u)}else l.current=null}function Zy(e){var t=e.type,l=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break e;case"img":l.src?r.src=l.src:l.srcSet&&(r.srcset=l.srcSet)}}catch(u){Ke(e,e.return,u)}}function tf(e,t,l){try{var r=e.stateNode;O_(r,e.type,l,t),r[It]=t}catch(u){Ke(e,e.return,u)}}function Jy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ol(e.type)||e.tag===4}function nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ol(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lf(e,t,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Hn));else if(r!==4&&(r===27&&Ol(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(lf(e,t,l),e=e.sibling;e!==null;)lf(e,t,l),e=e.sibling}function Lo(e,t,l){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(r!==4&&(r===27&&Ol(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Lo(e,t,l),e=e.sibling;e!==null;)Lo(e,t,l),e=e.sibling}function Wy(e){var t=e.stateNode,l=e.memoizedProps;try{for(var r=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ot(t,r,l),t[_t]=e,t[It]=l}catch(d){Ke(e,e.return,d)}}var Zn=!1,gt=!1,rf=!1,$y=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function u_(e,t){if(e=e.containerInfo,_f=ls,e=fg(e),Ju(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var r=l.getSelection&&l.getSelection();if(r&&r.rangeCount!==0){l=r.anchorNode;var u=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var v=0,E=-1,R=-1,H=0,X=0,J=e,Y=null;t:for(;;){for(var P;J!==l||u!==0&&J.nodeType!==3||(E=v+u),J!==d||r!==0&&J.nodeType!==3||(R=v+r),J.nodeType===3&&(v+=J.nodeValue.length),(P=J.firstChild)!==null;)Y=J,J=P;for(;;){if(J===e)break t;if(Y===l&&++H===u&&(E=v),Y===d&&++X===r&&(R=v),(P=J.nextSibling)!==null)break;J=Y,Y=J.parentNode}J=P}l=E===-1||R===-1?null:{start:E,end:R}}else l=null}l=l||{start:0,end:0}}else l=null;for(Af={focusedElem:e,selectionRange:l},ls=!1,Ct=t;Ct!==null;)if(t=Ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ct=e;else for(;Ct!==null;){switch(t=Ct,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)u=e[l],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=t,u=d.memoizedProps,d=d.memoizedState,r=l.stateNode;try{var de=lr(l.type,u);e=r.getSnapshotBeforeUpdate(de,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ke(l,l.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Of(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Of(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ct=e;break}Ct=t.return}}function ev(e,t,l){var r=l.flags;switch(l.tag){case 0:case 11:case 15:Wn(e,l),r&4&&ua(5,l);break;case 1:if(Wn(e,l),r&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(v){Ke(l,l.return,v)}else{var u=lr(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Ke(l,l.return,v)}}r&64&&Ky(l),r&512&&ca(l,l.return);break;case 3:if(Wn(e,l),r&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Bg(e,t)}catch(v){Ke(l,l.return,v)}}break;case 27:t===null&&r&4&&Wy(l);case 26:case 5:Wn(e,l),t===null&&r&4&&Zy(l),r&512&&ca(l,l.return);break;case 12:Wn(e,l);break;case 31:Wn(e,l),r&4&&lv(e,l);break;case 13:Wn(e,l),r&4&&rv(e,l),r&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=v_.bind(null,l),B_(e,l))));break;case 22:if(r=l.memoizedState!==null||Zn,!r){t=t!==null&&t.memoizedState!==null||gt,u=Zn;var d=gt;Zn=r,(gt=t)&&!d?$n(e,l,(l.subtreeFlags&8772)!==0):Wn(e,l),Zn=u,gt=d}break;case 30:break;default:Wn(e,l)}}function tv(e){var t=e.alternate;t!==null&&(e.alternate=null,tv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Du(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var it=null,qt=!1;function Jn(e,t,l){for(l=l.child;l!==null;)nv(e,t,l),l=l.sibling}function nv(e,t,l){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(zt,l)}catch{}switch(l.tag){case 26:gt||On(l,t),Jn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:gt||On(l,t);var r=it,u=qt;Ol(l.type)&&(it=l.stateNode,qt=!1),Jn(e,t,l),ba(l.stateNode),it=r,qt=u;break;case 5:gt||On(l,t);case 6:if(r=it,u=qt,it=null,Jn(e,t,l),it=r,qt=u,it!==null)if(qt)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(l.stateNode)}catch(d){Ke(l,t,d)}else try{it.removeChild(l.stateNode)}catch(d){Ke(l,t,d)}break;case 18:it!==null&&(qt?(e=it,Kv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),li(e)):Kv(it,l.stateNode));break;case 4:r=it,u=qt,it=l.stateNode.containerInfo,qt=!0,Jn(e,t,l),it=r,qt=u;break;case 0:case 11:case 14:case 15:Tl(2,l,t),gt||Tl(4,l,t),Jn(e,t,l);break;case 1:gt||(On(l,t),r=l.stateNode,typeof r.componentWillUnmount=="function"&&Qy(l,t,r)),Jn(e,t,l);break;case 21:Jn(e,t,l);break;case 22:gt=(r=gt)||l.memoizedState!==null,Jn(e,t,l),gt=r;break;default:Jn(e,t,l)}}function lv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{li(e)}catch(l){Ke(t,t.return,l)}}}function rv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(l){Ke(t,t.return,l)}}function c_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $y),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $y),t;default:throw Error(o(435,e.tag))}}function Uo(e,t){var l=c_(e);t.forEach(function(r){if(!l.has(r)){l.add(r);var u=b_.bind(null,e,r);r.then(u,u)}})}function Yt(e,t){var l=t.deletions;if(l!==null)for(var r=0;r<l.length;r++){var u=l[r],d=e,v=t,E=v;e:for(;E!==null;){switch(E.tag){case 27:if(Ol(E.type)){it=E.stateNode,qt=!1;break e}break;case 5:it=E.stateNode,qt=!1;break e;case 3:case 4:it=E.stateNode.containerInfo,qt=!0;break e}E=E.return}if(it===null)throw Error(o(160));nv(d,v,u),it=null,qt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)iv(t,e),t=t.sibling}var En=null;function iv(e,t){var l=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),Vt(e),r&4&&(Tl(3,e,e.return),ua(3,e),Tl(5,e,e.return));break;case 1:Yt(t,e),Vt(e),r&512&&(gt||l===null||On(l,l.return)),r&64&&Zn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?r:l.concat(r))));break;case 26:var u=En;if(Yt(t,e),Vt(e),r&512&&(gt||l===null||On(l,l.return)),r&4){var d=l!==null?l.memoizedState:null;if(r=e.memoizedState,l===null)if(r===null)if(e.stateNode===null){e:{r=e.type,l=e.memoizedProps,u=u.ownerDocument||u;t:switch(r){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Ui]||d[_t]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(r),u.head.insertBefore(d,u.querySelector("head > title"))),Ot(d,r,l),d[_t]=e,Tt(d),r=d;break e;case"link":var v=ib("link","href",u).get(r+(l.href||""));if(v){for(var E=0;E<v.length;E++)if(d=v[E],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(E,1);break t}}d=u.createElement(r),Ot(d,r,l),u.head.appendChild(d);break;case"meta":if(v=ib("meta","content",u).get(r+(l.content||""))){for(E=0;E<v.length;E++)if(d=v[E],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(E,1);break t}}d=u.createElement(r),Ot(d,r,l),u.head.appendChild(d);break;default:throw Error(o(468,r))}d[_t]=e,Tt(d),r=d}e.stateNode=r}else ab(u,e.type,e.stateNode);else e.stateNode=rb(u,r,e.memoizedProps);else d!==r?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,r===null?ab(u,e.type,e.stateNode):rb(u,r,e.memoizedProps)):r===null&&e.stateNode!==null&&tf(e,e.memoizedProps,l.memoizedProps)}break;case 27:Yt(t,e),Vt(e),r&512&&(gt||l===null||On(l,l.return)),l!==null&&r&4&&tf(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Yt(t,e),Vt(e),r&512&&(gt||l===null||On(l,l.return)),e.flags&32){u=e.stateNode;try{_r(u,"")}catch(de){Ke(e,e.return,de)}}r&4&&e.stateNode!=null&&(u=e.memoizedProps,tf(e,u,l!==null?l.memoizedProps:u)),r&1024&&(rf=!0);break;case 6:if(Yt(t,e),Vt(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,l=e.stateNode;try{l.nodeValue=r}catch(de){Ke(e,e.return,de)}}break;case 3:if($o=null,u=En,En=Jo(t.containerInfo),Yt(t,e),En=u,Vt(e),r&4&&l!==null&&l.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(de){Ke(e,e.return,de)}rf&&(rf=!1,av(e));break;case 4:r=En,En=Jo(e.stateNode.containerInfo),Yt(t,e),Vt(e),En=r;break;case 12:Yt(t,e),Vt(e);break;case 31:Yt(t,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uo(e,r)));break;case 13:Yt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Io=nt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uo(e,r)));break;case 22:u=e.memoizedState!==null;var R=l!==null&&l.memoizedState!==null,H=Zn,X=gt;if(Zn=H||u,gt=X||R,Yt(t,e),gt=X,Zn=H,Vt(e),r&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(l===null||R||Zn||gt||rr(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){R=l=t;try{if(d=R.stateNode,u)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{E=R.stateNode;var J=R.memoizedProps.style,Y=J!=null&&J.hasOwnProperty("display")?J.display:null;E.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(de){Ke(R,R.return,de)}}}else if(t.tag===6){if(l===null){R=t;try{R.stateNode.nodeValue=u?"":R.memoizedProps}catch(de){Ke(R,R.return,de)}}}else if(t.tag===18){if(l===null){R=t;try{var P=R.stateNode;u?Qv(P,!0):Qv(R.stateNode,!1)}catch(de){Ke(R,R.return,de)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(l=r.retryQueue,l!==null&&(r.retryQueue=null,Uo(e,l))));break;case 19:Yt(t,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uo(e,r)));break;case 30:break;case 21:break;default:Yt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var l,r=e.return;r!==null;){if(Jy(r)){l=r;break}r=r.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var u=l.stateNode,d=nf(e);Lo(e,d,u);break;case 5:var v=l.stateNode;l.flags&32&&(_r(v,""),l.flags&=-33);var E=nf(e);Lo(e,E,v);break;case 3:case 4:var R=l.stateNode.containerInfo,H=nf(e);lf(e,H,R);break;default:throw Error(o(161))}}catch(X){Ke(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function av(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;av(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ev(e,t.alternate,t),t=t.sibling}function rr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tl(4,t,t.return),rr(t);break;case 1:On(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Qy(t,t.return,l),rr(t);break;case 27:ba(t.stateNode);case 26:case 5:On(t,t.return),rr(t);break;case 22:t.memoizedState===null&&rr(t);break;case 30:rr(t);break;default:rr(t)}e=e.sibling}}function $n(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,u=e,d=t,v=d.flags;switch(d.tag){case 0:case 11:case 15:$n(u,d,l),ua(4,d);break;case 1:if($n(u,d,l),r=d,u=r.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(H){Ke(r,r.return,H)}if(r=d,u=r.updateQueue,u!==null){var E=r.stateNode;try{var R=u.shared.hiddenCallbacks;if(R!==null)for(u.shared.hiddenCallbacks=null,u=0;u<R.length;u++)Ug(R[u],E)}catch(H){Ke(r,r.return,H)}}l&&v&64&&Ky(d),ca(d,d.return);break;case 27:Wy(d);case 26:case 5:$n(u,d,l),l&&r===null&&v&4&&Zy(d),ca(d,d.return);break;case 12:$n(u,d,l);break;case 31:$n(u,d,l),l&&v&4&&lv(u,d);break;case 13:$n(u,d,l),l&&v&4&&rv(u,d);break;case 22:d.memoizedState===null&&$n(u,d,l),ca(d,d.return);break;case 30:break;default:$n(u,d,l)}t=t.sibling}}function af(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Zi(l))}function of(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function xn(e,t,l,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ov(e,t,l,r),t=t.sibling}function ov(e,t,l,r){var u=t.flags;switch(t.tag){case 0:case 11:case 15:xn(e,t,l,r),u&2048&&ua(9,t);break;case 1:xn(e,t,l,r);break;case 3:xn(e,t,l,r),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(u&2048){xn(e,t,l,r),e=t.stateNode;try{var d=t.memoizedProps,v=d.id,E=d.onPostCommit;typeof E=="function"&&E(v,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Ke(t,t.return,R)}}else xn(e,t,l,r);break;case 31:xn(e,t,l,r);break;case 13:xn(e,t,l,r);break;case 23:break;case 22:d=t.stateNode,v=t.alternate,t.memoizedState!==null?d._visibility&2?xn(e,t,l,r):fa(e,t):d._visibility&2?xn(e,t,l,r):(d._visibility|=2,Fr(e,t,l,r,(t.subtreeFlags&10256)!==0||!1)),u&2048&&af(v,t);break;case 24:xn(e,t,l,r),u&2048&&of(t.alternate,t);break;default:xn(e,t,l,r)}}function Fr(e,t,l,r,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,v=t,E=l,R=r,H=v.flags;switch(v.tag){case 0:case 11:case 15:Fr(d,v,E,R,u),ua(8,v);break;case 23:break;case 22:var X=v.stateNode;v.memoizedState!==null?X._visibility&2?Fr(d,v,E,R,u):fa(d,v):(X._visibility|=2,Fr(d,v,E,R,u)),u&&H&2048&&af(v.alternate,v);break;case 24:Fr(d,v,E,R,u),u&&H&2048&&of(v.alternate,v);break;default:Fr(d,v,E,R,u)}t=t.sibling}}function fa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,r=t,u=r.flags;switch(r.tag){case 22:fa(l,r),u&2048&&af(r.alternate,r);break;case 24:fa(l,r),u&2048&&of(r.alternate,r);break;default:fa(l,r)}t=t.sibling}}var da=8192;function Xr(e,t,l){if(e.subtreeFlags&da)for(e=e.child;e!==null;)sv(e,t,l),e=e.sibling}function sv(e,t,l){switch(e.tag){case 26:Xr(e,t,l),e.flags&da&&e.memoizedState!==null&&Z_(l,En,e.memoizedState,e.memoizedProps);break;case 5:Xr(e,t,l);break;case 3:case 4:var r=En;En=Jo(e.stateNode.containerInfo),Xr(e,t,l),En=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=da,da=16777216,Xr(e,t,l),da=r):Xr(e,t,l));break;default:Xr(e,t,l)}}function uv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ha(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];Ct=r,fv(r,e)}uv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cv(e),e=e.sibling}function cv(e){switch(e.tag){case 0:case 11:case 15:ha(e),e.flags&2048&&Tl(9,e,e.return);break;case 3:ha(e);break;case 12:ha(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bo(e)):ha(e);break;default:ha(e)}}function Bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var r=t[l];Ct=r,fv(r,e)}uv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tl(8,t,t.return),Bo(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Bo(t));break;default:Bo(t)}e=e.sibling}}function fv(e,t){for(;Ct!==null;){var l=Ct;switch(l.tag){case 0:case 11:case 15:Tl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var r=l.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(l.memoizedState.cache)}if(r=l.child,r!==null)r.return=l,Ct=r;else e:for(l=e;Ct!==null;){r=Ct;var u=r.sibling,d=r.return;if(tv(r),r===l){Ct=null;break e}if(u!==null){u.return=d,Ct=u;break e}Ct=d}}}var f_={getCacheForType:function(e){var t=Nt(ht),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Nt(ht).controller.signal}},d_=typeof WeakMap=="function"?WeakMap:Map,Pe=0,$e=null,je=null,Ue=0,Xe=0,tn=null,Cl=!1,Kr=!1,sf=!1,el=0,st=0,wl=0,ir=0,uf=0,nn=0,Qr=0,ma=null,Gt=null,cf=!1,Io=0,dv=0,Ho=1/0,qo=null,_l=null,St=0,Al=null,Zr=null,tl=0,ff=0,df=null,hv=null,pa=0,hf=null;function ln(){return(Pe&2)!==0&&Ue!==0?Ue&-Ue:U.T!==null?bf():Rp()}function mv(){if(nn===0)if((Ue&536870912)===0||Ie){var e=Ka;Ka<<=1,(Ka&3932160)===0&&(Ka=262144),nn=e}else nn=536870912;return e=$t.current,e!==null&&(e.flags|=32),nn}function Pt(e,t,l){(e===$e&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Jr(e,0),Nl(e,Ue,nn,!1)),Li(e,l),((Pe&2)===0||e!==$e)&&(e===$e&&((Pe&2)===0&&(ir|=l),st===4&&Nl(e,Ue,nn,!1)),kn(e))}function pv(e,t,l){if((Pe&6)!==0)throw Error(o(327));var r=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ji(e,t),u=r?p_(e,t):pf(e,t,!0),d=r;do{if(u===0){Kr&&!r&&Nl(e,t,0,!1);break}else{if(l=e.current.alternate,d&&!h_(l)){u=pf(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var E=e;u=ma;var R=E.current.memoizedState.isDehydrated;if(R&&(Jr(E,v).flags|=256),v=pf(E,v,!1),v!==2){if(sf&&!R){E.errorRecoveryDisabledLanes|=d,ir|=d,u=4;break e}d=Gt,Gt=u,d!==null&&(Gt===null?Gt=d:Gt.push.apply(Gt,d))}u=v}if(d=!1,u!==2)continue}}if(u===1){Jr(e,0),Nl(e,t,0,!0);break}e:{switch(r=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Nl(r,t,nn,!Cl);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=Io+300-nt(),10<u)){if(Nl(r,t,nn,!Cl),Za(r,0,!0)!==0)break e;tl=t,r.timeoutHandle=Fv(gv.bind(null,r,l,Gt,qo,cf,t,nn,ir,Qr,Cl,d,"Throttled",-0,0),u);break e}gv(r,l,Gt,qo,cf,t,nn,ir,Qr,Cl,d,null,-0,0)}}break}while(!0);kn(e)}function gv(e,t,l,r,u,d,v,E,R,H,X,J,Y,P){if(e.timeoutHandle=-1,J=t.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},sv(t,d,J);var de=(d&62914560)===d?Io-nt():(d&4194048)===d?dv-nt():0;if(de=J_(J,de),de!==null){tl=d,e.cancelPendingCommit=de(Cv.bind(null,e,t,d,l,r,u,v,E,R,X,J,null,Y,P)),Nl(e,d,v,!H);return}}Cv(e,t,d,l,r,u,v,E,R)}function h_(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var r=0;r<l.length;r++){var u=l[r],d=u.getSnapshot;u=u.value;try{if(!Jt(d(),u))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nl(e,t,l,r){t&=~uf,t&=~ir,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var u=t;0<u;){var d=31-We(u),v=1<<d;r[d]=-1,u&=~v}l!==0&&_p(e,l,t)}function Yo(){return(Pe&6)===0?(ga(0),!1):!0}function mf(){if(je!==null){if(Xe===0)var e=je.return;else e=je,Gn=Zl=null,Rc(e),qr=null,Wi=0,e=je;for(;e!==null;)Xy(e.alternate,e),e=e.return;je=null}}function Jr(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,z_(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,mf(),$e=e,je=l=Yn(e.current,null),Ue=t,Xe=0,tn=null,Cl=!1,Kr=ji(e,t),sf=!1,Qr=nn=uf=ir=wl=st=0,Gt=ma=null,cf=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var u=31-We(r),d=1<<u;t|=e[u],r&=~d}return el=t,so(),l}function yv(e,t){Ae=null,U.H=aa,t===Hr||t===yo?(t=zg(),Xe=3):t===yc?(t=zg(),Xe=4):Xe=t===Pc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,tn=t,je===null&&(st=1,ko(e,fn(t,e.current)))}function vv(){var e=$t.current;return e===null?!0:(Ue&4194048)===Ue?pn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===pn:!1}function bv(){var e=U.H;return U.H=aa,e===null?aa:e}function Sv(){var e=U.A;return U.A=f_,e}function Vo(){st=4,Cl||(Ue&4194048)!==Ue&&$t.current!==null||(Kr=!0),(wl&134217727)===0&&(ir&134217727)===0||$e===null||Nl($e,Ue,nn,!1)}function pf(e,t,l){var r=Pe;Pe|=2;var u=bv(),d=Sv();($e!==e||Ue!==t)&&(qo=null,Jr(e,t)),t=!1;var v=st;e:do try{if(Xe!==0&&je!==null){var E=je,R=tn;switch(Xe){case 8:mf(),v=6;break e;case 3:case 2:case 9:case 6:$t.current===null&&(t=!0);var H=Xe;if(Xe=0,tn=null,Wr(e,E,R,H),l&&Kr){v=0;break e}break;default:H=Xe,Xe=0,tn=null,Wr(e,E,R,H)}}m_(),v=st;break}catch(X){yv(e,X)}while(!0);return t&&e.shellSuspendCounter++,Gn=Zl=null,Pe=r,U.H=u,U.A=d,je===null&&($e=null,Ue=0,so()),v}function m_(){for(;je!==null;)Ev(je)}function p_(e,t){var l=Pe;Pe|=2;var r=bv(),u=Sv();$e!==e||Ue!==t?(qo=null,Ho=nt()+500,Jr(e,t)):Kr=ji(e,t);e:do try{if(Xe!==0&&je!==null){t=je;var d=tn;t:switch(Xe){case 1:Xe=0,tn=null,Wr(e,t,d,1);break;case 2:case 9:if(kg(d)){Xe=0,tn=null,xv(t);break}t=function(){Xe!==2&&Xe!==9||$e!==e||(Xe=7),kn(e)},d.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:kg(d)?(Xe=0,tn=null,xv(t)):(Xe=0,tn=null,Wr(e,t,d,7));break;case 5:var v=null;switch(je.tag){case 26:v=je.memoizedState;case 5:case 27:var E=je;if(v?ob(v):E.stateNode.complete){Xe=0,tn=null;var R=E.sibling;if(R!==null)je=R;else{var H=E.return;H!==null?(je=H,Go(H)):je=null}break t}}Xe=0,tn=null,Wr(e,t,d,5);break;case 6:Xe=0,tn=null,Wr(e,t,d,6);break;case 8:mf(),st=6;break e;default:throw Error(o(462))}}g_();break}catch(X){yv(e,X)}while(!0);return Gn=Zl=null,U.H=r,U.A=u,Pe=l,je!==null?0:($e=null,Ue=0,so(),st)}function g_(){for(;je!==null&&!Ge();)Ev(je)}function Ev(e){var t=Py(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Go(e):je=t}function xv(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Iy(l,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Iy(l,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Rc(t);default:Xy(l,t),t=je=Sg(t,el),t=Py(l,t,el)}e.memoizedProps=e.pendingProps,t===null?Go(e):je=t}function Wr(e,t,l,r){Gn=Zl=null,Rc(t),qr=null,Wi=0;var u=t.return;try{if(r_(e,u,t,l,Ue)){st=1,ko(e,fn(l,e.current)),je=null;return}}catch(d){if(u!==null)throw je=u,d;st=1,ko(e,fn(l,e.current)),je=null;return}t.flags&32768?(Ie||r===1?e=!0:Kr||(Ue&536870912)!==0?e=!1:(Cl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$t.current,r!==null&&r.tag===13&&(r.flags|=16384))),Tv(t,e)):Go(t)}function Go(e){var t=e;do{if((t.flags&32768)!==0){Tv(t,Cl);return}e=t.return;var l=o_(t.alternate,t,el);if(l!==null){je=l;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);st===0&&(st=5)}function Tv(e,t){do{var l=s_(e.alternate,e);if(l!==null){l.flags&=32767,je=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=l}while(e!==null);st=6,je=null}function Cv(e,t,l,r,u,d,v,E,R){e.cancelPendingCommit=null;do Po();while(St!==0);if((Pe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=nc,QC(e,l,d,v,E,R),e===$e&&(je=$e=null,Ue=0),Zr=t,Al=e,tl=l,ff=d,df=u,hv=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,S_(Se,function(){return Rv(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,u=W.p,W.p=2,v=Pe,Pe|=4;try{u_(e,t,l)}finally{Pe=v,W.p=u,U.T=r}}St=1,wv(),_v(),Av()}}function wv(){if(St===1){St=0;var e=Al,t=Zr,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var r=W.p;W.p=2;var u=Pe;Pe|=4;try{iv(t,e);var d=Af,v=fg(e.containerInfo),E=d.focusedElem,R=d.selectionRange;if(v!==E&&E&&E.ownerDocument&&cg(E.ownerDocument.documentElement,E)){if(R!==null&&Ju(E)){var H=R.start,X=R.end;if(X===void 0&&(X=H),"selectionStart"in E)E.selectionStart=H,E.selectionEnd=Math.min(X,E.value.length);else{var J=E.ownerDocument||document,Y=J&&J.defaultView||window;if(Y.getSelection){var P=Y.getSelection(),de=E.textContent.length,Ee=Math.min(R.start,de),Je=R.end===void 0?Ee:Math.min(R.end,de);!P.extend&&Ee>Je&&(v=Je,Je=Ee,Ee=v);var L=ug(E,Ee),k=ug(E,Je);if(L&&k&&(P.rangeCount!==1||P.anchorNode!==L.node||P.anchorOffset!==L.offset||P.focusNode!==k.node||P.focusOffset!==k.offset)){var I=J.createRange();I.setStart(L.node,L.offset),P.removeAllRanges(),Ee>Je?(P.addRange(I),P.extend(k.node,k.offset)):(I.setEnd(k.node,k.offset),P.addRange(I))}}}}for(J=[],P=E;P=P.parentNode;)P.nodeType===1&&J.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<J.length;E++){var Q=J[E];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}ls=!!_f,Af=_f=null}finally{Pe=u,W.p=r,U.T=l}}e.current=t,St=2}}function _v(){if(St===2){St=0;var e=Al,t=Zr,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var r=W.p;W.p=2;var u=Pe;Pe|=4;try{ev(e,t.alternate,t)}finally{Pe=u,W.p=r,U.T=l}}St=3}}function Av(){if(St===4||St===3){St=0,dt();var e=Al,t=Zr,l=tl,r=hv;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?St=5:(St=0,Zr=Al=null,Nv(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(_l=null),Mu(l),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(zt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=U.T,u=W.p,W.p=2,U.T=null;try{for(var d=e.onRecoverableError,v=0;v<r.length;v++){var E=r[v];d(E.value,{componentStack:E.stack})}}finally{U.T=t,W.p=u}}(tl&3)!==0&&Po(),kn(e),u=e.pendingLanes,(l&261930)!==0&&(u&42)!==0?e===hf?pa++:(pa=0,hf=e):pa=0,ga(0)}}function Nv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function Po(){return wv(),_v(),Av(),Rv()}function Rv(){if(St!==5)return!1;var e=Al,t=ff;ff=0;var l=Mu(tl),r=U.T,u=W.p;try{W.p=32>l?32:l,U.T=null,l=df,df=null;var d=Al,v=tl;if(St=0,Zr=Al=null,tl=0,(Pe&6)!==0)throw Error(o(331));var E=Pe;if(Pe|=4,cv(d.current),ov(d,d.current,v,l),Pe=E,ga(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(zt,d)}catch{}return!0}finally{W.p=u,U.T=r,Nv(e,t)}}function Ov(e,t,l){t=fn(l,t),t=Gc(e.stateNode,t,2),e=Sl(e,t,2),e!==null&&(Li(e,2),kn(e))}function Ke(e,t,l){if(e.tag===3)Ov(e,e,l);else for(;t!==null;){if(t.tag===3){Ov(t,e,l);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(_l===null||!_l.has(r))){e=fn(l,e),l=ky(2),r=Sl(t,l,2),r!==null&&(My(l,r,t,e),Li(r,2),kn(r));break}}t=t.return}}function gf(e,t,l){var r=e.pingCache;if(r===null){r=e.pingCache=new d_;var u=new Set;r.set(t,u)}else u=r.get(t),u===void 0&&(u=new Set,r.set(t,u));u.has(l)||(sf=!0,u.add(l),e=y_.bind(null,e,t,l),t.then(e,e))}function y_(e,t,l){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(Ue&l)===l&&(st===4||st===3&&(Ue&62914560)===Ue&&300>nt()-Io?(Pe&2)===0&&Jr(e,0):uf|=l,Qr===Ue&&(Qr=0)),kn(e)}function kv(e,t){t===0&&(t=wp()),e=Xl(e,t),e!==null&&(Li(e,t),kn(e))}function v_(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),kv(e,l)}function b_(e,t){var l=0;switch(e.tag){case 31:case 13:var r=e.stateNode,u=e.memoizedState;u!==null&&(l=u.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),kv(e,l)}function S_(e,t){return Ce(e,t)}var Fo=null,$r=null,yf=!1,Xo=!1,vf=!1,Rl=0;function kn(e){e!==$r&&e.next===null&&($r===null?Fo=$r=e:$r=$r.next=e),Xo=!0,yf||(yf=!0,x_())}function ga(e,t){if(!vf&&Xo){vf=!0;do for(var l=!1,r=Fo;r!==null;){if(e!==0){var u=r.pendingLanes;if(u===0)var d=0;else{var v=r.suspendedLanes,E=r.pingedLanes;d=(1<<31-We(42|e)+1)-1,d&=u&~(v&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,jv(r,d))}else d=Ue,d=Za(r,r===$e?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||ji(r,d)||(l=!0,jv(r,d));r=r.next}while(l);vf=!1}}function E_(){Mv()}function Mv(){Xo=yf=!1;var e=0;Rl!==0&&M_()&&(e=Rl);for(var t=nt(),l=null,r=Fo;r!==null;){var u=r.next,d=zv(r,t);d===0?(r.next=null,l===null?Fo=u:l.next=u,u===null&&($r=l)):(l=r,(e!==0||(d&3)!==0)&&(Xo=!0)),r=u}St!==0&&St!==5||ga(e),Rl!==0&&(Rl=0)}function zv(e,t){for(var l=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-We(d),E=1<<v,R=u[v];R===-1?((E&l)===0||(E&r)!==0)&&(u[v]=KC(E,t)):R<=t&&(e.expiredLanes|=E),d&=~E}if(t=$e,l=Ue,l=Za(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,l===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Me(r),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ji(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(r!==null&&Me(r),Mu(l)){case 2:case 8:l=re;break;case 32:l=Se;break;case 268435456:l=Fe;break;default:l=Se}return r=Dv.bind(null,e),l=Ce(l,r),e.callbackPriority=t,e.callbackNode=l,t}return r!==null&&r!==null&&Me(r),e.callbackPriority=2,e.callbackNode=null,2}function Dv(e,t){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Po()&&e.callbackNode!==l)return null;var r=Ue;return r=Za(e,e===$e?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(pv(e,r,t),zv(e,nt()),e.callbackNode!=null&&e.callbackNode===l?Dv.bind(null,e):null)}function jv(e,t){if(Po())return null;pv(e,t,!0)}function x_(){D_(function(){(Pe&6)!==0?Ce(F,E_):Mv()})}function bf(){if(Rl===0){var e=Br;e===0&&(e=Xa,Xa<<=1,(Xa&261888)===0&&(Xa=256)),Rl=e}return Rl}function Lv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:eo(""+e)}function Uv(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function T_(e,t,l,r,u){if(t==="submit"&&l&&l.stateNode===u){var d=Lv((u[It]||null).action),v=r.submitter;v&&(t=(t=v[It]||null)?Lv(t.formAction):v.getAttribute("formAction"),t!==null&&(d=t,v=null));var E=new ro("action","action",null,r,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Rl!==0){var R=v?Uv(u,v):new FormData(u);Bc(l,{pending:!0,data:R,method:u.method,action:d},null,R)}}else typeof d=="function"&&(E.preventDefault(),R=v?Uv(u,v):new FormData(u),Bc(l,{pending:!0,data:R,method:u.method,action:d},d,R))},currentTarget:u}]})}}for(var Sf=0;Sf<tc.length;Sf++){var Ef=tc[Sf],C_=Ef.toLowerCase(),w_=Ef[0].toUpperCase()+Ef.slice(1);Sn(C_,"on"+w_)}Sn(mg,"onAnimationEnd"),Sn(pg,"onAnimationIteration"),Sn(gg,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(qw,"onTransitionRun"),Sn(Yw,"onTransitionStart"),Sn(Vw,"onTransitionCancel"),Sn(yg,"onTransitionEnd"),Cr("onMouseEnter",["mouseout","mouseover"]),Cr("onMouseLeave",["mouseout","mouseover"]),Cr("onPointerEnter",["pointerout","pointerover"]),Cr("onPointerLeave",["pointerout","pointerover"]),Vl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ya="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(" "),__=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ya));function Bv(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var r=e[l],u=r.event;r=r.listeners;e:{var d=void 0;if(t)for(var v=r.length-1;0<=v;v--){var E=r[v],R=E.instance,H=E.currentTarget;if(E=E.listener,R!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=H;try{d(u)}catch(X){oo(X)}u.currentTarget=null,d=R}else for(v=0;v<r.length;v++){if(E=r[v],R=E.instance,H=E.currentTarget,E=E.listener,R!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=H;try{d(u)}catch(X){oo(X)}u.currentTarget=null,d=R}}}}function Le(e,t){var l=t[zu];l===void 0&&(l=t[zu]=new Set);var r=e+"__bubble";l.has(r)||(Iv(t,e,2,!1),l.add(r))}function xf(e,t,l){var r=0;t&&(r|=4),Iv(l,e,r,t)}var Ko="_reactListening"+Math.random().toString(36).slice(2);function Tf(e){if(!e[Ko]){e[Ko]=!0,Mp.forEach(function(l){l!=="selectionchange"&&(__.has(l)||xf(l,!1,e),xf(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ko]||(t[Ko]=!0,xf("selectionchange",!1,t))}}function Iv(e,t,l,r){switch(mb(t)){case 2:var u=eA;break;case 8:u=tA;break;default:u=Bf}l=u.bind(null,t,l,e),u=void 0,!Yu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),r?u!==void 0?e.addEventListener(t,l,{capture:!0,passive:u}):e.addEventListener(t,l,!0):u!==void 0?e.addEventListener(t,l,{passive:u}):e.addEventListener(t,l,!1)}function Cf(e,t,l,r,u){var d=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var v=r.tag;if(v===3||v===4){var E=r.stateNode.containerInfo;if(E===u)break;if(v===4)for(v=r.return;v!==null;){var R=v.tag;if((R===3||R===4)&&v.stateNode.containerInfo===u)return;v=v.return}for(;E!==null;){if(v=Er(E),v===null)return;if(R=v.tag,R===5||R===6||R===26||R===27){r=d=v;continue e}E=E.parentNode}}r=r.return}Gp(function(){var H=d,X=Hu(l),J=[];e:{var Y=vg.get(e);if(Y!==void 0){var P=ro,de=e;switch(e){case"keypress":if(no(l)===0)break e;case"keydown":case"keyup":P=bw;break;case"focusin":de="focus",P=Fu;break;case"focusout":de="blur",P=Fu;break;case"beforeblur":case"afterblur":P=Fu;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":P=Xp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=ow;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=xw;break;case mg:case pg:case gg:P=cw;break;case yg:P=Cw;break;case"scroll":case"scrollend":P=iw;break;case"wheel":P=_w;break;case"copy":case"cut":case"paste":P=dw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Qp;break;case"toggle":case"beforetoggle":P=Nw}var Ee=(t&4)!==0,Je=!Ee&&(e==="scroll"||e==="scrollend"),L=Ee?Y!==null?Y+"Capture":null:Y;Ee=[];for(var k=H,I;k!==null;){var Q=k;if(I=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||I===null||L===null||(Q=Ii(k,L),Q!=null&&Ee.push(va(k,Q,I))),Je)break;k=k.return}0<Ee.length&&(Y=new P(Y,de,null,l,X),J.push({event:Y,listeners:Ee}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",Y&&l!==Iu&&(de=l.relatedTarget||l.fromElement)&&(Er(de)||de[Sr]))break e;if((P||Y)&&(Y=X.window===X?X:(Y=X.ownerDocument)?Y.defaultView||Y.parentWindow:window,P?(de=l.relatedTarget||l.toElement,P=H,de=de?Er(de):null,de!==null&&(Je=c(de),Ee=de.tag,de!==Je||Ee!==5&&Ee!==27&&Ee!==6)&&(de=null)):(P=null,de=H),P!==de)){if(Ee=Xp,Q="onMouseLeave",L="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=Qp,Q="onPointerLeave",L="onPointerEnter",k="pointer"),Je=P==null?Y:Bi(P),I=de==null?Y:Bi(de),Y=new Ee(Q,k+"leave",P,l,X),Y.target=Je,Y.relatedTarget=I,Q=null,Er(X)===H&&(Ee=new Ee(L,k+"enter",de,l,X),Ee.target=I,Ee.relatedTarget=Je,Q=Ee),Je=Q,P&&de)t:{for(Ee=A_,L=P,k=de,I=0,Q=L;Q;Q=Ee(Q))I++;Q=0;for(var be=k;be;be=Ee(be))Q++;for(;0<I-Q;)L=Ee(L),I--;for(;0<Q-I;)k=Ee(k),Q--;for(;I--;){if(L===k||k!==null&&L===k.alternate){Ee=L;break t}L=Ee(L),k=Ee(k)}Ee=null}else Ee=null;P!==null&&Hv(J,Y,P,Ee,!1),de!==null&&Je!==null&&Hv(J,Je,de,Ee,!0)}}e:{if(Y=H?Bi(H):window,P=Y.nodeName&&Y.nodeName.toLowerCase(),P==="select"||P==="input"&&Y.type==="file")var qe=lg;else if(tg(Y))if(rg)qe=Bw;else{qe=Lw;var ye=jw}else P=Y.nodeName,!P||P.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?H&&Bu(H.elementType)&&(qe=lg):qe=Uw;if(qe&&(qe=qe(e,H))){ng(J,qe,l,X);break e}ye&&ye(e,Y,H),e==="focusout"&&H&&Y.type==="number"&&H.memoizedProps.value!=null&&Uu(Y,"number",Y.value)}switch(ye=H?Bi(H):window,e){case"focusin":(tg(ye)||ye.contentEditable==="true")&&(Or=ye,Wu=H,Xi=null);break;case"focusout":Xi=Wu=Or=null;break;case"mousedown":$u=!0;break;case"contextmenu":case"mouseup":case"dragend":$u=!1,dg(J,l,X);break;case"selectionchange":if(Hw)break;case"keydown":case"keyup":dg(J,l,X)}var Re;if(Ku)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Rr?$p(e,l)&&(Be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Be="onCompositionStart");Be&&(Zp&&l.locale!=="ko"&&(Rr||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Rr&&(Re=Pp()):(hl=X,Vu="value"in hl?hl.value:hl.textContent,Rr=!0)),ye=Qo(H,Be),0<ye.length&&(Be=new Kp(Be,e,null,l,X),J.push({event:Be,listeners:ye}),Re?Be.data=Re:(Re=eg(l),Re!==null&&(Be.data=Re)))),(Re=Ow?kw(e,l):Mw(e,l))&&(Be=Qo(H,"onBeforeInput"),0<Be.length&&(ye=new Kp("onBeforeInput","beforeinput",null,l,X),J.push({event:ye,listeners:Be}),ye.data=Re)),T_(J,e,H,l,X)}Bv(J,t)})}function va(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Qo(e,t){for(var l=t+"Capture",r=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=Ii(e,l),u!=null&&r.unshift(va(e,u,d)),u=Ii(e,t),u!=null&&r.push(va(e,u,d))),e.tag===3)return r;e=e.return}return[]}function A_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hv(e,t,l,r,u){for(var d=t._reactName,v=[];l!==null&&l!==r;){var E=l,R=E.alternate,H=E.stateNode;if(E=E.tag,R!==null&&R===r)break;E!==5&&E!==26&&E!==27||H===null||(R=H,u?(H=Ii(l,d),H!=null&&v.unshift(va(l,H,R))):u||(H=Ii(l,d),H!=null&&v.push(va(l,H,R)))),l=l.return}v.length!==0&&e.push({event:t,listeners:v})}var N_=/\r\n?/g,R_=/\u0000|\uFFFD/g;function qv(e){return(typeof e=="string"?e:""+e).replace(N_,`
|
|
9
|
+
`).replace(R_,"")}function Yv(e,t){return t=qv(t),qv(e)===t}function Ze(e,t,l,r,u,d){switch(l){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||_r(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&_r(e,""+r);break;case"className":Wa(e,"class",r);break;case"tabIndex":Wa(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Wa(e,l,r);break;case"style":Yp(e,r,d);break;case"data":if(t!=="object"){Wa(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=eo(""+r),e.setAttribute(l,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(t!=="input"&&Ze(e,t,"name",u.name,u,null),Ze(e,t,"formEncType",u.formEncType,u,null),Ze(e,t,"formMethod",u.formMethod,u,null),Ze(e,t,"formTarget",u.formTarget,u,null)):(Ze(e,t,"encType",u.encType,u,null),Ze(e,t,"method",u.method,u,null),Ze(e,t,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(l);break}r=eo(""+r),e.setAttribute(l,r);break;case"onClick":r!=null&&(e.onclick=Hn);break;case"onScroll":r!=null&&Le("scroll",e);break;case"onScrollEnd":r!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(l=r.__html,l!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}l=eo(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""+r):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":r===!0?e.setAttribute(l,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(l,r):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(l,r):e.removeAttribute(l);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(l):e.setAttribute(l,r);break;case"popover":Le("beforetoggle",e),Le("toggle",e),Ja(e,"popover",r);break;case"xlinkActuate":In(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":In(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":In(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":In(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":In(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":In(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":In(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":In(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":In(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ja(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=lw.get(l)||l,Ja(e,l,r))}}function wf(e,t,l,r,u,d){switch(l){case"style":Yp(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(l=r.__html,l!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof r=="string"?_r(e,r):(typeof r=="number"||typeof r=="bigint")&&_r(e,""+r);break;case"onScroll":r!=null&&Le("scroll",e);break;case"onScrollEnd":r!=null&&Le("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zp.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(u=l.endsWith("Capture"),t=l.slice(2,u?l.length-7:void 0),d=e[It]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof r=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,r,u);break e}l in e?e[l]=r:r===!0?e.setAttribute(l,""):Ja(e,l,r)}}}function Ot(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var r=!1,u=!1,d;for(d in l)if(l.hasOwnProperty(d)){var v=l[d];if(v!=null)switch(d){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ze(e,t,d,v,l,null)}}u&&Ze(e,t,"srcSet",l.srcSet,l,null),r&&Ze(e,t,"src",l.src,l,null);return;case"input":Le("invalid",e);var E=d=v=u=null,R=null,H=null;for(r in l)if(l.hasOwnProperty(r)){var X=l[r];if(X!=null)switch(r){case"name":u=X;break;case"type":v=X;break;case"checked":R=X;break;case"defaultChecked":H=X;break;case"value":d=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:Ze(e,t,r,X,l,null)}}Bp(e,d,E,R,H,v,u,!1);return;case"select":Le("invalid",e),r=v=d=null;for(u in l)if(l.hasOwnProperty(u)&&(E=l[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":v=E;break;case"multiple":r=E;default:Ze(e,t,u,E,l,null)}t=d,l=v,e.multiple=!!r,t!=null?wr(e,!!r,t,!1):l!=null&&wr(e,!!r,l,!0);return;case"textarea":Le("invalid",e),d=u=r=null;for(v in l)if(l.hasOwnProperty(v)&&(E=l[v],E!=null))switch(v){case"value":r=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(91));break;default:Ze(e,t,v,E,l,null)}Hp(e,r,u,d);return;case"option":for(R in l)if(l.hasOwnProperty(R)&&(r=l[R],r!=null))switch(R){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ze(e,t,R,r,l,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(r=0;r<ya.length;r++)Le(ya[r],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in l)if(l.hasOwnProperty(H)&&(r=l[H],r!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ze(e,t,H,r,l,null)}return;default:if(Bu(t)){for(X in l)l.hasOwnProperty(X)&&(r=l[X],r!==void 0&&wf(e,t,X,r,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(r=l[E],r!=null&&Ze(e,t,E,r,l,null))}function O_(e,t,l,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,v=null,E=null,R=null,H=null,X=null;for(P in l){var J=l[P];if(l.hasOwnProperty(P)&&J!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":R=J;default:r.hasOwnProperty(P)||Ze(e,t,P,null,r,J)}}for(var Y in r){var P=r[Y];if(J=l[Y],r.hasOwnProperty(Y)&&(P!=null||J!=null))switch(Y){case"type":d=P;break;case"name":u=P;break;case"checked":H=P;break;case"defaultChecked":X=P;break;case"value":v=P;break;case"defaultValue":E=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==J&&Ze(e,t,Y,P,r,J)}}Lu(e,v,E,R,H,X,d,u);return;case"select":P=v=E=Y=null;for(d in l)if(R=l[d],l.hasOwnProperty(d)&&R!=null)switch(d){case"value":break;case"multiple":P=R;default:r.hasOwnProperty(d)||Ze(e,t,d,null,r,R)}for(u in r)if(d=r[u],R=l[u],r.hasOwnProperty(u)&&(d!=null||R!=null))switch(u){case"value":Y=d;break;case"defaultValue":E=d;break;case"multiple":v=d;default:d!==R&&Ze(e,t,u,d,r,R)}t=E,l=v,r=P,Y!=null?wr(e,!!l,Y,!1):!!r!=!!l&&(t!=null?wr(e,!!l,t,!0):wr(e,!!l,l?[]:"",!1));return;case"textarea":P=Y=null;for(E in l)if(u=l[E],l.hasOwnProperty(E)&&u!=null&&!r.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ze(e,t,E,null,r,u)}for(v in r)if(u=r[v],d=l[v],r.hasOwnProperty(v)&&(u!=null||d!=null))switch(v){case"value":Y=u;break;case"defaultValue":P=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&Ze(e,t,v,u,r,d)}Ip(e,Y,P);return;case"option":for(var de in l)if(Y=l[de],l.hasOwnProperty(de)&&Y!=null&&!r.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Ze(e,t,de,null,r,Y)}for(R in r)if(Y=r[R],P=l[R],r.hasOwnProperty(R)&&Y!==P&&(Y!=null||P!=null))switch(R){case"selected":e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol";break;default:Ze(e,t,R,Y,r,P)}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 Ee in l)Y=l[Ee],l.hasOwnProperty(Ee)&&Y!=null&&!r.hasOwnProperty(Ee)&&Ze(e,t,Ee,null,r,Y);for(H in r)if(Y=r[H],P=l[H],r.hasOwnProperty(H)&&Y!==P&&(Y!=null||P!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(o(137,t));break;default:Ze(e,t,H,Y,r,P)}return;default:if(Bu(t)){for(var Je in l)Y=l[Je],l.hasOwnProperty(Je)&&Y!==void 0&&!r.hasOwnProperty(Je)&&wf(e,t,Je,void 0,r,Y);for(X in r)Y=r[X],P=l[X],!r.hasOwnProperty(X)||Y===P||Y===void 0&&P===void 0||wf(e,t,X,Y,r,P);return}}for(var L in l)Y=l[L],l.hasOwnProperty(L)&&Y!=null&&!r.hasOwnProperty(L)&&Ze(e,t,L,null,r,Y);for(J in r)Y=r[J],P=l[J],!r.hasOwnProperty(J)||Y===P||Y==null&&P==null||Ze(e,t,J,Y,r,P)}function Vv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),r=0;r<l.length;r++){var u=l[r],d=u.transferSize,v=u.initiatorType,E=u.duration;if(d&&E&&Vv(v)){for(v=0,E=u.responseEnd,r+=1;r<l.length;r++){var R=l[r],H=R.startTime;if(H>E)break;var X=R.transferSize,J=R.initiatorType;X&&Vv(J)&&(R=R.responseEnd,v+=X*(R<E?1:(E-H)/(R-H)))}if(--r,t+=8*(d+v)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _f=null,Af=null;function Zo(e){return e.nodeType===9?e:e.ownerDocument}function Gv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Nf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Rf=null;function M_(){var e=window.event;return e&&e.type==="popstate"?e===Rf?!1:(Rf=e,!0):(Rf=null,!1)}var Fv=typeof setTimeout=="function"?setTimeout:void 0,z_=typeof clearTimeout=="function"?clearTimeout:void 0,Xv=typeof Promise=="function"?Promise:void 0,D_=typeof queueMicrotask=="function"?queueMicrotask:typeof Xv<"u"?function(e){return Xv.resolve(null).then(e).catch(j_)}:Fv;function j_(e){setTimeout(function(){throw e})}function Ol(e){return e==="head"}function Kv(e,t){var l=t,r=0;do{var u=l.nextSibling;if(e.removeChild(l),u&&u.nodeType===8)if(l=u.data,l==="/$"||l==="/&"){if(r===0){e.removeChild(u),li(t);return}r--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")r++;else if(l==="html")ba(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ba(l);for(var d=l.firstChild;d;){var v=d.nextSibling,E=d.nodeName;d[Ui]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=v}}else l==="body"&&ba(e.ownerDocument.body);l=u}while(l);li(t)}function Qv(e,t){var l=e;e=0;do{var r=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),r&&r.nodeType===8)if(l=r.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=r}while(l)}function Of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Of(l),Du(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function L_(e,t,l,r){for(;e.nodeType===1;){var u=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ui])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function U_(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=gn(e.nextSibling),e===null))return null;return e}function Zv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=gn(e.nextSibling),e===null))return null;return e}function kf(e){return e.data==="$?"||e.data==="$~"}function Mf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function B_(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var r=function(){t(),l.removeEventListener("DOMContentLoaded",r)};l.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var zf=null;function Jv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return gn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Wv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function $v(e,t,l){switch(t=Zo(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ba(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Du(e)}var yn=new Map,eb=new Set;function Jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=W.d;W.d={f:I_,r:H_,D:q_,C:Y_,L:V_,m:G_,X:F_,S:P_,M:X_};function I_(){var e=nl.f(),t=Yo();return e||t}function H_(e){var t=xr(e);t!==null&&t.tag===5&&t.type==="form"?yy(t):nl.r(e)}var ei=typeof document>"u"?null:document;function tb(e,t,l){var r=ei;if(r&&typeof t=="string"&&t){var u=un(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof l=="string"&&(u+='[crossorigin="'+l+'"]'),eb.has(u)||(eb.add(u),e={rel:e,crossOrigin:l,href:t},r.querySelector(u)===null&&(t=r.createElement("link"),Ot(t,"link",e),Tt(t),r.head.appendChild(t)))}}function q_(e){nl.D(e),tb("dns-prefetch",e,null)}function Y_(e,t){nl.C(e,t),tb("preconnect",e,t)}function V_(e,t,l){nl.L(e,t,l);var r=ei;if(r&&e&&t){var u='link[rel="preload"][as="'+un(t)+'"]';t==="image"&&l&&l.imageSrcSet?(u+='[imagesrcset="'+un(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(u+='[imagesizes="'+un(l.imageSizes)+'"]')):u+='[href="'+un(e)+'"]';var d=u;switch(t){case"style":d=ti(e);break;case"script":d=ni(e)}yn.has(d)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),yn.set(d,e),r.querySelector(u)!==null||t==="style"&&r.querySelector(Sa(d))||t==="script"&&r.querySelector(Ea(d))||(t=r.createElement("link"),Ot(t,"link",e),Tt(t),r.head.appendChild(t)))}}function G_(e,t){nl.m(e,t);var l=ei;if(l&&e){var r=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+un(r)+'"][href="'+un(e)+'"]',d=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ni(e)}if(!yn.has(d)&&(e=y({rel:"modulepreload",href:e},t),yn.set(d,e),l.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ea(d)))return}r=l.createElement("link"),Ot(r,"link",e),Tt(r),l.head.appendChild(r)}}}function P_(e,t,l){nl.S(e,t,l);var r=ei;if(r&&e){var u=Tr(r).hoistableStyles,d=ti(e);t=t||"default";var v=u.get(d);if(!v){var E={loading:0,preload:null};if(v=r.querySelector(Sa(d)))E.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=yn.get(d))&&Df(e,l);var R=v=r.createElement("link");Tt(R),Ot(R,"link",e),R._p=new Promise(function(H,X){R.onload=H,R.onerror=X}),R.addEventListener("load",function(){E.loading|=1}),R.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Wo(v,t,r)}v={type:"stylesheet",instance:v,count:1,state:E},u.set(d,v)}}}function F_(e,t){nl.X(e,t);var l=ei;if(l&&e){var r=Tr(l).hoistableScripts,u=ni(e),d=r.get(u);d||(d=l.querySelector(Ea(u)),d||(e=y({src:e,async:!0},t),(t=yn.get(u))&&jf(e,t),d=l.createElement("script"),Tt(d),Ot(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(u,d))}}function X_(e,t){nl.M(e,t);var l=ei;if(l&&e){var r=Tr(l).hoistableScripts,u=ni(e),d=r.get(u);d||(d=l.querySelector(Ea(u)),d||(e=y({src:e,async:!0,type:"module"},t),(t=yn.get(u))&&jf(e,t),d=l.createElement("script"),Tt(d),Ot(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(u,d))}}function nb(e,t,l,r){var u=(u=ge.current)?Jo(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ti(l.href),l=Tr(u).hoistableStyles,r=l.get(t),r||(r={type:"style",instance:null,count:0,state:null},l.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ti(l.href);var d=Tr(u).hoistableStyles,v=d.get(e);if(v||(u=u.ownerDocument||u,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=u.querySelector(Sa(e)))&&!d._p&&(v.instance=d,v.state.loading=5),yn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},yn.set(e,l),d||K_(u,e,l,v.state))),t&&r===null)throw Error(o(528,""));return v}if(t&&r!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ni(l),l=Tr(u).hoistableScripts,r=l.get(t),r||(r={type:"script",instance:null,count:0,state:null},l.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ti(e){return'href="'+un(e)+'"'}function Sa(e){return'link[rel="stylesheet"]['+e+"]"}function lb(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function K_(e,t,l,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Ot(t,"link",l),Tt(t),e.head.appendChild(t))}function ni(e){return'[src="'+un(e)+'"]'}function Ea(e){return"script[async]"+e}function rb(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+un(l.href)+'"]');if(r)return t.instance=r,Tt(r),r;var u=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Tt(r),Ot(r,"style",u),Wo(r,l.precedence,e),t.instance=r;case"stylesheet":u=ti(l.href);var d=e.querySelector(Sa(u));if(d)return t.state.loading|=4,t.instance=d,Tt(d),d;r=lb(l),(u=yn.get(u))&&Df(r,u),d=(e.ownerDocument||e).createElement("link"),Tt(d);var v=d;return v._p=new Promise(function(E,R){v.onload=E,v.onerror=R}),Ot(d,"link",r),t.state.loading|=4,Wo(d,l.precedence,e),t.instance=d;case"script":return d=ni(l.src),(u=e.querySelector(Ea(d)))?(t.instance=u,Tt(u),u):(r=l,(u=yn.get(d))&&(r=y({},l),jf(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),Tt(u),Ot(u,"link",r),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Wo(r,l.precedence,e));return t.instance}function Wo(e,t,l){for(var r=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,d=u,v=0;v<r.length;v++){var E=r[v];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Df(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $o=null;function ib(e,t,l){if($o===null){var r=new Map,u=$o=new Map;u.set(l,r)}else u=$o,r=u.get(l),r||(r=new Map,u.set(l,r));if(r.has(e))return r;for(r.set(e,null),l=l.getElementsByTagName(e),u=0;u<l.length;u++){var d=l[u];if(!(d[Ui]||d[_t]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(t)||"";v=e+v;var E=r.get(v);E?E.push(d):r.set(v,[d])}}return r}function ab(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Q_(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ob(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Z_(e,t,l,r){if(l.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var u=ti(r.href),d=t.querySelector(Sa(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=es.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=d,Tt(d);return}d=t.ownerDocument||t,r=lb(r),(u=yn.get(u))&&Df(r,u),d=d.createElement("link"),Tt(d);var v=d;v._p=new Promise(function(E,R){v.onload=E,v.onerror=R}),Ot(d,"link",r),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=es.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Lf=0;function J_(e,t){return e.stylesheets&&e.count===0&&ns(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var r=setTimeout(function(){if(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Lf===0&&(Lf=62500*k_());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ns(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Lf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function es(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ns(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ts=null;function ns(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ts=new Map,t.forEach(W_,e),ts=null,es.call(e))}function W_(e,t){if(!(t.state.loading&4)){var l=ts.get(e);if(l)var r=l.get(null);else{l=new Map,ts.set(e,l);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var v=u[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),r=v)}r&&l.set(null,r)}u=t.instance,v=u.getAttribute("data-precedence"),d=l.get(v)||r,d===r&&l.set(null,u),l.set(v,u),this.count++,r=es.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var xa={$$typeof:B,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function $_(e,t,l,r,u,d,v,E,R){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ou(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ou(0),this.hiddenUpdates=Ou(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function sb(e,t,l,r,u,d,v,E,R,H,X,J){return e=new $_(e,t,l,v,R,H,X,J,E),t=1,d===!0&&(t|=24),d=Wt(3,null,null,t),e.current=d,d.stateNode=e,t=mc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:r,isDehydrated:l,cache:t},vc(d),e}function ub(e){return e?(e=zr,e):zr}function cb(e,t,l,r,u,d){u=ub(u),r.context===null?r.context=u:r.pendingContext=u,r=bl(t),r.payload={element:l},d=d===void 0?null:d,d!==null&&(r.callback=d),l=Sl(e,r,t),l!==null&&(Pt(l,e,t),ea(l,e,t))}function fb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Uf(e,t){fb(e,t),(e=e.alternate)&&fb(e,t)}function db(e){if(e.tag===13||e.tag===31){var t=Xl(e,67108864);t!==null&&Pt(t,e,67108864),Uf(e,67108864)}}function hb(e){if(e.tag===13||e.tag===31){var t=ln();t=ku(t);var l=Xl(e,t);l!==null&&Pt(l,e,t),Uf(e,t)}}var ls=!0;function eA(e,t,l,r){var u=U.T;U.T=null;var d=W.p;try{W.p=2,Bf(e,t,l,r)}finally{W.p=d,U.T=u}}function tA(e,t,l,r){var u=U.T;U.T=null;var d=W.p;try{W.p=8,Bf(e,t,l,r)}finally{W.p=d,U.T=u}}function Bf(e,t,l,r){if(ls){var u=If(r);if(u===null)Cf(e,t,r,rs,l),pb(e,r);else if(lA(u,e,t,l,r))r.stopPropagation();else if(pb(e,r),t&4&&-1<nA.indexOf(e)){for(;u!==null;){var d=xr(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=Yl(d.pendingLanes);if(v!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;v;){var R=1<<31-We(v);E.entanglements[1]|=R,v&=~R}kn(d),(Pe&6)===0&&(Ho=nt()+500,ga(0))}}break;case 31:case 13:E=Xl(d,2),E!==null&&Pt(E,d,2),Yo(),Uf(d,2)}if(d=If(r),d===null&&Cf(e,t,r,rs,l),d===u)break;u=d}u!==null&&r.stopPropagation()}else Cf(e,t,r,null,l)}}function If(e){return e=Hu(e),Hf(e)}var rs=null;function Hf(e){if(rs=null,e=Er(e),e!==null){var t=c(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return rs=e,null}function mb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(br()){case F:return 2;case re:return 8;case Se:case De:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var qf=!1,kl=null,Ml=null,zl=null,Ta=new Map,Ca=new Map,Dl=[],nA="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 pb(e,t){switch(e){case"focusin":case"focusout":kl=null;break;case"dragenter":case"dragleave":Ml=null;break;case"mouseover":case"mouseout":zl=null;break;case"pointerover":case"pointerout":Ta.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ca.delete(t.pointerId)}}function wa(e,t,l,r,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:l,eventSystemFlags:r,nativeEvent:d,targetContainers:[u]},t!==null&&(t=xr(t),t!==null&&db(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function lA(e,t,l,r,u){switch(t){case"focusin":return kl=wa(kl,e,t,l,r,u),!0;case"dragenter":return Ml=wa(Ml,e,t,l,r,u),!0;case"mouseover":return zl=wa(zl,e,t,l,r,u),!0;case"pointerover":var d=u.pointerId;return Ta.set(d,wa(Ta.get(d)||null,e,t,l,r,u)),!0;case"gotpointercapture":return d=u.pointerId,Ca.set(d,wa(Ca.get(d)||null,e,t,l,r,u)),!0}return!1}function gb(e){var t=Er(e.target);if(t!==null){var l=c(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Op(e.priority,function(){hb(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Op(e.priority,function(){hb(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function is(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=If(e.nativeEvent);if(l===null){l=e.nativeEvent;var r=new l.constructor(l.type,l);Iu=r,l.target.dispatchEvent(r),Iu=null}else return t=xr(l),t!==null&&db(t),e.blockedOn=l,!1;t.shift()}return!0}function yb(e,t,l){is(e)&&l.delete(t)}function rA(){qf=!1,kl!==null&&is(kl)&&(kl=null),Ml!==null&&is(Ml)&&(Ml=null),zl!==null&&is(zl)&&(zl=null),Ta.forEach(yb),Ca.forEach(yb)}function as(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,rA)))}var os=null;function vb(e){os!==e&&(os=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){os===e&&(os=null);for(var t=0;t<e.length;t+=3){var l=e[t],r=e[t+1],u=e[t+2];if(typeof r!="function"){if(Hf(r||l)===null)continue;break}var d=xr(l);d!==null&&(e.splice(t,3),t-=3,Bc(d,{pending:!0,data:u,method:l.method,action:r},r,u))}}))}function li(e){function t(R){return as(R,e)}kl!==null&&as(kl,e),Ml!==null&&as(Ml,e),zl!==null&&as(zl,e),Ta.forEach(t),Ca.forEach(t);for(var l=0;l<Dl.length;l++){var r=Dl[l];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Dl.length&&(l=Dl[0],l.blockedOn===null);)gb(l),l.blockedOn===null&&Dl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(r=0;r<l.length;r+=3){var u=l[r],d=l[r+1],v=u[It]||null;if(typeof d=="function")v||vb(l);else if(v){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,v=d[It]||null)E=v.formAction;else if(Hf(u)!==null)continue}else E=v.action;typeof E=="function"?l[r+1]=E:(l.splice(r,3),r-=3),vb(l)}}}function bb(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return u=v})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),r||setTimeout(l,20)}function l(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Yf(e){this._internalRoot=e}ss.prototype.render=Yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,r=ln();cb(l,r,e,t,null,null)},ss.prototype.unmount=Yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cb(e.current,2,null,e,null,null),Yo(),t[Sr]=null}};function ss(e){this._internalRoot=e}ss.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rp();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Dl.length&&t!==0&&t<Dl[l].priority;l++);Dl.splice(l,0,e),l===0&&gb(e)}};var Sb=i.version;if(Sb!=="19.2.0")throw Error(o(527,Sb,"19.2.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var iA={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!us.isDisabled&&us.supportsFiber)try{zt=us.inject(iA),bt=us}catch{}}return ai.createRoot=function(e,t){if(!s(e))throw Error(o(299));var l=!1,r="",u=Ay,d=Ny,v=Ry;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=sb(e,1,!1,null,null,l,r,null,u,d,v,bb),e[Sr]=t.current,Tf(e),new Yf(t)},ai.hydrateRoot=function(e,t,l){if(!s(e))throw Error(o(299));var r=!1,u="",d=Ay,v=Ny,E=Ry,R=null;return l!=null&&(l.unstable_strictMode===!0&&(r=!0),l.identifierPrefix!==void 0&&(u=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(R=l.formState)),t=sb(e,1,!0,t,l??null,r,u,R,d,v,E,bb),t.context=ub(null),l=t.current,r=ln(),r=ku(r),u=bl(r),u.callback=null,Sl(l,u,r),l=r,t.current.lanes=l,Li(t,l),kn(t),e[Sr]=t.current,Tf(e),new ss(t)},ai.version="19.2.0",ai}var ed;function Rb(){if(ed)return ms.exports;ed=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch{}}return n(),ms.exports=Nb(),ms.exports}var Ob=Rb();Wf();function td(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function vs(...n){return i=>{let a=!1;const o=n.map(s=>{const c=td(s,i);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let s=0;s<o.length;s++){const c=o[s];typeof c=="function"?c():td(n[s],null)}}}}function Mn(...n){return w.useCallback(vs(...n),n)}function kb(n){const i=Mb(n),a=w.forwardRef((o,s)=>{const{children:c,...f}=o,h=w.Children.toArray(c),p=h.find(Db);if(p){const m=p.props.children,g=h.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return x.jsx(i,{...f,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return x.jsx(i,{...f,ref:s,children:c})});return a.displayName=`${n}.Slot`,a}function Mb(n){const i=w.forwardRef((a,o)=>{const{children:s,...c}=a;if(w.isValidElement(s)){const f=Lb(s),h=jb(c,s.props);return s.type!==w.Fragment&&(h.ref=o?vs(o,f):f),w.cloneElement(s,h)}return w.Children.count(s)>1?w.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var zb=Symbol("radix.slottable");function Db(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===zb}function jb(n,i){const a={...i};for(const o in i){const s=n[o],c=i[o];/^on[A-Z]/.test(o)?s&&c?a[o]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[o]=s):o==="style"?a[o]={...s,...c}:o==="className"&&(a[o]=[s,c].filter(Boolean).join(" "))}return{...n,...a}}function Lb(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}var Ub=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ll=Ub.reduce((n,i)=>{const a=kb(`Primitive.${i}`),o=w.forwardRef((s,c)=>{const{asChild:f,...h}=s,p=f?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...h,ref:c})});return o.displayName=`Primitive.${i}`,{...n,[i]:o}},{}),rl=globalThis?.document?w.useLayoutEffect:()=>{};function Bb(n,i){return w.useReducer((a,o)=>i[a][o]??a,n)}var ar=n=>{const{present:i,children:a}=n,o=Ib(i),s=typeof a=="function"?a({present:o.isPresent}):w.Children.only(a),c=Mn(o.ref,Hb(s));return typeof a=="function"||o.isPresent?w.cloneElement(s,{ref:c}):null};ar.displayName="Presence";function Ib(n){const[i,a]=w.useState(),o=w.useRef(null),s=w.useRef(n),c=w.useRef("none"),f=n?"mounted":"unmounted",[h,p]=Bb(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const m=Aa(o.current);c.current=h==="mounted"?m:"none"},[h]),rl(()=>{const m=o.current,g=s.current;if(g!==n){const S=c.current,b=Aa(m);n?p("MOUNT"):b==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&S!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,p]),rl(()=>{if(i){let m;const g=i.ownerDocument.defaultView??window,y=b=>{const O=Aa(o.current).includes(CSS.escape(b.animationName));if(b.target===i&&O&&(p("ANIMATION_END"),!s.current)){const z=i.style.animationFillMode;i.style.animationFillMode="forwards",m=g.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=z)})}},S=b=>{b.target===i&&(c.current=Aa(o.current))};return i.addEventListener("animationstart",S),i.addEventListener("animationcancel",y),i.addEventListener("animationend",y),()=>{g.clearTimeout(m),i.removeEventListener("animationstart",S),i.removeEventListener("animationcancel",y),i.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:w.useCallback(m=>{o.current=m?getComputedStyle(m):null,a(m)},[])}}function Aa(n){return n?.animationName||"none"}function Hb(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}function nd(n,i=[]){let a=[];function o(c,f){const h=w.createContext(f),p=a.length;a=[...a,f];const m=y=>{const{scope:S,children:b,...M}=y,O=S?.[n]?.[p]||h,z=w.useMemo(()=>M,Object.values(M));return x.jsx(O.Provider,{value:z,children:b})};m.displayName=c+"Provider";function g(y,S){const b=S?.[n]?.[p]||h,M=w.useContext(b);if(M)return M;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[m,g]}const s=()=>{const c=a.map(f=>w.createContext(f));return function(h){const p=h?.[n]||c;return w.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[o,qb(s,...i)]}function qb(...n){const i=n[0];if(n.length===1)return i;const a=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((h,{useScope:p,scopeName:m})=>{const y=p(c)[`__scope${m}`];return{...h,...y}},{});return w.useMemo(()=>({[`__scope${i.scopeName}`]:f}),[f])}};return a.scopeName=i.scopeName,a}function il(n){const i=w.useRef(n);return w.useEffect(()=>{i.current=n}),w.useMemo(()=>(...a)=>i.current?.(...a),[])}var Yb=w.createContext(void 0);function Vb(n){const i=w.useContext(Yb);return n||i||"ltr"}function Gb(n,[i,a]){return Math.min(a,Math.max(i,n))}function zn(n,i,{checkForDefaultPrevented:a=!0}={}){return function(s){if(n?.(s),a===!1||!s.defaultPrevented)return i?.(s)}}function Pb(n,i){return w.useReducer((a,o)=>i[a][o]??a,n)}var bs="ScrollArea",[ld]=nd(bs),[Fb,rn]=ld(bs),rd=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,type:o="hover",dir:s,scrollHideDelay:c=600,...f}=n,[h,p]=w.useState(null),[m,g]=w.useState(null),[y,S]=w.useState(null),[b,M]=w.useState(null),[O,z]=w.useState(null),[_,q]=w.useState(0),[B,$]=w.useState(0),[G,N]=w.useState(!1),[D,j]=w.useState(!1),K=Mn(i,le=>p(le)),ae=Vb(s);return x.jsx(Fb,{scope:a,type:o,dir:ae,scrollHideDelay:c,scrollArea:h,viewport:m,onViewportChange:g,content:y,onContentChange:S,scrollbarX:b,onScrollbarXChange:M,scrollbarXEnabled:G,onScrollbarXEnabledChange:N,scrollbarY:O,onScrollbarYChange:z,scrollbarYEnabled:D,onScrollbarYEnabledChange:j,onCornerWidthChange:q,onCornerHeightChange:$,children:x.jsx(ll.div,{dir:ae,...f,ref:K,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":B+"px",...n.style}})})});rd.displayName=bs;var id="ScrollAreaViewport",ad=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,children:o,nonce:s,...c}=n,f=rn(id,a),h=w.useRef(null),p=Mn(i,h,f.onViewportChange);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),x.jsx(ll.div,{"data-radix-scroll-area-viewport":"",...c,ref:p,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...n.style},children:x.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});ad.displayName=id;var Tn="ScrollAreaScrollbar",Ss=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=rn(Tn,n.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:f}=s,h=n.orientation==="horizontal";return w.useEffect(()=>(h?c(!0):f(!0),()=>{h?c(!1):f(!1)}),[h,c,f]),s.type==="hover"?x.jsx(Xb,{...o,ref:i,forceMount:a}):s.type==="scroll"?x.jsx(Kb,{...o,ref:i,forceMount:a}):s.type==="auto"?x.jsx(od,{...o,ref:i,forceMount:a}):s.type==="always"?x.jsx(Es,{...o,ref:i}):null});Ss.displayName=Tn;var Xb=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=rn(Tn,n.__scopeScrollArea),[c,f]=w.useState(!1);return w.useEffect(()=>{const h=s.scrollArea;let p=0;if(h){const m=()=>{window.clearTimeout(p),f(!0)},g=()=>{p=window.setTimeout(()=>f(!1),s.scrollHideDelay)};return h.addEventListener("pointerenter",m),h.addEventListener("pointerleave",g),()=>{window.clearTimeout(p),h.removeEventListener("pointerenter",m),h.removeEventListener("pointerleave",g)}}},[s.scrollArea,s.scrollHideDelay]),x.jsx(ar,{present:a||c,children:x.jsx(od,{"data-state":c?"visible":"hidden",...o,ref:i})})}),Kb=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=rn(Tn,n.__scopeScrollArea),c=n.orientation==="horizontal",f=ka(()=>p("SCROLL_END"),100),[h,p]=Pb("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(h==="idle"){const m=window.setTimeout(()=>p("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(m)}},[h,s.scrollHideDelay,p]),w.useEffect(()=>{const m=s.viewport,g=c?"scrollLeft":"scrollTop";if(m){let y=m[g];const S=()=>{const b=m[g];y!==b&&(p("SCROLL"),f()),y=b};return m.addEventListener("scroll",S),()=>m.removeEventListener("scroll",S)}},[s.viewport,c,p,f]),x.jsx(ar,{present:a||h!=="hidden",children:x.jsx(Es,{"data-state":h==="hidden"?"hidden":"visible",...o,ref:i,onPointerEnter:zn(n.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:zn(n.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),od=w.forwardRef((n,i)=>{const a=rn(Tn,n.__scopeScrollArea),{forceMount:o,...s}=n,[c,f]=w.useState(!1),h=n.orientation==="horizontal",p=ka(()=>{if(a.viewport){const m=a.viewport.offsetWidth<a.viewport.scrollWidth,g=a.viewport.offsetHeight<a.viewport.scrollHeight;f(h?m:g)}},10);return or(a.viewport,p),or(a.content,p),x.jsx(ar,{present:o||c,children:x.jsx(Es,{"data-state":c?"visible":"hidden",...s,ref:i})})}),Es=w.forwardRef((n,i)=>{const{orientation:a="vertical",...o}=n,s=rn(Tn,n.__scopeScrollArea),c=w.useRef(null),f=w.useRef(0),[h,p]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=dd(h.viewport,h.content),g={...o,sizes:h,onSizesChange:p,hasThumb:m>0&&m<1,onThumbChange:S=>c.current=S,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:S=>f.current=S};function y(S,b){return e0(S,f.current,h,b)}return a==="horizontal"?x.jsx(Qb,{...g,ref:i,onThumbPositionChange:()=>{if(s.viewport&&c.current){const S=s.viewport.scrollLeft,b=hd(S,h,s.dir);c.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:S=>{s.viewport&&(s.viewport.scrollLeft=S)},onDragScroll:S=>{s.viewport&&(s.viewport.scrollLeft=y(S,s.dir))}}):a==="vertical"?x.jsx(Zb,{...g,ref:i,onThumbPositionChange:()=>{if(s.viewport&&c.current){const S=s.viewport.scrollTop,b=hd(S,h);c.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:S=>{s.viewport&&(s.viewport.scrollTop=S)},onDragScroll:S=>{s.viewport&&(s.viewport.scrollTop=y(S))}}):null}),Qb=w.forwardRef((n,i)=>{const{sizes:a,onSizesChange:o,...s}=n,c=rn(Tn,n.__scopeScrollArea),[f,h]=w.useState(),p=w.useRef(null),m=Mn(i,p,c.onScrollbarXChange);return w.useEffect(()=>{p.current&&h(getComputedStyle(p.current))},[p]),x.jsx(ud,{"data-orientation":"horizontal",...s,ref:m,sizes:a,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Oa(a)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.x),onDragScroll:g=>n.onDragScroll(g.x),onWheelScroll:(g,y)=>{if(c.viewport){const S=c.viewport.scrollLeft+g.deltaX;n.onWheelScroll(S),pd(S,y)&&g.preventDefault()}},onResize:()=>{p.current&&c.viewport&&f&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:Ra(f.paddingLeft),paddingEnd:Ra(f.paddingRight)}})}})}),Zb=w.forwardRef((n,i)=>{const{sizes:a,onSizesChange:o,...s}=n,c=rn(Tn,n.__scopeScrollArea),[f,h]=w.useState(),p=w.useRef(null),m=Mn(i,p,c.onScrollbarYChange);return w.useEffect(()=>{p.current&&h(getComputedStyle(p.current))},[p]),x.jsx(ud,{"data-orientation":"vertical",...s,ref:m,sizes:a,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Oa(a)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.y),onDragScroll:g=>n.onDragScroll(g.y),onWheelScroll:(g,y)=>{if(c.viewport){const S=c.viewport.scrollTop+g.deltaY;n.onWheelScroll(S),pd(S,y)&&g.preventDefault()}},onResize:()=>{p.current&&c.viewport&&f&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:Ra(f.paddingTop),paddingEnd:Ra(f.paddingBottom)}})}})}),[Jb,sd]=ld(Tn),ud=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,sizes:o,hasThumb:s,onThumbChange:c,onThumbPointerUp:f,onThumbPointerDown:h,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:g,onResize:y,...S}=n,b=rn(Tn,a),[M,O]=w.useState(null),z=Mn(i,K=>O(K)),_=w.useRef(null),q=w.useRef(""),B=b.viewport,$=o.content-o.viewport,G=il(g),N=il(p),D=ka(y,10);function j(K){if(_.current){const ae=K.clientX-_.current.left,le=K.clientY-_.current.top;m({x:ae,y:le})}}return w.useEffect(()=>{const K=ae=>{const le=ae.target;M?.contains(le)&&G(ae,$)};return document.addEventListener("wheel",K,{passive:!1}),()=>document.removeEventListener("wheel",K,{passive:!1})},[B,M,$,G]),w.useEffect(N,[o,N]),or(M,D),or(b.content,D),x.jsx(Jb,{scope:a,scrollbar:M,hasThumb:s,onThumbChange:il(c),onThumbPointerUp:il(f),onThumbPositionChange:N,onThumbPointerDown:il(h),children:x.jsx(ll.div,{...S,ref:z,style:{position:"absolute",...S.style},onPointerDown:zn(n.onPointerDown,K=>{K.button===0&&(K.target.setPointerCapture(K.pointerId),_.current=M.getBoundingClientRect(),q.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),j(K))}),onPointerMove:zn(n.onPointerMove,j),onPointerUp:zn(n.onPointerUp,K=>{const ae=K.target;ae.hasPointerCapture(K.pointerId)&&ae.releasePointerCapture(K.pointerId),document.body.style.webkitUserSelect=q.current,b.viewport&&(b.viewport.style.scrollBehavior=""),_.current=null})})})}),Na="ScrollAreaThumb",cd=w.forwardRef((n,i)=>{const{forceMount:a,...o}=n,s=sd(Na,n.__scopeScrollArea);return x.jsx(ar,{present:a||s.hasThumb,children:x.jsx(Wb,{ref:i,...o})})}),Wb=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,style:o,...s}=n,c=rn(Na,a),f=sd(Na,a),{onThumbPositionChange:h}=f,p=Mn(i,y=>f.onThumbChange(y)),m=w.useRef(void 0),g=ka(()=>{m.current&&(m.current(),m.current=void 0)},100);return w.useEffect(()=>{const y=c.viewport;if(y){const S=()=>{if(g(),!m.current){const b=t0(y,h);m.current=b,h()}};return h(),y.addEventListener("scroll",S),()=>y.removeEventListener("scroll",S)}},[c.viewport,g,h]),x.jsx(ll.div,{"data-state":f.hasThumb?"visible":"hidden",...s,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:zn(n.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),M=y.clientX-b.left,O=y.clientY-b.top;f.onThumbPointerDown({x:M,y:O})}),onPointerUp:zn(n.onPointerUp,f.onThumbPointerUp)})});cd.displayName=Na;var xs="ScrollAreaCorner",fd=w.forwardRef((n,i)=>{const a=rn(xs,n.__scopeScrollArea),o=!!(a.scrollbarX&&a.scrollbarY);return a.type!=="scroll"&&o?x.jsx($b,{...n,ref:i}):null});fd.displayName=xs;var $b=w.forwardRef((n,i)=>{const{__scopeScrollArea:a,...o}=n,s=rn(xs,a),[c,f]=w.useState(0),[h,p]=w.useState(0),m=!!(c&&h);return or(s.scrollbarX,()=>{const g=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(g),p(g)}),or(s.scrollbarY,()=>{const g=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(g),f(g)}),m?x.jsx(ll.div,{...o,ref:i,style:{width:c,height:h,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Ra(n){return n?parseInt(n,10):0}function dd(n,i){const a=n/i;return isNaN(a)?0:a}function Oa(n){const i=dd(n.viewport,n.content),a=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-a)*i;return Math.max(o,18)}function e0(n,i,a,o="ltr"){const s=Oa(a),c=s/2,f=i||c,h=s-f,p=a.scrollbar.paddingStart+f,m=a.scrollbar.size-a.scrollbar.paddingEnd-h,g=a.content-a.viewport,y=o==="ltr"?[0,g]:[g*-1,0];return md([p,m],y)(n)}function hd(n,i,a="ltr"){const o=Oa(i),s=i.scrollbar.paddingStart+i.scrollbar.paddingEnd,c=i.scrollbar.size-s,f=i.content-i.viewport,h=c-o,p=a==="ltr"?[0,f]:[f*-1,0],m=Gb(n,p);return md([0,f],[0,h])(m)}function md(n,i){return a=>{if(n[0]===n[1]||i[0]===i[1])return i[0];const o=(i[1]-i[0])/(n[1]-n[0]);return i[0]+o*(a-n[0])}}function pd(n,i){return n>0&&n<i}var t0=(n,i=()=>{})=>{let a={left:n.scrollLeft,top:n.scrollTop},o=0;return(function s(){const c={left:n.scrollLeft,top:n.scrollTop},f=a.left!==c.left,h=a.top!==c.top;(f||h)&&i(),a=c,o=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(o)};function ka(n,i){const a=il(n),o=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(o.current),[]),w.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(a,i)},[a,i])}function or(n,i){const a=il(i);rl(()=>{let o=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(a)});return s.observe(n),()=>{window.cancelAnimationFrame(o),s.unobserve(n)}}},[n,a])}var gd=rd,n0=ad,l0=fd;function yd(n){var i,a,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(i=0;i<s;i++)n[i]&&(a=yd(n[i]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}function vd(){for(var n,i,a=0,o="",s=arguments.length;a<s;a++)(n=arguments[a])&&(i=yd(n))&&(o&&(o+=" "),o+=i);return o}const r0=(n,i)=>{const a=new Array(n.length+i.length);for(let o=0;o<n.length;o++)a[o]=n[o];for(let o=0;o<i.length;o++)a[n.length+o]=i[o];return a},i0=(n,i)=>({classGroupId:n,validator:i}),bd=(n=new Map,i=null,a)=>({nextPart:n,validators:i,classGroupId:a}),Ma="-",Sd=[],a0="arbitrary..",o0=n=>{const i=u0(n),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return s0(f);const h=f.split(Ma),p=h[0]===""&&h.length>1?1:0;return Ed(h,p,i)},getConflictingClassGroupIds:(f,h)=>{if(h){const p=o[f],m=a[f];return p?m?r0(m,p):p:m||Sd}return a[f]||Sd}}},Ed=(n,i,a)=>{if(n.length-i===0)return a.classGroupId;const s=n[i],c=a.nextPart.get(s);if(c){const m=Ed(n,i+1,c);if(m)return m}const f=a.validators;if(f===null)return;const h=i===0?n.join(Ma):n.slice(i).join(Ma),p=f.length;for(let m=0;m<p;m++){const g=f[m];if(g.validator(h))return g.classGroupId}},s0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),a=i.indexOf(":"),o=i.slice(0,a);return o?a0+o:void 0})(),u0=n=>{const{theme:i,classGroups:a}=n;return c0(a,i)},c0=(n,i)=>{const a=bd();for(const o in n){const s=n[o];Ts(s,a,o,i)}return a},Ts=(n,i,a,o)=>{const s=n.length;for(let c=0;c<s;c++){const f=n[c];f0(f,i,a,o)}},f0=(n,i,a,o)=>{if(typeof n=="string"){d0(n,i,a);return}if(typeof n=="function"){h0(n,i,a,o);return}m0(n,i,a,o)},d0=(n,i,a)=>{const o=n===""?i:xd(i,n);o.classGroupId=a},h0=(n,i,a,o)=>{if(p0(n)){Ts(n(o),i,a,o);return}i.validators===null&&(i.validators=[]),i.validators.push(i0(a,n))},m0=(n,i,a,o)=>{const s=Object.entries(n),c=s.length;for(let f=0;f<c;f++){const[h,p]=s[f];Ts(p,xd(i,h),a,o)}},xd=(n,i)=>{let a=n;const o=i.split(Ma),s=o.length;for(let c=0;c<s;c++){const f=o[c];let h=a.nextPart.get(f);h||(h=bd(),a.nextPart.set(f,h)),a=h}return a},p0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,g0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,a=Object.create(null),o=Object.create(null);const s=(c,f)=>{a[c]=f,i++,i>n&&(i=0,o=a,a=Object.create(null))};return{get(c){let f=a[c];if(f!==void 0)return f;if((f=o[c])!==void 0)return s(c,f),f},set(c,f){c in a?a[c]=f:s(c,f)}}},Cs="!",Td=":",y0=[],Cd=(n,i,a,o,s)=>({modifiers:n,hasImportantModifier:i,baseClassName:a,maybePostfixModifierPosition:o,isExternal:s}),v0=n=>{const{prefix:i,experimentalParseClassName:a}=n;let o=s=>{const c=[];let f=0,h=0,p=0,m;const g=s.length;for(let O=0;O<g;O++){const z=s[O];if(f===0&&h===0){if(z===Td){c.push(s.slice(p,O)),p=O+1;continue}if(z==="/"){m=O;continue}}z==="["?f++:z==="]"?f--:z==="("?h++:z===")"&&h--}const y=c.length===0?s:s.slice(p);let S=y,b=!1;y.endsWith(Cs)?(S=y.slice(0,-1),b=!0):y.startsWith(Cs)&&(S=y.slice(1),b=!0);const M=m&&m>p?m-p:void 0;return Cd(c,b,S,M)};if(i){const s=i+Td,c=o;o=f=>f.startsWith(s)?c(f.slice(s.length)):Cd(y0,!1,f,void 0,!0)}if(a){const s=o;o=c=>a({className:c,parseClassName:s})}return o},b0=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((a,o)=>{i.set(a,1e6+o)}),a=>{const o=[];let s=[];for(let c=0;c<a.length;c++){const f=a[c],h=f[0]==="[",p=i.has(f);h||p?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(f)):s.push(f)}return s.length>0&&(s.sort(),o.push(...s)),o}},S0=n=>({cache:g0(n.cacheSize),parseClassName:v0(n),sortModifiers:b0(n),...o0(n)}),E0=/\s+/,x0=(n,i)=>{const{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:c}=i,f=[],h=n.trim().split(E0);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:y,modifiers:S,hasImportantModifier:b,baseClassName:M,maybePostfixModifierPosition:O}=a(g);if(y){p=g+(p.length>0?" "+p:p);continue}let z=!!O,_=o(z?M.substring(0,O):M);if(!_){if(!z){p=g+(p.length>0?" "+p:p);continue}if(_=o(M),!_){p=g+(p.length>0?" "+p:p);continue}z=!1}const q=S.length===0?"":S.length===1?S[0]:c(S).join(":"),B=b?q+Cs:q,$=B+_;if(f.indexOf($)>-1)continue;f.push($);const G=s(_,z);for(let N=0;N<G.length;++N){const D=G[N];f.push(B+D)}p=g+(p.length>0?" "+p:p)}return p},T0=(...n)=>{let i=0,a,o,s="";for(;i<n.length;)(a=n[i++])&&(o=wd(a))&&(s&&(s+=" "),s+=o);return s},wd=n=>{if(typeof n=="string")return n;let i,a="";for(let o=0;o<n.length;o++)n[o]&&(i=wd(n[o]))&&(a&&(a+=" "),a+=i);return a},C0=(n,...i)=>{let a,o,s,c;const f=p=>{const m=i.reduce((g,y)=>y(g),n());return a=S0(m),o=a.cache.get,s=a.cache.set,c=h,h(p)},h=p=>{const m=o(p);if(m)return m;const g=x0(p,a);return s(p,g),g};return c=f,(...p)=>c(T0(...p))},w0=[],yt=n=>{const i=a=>a[n]||w0;return i.isThemeGetter=!0,i},_d=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ad=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_0=/^\d+\/\d+$/,A0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,R0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=n=>_0.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),al=n=>!!n&&Number.isInteger(Number(n)),ws=n=>n.endsWith("%")&&ke(n.slice(0,-1)),Dn=n=>A0.test(n),M0=()=>!0,z0=n=>N0.test(n)&&!R0.test(n),Nd=()=>!1,D0=n=>O0.test(n),j0=n=>k0.test(n),L0=n=>!he(n)&&!me(n),U0=n=>ur(n,zd,Nd),he=n=>_d.test(n),Ll=n=>ur(n,Dd,z0),_s=n=>ur(n,Y0,ke),Rd=n=>ur(n,kd,Nd),B0=n=>ur(n,Md,j0),za=n=>ur(n,jd,D0),me=n=>Ad.test(n),oi=n=>cr(n,Dd),I0=n=>cr(n,V0),Od=n=>cr(n,kd),H0=n=>cr(n,zd),q0=n=>cr(n,Md),Da=n=>cr(n,jd,!0),ur=(n,i,a)=>{const o=_d.exec(n);return o?o[1]?i(o[1]):a(o[2]):!1},cr=(n,i,a=!1)=>{const o=Ad.exec(n);return o?o[1]?i(o[1]):a:!1},kd=n=>n==="position"||n==="percentage",Md=n=>n==="image"||n==="url",zd=n=>n==="length"||n==="size"||n==="bg-size",Dd=n=>n==="length",Y0=n=>n==="number",V0=n=>n==="family-name",jd=n=>n==="shadow",G0=C0(()=>{const n=yt("color"),i=yt("font"),a=yt("text"),o=yt("font-weight"),s=yt("tracking"),c=yt("leading"),f=yt("breakpoint"),h=yt("container"),p=yt("spacing"),m=yt("radius"),g=yt("shadow"),y=yt("inset-shadow"),S=yt("text-shadow"),b=yt("drop-shadow"),M=yt("blur"),O=yt("perspective"),z=yt("aspect"),_=yt("ease"),q=yt("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...$(),me,he],N=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],j=()=>[me,he,p],K=()=>[sr,"full","auto",...j()],ae=()=>[al,"none","subgrid",me,he],le=()=>["auto",{span:["full",al,me,he]},al,me,he],oe=()=>[al,"auto",me,he],_e=()=>["auto","min","max","fr",me,he],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...j()],W=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],Z=()=>[n,me,he],ne=()=>[...$(),Od,Rd,{position:[me,he]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",H0,U0,{size:[me,he]}],V=()=>[ws,oi,Ll],T=()=>["","none","full",m,me,he],te=()=>["",ke,oi,Ll],ce=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[ke,ws,Od,Rd],He=()=>["","none",M,me,he],Oe=()=>["none",ke,me,he],at=()=>["none",ke,me,he],vt=()=>[ke,me,he],Qt=()=>[sr,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dn],breakpoint:[Dn],color:[M0],container:[Dn],"drop-shadow":[Dn],ease:["in","out","in-out"],font:[L0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dn],shadow:[Dn],spacing:["px",ke],text:[Dn],"text-shadow":[Dn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,he,me,z]}],container:["container"],columns:[{columns:[ke,he,me,h]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:G()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[al,"auto",me,he]}],basis:[{basis:[sr,"full","auto",h,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,sr,"auto","initial","none",he]}],grow:[{grow:["",ke,me,he]}],shrink:[{shrink:["",ke,me,he]}],order:[{order:[al,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_e()}],"auto-rows":[{"auto-rows":_e()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[h,"screen",...W()]}],"min-w":[{"min-w":[h,"screen","none",...W()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",a,oi,Ll]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,me,_s]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ws,he]}],"font-family":[{font:[I0,he,i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,me,he]}],"line-clamp":[{"line-clamp":[ke,"none",me,_s]}],leading:[{leading:[c,...j()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",me,Ll]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[ke,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},al,me,he],radial:["",me,he],conic:[al,me,he]},q0,B0]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,me,he]}],"outline-w":[{outline:["",ke,oi,Ll]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",g,Da,za]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",y,Da,za]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[ke,Ll]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",S,Da,za]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[ke,me,he]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[me,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:He()}],brightness:[{brightness:[ke,me,he]}],contrast:[{contrast:[ke,me,he]}],"drop-shadow":[{"drop-shadow":["","none",b,Da,za]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",ke,me,he]}],"hue-rotate":[{"hue-rotate":[ke,me,he]}],invert:[{invert:["",ke,me,he]}],saturate:[{saturate:[ke,me,he]}],sepia:[{sepia:["",ke,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":He()}],"backdrop-brightness":[{"backdrop-brightness":[ke,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[ke,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,me,he]}],"backdrop-invert":[{"backdrop-invert":["",ke,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[ke,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[ke,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",me,he]}],ease:[{ease:["linear","initial",_,me,he]}],delay:[{delay:[ke,me,he]}],animate:[{animate:["none",q,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[O,me,he]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:at()}],"scale-x":[{"scale-x":at()}],"scale-y":[{"scale-y":at()}],"scale-z":[{"scale-z":at()}],"scale-3d":["scale-3d"],skew:[{skew:vt()}],"skew-x":[{"skew-x":vt()}],"skew-y":[{"skew-y":vt()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Qt()}],"translate-x":[{"translate-x":Qt()}],"translate-y":[{"translate-y":Qt()}],"translate-z":[{"translate-z":Qt()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,he]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[ke,oi,Ll,_s]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Te(...n){return G0(vd(n))}function fr(n){if(!n&&n!==0)return"";const i=n instanceof Date?n:new Date(typeof n=="number"?n:Number(n)||n);return Number.isNaN(i.getTime())?"":i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const P0=n=>new Promise(i=>setTimeout(i,n)),Ld=w.forwardRef(({className:n,children:i,...a},o)=>x.jsxs(gd,{ref:o,className:Te("relative overflow-hidden",n),...a,children:[x.jsx(n0,{className:"h-full w-full rounded-[inherit]",children:i}),x.jsx(Ud,{}),x.jsx(l0,{})]}));Ld.displayName=gd.displayName;const Ud=w.forwardRef(({className:n,orientation:i="vertical",...a},o)=>x.jsx(Ss,{ref:o,orientation:i,className:Te("flex touch-none select-none transition-colors",i==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",i==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...a,children:x.jsx(cd,{className:"relative flex-1 rounded-full bg-border"})}));Ud.displayName=Ss.displayName;var F0=Symbol.for("react.lazy"),ja=Xf[" use ".trim().toString()];function X0(n){return typeof n=="object"&&n!==null&&"then"in n}function Bd(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===F0&&"_payload"in n&&X0(n._payload)}function Id(n){const i=Q0(n),a=w.forwardRef((o,s)=>{let{children:c,...f}=o;Bd(c)&&typeof ja=="function"&&(c=ja(c._payload));const h=w.Children.toArray(c),p=h.find(J0);if(p){const m=p.props.children,g=h.map(y=>y===p?w.Children.count(m)>1?w.Children.only(null):w.isValidElement(m)?m.props.children:null:y);return x.jsx(i,{...f,ref:s,children:w.isValidElement(m)?w.cloneElement(m,void 0,g):null})}return x.jsx(i,{...f,ref:s,children:c})});return a.displayName=`${n}.Slot`,a}var K0=Id("Slot");function Q0(n){const i=w.forwardRef((a,o)=>{let{children:s,...c}=a;if(Bd(s)&&typeof ja=="function"&&(s=ja(s._payload)),w.isValidElement(s)){const f=$0(s),h=W0(c,s.props);return s.type!==w.Fragment&&(h.ref=o?vs(o,f):f),w.cloneElement(s,h)}return w.Children.count(s)>1?w.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var Z0=Symbol("radix.slottable");function J0(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Z0}function W0(n,i){const a={...i};for(const o in i){const s=n[o],c=i[o];/^on[A-Z]/.test(o)?s&&c?a[o]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[o]=s):o==="style"?a[o]={...s,...c}:o==="className"&&(a[o]=[s,c].filter(Boolean).join(" "))}return{...n,...a}}function $0(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?n.props.ref:n.props.ref||n.ref)}const Hd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,qd=vd,eS=((n,i)=>a=>{var o;if(i?.variants==null)return qd(n,a?.class,a?.className);const{variants:s,defaultVariants:c}=i,f=Object.keys(s).map(m=>{const g=a?.[m],y=c?.[m];if(g===null)return null;const S=Hd(g)||Hd(y);return s[m][S]}),h=a&&Object.entries(a).reduce((m,g)=>{let[y,S]=g;return S===void 0||(m[y]=S),m},{}),p=i==null||(o=i.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:y,className:S,...b}=g;return Object.entries(b).every(M=>{let[O,z]=M;return Array.isArray(z)?z.includes({...c,...h}[O]):{...c,...h}[O]===z})?[...m,y,S]:m},[]);return qd(n,f,p,a?.class,a?.className)})("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Et=w.forwardRef(({className:n,variant:i,size:a,asChild:o=!1,...s},c)=>{const f=o?K0:"button";return x.jsx(f,{className:Te(eS({variant:i,size:a,className:n})),ref:c,...s})});Et.displayName="Button";const tS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,a,o)=>o?o.toUpperCase():a.toLowerCase()),Yd=n=>{const i=nS(n);return i.charAt(0).toUpperCase()+i.slice(1)},Vd=(...n)=>n.filter((i,a,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===a).join(" ").trim(),lS=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};var rS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const iS=w.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:s="",children:c,iconNode:f,...h},p)=>w.createElement("svg",{ref:p,...rS,width:i,height:i,stroke:n,strokeWidth:o?Number(a)*24/Number(i):a,className:Vd("lucide",s),...!c&&!lS(h)&&{"aria-hidden":"true"},...h},[...f.map(([m,g])=>w.createElement(m,g)),...Array.isArray(c)?c:[c]]));const xt=(n,i)=>{const a=w.forwardRef(({className:o,...s},c)=>w.createElement(iS,{ref:c,iconNode:i,className:Vd(`lucide-${tS(Yd(n))}`,`lucide-${n}`,o),...s}));return a.displayName=Yd(n),a};const aS=xt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Gd=xt("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);const Pd=xt("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);const oS=xt("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Fd=xt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const As=xt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const sS=xt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const uS=xt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const cS=xt("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const fS=xt("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const dS=xt("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);const Xd=xt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const hS=xt("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]);const mS=xt("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);const pS=xt("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);const gS=xt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const yS=xt("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Ns=xt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),si=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Te("rounded-xl border bg-card text-card-foreground shadow",n),...i}));si.displayName="Card";const Kd=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Te("flex flex-col space-y-1.5 p-6",n),...i}));Kd.displayName="CardHeader";const vS=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Te("font-semibold leading-none tracking-tight",n),...i}));vS.displayName="CardTitle";const bS=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Te("text-sm text-muted-foreground",n),...i}));bS.displayName="CardDescription";const Qd=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Te("p-6 pt-0",n),...i}));Qd.displayName="CardContent";const SS=w.forwardRef(({className:n,...i},a)=>x.jsx("div",{ref:a,className:Te("flex items-center p-6 pt-0",n),...i}));SS.displayName="CardFooter";function ES(n,i=[]){let a=[];function o(c,f){const h=w.createContext(f);h.displayName=c+"Context";const p=a.length;a=[...a,f];const m=y=>{const{scope:S,children:b,...M}=y,O=S?.[n]?.[p]||h,z=w.useMemo(()=>M,Object.values(M));return x.jsx(O.Provider,{value:z,children:b})};m.displayName=c+"Provider";function g(y,S){const b=S?.[n]?.[p]||h,M=w.useContext(b);if(M)return M;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[m,g]}const s=()=>{const c=a.map(f=>w.createContext(f));return function(h){const p=h?.[n]||c;return w.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return s.scopeName=n,[o,xS(s,...i)]}function xS(...n){const i=n[0];if(n.length===1)return i;const a=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const f=o.reduce((h,{useScope:p,scopeName:m})=>{const y=p(c)[`__scope${m}`];return{...h,...y}},{});return w.useMemo(()=>({[`__scope${i.scopeName}`]:f}),[f])}};return a.scopeName=i.scopeName,a}var TS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rs=TS.reduce((n,i)=>{const a=Id(`Primitive.${i}`),o=w.forwardRef((s,c)=>{const{asChild:f,...h}=s,p=f?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(p,{...h,ref:c})});return o.displayName=`Primitive.${i}`,{...n,[i]:o}},{}),Os={exports:{}},ks={};var Zd;function CS(){if(Zd)return ks;Zd=1;var n=_a();function i(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var a=typeof Object.is=="function"?Object.is:i,o=n.useState,s=n.useEffect,c=n.useLayoutEffect,f=n.useDebugValue;function h(y,S){var b=S(),M=o({inst:{value:b,getSnapshot:S}}),O=M[0].inst,z=M[1];return c(function(){O.value=b,O.getSnapshot=S,p(O)&&z({inst:O})},[y,b,S]),s(function(){return p(O)&&z({inst:O}),y(function(){p(O)&&z({inst:O})})},[y]),f(b),b}function p(y){var S=y.getSnapshot;y=y.value;try{var b=S();return!a(y,b)}catch{return!0}}function m(y,S){return S()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return ks.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,ks}var Jd;function wS(){return Jd||(Jd=1,Os.exports=CS()),Os.exports}var _S=wS();function AS(){return _S.useSyncExternalStore(NS,()=>!0,()=>!1)}function NS(){return()=>{}}var Ms="Avatar",[RS]=ES(Ms),[OS,Wd]=RS(Ms),$d=w.forwardRef((n,i)=>{const{__scopeAvatar:a,...o}=n,[s,c]=w.useState("idle");return x.jsx(OS,{scope:a,imageLoadingStatus:s,onImageLoadingStatusChange:c,children:x.jsx(Rs.span,{...o,ref:i})})});$d.displayName=Ms;var eh="AvatarImage",th=w.forwardRef((n,i)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:s=()=>{},...c}=n,f=Wd(eh,a),h=kS(o,c),p=il(m=>{s(m),f.onImageLoadingStatusChange(m)});return rl(()=>{h!=="idle"&&p(h)},[h,p]),h==="loaded"?x.jsx(Rs.img,{...c,ref:i,src:o}):null});th.displayName=eh;var nh="AvatarFallback",lh=w.forwardRef((n,i)=>{const{__scopeAvatar:a,delayMs:o,...s}=n,c=Wd(nh,a),[f,h]=w.useState(o===void 0);return w.useEffect(()=>{if(o!==void 0){const p=window.setTimeout(()=>h(!0),o);return()=>window.clearTimeout(p)}},[o]),f&&c.imageLoadingStatus!=="loaded"?x.jsx(Rs.span,{...s,ref:i}):null});lh.displayName=nh;function rh(n,i){return n?i?(n.src!==i&&(n.src=i),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function kS(n,{referrerPolicy:i,crossOrigin:a}){const o=AS(),s=w.useRef(null),c=o?(s.current||(s.current=new window.Image),s.current):null,[f,h]=w.useState(()=>rh(c,n));return rl(()=>{h(rh(c,n))},[c,n]),rl(()=>{const p=y=>()=>{h(y)};if(!c)return;const m=p("loaded"),g=p("error");return c.addEventListener("load",m),c.addEventListener("error",g),i&&(c.referrerPolicy=i),typeof a=="string"&&(c.crossOrigin=a),()=>{c.removeEventListener("load",m),c.removeEventListener("error",g)}},[c,a,i]),f}var ih=$d,ah=th,oh=lh;const ui=w.forwardRef(({className:n,...i},a)=>x.jsx(ih,{ref:a,className:Te("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...i}));ui.displayName=ih.displayName;const sh=w.forwardRef(({className:n,...i},a)=>x.jsx(ah,{ref:a,className:Te("aspect-square h-full w-full",n),...i}));sh.displayName=ah.displayName;const ci=w.forwardRef(({className:n,...i},a)=>x.jsx(oh,{ref:a,className:Te("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...i}));ci.displayName=oh.displayName;var Ul={},fi={},zs={},di={},hi={},mi={},uh;function MS(){if(uh)return mi;uh=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.EventEmitter=void 0;let n=class{eventListeners=new Map;on(a,o){const s=this.eventListeners.get(a)||new Set;s.add(o),this.eventListeners.set(a,s)}off(a,o){const s=this.eventListeners.get(a);s&&(s.delete(o),s.size===0&&this.eventListeners.delete(a))}emit(a,...o){const s=this.eventListeners.get(a);s&&s.forEach(c=>c(...o))}};return mi.EventEmitter=n,mi}var Bl={},ch;function Ds(){return ch||(ch=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.DisconnectionReason=Bl.ConnectionStatus=void 0,Bl.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},Bl.DisconnectionReason={CLIENT_CLOSED:"client_closed",SERVER_CLOSED:"server_closed",CONNECTION_ERROR:"connection_error",AUTHENTICATION_ERROR:"authentication_error",MAX_RECONNECT_ATTEMPTS:"max_reconnect_attempts",TIMEOUT:"timeout",NETWORK_ERROR:"network_error"}),Bl}var fh;function dh(){if(fh)return hi;fh=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.BaseConnection=void 0;const n=MS(),i=Ds();let a=class{status=i.ConnectionStatus.CONNECTING;queue=[];eventEmitter=new n.EventEmitter;disconnectionDetails=null;onErrorCallback=null;onDisconnectCallback=null;onMessageCallback=null;onOpenCallback=null;onStatusChangeCallback=null;getStatus(){return this.status}onOpen(s){this.onOpenCallback=s}onMessage(s){if(this.onMessageCallback=s,this.queue.length>0){const c=[...this.queue];this.queue.length=0,queueMicrotask(()=>{c.forEach(f=>{this.onMessageCallback?.(f)})})}}onDisconnect(s){this.onDisconnectCallback=s;const c=this.disconnectionDetails;c&&queueMicrotask(()=>{this.onDisconnectCallback?.(c)})}onError(s){this.onErrorCallback=s}on(s,c){this.eventEmitter.on(s,c)}off(s,c){this.eventEmitter.off(s,c)}emit(s,...c){this.eventEmitter.emit(s,...c)}onStatusChange(s){this.onStatusChangeCallback=s,queueMicrotask(()=>{s(this.status)})}disconnect(s){this.disconnectionDetails||(this.disconnectionDetails=s,this.updateStatus(i.ConnectionStatus.NOT_CONNECTED),this.onDisconnectCallback?.(s))}handleMessage(s){this.onMessageCallback?this.onMessageCallback(s):this.queue.push(s)}updateStatus(s){this.status!==s&&(this.status=s,this.onStatusChangeCallback?.(s))}};return hi.BaseConnection=a,hi}var js={},hh;function Cn(){return hh||(hh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ValidationError=n.ConfigurationError=n.StoreError=n.MessageError=n.SessionError=n.FileError=n.RecordingError=n.ConnectionError=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.SynapseErrorCode=void 0,n.normalizeError=$,n.SynapseErrorCode={API:"API_ERROR",CONNECTION:"CONNECTION_ERROR",RECORDING:"RECORDING_ERROR",FILE:"FILE_ERROR",SESSION:"SESSION_ERROR",MESSAGE:"MESSAGE_ERROR",STORE:"STORE_ERROR",CONFIGURATION:"CONFIGURATION_ERROR",VALIDATION:"VALIDATION_ERROR",AUTH:"AUTH_ERROR",UNKNOWN:"UNKNOWN_ERROR"};class i extends Error{code;timestamp;cause;context;hint;displayMessage;constructor(N,D=n.SynapseErrorCode.UNKNOWN,j={}){super(N),this.name="SynapseError",this.code=D,this.timestamp=new Date,this.cause=j.cause,this.context=j.context,this.hint=j.hint,this.displayMessage=j.displayMessage||j?.hint||N,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=i;class a extends i{status;error;headers;constructor(N,D,j,K){const ae=a.makeMessage(D,j,N);super(ae,n.SynapseErrorCode.API,{cause:j,context:{status:D,hasBody:!!j},hint:D&&D>=500?"Retry the request or contact support if the issue persists.":void 0,displayMessage:N||"Something went wrong"}),this.name="APIError",this.status=D,this.error=j,this.headers=K}static makeMessage(N,D,j){const K=D instanceof Error?D.message:j;return N&&K?`HTTP ${N}: ${K}`:N?`${N} status code (no body)`:K||"(no status code or body)"}static generate(N,D,j,K){if(!N)return new o({message:j});const ae=D?.error,le=ae&&typeof ae=="object"&&!Array.isArray(ae)?ae:void 0;switch(N){case 400:return new c(j||"Bad Request",N,le,K);case 401:return new f(j||"Unauthorized",N,le,K);case 403:return new h(j||"Permission Denied",N,le,K);case 404:return new p(j||"Not Found",N,le,K);case 405:return new m(j||"Method Not Allowed",N,le,K);case 429:return new g(j||"Rate Limit Exceeded",N,le,K);case 500:return new y(j||"Internal Server Error",N,le,K);default:return new a(j||"API Error",N,le,K)}}}n.APIError=a;class o extends a{constructor({message:N}={}){super(N||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class s extends a{constructor({message:N}={}){super(N||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=s;class c extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="BadRequestError"}}n.BadRequestError=c;class f extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="UnauthorizedError"}}n.UnauthorizedError=f;class h extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="PermissionDeniedError"}}n.PermissionDeniedError=h;class p extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="NotFoundError"}}n.NotFoundError=p;class m extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=m;class g extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="RateLimitError"}}n.RateLimitError=g;class y extends a{constructor(N,D,j,K){super(N,D,j,K),this.name="InternalServerError"}}n.InternalServerError=y;class S extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.CONNECTION,D),this.name="ConnectionError"}}n.ConnectionError=S;class b extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.RECORDING,D),this.name="RecordingError"}}n.RecordingError=b;class M extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.FILE,D),this.name="FileError"}}n.FileError=M;class O extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.SESSION,D),this.name="SessionError"}}n.SessionError=O;class z extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.MESSAGE,D),this.name="MessageError"}}n.MessageError=z;class _ extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.STORE,D),this.name="StoreError"}}n.StoreError=_;class q extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.CONFIGURATION,D),this.name="ConfigurationError"}}n.ConfigurationError=q;class B extends i{constructor(N,D={}){super(N,n.SynapseErrorCode.VALIDATION,D),this.name="ValidationError"}}n.ValidationError=B;function $(G,N,D,j={}){if(G instanceof N)return G;const K={...j,context:{...G instanceof i?G.context:void 0,...j.context},hint:j.hint??(G instanceof i?G.hint:void 0),cause:j.cause??G};if(G instanceof i)return new N(G.message,K);const ae=G instanceof Error&&G.message?G.message:D;return new N(ae,K)}})(js)),js}var mh;function ph(){if(mh)return di;mh=1,Object.defineProperty(di,"__esModule",{value:!0}),di.WebSocketConnection=void 0;const n=dh(),i=Ds(),a=Cn();class o extends n.BaseConnection{conversationId;socket=null;config;reconnectCount=0;constructor(c){super(),this.config={...c,reconnect:c.reconnect||!0,reconnectAttempts:c.reconnectAttempts||3,reconnectDelay:c.reconnectDelay||1e3},this.conversationId=c.auth.sessionId,this.connect()}connect(){try{this.updateStatus(i.ConnectionStatus.CONNECTING);const c=this.buildConnectionUrl();this.socket=new WebSocket(c),this.socket.onopen=this.handleOpen.bind(this),this.socket.onmessage=this.handleSocketMessage.bind(this),this.socket.onerror=this.handleError.bind(this),this.socket.onclose=this.handleClose.bind(this)}catch(c){const f=(0,a.normalizeError)(c,a.ConnectionError,"Failed to establish WebSocket connection",{context:{stage:"connect"}});this.onErrorCallback?.(f),this.disconnect({reason:i.DisconnectionReason.CONNECTION_ERROR,message:f.message,timestamp:new Date})}}buildConnectionUrl(){const c=new URL(this.config.serverUrl);return c.pathname=`/reloaded/ws/med-assist/session/${this.config.auth.sessionId}/`,c.toString()}handleOpen(){this.onOpenCallback?.()}handleSocketMessage(c){try{const f=JSON.parse(c.data);this.handleMessage(f)}catch(f){const h=(0,a.normalizeError)(f,a.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(h)}}handleError(c){const f=new a.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:c});this.onErrorCallback?.(f)}handleClose(c){const f=c.wasClean,h=c.code,p=c.reason;let m,g;h===1e3?(m=i.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):h===1001||h===1006?(m=i.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):h===4001?(m=i.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):f?(m=i.DisconnectionReason.SERVER_CLOSED,g=p||"Server closed connection"):(m=i.DisconnectionReason.CONNECTION_ERROR,g=p||"Connection closed unexpectedly"),this.config.reconnect&&m!==i.DisconnectionReason.AUTHENTICATION_ERROR&&m!==i.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:m,message:g,code:h,timestamp:new Date})}sendMessage(c){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new a.ConnectionError("Cannot send message: connection not open",{context:{stage:"sendMessage",readyState:this.socket?.readyState},hint:"Ensure the WebSocket is open before sending messages."});try{this.socket.send(JSON.stringify(c))}catch(f){const h=(0,a.normalizeError)(f,a.ConnectionError,"Failed to send WebSocket message",{context:{stage:"sendMessage"}});throw this.onErrorCallback?.(h),h}}close(){this.socket&&(this.updateStatus(i.ConnectionStatus.NOT_CONNECTED),this.socket.close(1e3,"Client closed connection"),this.socket=null)}isConnected(){return this.socket?.readyState===WebSocket.OPEN}handleConnected(){this.updateStatus(i.ConnectionStatus.CONNECTED),this.reconnectCount=0}}return di.WebSocketConnection=o,di}var gh;function yh(){return gh||(gh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const i=ph(),a=Cn();n.ConnectionType={SOCKET:"socket"};class o{static async createConnection(c,f){switch(c){case n.ConnectionType.SOCKET:return new i.WebSocketConnection(f);default:throw new a.ConnectionError(`Unsupported connection type: ${c}`,{context:{type:c}})}}}n.ConnectionFactory=o})(zs)),zs}var Il={},vh;function zS(){if(vh)return Il;vh=1,Object.defineProperty(Il,"__esModule",{value:!0}),Il.SYNAPSE_TOOL_NAME=Il.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care/reloaded",BASE_API_URL:"https://matrix.eka.care/reloaded"},i={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care/reloaded",BASE_API_URL:"https://matrix.dev.eka.care/reloaded"},a={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},o=(c="production")=>c==="development"?i:c==="production"?n:c==="staging"?a:n;Il.getConfig=o;var s;return(function(c){c.MOBILE_VERIFICATION="mobile_verification",c.AVAILABILITY_DATES="availability_dates",c.AVAILABILITY_SLOTS="availability_slots",c.DOCTOR_DETAILS="doctor_details",c.GET_LOCATION="get_location"})(s||(Il.SYNAPSE_TOOL_NAME=s={})),Il}var pi={},gi={},bh;function Sh(){if(bh)return gi;bh=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.HttpClient=void 0;const n=Cn();let i=class{baseUrl;headers;timeout;maxRetries;constructor(o){this.baseUrl=o.baseUrl.replace(/\/$/,""),this.timeout=o.timeout||3e4,this.maxRetries=o.maxRetries||3,this.headers={"Content-Type":"application/json",...o.headers},o.authorization&&(this.headers.Authorization=o.authorization)}async request(o,s,c){const f=c?.retries??this.maxRetries;let h;for(let p=0;p<=f;p++)try{const m=this.buildUrl(s,c?.params),g=await fetch(m,{method:o,headers:{...this.headers,...c?.headers},body:c?.body?JSON.stringify(c.body):void 0,signal:AbortSignal.timeout(this.timeout)});return g.ok||await this.handleError(g),g.json()}catch(m){if(h=m,p===f||!(m instanceof TypeError&&m.message==="Failed to fetch"||m instanceof DOMException&&m.name==="AbortError"||m instanceof SyntaxError))break;const y=Math.pow(2,p)*100;await new Promise(S=>setTimeout(S,y))}throw h?h instanceof TypeError&&h.message==="Failed to fetch"?new n.APIError("Network error: Unable to connect to the server. Please check your internet connection.",0,{type:"NETWORK_ERROR",originalError:h.message}):h instanceof DOMException&&h.name==="AbortError"?new n.APIConnectionTimeoutError({message:`Request timed out after ${this.timeout}ms`}):h instanceof SyntaxError?new n.APIError("Invalid response format from server",502,{type:"PARSE_ERROR",originalError:h.message}):h instanceof n.APIError?h:new n.APIError(`Request failed: ${h.message||"Unknown error"}`,500,{type:"UNKNOWN_ERROR",originalError:h}):new n.APIError("Unknown error occurred",500,{type:"UNKNOWN_ERROR"})}async get(o,s,c){return this.request("GET",o,{params:s,...c})}async post(o,s,c){return this.request("POST",o,{body:s,...c})}async put(o,s,c){return this.request("PUT",o,{body:s,...c})}async delete(o,s){return this.request("DELETE",o,{...s})}async patch(o,s,c){return this.request("PATCH",o,{body:s,...c})}buildUrl(o,s){let c=`${this.baseUrl}${o}`;if(s){const f=new URLSearchParams(s).toString();c+=`?${f}`}return c}async handleError(o){let s,c;try{c=await o.json(),s=c.message||c?.msg||o.statusText}catch{s=o.statusText}throw n.APIError.generate(o.status,c,s,o.headers)}};return gi.HttpClient=i,gi}var yi={},vi={},Eh;function xh(){if(Eh)return vi;Eh=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.BaseResource=void 0;let n=class{client;constructor(a){this.client=a}async get(a,o,s){return this.client.get(a,o,s)}async post(a,o,s){return this.client.post(a,o,s)}async put(a,o,s){return this.client.put(a,o,s)}async delete(a,o){return this.client.delete(a,o)}async patch(a,o,s){return this.client.patch(a,o,s)}buildPath(a,o){let s=a;for(const[c,f]of Object.entries(o))s=s.replace(`:${c}`,encodeURIComponent(f));return s}};return vi.BaseResource=n,vi}var Th;function Ch(){if(Th)return yi;Th=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.Session=void 0;const n=xh();let i=class extends n.BaseResource{basePath="/med-assist/session";async create(o){return this.post(this.basePath,o)}async retrieve(o){return this.get(`${this.basePath}/${o}`)}async refresh(o,s){return this.get(`${this.basePath}/${o}/refresh`,void 0,{headers:{"x-sess-token":s}})}async feedback(o,s,c,f){return this.patch(`${this.basePath}/${o}/${s}`,{feedback:c,feedback_reason:f})}};return yi.Session=i,yi}var bi={},jn={},wh;function _h(){if(wh)return jn;wh=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.SYNAPSE_TOOL_CALLBACK_NAME=jn.SYNAPSE_COMPONENTS=jn.SYNAPSE_TOOL_NAME=void 0;var n;(function(a){a.MOBILE_VERIFICATION="mobile_verification",a.AVAILABILITY_DATES="availability_dates",a.AVAILABILITY_SLOTS="availability_slots",a.DOCTOR_AVAILABILITY="doctor_availability",a.DOCTOR_DETAILS="doctor_details",a.GET_LOCATION="get_location"})(n||(jn.SYNAPSE_TOOL_NAME=n={})),jn.SYNAPSE_COMPONENTS={MOBILE_VERIFICATION:"mobile_verification",PILL:"pills",MULTI:"multi",DOCTOR_CARD:"doctor_card"};var i;return(function(a){a.DOCTOR_AVAILABILITY="tool_callback_doctor_availability",a.AVAILABILITY_DATES="tool_callback_availability_dates",a.AVAILABILITY_SLOTS="tool_callback_availability_slots",a.MOBILE_VERIFICATION="tool_callback_mobile_verification",a.DOCTOR_DETAILS="tool_callback_doctor_details"})(i||(jn.SYNAPSE_TOOL_CALLBACK_NAME=i={})),jn}var Ah;function Nh(){if(Ah)return bi;Ah=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.ToolCall=void 0;const n=xh(),i=_h();let a=class extends n.BaseResource{basePath="/med-assist/api-call-tool";async callTool(s,c,f){return c===i.SYNAPSE_TOOL_NAME.GET_LOCATION?this.requestLocation():this.post(`${this.basePath}?session_id=${s}&tool_name=${c}`,{tool_params:f})}async requestLocation(){return new Promise((s,c)=>{if(typeof navigator>"u"||!navigator.geolocation){c({code:500,message:"Geolocation is not supported by this browser",status:500,type:"GEOLOCATION_ERROR",originalError:new Error("Geolocation is not supported by this browser")});return}navigator.geolocation.getCurrentPosition(f=>{s({latitude:f.coords.latitude,longitude:f.coords.longitude,accuracy:f.coords?.accuracy??void 0})},f=>{c({code:f.code,message:f.message,status:500,type:"GEOLOCATION_ERROR",originalError:f})},{timeout:1e4,maximumAge:0,enableHighAccuracy:!0})})}};return bi.ToolCall=a,bi}var Rh;function Oh(){if(Rh)return pi;Rh=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.ResourceManager=void 0;const n=Sh(),i=Ch(),a=Cn(),o=Nh();class s{resourceConfig;httpClient;session;toolCall=null;constructor(f){this.resourceConfig=f,this.httpClient=new n.HttpClient({baseUrl:this.resourceConfig.serverUrl,headers:{"X-agent-id":this.resourceConfig.agentId}}),this.session=new i.Session(this.httpClient)}async createSession(f,h){try{const p={user_id:f,...h?.profile&&{user_context:h?.profile},...h?.intent&&{session_context:{intent:h.intent,...h?.user_location&&{user_location:h.user_location}}},...h?.referer&&{referer:h?.referer}},m=await this.session.create(p);if(!m?.session_id||!m?.session_token)throw new a.APIError("Failed to start session.",500,void 0,void 0);return m}catch(p){throw p instanceof a.APIError?p:new a.APIError("Failed to start session.",500,void 0,void 0)}}async validateSession(f){try{const h=await this.session.retrieve(f);return h.msg&&h.msg==="Session Active"?{expired:!1,active:!0}:{expired:!0,active:!1}}catch(h){if(h instanceof a.APIError)switch(h.status){case 404:return{expired:!1,active:!1};case 500:return{expired:!1,active:!1};case 401:return{expired:!0,active:!1};default:return{expired:!1,active:!1}}throw new a.APIError("Failed to validate session.",500,void 0,void 0)}}async refreshSession(f,h){return await this.session.refresh(f,h)}async sendFeedback(f,h,p,m){return await this.session.feedback(f,h,p,m)}async callTool(f,h,p){return this.toolCall||(this.toolCall=new o.ToolCall(this.httpClient)),await this.toolCall.callTool(f,h,p)}}return pi.ResourceManager=s,pi}var Si={},Ls={},kh;function Us(){return kh||(kh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.MULTI_SELECT_ADDITIONAL_OPTION=n.SOCKET_EVENTS=n.SOCKET_CONTENT_TYPES=void 0,n.IsValidSocketMesssage=i,n.SOCKET_CONTENT_TYPES={TEXT:"text",AUDIO:"audio",FILE:"file",TOOL_CALL:"tool",TIPS:"tips",AUDIO_TRANSCRIPT:"audio_transcript",TOOL_START:"tool_start",TOOL_END:"tool_end"},n.SOCKET_EVENTS={PING:"ping",PONG:"pong",CHAT:"chat",STREAM:"stream",AUTH:"auth",END_OF_STREAM:"eos",SYNC:"sync",ERROR:"err",CONNECTION_ESTABLISHED:"conn"},n.MULTI_SELECT_ADDITIONAL_OPTION={NOTA:"none_of_the_above",AOTA:"all_of_the_above"};function i(a){return[n.SOCKET_EVENTS.PING,n.SOCKET_EVENTS.PONG,n.SOCKET_EVENTS.ERROR,n.SOCKET_EVENTS.SYNC,n.SOCKET_EVENTS.CONNECTION_ESTABLISHED,n.SOCKET_EVENTS.CHAT,n.SOCKET_EVENTS.STREAM,n.SOCKET_EVENTS.END_OF_STREAM].includes(a.ev)}})(Ls)),Ls}var Bs={},Mh;function DS(){return Mh||(Mh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Filemanager=n.MAX_FILE_SIZE=void 0;const i=Cn();n.MAX_FILE_SIZE=3145728;class a{pendingFiles=[];pendingMessage="";pendingFormats=[];setFilesForUpload(s,c){this.pendingFiles.length>0&&this.clearPendingFilesState();const f=s.filter(h=>this.validateFile(h));if(f.length===0)throw new i.FileError("File not supported",{context:{stage:"setFilesForUpload"}});this.pendingFiles=f,c&&c.trim()&&(this.pendingMessage=c),this.pendingFormats=f.map(h=>h.type)}getPendingFileState(){return{files:this.pendingFiles,message:this.pendingMessage||"",formats:this.pendingFormats||[]}}async uploadFilesToPresignedUrl(s){let c=[];const f=s.filter(h=>h.url&&h.url.trim());try{if(f.length===0)throw new i.FileError("No valid presigned URLs provided",{context:{stage:"uploadFilesToPresignedUrl"}});if(!this.pendingFiles.length)throw new i.FileError("No files to upload",{context:{stage:"uploadFilesToPresignedUrl"}});for(let h=0;h<f.length;h++){const p=f[h].url,m=await fetch(p,{method:"PUT",body:this.pendingFiles[h],headers:{"Content-Type":this.pendingFiles[h].type,"x-ms-blob-type":"BlockBlob"}});if(!m.ok)throw new i.FileError(`Failed to upload ${this.pendingFiles[h].name} to URL ${h+1}: ${m.status} ${m.statusText}`,{context:{stage:"uploadFilesToPresignedUrl"}});c.push(f[h].id)}return c}catch(h){if(c.length>0)return c;throw(0,i.normalizeError)(h,i.FileError,"Failed to upload files to presigned URL",{context:{stage:"uploadFilesToPresignedUrl"}})}}blobToFile(s,c){return new File([s],c,{type:s.type})}validateFile(s){return["application/pdf","image/jpeg","image/png","image/jpg"].includes(s.type)&&s.size<n.MAX_FILE_SIZE}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormats=[]}}n.Filemanager=a})(Bs)),Bs}var vn={},zh;function La(){if(zh)return vn;zh=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.SYNAPSE_REALTIME_RESERVED_EVENTS=vn.SYNAPSE_REALTIME_ERROR_CODES=vn.SYNAPSE_REALTIME_EVENTS=vn.SYNAPSE_MESSAGE_TYPES=void 0;const n=Us();return vn.SYNAPSE_MESSAGE_TYPES=n.SOCKET_CONTENT_TYPES,vn.SYNAPSE_REALTIME_EVENTS={CONNECTED:"connected",DISCONNECTED:"disconnected",PROGRESS_MESSAGE:"progress_message",MESSAGE_CHUNK:"message_chunk",TIPS_MESSAGE:"tips_message",END_OF_STREAM:"end_of_stream",ERROR:"error",TOOL_CALL:"tool_call",AUDIO_TRANSCRIPT:"audio_transcript",TOOL_START:"tool_start",TOOL_END:"tool_end"},vn.SYNAPSE_REALTIME_ERROR_CODES={SESSION_INACTIVE:"session_not_found",SESSION_EXPIRED:"session_expired",INVALID_EVENT:"invalid_event",INVALID_CONTENT_TYPE:"invalid_content",PARSING_ERROR:"parsing",FILE_UPLOAD_INPROGRESS:"file_upload_inprogress",TIMEOUT:"timeout",SERVER_ERROR:"server_error",SESSION_TOKEN_MISMATCH:"session_token_mismatch"},vn.SYNAPSE_REALTIME_RESERVED_EVENTS={SESSION_EXPIRED:"session_expired"},vn}var Ei={},Dh;function jS(){if(Dh)return Ei;Dh=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.AudioManager=void 0;const n=Cn();class i{mediaRecorder=null;mediaStream=null;recordingStartTime=0;autoPauseTimer=null;config;onAudioData=null;onAudioError=null;suppressCallbacks=!1;constructor(o={}){this.config={mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:128e3,maxRecordingDuration:9e5,autoPauseEnabled:!0,...o}}async checkCurrentPermissionState(){const o=await navigator.permissions.query({name:"microphone"});if(o.state==="denied")throw new n.RecordingError("Microphone permission denied",{context:{permissionState:o.state},hint:"Ensure the browser has microphone access enabled for this site."});return o.state}async start(o,s){try{if(!navigator.mediaDevices)throw new n.RecordingError("Media devices API is not available. This usually means the page is not served over HTTPS or there are browser restrictions.",{context:{feature:"mediaDevices"},hint:"Serve the app over HTTPS and verify browser/device microphone support.",displayMessage:"Microphone access is unavailable."});if(!window.MediaRecorder)throw new n.RecordingError("MediaRecorder is not supported in this browser",{context:{feature:"MediaRecorder"},hint:"Use a browser that supports the MediaRecorder API.",displayMessage:"Microphone access is unavailable."});const c=["audio/mp3","audio/ogg;codecs=opus","audio/mp4","audio/ogg","audio/wav"].filter(f=>MediaRecorder.isTypeSupported(f));if(c.length===0)throw new n.RecordingError("No supported audio formats found in this browser",{context:{requestedTypes:c},hint:"Verify codec support or adjust the requested MIME types.",displayMessage:"Microphone access is unavailable."});if(this.config.mimeType=c[0],await this.checkCurrentPermissionState(),this.onAudioData=o,this.onAudioError=s??null,this.suppressCallbacks=!1,this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1,sampleRate:44100,channelCount:1}}),this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.config.mimeType,audioBitsPerSecond:this.config.audioBitsPerSecond}),this.mediaRecorder.state!=="inactive")throw new n.RecordingError("MediaRecorder is in an invalid state for start()",{context:{recorderState:this.mediaRecorder.state},displayMessage:"Failed to start recording"});this.setupMediaRecorderEvents(),this.mediaRecorder.start(),this.recordingStartTime=Date.now(),this.config.autoPauseEnabled&&this.setupAutoPauseTimer()}catch(c){throw this.toRecordingError(c,"Failed to start audio recording",{stage:"start"})}}async processAudioChunk(o){try{const s=await this.blobToBase64(o),c=Date.now();if(!this.onAudioData)return;const f={audio:s,format:this.config.mimeType,duration:this.recordingStartTime>0?c-this.recordingStartTime:0,timestamp:this.recordingStartTime>0?this.recordingStartTime:c};this.onAudioData(f)}catch(s){this.handleError(s,{stage:"process_audio_chunk"})}}toRecordingError(o,s,c){if(o instanceof n.RecordingError)return o;if(o instanceof n.SynapseError)return new n.RecordingError(o.message,{cause:o,context:{...o.context,...c},hint:o.hint});const f=o instanceof Error&&o.message?o.message:s;return new n.RecordingError(f,{cause:o,context:c})}handleError(o,s){const c=this.toRecordingError(o,"Unexpected recording error",s);if(this.onAudioError)try{this.onAudioError(c)}catch{}}setupAutoPauseTimer(){this.autoPauseTimer&&clearTimeout(this.autoPauseTimer),this.autoPauseTimer=setTimeout(()=>{this.stop()},this.config.maxRecordingDuration)}setupMediaRecorderEvents(){this.mediaRecorder&&(this.mediaRecorder.ondataavailable=o=>{this.suppressCallbacks||o.data.size<=0||this.processAudioChunk(o.data).catch(s=>this.handleError(s,{stage:"media_recorder_ondataavailable",hasData:o.data.size>0}))},this.mediaRecorder.onstop=async()=>{this.recordingStartTime=0},this.mediaRecorder.onerror=o=>{this.handleError(o.error instanceof Error?o.error:new Error("MediaRecorder encountered an unknown error"),{stage:"media_recorder_onerror"})},this.mediaRecorder.onstart=()=>{this.mediaRecorder})}blobToBase64(o){return new Promise((s,c)=>{const f=new FileReader;f.onload=()=>{if(typeof f.result=="string"){const h=f.result.split(",")[1];s(h)}else c(new n.RecordingError("Failed to convert blob to base64",{context:{stage:"blob_to_base64"}}))},f.onerror=()=>c(new n.RecordingError("FileReader error while converting audio chunk to base64",{cause:f.error??void 0,context:{stage:"blob_to_base64"}})),f.readAsDataURL(o)})}stop(){if(this.mediaRecorder)try{this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to stop audio recording",{stage:"stop"})}}cancel(){if(this.mediaRecorder)try{this.suppressCallbacks=!0,this.autoPauseTimer&&(clearTimeout(this.autoPauseTimer),this.autoPauseTimer=null),this.mediaRecorder.ondataavailable=null,this.mediaRecorder.state==="recording"&&this.mediaRecorder.stop(),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to cancel audio recording",{stage:"cancel"})}}destroy(){try{this.cancel(),this.mediaRecorder&&(this.mediaRecorder=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(o=>o.stop()),this.mediaStream=null)}catch(o){throw this.toRecordingError(o,"Failed to destroy audio resources",{stage:"destroy"})}}}return Ei.AudioManager=i,Ei}var jh;function Lh(){if(jh)return Si;jh=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.MessageManager=void 0;const n=Us(),i=DS(),a=La(),o=jS(),s=Cn();let c=class{connection=null;callbacks=null;fileManager=null;audioManager=null;constructor(h,p){this.connection=h||null,this.callbacks=p||null}handleFileUploadProcess({files:h,message:p,urls:m}){this.fileManager||(this.fileManager=new i.Filemanager);let g;if(h&&h.length>0)this.fileManager.setFilesForUpload(h,p),g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{extensions:this.fileManager.getPendingFileState().formats}};else if(m&&m.length>0){const y=this.fileManager.getPendingFileState().message;g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{urls:m,...y&&{text:y}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:h,files:p,audio:m,urls:g,tool_declined:y,tool_id:S,initial_prompts:b}){const M=this.assertConnection("sendSocketChatMessage");let O;if(p&&p.length>0||g&&g.length>0){if(p&&p.length>3){const z=new s.MessageError("Maximum 3 files are allowed to be sent at a time",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(z),z}O=this.handleFileUploadProcess({files:p,message:h,urls:g})}else h?O={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.TEXT,_id:Date.now().toString(),ts:Date.now(),data:{text:h,...y&&{tool_declined:y},...S&&{tool_id:S},...b&&{initial_prompts:b}}}:m&&m?.audio&&m?.format&&(O={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:m?.audio,format:m?.format}});if(!O){const z=new s.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(z),z}M.sendMessage(O)}handleIncomingSocketChatMessage(h){const p=this.assertConnection("handleIncomingSocketChatMessage");switch(h.ct){case n.SOCKET_CONTENT_TYPES.FILE:{h?.data?.urls&&h.data.urls?.length>0&&this.fileManager?.uploadFilesToPresignedUrl(h.data.urls).then(m=>{this.sendSocketMessage({urls:m})}).catch(m=>{const g=this.toFileError(m,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:h.data?.urls?.length});this.emitError(g)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(h.data.text&&h.data.text.trim()===""&&h._id){const m={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,m)}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(h?.data?.tool_id&&h._id){const m={data:{...h.data},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,m)}break;case n.SOCKET_CONTENT_TYPES.AUDIO_TRANSCRIPT:if(h?.data?.text){const m={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,m)}break}}handleIncomingSocketStreamMessage(h){const p=this.assertConnection("handleIncomingSocketStreamMessage");switch(h.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(h?.data?.progress_msg){const S={data:{text:h.data.progress_msg},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,S);return}if(h?.data?.text){const S={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,S)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(h?.data?.tips){const S={data:{tips:h.data.tips},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,S);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(h?.data?.tool_id&&h._id){const S={data:{...h.data},messageId:h._id,timestamp:h.ts};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,S);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_START:const m={data:h?.data,messageId:h._id||Date.now().toString()};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_START,m);break;case n.SOCKET_CONTENT_TYPES.TOOL_END:const g={data:h?.data,messageId:h._id||Date.now().toString()};p.emit(a.SYNAPSE_REALTIME_EVENTS.TOOL_END,g);break;default:const y=new s.MessageError(`Unsupported content type ${h?.ct}`,{context:{stage:"handleIncomingSocketStreamMessage",contentType:h.ct}});throw this.emitError(y),y}}handleDisconnect(h){this.connection?.emit?.(a.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,h)}handleIncomingSocketEndOfStreamMessage(h){this.assertConnection("handleIncomingSocketEndOfStreamMessage").emit(a.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM)}handleIncomingSocketErrorMessage(h){const p=this.assertConnection("handleIncomingSocketErrorMessage");switch(h.code){case a.SYNAPSE_REALTIME_ERROR_CODES.SESSION_EXPIRED:p.emit(a.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED);break;default:const m=new s.MessageError(h.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:h.code}});p.emit(a.SYNAPSE_REALTIME_EVENTS.ERROR,m),this.emitError(m)}}sendSocketAuthMessage(h){const p=this.assertConnection("sendSocketAuthMessage"),m={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:h}};p.sendMessage(m)}sendSocketPingMessage(){const h=this.assertConnection("sendSocketPingMessage"),p={ev:n.SOCKET_EVENTS.PING,_id:Date.now().toString(),ts:Date.now()};h.sendMessage(p)}async startRecording({onChunks:h,onError:p}){if(!h){const m=new s.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(m),m}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(h,m=>{const g=this.toRecordingError(m,"Failed to start audio recording",{stage:"startRecording"});p?.(g),this.emitError(g)})}catch(m){const g=this.toRecordingError(m,"Failed to start audio recording",{stage:"startRecording"});throw p?.(g),this.emitError(g),g}}endRecordingWithSocket(){if(!this.audioManager){const h=new s.RecordingError("Audio manager not set. Call startRecording() first.",{context:{stage:"stopRecording"}});throw this.emitError(h),h}try{this.audioManager.stop()}catch(h){const p=this.toRecordingError(h,"Failed to stop audio recording",{stage:"stopRecording"});throw this.emitError(p),p}}sendSocketPongMessage(){const h=this.assertConnection("sendSocketPongMessage"),p={ev:n.SOCKET_EVENTS.PONG,_id:Date.now().toString(),ts:Date.now()};h.sendMessage(p)}handleConnectionEstablished(){this.connection?.handleConnected(),this.connection?.emit(a.SYNAPSE_REALTIME_EVENTS.CONNECTED)}cleanupMessageServerState(){this.fileManager&&(this.fileManager.clearPendingFilesState(),this.fileManager=null),this.audioManager&&(this.audioManager.destroy(),this.audioManager=null)}emitError(h){this.callbacks?.onError?.(h)}toFileError(h,p,m,g){return(0,s.normalizeError)(h,s.FileError,p,{context:m,hint:g})}toRecordingError(h,p,m,g){return(0,s.normalizeError)(h,s.RecordingError,p,{context:m,hint:g})}assertConnection(h){if(!this.connection){const p=new s.ConnectionError("Connection not set. Please ensure the connection is established before calling this method.",{context:{stage:h}});throw this.emitError(p),p}return this.connection}};return Si.MessageManager=c,Si}var xi={},Uh;function Bh(){if(Uh)return xi;Uh=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.ErrorUtils=void 0;const n=Cn();class i{static isAPIError(o){return o instanceof n.APIError}static isNetworkError(o){return o instanceof n.APIError&&(o.status===0||o.status===void 0)}static isTimeoutError(o){return o instanceof n.APIConnectionTimeoutError}static isAuthError(o){return o instanceof n.UnauthorizedError||o instanceof n.PermissionDeniedError}static isClientError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=400&&o.status<500}static isServerError(o){return o instanceof n.APIError&&o.status!==void 0&&o.status>=500}static getUserFriendlyMessage(o){return i.isNetworkError(o)?"Unable to connect to the server. Please check your internet connection.":i.isTimeoutError(o)?"Request timed out. Please try again.":i.isAuthError(o)?"Authentication failed. Please log in again.":i.isServerError(o)?"Server error occurred. Please try again later.":i.isAPIError(o)||o instanceof Error?o.message:"An unexpected error occurred."}static getErrorDetails(o){return i.isAPIError(o)?{type:o.name,message:o.message,code:o.code,status:o.status,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof n.SynapseError?{type:o.name,message:o.message,code:o.code,timestamp:o.timestamp,stack:o.stack,context:o.context,hint:o.hint}:o instanceof Error?{type:o.name,message:o.message,stack:o.stack}:{type:"Unknown",message:String(o)}}}return xi.ErrorUtils=i,xi}var Ih;function LS(){if(Ih)return fi;Ih=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.SynapseSDK=void 0;const n=yh(),i=zS(),a=Oh(),o=Lh(),s=La(),c=Bh(),f=Cn(),h=Us();class p{connection=null;messageManager;resourceManager;sessionConfig=null;config;connectionType;constructor(g){this.config={...g,environment:g.environment||"production"},this.connectionType=g.connectionType||n.ConnectionType.SOCKET;const y=(0,i.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new a.ResourceManager({agentId:this.config.agentId,serverUrl:this.config.serverUrl||y})}async startSession(g){try{const y=await this.manageSession(g);return await this.initializeConnection(y),this.setupEventHandlers(),y}catch(y){const S=c.ErrorUtils.getUserFriendlyMessage(y),b=c.ErrorUtils.getErrorDetails(y),M=this.toSessionError(y,S||"Failed to start session",{stage:"startSession",details:b},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(M),M}}async sendMessage({message:g,files:y,audio:S,tool_declined:b,tool_id:M,initial_prompts:O}){if(!this.connection){const z=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendChatMessage"},hint:"Call startSession() and wait for connection before sending messages."});throw this.emitError(z),z}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketMessage({message:g,files:y,audio:S,...b&&{tool_declined:b},...M&&{tool_id:M},...O?.length&&{initial_prompts:O}});break;default:const z=new f.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(z),z}}on(g,y){this.connection?.on(g,y)}off(g,y){this.connection?.off(g,y)}getSessionConfig(){if(!this.sessionConfig?.session_id||!this.sessionConfig?.session_token)throw new f.SessionError("Session ID or token not found",{context:{stage:"getSessionConfig"},hint:"Ensure the session API returns both identifiers."});return this.sessionConfig}async callTool(g,y){if(!this.connection){const S=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(S),S}if(!this.sessionConfig?.session_id){const S=new f.SessionError("Session ID not found",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(S),S}switch(this.connectionType){case n.ConnectionType.SOCKET:try{const b=await this.resourceManager.callTool(this.sessionConfig.session_id,g,y);if(b.err)throw new f.APIError(b.err.msg,500,b.err);return b}catch(b){if(b instanceof f.APIError&&b?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,y);throw b}default:const S=new f.ConnectionError("Unsupported connection type",{context:{stage:"callTool",connectionType:this.connectionType}});throw this.emitError(S),S}}async startRecording({onChunks:g,onError:y}){if(!this.connection){const S=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendAudio"},hint:"Call startSession() before attempting to send audio."});throw this.emitError(S),S}switch(this.connectionType){case n.ConnectionType.SOCKET:try{await this.messageManager.startRecording({onChunks:g,onError:y})}catch(b){throw b}break;default:const S=new f.ConnectionError("Unsupported connection type",{context:{stage:"sendAudio",connectionType:this.connectionType}});throw this.emitError(S),S}}endRecording(){if(!this.connection){const g=new f.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"endRecording"},hint:"Call startRecording() before attempting to stop recording."});throw this.emitError(g),g}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.endRecordingWithSocket();break;default:const g=new f.ConnectionError("Unsupported connection type",{context:{stage:"endRecording",connectionType:this.connectionType}});throw this.emitError(g),g}}isConnected(){return this.connection?.isConnected()??!1}endSession(){this.connection&&(this.connection.close(),this.connection=null),this.messageManager&&this.messageManager.cleanupMessageServerState()}emitError(g){this.config.callbacks?.onError?.(g)}toSessionError(g,y,S,b){return(0,f.normalizeError)(g,f.SessionError,y,{context:S,hint:b})}async initializeConnection(g){if(this.connection&&(this.connection.close(),this.connection=null),!g.session_id||!g.session_token)throw new f.SessionError("Session ID or token not found",{context:{stage:"initializeConnection"},hint:"Ensure the session API returns both identifiers."});this.sessionConfig=g;const y=(0,i.getConfig)(this.config?.environment).WEBSOCKET_URL,S=this.config.serverUrl?`wss://${this.config.serverUrl.split("://")[1]}`:null,b=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(b,{serverUrl:S||y,auth:{sessionId:g.session_id,sessionToken:g.session_token},agentId:this.config.agentId,userId:this.config.userId,overrides:this.config.overrides}),this.messageManager=new o.MessageManager(this.connection,this.config?.callbacks)}async manageSession(g){try{if(!g?.session_id)return this.createNewSession();const y=await this.resourceManager.validateSession(g.session_id);return y.active?g:y.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(y){if(y instanceof f.APIError){const S=y.status;if(S===404||S===500)return this.createNewSession()}throw this.toSessionError(y,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,y){try{return await this.resourceManager.refreshSession(g,y)}catch(S){if(S instanceof f.APIError){this.emitError(S);const b=S.status;if(b===404||b===500)return this.createNewSession()}throw this.toSessionError(S,"Failed to refresh session",{stage:"refreshSession",sessionId:g})}}async createNewSession(){return await this.resourceManager.createSession(this.config.userId||Date.now().toString(),this.config.context)}setupEventHandlers(){if(this.connection){switch(this.connectionType){case n.ConnectionType.SOCKET:this.connection.onOpen(()=>{this.onSocketConnectionOpen()}),this.connection.onMessage(g=>{this.onIncomingSocketMessage(g)}),this.connection.onError(g=>{this.onSocketConnectionError(g)}),this.connection.on(s.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED,()=>{this.handleSessionExpiry()});break;default:throw new f.ConnectionError("Unsupported connection type",{context:{stage:"setupEventHandlers",connectionType:this.connectionType},hint:"Use ConnectionType.SOCKET or provide a custom handler."})}this.connection.onDisconnect(g=>{this.messageManager.handleDisconnect(g)})}}onSocketConnectionError(g){this.connection?.emit(s.SYNAPSE_REALTIME_EVENTS.ERROR,g);const y=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(y)}onSocketConnectionOpen(){if(!this.sessionConfig?.session_token){const g=new f.SessionError("Session token not set. Call startSession() first.",{context:{stage:"onSocketConnectionOpen"},hint:"Ensure startSession() completes successfully before socket opens."});throw this.emitError(g),g}this.messageManager.sendSocketAuthMessage(this.sessionConfig.session_token)}onIncomingSocketMessage(g){switch(g.ev){case h.SOCKET_EVENTS.CHAT:this.messageManager.handleIncomingSocketChatMessage(g);break;case h.SOCKET_EVENTS.CONNECTION_ESTABLISHED:this.messageManager.handleConnectionEstablished();break;case h.SOCKET_EVENTS.STREAM:this.messageManager.handleIncomingSocketStreamMessage(g);break;case h.SOCKET_EVENTS.END_OF_STREAM:this.messageManager.handleIncomingSocketEndOfStreamMessage(g);break;case h.SOCKET_EVENTS.PING:this.messageManager.sendSocketPongMessage();break;case h.SOCKET_EVENTS.PONG:this.messageManager.sendSocketPingMessage();break;case h.SOCKET_EVENTS.SYNC:break;case h.SOCKET_EVENTS.ERROR:this.messageManager.handleIncomingSocketErrorMessage(g);break;default:const y=new f.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(y);return}}async handleSessionExpiry(){try{if(this.endSession(),!this.sessionConfig?.session_id||!this.sessionConfig?.session_token){const y=new f.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(y),y}const g=await this.refreshSession(this.sessionConfig.session_id,this.sessionConfig.session_token);if(!g.session_id||!g.session_token)throw new f.SessionError("Session refresh failed",{context:{stage:"handleSessionExpiry"}});this.sessionConfig.session_id=g.session_id,this.sessionConfig.session_token=g.session_token,await this.initializeConnection(g),this.setupEventHandlers(),this.config.callbacks?.onSessionRefreshed?.(g)}catch(g){const y=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(y)}}toConnectionError(g,y,S,b){return(0,f.normalizeError)(g,f.ConnectionError,y,{context:S,hint:b})}}return fi.SynapseSDK=p,fi}var Is={},Hh;function US(){return Hh||(Hh=1,Object.defineProperty(Is,"__esModule",{value:!0})),Is}var Ti={},qh;function BS(){return qh||(qh=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.USER_FEEDBACK=void 0,Ti.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Ti}var Hs={},Yh;function IS(){return Yh||(Yh=1,Object.defineProperty(Hs,"__esModule",{value:!0})),Hs}var Ci={},Vh;function HS(){return Vh||(Vh=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.ErrorType=void 0,Ci.ErrorType={NETWORK_ERROR:"NETWORK_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",API_ERROR:"API_ERROR",RATE_LIMIT_ERROR:"RATE_LIMIT_ERROR",SERVER_ERROR:"SERVER_ERROR",PARSE_ERROR:"PARSE_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR"}),Ci}var qs={},Gh;function qS(){return Gh||(Gh=1,Object.defineProperty(qs,"__esModule",{value:!0})),qs}var Ph;function YS(){return Ph||(Ph=1,(function(n){var i=Ul&&Ul.__createBinding||(Object.create?(function(z,_,q,B){B===void 0&&(B=q);var $=Object.getOwnPropertyDescriptor(_,q);(!$||("get"in $?!_.__esModule:$.writable||$.configurable))&&($={enumerable:!0,get:function(){return _[q]}}),Object.defineProperty(z,B,$)}):(function(z,_,q,B){B===void 0&&(B=q),z[B]=_[q]})),a=Ul&&Ul.__exportStar||function(z,_){for(var q in z)q!=="default"&&!Object.prototype.hasOwnProperty.call(_,q)&&i(_,z,q)};Object.defineProperty(n,"__esModule",{value:!0}),n.SYNAPSE_MESSAGE_TYPES=n.ErrorUtils=n.ErrorType=n.SynapseErrorCode=n.InternalServerError=n.RateLimitError=n.MethodNotAllowedError=n.NotFoundError=n.PermissionDeniedError=n.UnauthorizedError=n.BadRequestError=n.APIConnectionTimeoutError=n.APIUserAbortError=n.APIError=n.SynapseError=n.HttpClient=n.MessageManager=n.ToolCall=n.Session=n.ResourceManager=n.ConnectionType=n.ConnectionFactory=n.WebSocketConnection=n.BaseConnection=n.SynapseSDK=void 0;var o=LS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var s=dh();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return s.BaseConnection}});var c=ph();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return c.WebSocketConnection}});var f=yh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return f.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return f.ConnectionType}}),a(Ds(),n);var h=Oh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return h.ResourceManager}}),a(US(),n);var p=Ch();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return p.Session}}),a(BS(),n);var m=Nh();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return m.ToolCall}}),a(_h(),n);var g=Lh();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return g.MessageManager}}),a(La(),n),a(IS(),n);var y=Sh();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return y.HttpClient}});var S=Cn();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return S.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return S.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return S.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return S.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return S.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return S.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return S.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return S.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return S.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return S.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return S.InternalServerError}}),Object.defineProperty(n,"SynapseErrorCode",{enumerable:!0,get:function(){return S.SynapseErrorCode}});var b=HS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var M=Bh();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return M.ErrorUtils}}),a(qS(),n);var O=La();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return O.SYNAPSE_MESSAGE_TYPES}})})(Ul)),Ul}var ze=YS();const Fh=n=>{let i;const a=new Set,o=(m,g)=>{const y=typeof m=="function"?m(i):m;if(!Object.is(y,i)){const S=i;i=g??(typeof y!="object"||y===null)?y:Object.assign({},i,y),a.forEach(b=>b(i,S))}},s=()=>i,h={setState:o,getState:s,getInitialState:()=>p,subscribe:m=>(a.add(m),()=>a.delete(m))},p=i=n(o,s,h);return h},VS=(n=>n?Fh(n):Fh),GS=n=>n;function PS(n,i=GS){const a=ii.useSyncExternalStore(n.subscribe,ii.useCallback(()=>i(n.getState()),[n,i]),ii.useCallback(()=>i(n.getInitialState()),[n,i]));return ii.useDebugValue(a),a}const FS=n=>{const i=VS(n),a=o=>PS(i,o);return Object.assign(a,i),a},XS=(n=>FS);function Xh(n,i){let a;try{a=n()}catch{return}return{getItem:s=>{var c;const f=p=>p===null?null:JSON.parse(p,void 0),h=(c=a.getItem(s))!=null?c:null;return h instanceof Promise?h.then(f):f(h)},setItem:(s,c)=>a.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>a.removeItem(s)}}const Ys=n=>i=>{try{const a=n(i);return a instanceof Promise?a:{then(o){return Ys(o)(a)},catch(o){return this}}}catch(a){return{then(o){return this},catch(o){return Ys(o)(a)}}}},KS=(n,i)=>(a,o,s)=>{let c={storage:Xh(()=>localStorage),partialize:O=>O,version:0,merge:(O,z)=>({...z,...O}),...i},f=!1;const h=new Set,p=new Set;let m=c.storage;if(!m)return n((...O)=>{a(...O)},o,s);const g=()=>{const O=c.partialize({...o()});return m.setItem(c.name,{state:O,version:c.version})},y=s.setState;s.setState=(O,z)=>(y(O,z),g());const S=n((...O)=>(a(...O),g()),o,s);s.getInitialState=()=>S;let b;const M=()=>{var O,z;if(!m)return;f=!1,h.forEach(q=>{var B;return q((B=o())!=null?B:S)});const _=((z=c.onRehydrateStorage)==null?void 0:z.call(c,(O=o())!=null?O:S))||void 0;return Ys(m.getItem.bind(m))(c.name).then(q=>{if(q)if(typeof q.version=="number"&&q.version!==c.version){if(c.migrate){const B=c.migrate(q.state,q.version);return B instanceof Promise?B.then($=>[!0,$]):[!0,B]}}else return[!1,q.state];return[!1,void 0]}).then(q=>{var B;const[$,G]=q;if(b=c.merge(G,(B=o())!=null?B:S),a(b,!0),$)return g()}).then(()=>{_?.(b,void 0),b=o(),f=!0,p.forEach(q=>q(b))}).catch(q=>{_?.(void 0,q)})};return s.persist={setOptions:O=>{c={...c,...O},O.storage&&(m=O.storage)},clearStorage:()=>{m?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>M(),hasHydrated:()=>f,onHydrate:O=>(h.add(O),()=>{h.delete(O)}),onFinishHydration:O=>(p.add(O),()=>{p.delete(O)})},c.skipHydration||M(),b||S},Ft={USER:"user",ASSISTANT:"assistant"};var wt=(n=>(n.IDLE="idle",n.LISTENING="listening",n.ERROR="error",n.PROCESSING="processing",n.TRANSCRIBING="transcribing",n))(wt||{});const QS={sessionId:"",sessionToken:"",isStreaming:!1,recordingStatus:wt.IDLE,isWaitingForResponse:!1,error:null,isTimeoutError:!1,startNewConnection:!1,showRetryButton:!1,chats:{},inlineText:null,isRefreshingSession:!1,ConnectionStatus:ze.ConnectionStatus.CONNECTING,streamingTimeoutId:null,responseTimeoutId:null,lastStreamingActivity:null,progressMessage:null,fileUploadPerSession:0},dr=XS()(KS((n,i)=>({sessionId:"",setSessionId:a=>n({sessionId:a}),sessionToken:"",setSessionToken:a=>n({sessionToken:a}),initialMessage:null,setInitialMessage:a=>n({initialMessage:a}),agentId:"",setAgentId:a=>n({agentId:a}),userId:"",setUserId:a=>n({userId:a}),context:null,setContext:a=>n({context:a}),connectionStatus:ze.ConnectionStatus.CONNECTING,setConnectionStatus:a=>n({connectionStatus:a}),isStreaming:!1,setIsStreaming:a=>n({isStreaming:a}),isWaitingForResponse:!1,setIsWaitingForResponse:a=>n({isWaitingForResponse:a}),progressMessage:null,setProgressMessage:a=>n({progressMessage:a}),recordingStatus:wt.IDLE,setRecordingStatus:a=>n({recordingStatus:a}),startNewConnection:!1,setStartNewConnection:a=>n({startNewConnection:a}),fileUploadPerSession:0,setFileUploadPerSession:a=>n({fileUploadPerSession:a}),inlineText:null,setInlineText:a=>n({inlineText:a}),isBotIconAnimating:!1,setIsBotIconAnimating:a=>n({isBotIconAnimating:a}),chats:{},addMessageToSession:(a,o)=>{n(s=>({chats:{...s.chats,[a]:[...s.chats[a]||[],o]}}))},updateMessageInSession:(a,o,s)=>n(c=>({chats:{...c.chats,[a]:(c.chats[a]||[]).map(f=>f.id===o?{...f,...s}:f)}})),getMessagesForSession:a=>i().chats[a]||[],clearMessagesForSession:a=>n(o=>({chats:{...o.chats,[a]:[]}})),clearAllChats:()=>n({chats:{}}),error:null,setError:a=>n({error:a}),clearError:()=>n({error:null,isTimeoutError:!1,showRetryButton:!1,startNewConnection:!1}),showRetryButton:!1,setShowRetryButton:a=>n({showRetryButton:a}),isTimeoutError:!1,setTimeoutError:a=>n({isTimeoutError:a}),clearSession:async()=>{n(QS),await localStorage.removeItem("med-assist-store")},streamingTimeoutId:null,setStreamingTimeoutId:a=>n({streamingTimeoutId:a}),clearStreamingTimeout:()=>{const a=i();a.streamingTimeoutId&&(clearTimeout(a.streamingTimeoutId),n({streamingTimeoutId:null}))},responseTimeoutId:null,setResponseTimeoutId:a=>n({responseTimeoutId:a}),clearResponseTimeout:()=>{const a=i();a.responseTimeoutId&&(clearTimeout(a.responseTimeoutId),n({responseTimeoutId:null}))},lastStreamingActivity:null,setLastStreamingActivity:a=>n({lastStreamingActivity:a})}),{name:"med-assist-store",storage:Xh(()=>localStorage),partialize:n=>({agentId:n.agentId,userId:n.userId,context:n.context,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,initialMessage:n.initialMessage,connectionStatus:n.connectionStatus})}));function ZS({onClose:n,title:i,iconUrl:a,startNewConversation:o}){const s=dr(h=>h.connectionStatus),f=(()=>{switch(s){case ze.ConnectionStatus.CONNECTED:return{dotColor:"bg-green-500",text:"Connected",textColor:"text-green-600"};case ze.ConnectionStatus.CONNECTING:return{dotColor:"bg-amber-500",text:"Connecting",textColor:"text-amber-600"};case ze.ConnectionStatus.NOT_CONNECTED:return{dotColor:"bg-red-500",text:"Not Connected",textColor:"text-red-600"};default:return{dotColor:"bg-gray-400",text:"Not Connected",textColor:"text-gray-600"}}})();return x.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("div",{className:"relative flex-shrink-0",children:[x.jsx(ui,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:x.jsx(ci,{className:"text-white font-bold text-lg bg-transparent",children:a?x.jsx("img",{src:a,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):x.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),x.jsx("div",{className:Te("absolute bottom-0 right-0 w-3.5 h-3.5 rounded-full border-2 border-white shadow-sm",f.dotColor,s===ze.ConnectionStatus.CONNECTING&&"animate-pulse")})]}),x.jsxs("div",{className:"flex flex-col",children:[x.jsx("p",{className:"text-lg font-semibold text-slate-900",children:i||"Health Assist"}),x.jsx("div",{className:"flex items-center gap-1.5",children:x.jsx("span",{className:Te("text-xs font-medium",f.textColor),children:f.text})})]})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Et,{type:"button",variant:"ghost",size:"icon",title:"Start New Chat",onClick:o,className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:x.jsx(hS,{className:"w-8 h-8"})}),x.jsx(Et,{onClick:n,type:"button",variant:"ghost",size:"icon",title:"Close",className:"h-8 w-8 text-slate-600 hover:text-slate-900 hover:bg-white/60 active:bg-white/80 rounded-xl transition-all duration-200",children:x.jsx(Ns,{className:"w-8 h-8"})})]})]})})}function JS({defaultPosition:n,enabled:i=!0,onDragStart:a,onDragEnd:o}={}){const s=w.useCallback(()=>typeof window>"u"?{x:0,y:0}:{x:window.innerWidth-400,y:window.innerHeight-600},[]),[c,f]=w.useState(()=>n??s()),[h,p]=w.useState(!1),m=w.useRef({x:0,y:0}),g=w.useRef(null),y=w.useRef(!1);w.useEffect(()=>{if(!i||y.current||!g.current||typeof window>"u")return;const O=g.current,z=O.offsetWidth||400,_=O.offsetHeight||600,q={x:window.innerWidth-z-20,y:window.innerHeight-_-20};n||f(q),y.current=!0},[i,n]);const S=w.useCallback(O=>{if(!i)return;const z=O.target;if(z.tagName==="BUTTON"||z.tagName==="INPUT"||z.tagName==="TEXTAREA"||z.tagName==="SELECT"||z.closest("button")||z.closest("input")||z.closest("textarea")||z.closest("select")||z.closest("a"))return;O.preventDefault(),p(!0);const _=g.current;if(_){const q=_.getBoundingClientRect();m.current={x:O.clientX-q.left,y:O.clientY-q.top}}else m.current={x:O.clientX-c.x,y:O.clientY-c.y};a?.()},[i,c.x,c.y,a]),b=w.useCallback(O=>{if(!i||!h)return;const z=O.clientX-m.current.x,_=O.clientY-m.current.y,q=window.innerWidth-(g.current?.offsetWidth||0),B=window.innerHeight-(g.current?.offsetHeight||0),$=Math.max(0,Math.min(z,q)),G=Math.max(0,Math.min(_,B));f({x:$,y:G})},[h,i]),M=w.useCallback(()=>{!i||!h||(p(!1),o?.())},[h,o]);return w.useEffect(()=>{if(!i)return;const O=g.current;if(O)return O.addEventListener("mousedown",S),()=>{O.removeEventListener("mousedown",S)}},[i,S]),w.useEffect(()=>{if(h)return document.addEventListener("mousemove",b),document.addEventListener("mouseup",M),document.body.style.cursor="grabbing",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",M),document.body.style.cursor="",document.body.style.userSelect=""}},[h,b,M]),{position:c,isDragging:h,elementRef:g,setPosition:f}}const WS=w.lazy(()=>Promise.resolve().then(()=>uE));function $S({isOpen:n,onClose:i,iconUrl:a,onStartNewSession:o,children:s,title:c,sessionId:f,chatComposer:h,environment:p,displayMode:m}){const[g,y]=w.useState(!1),S=w.useRef(null);w.useEffect(()=>{const _=()=>{const q=window?.innerWidth??0,B=navigator?.userAgent?.toLowerCase()??"",$=q<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(B)||m==="full";y($)};return _(),window.addEventListener("resize",_),()=>window.removeEventListener("resize",_)},[m]),w.useEffect(()=>{if(!n||!g||!S.current)return;const _=S.current;let q=null,B=null;if(window.visualViewport){const $=()=>{if(_&&window.visualViewport){const D=window.visualViewport.height,j=window.visualViewport.offsetTop;q=requestAnimationFrame(()=>{_.style.transition="none",_.style.top=`${j}px`,_.style.left="0",_.style.right="0",_.style.bottom="auto",_.style.width="100vw",_.style.height=`${D}px`,_.style.maxHeight=`${D}px`,_.style.minHeight=`${D}px`,B&&clearTimeout(B),B=setTimeout(()=>{_.style.transition=""},100)})}},G=()=>{$()},N=()=>{if(_&&window.visualViewport){const D=window.visualViewport.offsetTop;q=requestAnimationFrame(()=>{_.style.transition="none",_.style.top=`${D}px`,setTimeout(()=>{_.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",G),window.visualViewport.addEventListener("scroll",N),$(),()=>{q&&cancelAnimationFrame(q),B&&clearTimeout(B),window.visualViewport?.removeEventListener("resize",G),window.visualViewport?.removeEventListener("scroll",N)}}else{const $=()=>{_&&(_.style.transition="none",_.style.top="0",_.style.left="0",_.style.right="0",_.style.bottom="auto",_.style.width="100vw",_.style.height="100svh",_.style.maxHeight="100svh",setTimeout(()=>{_.style.transition=""},100))};return window.addEventListener("resize",$),$(),()=>{window.removeEventListener("resize",$)}}},[n,g]),w.useEffect(()=>{if(n){const _=document.body.style.overflow,q=document.body.style.paddingRight,B=document.documentElement.style.overflow,$=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",$>0&&!g&&(document.body.style.paddingRight=`${$}px`),()=>{document.body.style.overflow=_,document.body.style.paddingRight=q,document.documentElement.style.overflow=B}}},[n,g]);const{position:b,elementRef:M}=JS({enabled:n&&!g});w.useEffect(()=>{S.current&&(M.current=S.current)},[M]);const O=Te("synapse-chat-widget-container","fixed m-0 p-0","box-border",g?"":"transition-all duration-300",g?"w-screen h-[100svh]":"w-96 h-[600px]","z-[2147483647]",n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none scale-95"),z=Te("w-full h-full",g?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",g?"rounded-none":"rounded-3xl");return x.jsxs("div",{ref:S,className:O,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...!g&&{left:`${b.x}px`,top:`${b.y}px`,bottom:"auto",right:"auto",cursor:n?"grab":"default"},...g&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",backgroundColor:"white"}},children:[x.jsx("style",{children:`
|
|
10
10
|
/* Isolate widget from host website styles */
|
|
11
11
|
.synapse-chat-widget-container,
|
|
12
12
|
.synapse-chat-widget-container *,
|
|
@@ -39,18 +39,18 @@ Error generating stack: `+r.message+`
|
|
|
39
39
|
max-height: 100svh;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
`}),x.jsxs(si,{className:R,children:[x.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:x.jsx(QS,{onClose:i,title:c,iconUrl:a,startNewConversation:o})}),x.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:s}),h&&x.jsxs("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:[x.jsx(w.Suspense,{fallback:null,children:x.jsx(JS,{value:h.value,onChange:h.onChange,onSend:h.onSend,onFileChange:h.onFileChange,onRemoveFile:h.onRemoveFile,onRecording:h.onRecording,isRecording:h.isRecording,hasAttachment:h.hasAttachment,attachmentFiles:h.attachmentFiles,isDisabled:h.isDisabled,isMobile:g,placeholder:h.placeholder,recordingStatus:h.recordingStatus})}),f&&p==="development"&&x.jsx("div",{className:"px-6 flex justify-center items-center",children:x.jsxs("p",{className:"text-[8px] text-gray-600 font-mono opacity-50",children:["Session ID: ",f]})})]})]})]})}function Xh(){const[n,i]=w.useState(typeof navigator<"u"?navigator.onLine:!0);return w.useEffect(()=>{const a=()=>i(!0),o=()=>i(!1);return window.addEventListener("online",a),window.addEventListener("offline",o),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",o)}},[]),{isOnline:n}}const $S=({environment:n,baseUrl:i,context:a})=>{const[o,s]=w.useState([]),[c,f]=w.useState(!1),[h,p]=w.useState(0),[m,g]=w.useState(!1),[y,S]=w.useState([]),b=w.useRef(null),k=w.useRef(null),{isOnline:M}=Xh(),{agentId:U,setSessionId:R,setSessionToken:D,sessionId:I,sessionToken:$,setError:V,setConnectionStatus:A,setShowRetryButton:j,setStartNewConnection:z,setIsStreaming:K,setIsWaitingForResponse:ae,isStreaming:te,initialMessage:oe,isWaitingForResponse:_e,setProgressMessage:ce,setRecordingStatus:ee,clearSession:B,addMessageToSession:W,getMessagesForSession:Z,updateMessageInSession:le,setInitialMessage:C,userId:_}=hr();w.useEffect(()=>{M?m?T()&&(A(ke.ConnectionStatus.CONNECTED),fe()):A(ke.ConnectionStatus.CONNECTING):A(ke.ConnectionStatus.NOT_CONNECTED)},[M,m]),w.useEffect(()=>{if(I){const ue=Z(I)||[];s(ue),S([])}},[I]),w.useEffect(()=>{if(g(!1),!U)return;const ue=new ke.SynapseSDK({agentId:U,environment:n,userId:_,callbacks:{onError:se=>{if(se instanceof ke.SynapseError)switch(se.code){case ke.SynapseErrorCode.SESSION:A(ke.ConnectionStatus.NOT_CONNECTED),j(!0);break;case ke.SynapseErrorCode.RECORDING:V({title:"Recording failed",description:se?.displayMessage||"Please try again later"});break;default:V({title:"Something went wrong",description:"Please try again later"}),j(!0);break}},onSessionRefreshed:se=>{se?.session_id&&se?.session_token&&(R(se.session_id),D(se.session_token))}},...i&&{serverUrl:i},...a&&{context:a}});return b.current=ue,g(!0),()=>{g(!1),b.current?.endSession(),b.current=null,k.current&&(clearTimeout(k.current),k.current=null)}},[U,n,_]),w.useEffect(()=>{const ue=o[o.length-1];!ue?.role||!I||(ue?.role===Kt.USER?W(I,ue):!te&&!ue.isStored&&(s(se=>{const Se=[...se];return Se[Se.length-1]={...ue,isStored:!0},Se}),W(I,{...ue,isStored:!0})))},[o,te]),w.useEffect(()=>{const ue=o[o.length-1];return()=>{ue&&!ue?.isStored&&I&&W(I,{...ue,isStored:!0})}},[]),w.useEffect(()=>(k.current&&(clearTimeout(k.current),k.current=null),_e&&!te?k.current=setTimeout(()=>{ae(!1),k.current=null},3e4):te&&k.current&&(clearTimeout(k.current),k.current=null),()=>{k.current&&(clearTimeout(k.current),k.current=null)}),[_e,te,ae]);const G=async(ue=!1)=>{try{if(!b.current){V({title:"SDK not initialized",description:"Please ensure agentId is configured"}),f(!1);return}f(!0);let se;ue?(await B(),fe(),se=await b.current.startSession()):se=await b.current.startSession({session_id:I||"",session_token:$||""}),se?.session_id&&se?.session_token&&(R(se.session_id),D(se.session_token),(se?.initial_message?.text||se?.initial_message?.suggestions?.length)&&C(se.initial_message)),pe()}catch{V({title:"Something Went wrong!",description:"Please try again later."}),f(!1);return}finally{f(!1)}},T=()=>b.current?.isConnected()??!1,ne=()=>{b.current?.endSession()},fe=()=>{p(0),j(!1),z(!1),V(null)},pe=()=>{b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,ue=>{const se=ue;if(se.data?.text&&se.messageId){te||(ae(!1),K(!0));const Se=se.data.text,rt=se.messageId;s(Ve=>{const Ee=Ve[Ve.length-1];if(Ee&&Ee.id===rt&&Ee.role===Kt.ASSISTANT){const Je=[...Ve];return Je[Je.length-1]={...Ee,content:Ee.content+Se},Je}else return[...Ve,{id:rt,content:Se,role:Kt.ASSISTANT,timestamp:dr(Date.now()),isStored:!1}]})}}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{K(!1),ce(null)}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{fe(),A(ke.ConnectionStatus.CONNECTED)}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,ue=>{const se=ue;if(!se?.messageId||!se?.data||!se?.data?.details?.component)return;const Se=se.messageId,rt=se.timestamp??Date.now();s(Ve=>{const Ee=Ve[Ve.length-1];if(Ee.id===Se&&Ee.role===Kt.ASSISTANT){const Je=[...Ve],Tt={...Ee,toolEscalationData:{...se.data,isResponded:!1},isResponseFromTool:!0};return Je[Ve.length-1]=Tt,le(I,Se,Tt),Je}else{const Je={id:Se,content:se.data?.text||"",role:Kt.ASSISTANT,toolEscalationData:{...se.data,isResponded:!1},isResponseFromTool:!0,timestamp:dr(rt),isStored:!1};return[...Ve,Je]}})}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,ue=>{A(ke.ConnectionStatus.NOT_CONNECTED),h<2?(p(se=>se+1),j(!0)):z(!0)}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.ERROR,ue=>{const se=ue.message||ue.displayMessage||"Something went wrong";V({title:se,description:"Please try again later"}),j(!0),ee(_t.IDLE)}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,async ue=>{const se=ue;se?.data?.text&&(s(Se=>[...Se,{id:Date.now().toString(),content:se.data.text||"",role:Kt.USER,timestamp:dr(Date.now()),isStored:!0}]),ee(_t.IDLE)),K(!1),ae(!1),ce(null)}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,ue=>{const se=ue;se.data?.text&&(ae(!1),ce(se.data.text))}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.TOOL_START,ue=>{const se=ue;if(se.data?.name&&se.messageId){const Se=se.messageId;s(rt=>{const Ve=rt[rt.length-1];if(Ve&&Ve.id===Se&&Ve.role===Kt.ASSISTANT){const Ee=[...rt];return Ee[Ee.length-1]={...Ve,toolCallStatus:`Calling tool: ${se.data.name}...`},I&&le(I,Se,{toolCallStatus:`Calling tool: ${se.data.name}...`}),Ee}return rt})}}),b.current?.on(ke.SYNAPSE_REALTIME_EVENTS.TOOL_END,ue=>{const se=ue;if(se.data?.name&&se.messageId){const Se=se.messageId;s(rt=>{const Ve=rt[rt.length-1];if(Ve&&Ve.id===Se&&Ve.role===Kt.ASSISTANT){const Ee=[...rt];return Ee[Ee.length-1]={...Ve,toolCallStatus:"Tool call completed."},I&&le(I,Se,{toolCallStatus:"Tool call completed."}),Ee}return rt})}})},ge=async({message:ue,messageId:se,files:Se,audio:rt,toolCalled:Ve})=>{if(!T()||Se&&Se.length<0&&ue?.trim()===""&&!rt?.audio)return;if(Se&&Se.length>3){V({title:"Maximum 3 files are allowed to be sent at a time",description:"Please try again"});return}if(Se&&Se.length>0&&Se.reduce((ut,It)=>ut+It.size,0)>10*1024*1024){V({title:"Total file size limit of 10MB exceeded",description:"Please reduce the size of the files or try again with less files"});return}V(null),j(!1);const Ee=o.length==2&&y.length==2?y:null,Je=o.length-1,Tt=Je>=0?o[Je]:null,Yl=Tt?Tt?.isResponseFromTool||Tt.role===Kt.ASSISTANT&&Tt.toolEscalationData:null;await b.current?.sendMessage({message:ue,files:Se,audio:rt,...Ee&&{initial_prompts:Ee},...Yl&&!Ve?{tool_declined:!0,tool_id:Tt?.toolEscalationData?.tool_id||""}:{}}),(ue||Se&&Se.length>0)&&(s(ut=>{const It=[...ut],F=It.length-1;return Yl&&F>=0&&It[F].toolEscalationData&&(It[F]={...It[F],toolEscalationData:{...It[F].toolEscalationData,tool_id:null,isResponded:!0}},le(I,It[Je].id||Date.now().toString(),It[Je])),[...It,{id:se||Date.now().toString(),content:ue||"",files:Se||[],role:Kt.USER,timestamp:dr(Date.now()),isStored:!0}]}),ae(!0))};return{sendMessage:ge,startSession:G,incomingMessages:o,loading:c,endSession:ne,isReady:m,startRecording:async()=>{if(!T())throw new Error("Not connected to the server");try{await b.current?.startRecording({onChunks:async ue=>{ee(_t.PROCESSING),await ge({audio:ue}),ee(_t.TRANSCRIBING)},onError(ue){ee(_t.IDLE)}}),ee(_t.LISTENING)}catch(ue){throw ee(_t.IDLE),ue}},stopRecording:()=>{T()&&b.current?.endRecording()},handleRetry:async()=>{if(!T())fe(),await G(!1);else{const ue=o[o.length-1];ue&&ue.role===Kt.USER&&b.current?.sendMessage({message:ue.content,files:ue.files||[],messageId:ue.id})}},isValidFile:ue=>ue.type.toLowerCase()&&!["application/pdf","image/jpeg","image/jpg","image/png"].includes(ue.type)?(V({title:`File type not supported: ${ue.name}`,description:"Only PDF, images (JPG, JPEG, PNG) are allowed."}),!1):ue.size>3*1024*1024?(V({title:"File size limit of 3MB exceeded",description:"Please reduce the size of the file or try again with a smaller file"}),!1):!0,handleStartNewConnection:async()=>{fe(),await B(),await G(!0)},callTool:async(ue,se)=>{try{if(!T())throw new Error("Not connected to the server");const Se=await b.current?.callTool(ue,se);if(!Se)throw new Error("Failed to call tool");return Se}catch(Se){throw Se}},handleInitialTaskClick:async ue=>{if(!oe?.suggestions?.length||!ue)return;const se=oe.suggestions.find(Se=>Se.value===ue);if(!se||!se.response){await ge({message:ue});return}s(Se=>[...Se,{id:Date.now().toString(),content:ue,role:Kt.USER,timestamp:dr(Date.now()),isStored:!0}]),ae(!0),await G0(1e3),ae(!1),s(Se=>[...Se,{id:Date.now().toString(),content:se.response||"Please try again",role:Kt.ASSISTANT,timestamp:dr(Date.now()),isStored:!1}]),S([{role:"user",text:ue},{role:"assistant",text:se.response}])}}},eE=w.lazy(()=>Promise.resolve().then(()=>IC)),tE=w.lazy(()=>Promise.resolve().then(()=>YC)),nE=w.lazy(()=>Promise.resolve().then(()=>GC).then(n=>({default:n.ConnectionStatus})));function lE({isOpen:n,agentId:i,config:a}){const[o,s]=w.useState(""),[c,f]=w.useState(!1),[h,p]=w.useState(!1),[m,g]=w.useState([]),y=w.useRef(!1),S=w.useRef(null),b=w.useRef(null),[k,M]=w.useState(!1),{setAgentId:U,startNewConnection:R,showRetryButton:D,clearError:I,error:$,connectionStatus:V,recordingStatus:A,isWaitingForResponse:j,isStreaming:z,setError:K,initialMessage:ae,sessionId:te,setUserId:oe,userId:_e,setContext:ce}=hr(),{incomingMessages:ee,loading:B,sendMessage:W,startSession:Z,isReady:le,startRecording:C,stopRecording:_,handleRetry:G,handleStartNewConnection:T,isValidFile:ne,callTool:fe,handleInitialTaskClick:pe}=$S({environment:"production",baseUrl:a.environment==="development"&&a.baseUrl?a.baseUrl:void 0,context:a?.context});w.useEffect(()=>{if(i){if(U(i),!_e){const Ee=crypto?.randomUUID?.()||Date.now().toString();oe(Ee)}a?.context&&ce(a?.context),n&&le&&!y.current&&(y.current=!0,Z(!1))}},[n,le,i]);const ge=()=>S.current?.querySelector("[data-radix-scroll-area-viewport]")||null,Ie=()=>{const Ee=ge();Ee&&(Ee.scrollTo({top:Ee.scrollHeight,behavior:"smooth"}),M(!1))};w.useEffect(()=>{Ie()},[ee,z]);const Me=ee.length>0,at=V===ke.ConnectionStatus.CONNECTED,vt=B||!at||j||z,Jt=B||!at,cl=w.useMemo(()=>A===_t.IDLE?null:A===_t.LISTENING?"Listening...":A===_t.PROCESSING?"Processing...":A===_t.TRANSCRIBING?"Transcribing...":null,[A]),un=Jt?"Connecting...":cl&&A!==_t.IDLE?cl:j||z?"Please wait for the response...":"Ask me anything…",ue=async()=>{if(!vt&&(o.trim()||c||h)){const Ee=Date.now().toString();m.length>0?(await W({files:m,message:o.trim(),messageId:Ee}),g([]),p(!1)):o.trim()&&await W({message:o,messageId:Ee}),s(""),f(!1),p(!1),setTimeout(()=>{Ie()},100)}},se=async Ee=>{Ee&&await pe(Ee)},Se=Ee=>{if(Ee&&Ee.length>0){const Je=Ee.filter(Tt=>ne(Tt)?!0:(K({title:`File type not supported: ${Tt.name}`,description:"Only PDF, images (JPG, JPEG, PNG) are allowed."}),!1));if(Je?.length>0)Ee=Je;else return}g(Je=>(p((Je?.length??0)+(Ee?.length??0)>0),[...Je,...Ee]))},rt=Ee=>{g(Je=>{const Tt=Je.filter((Yl,ut)=>ut!==Ee);return p(Tt.length>0),Tt})},Ve=async()=>{if(c)await _(),f(!1);else{if(vt)return;try{await C(),f(!0)}catch{}}};return x.jsx(WS,{isOpen:n,onClose:a.onClose,title:a.title,iconUrl:a.iconUrl,onStartNewSession:()=>Z(!0),sessionId:te,environment:a.environment,displayMode:a.displayMode??"widget",chatComposer:{value:o,onChange:s,onSend:ue,onFileChange:Se,onRemoveFile:rt,onRecording:Ve,isRecording:c,hasAttachment:h,attachmentFiles:m,isDisabled:vt,placeholder:un,recordingStatus:A},children:!B&&x.jsx(w.Suspense,{fallback:x.jsx(rE,{}),children:x.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[x.jsx(jd,{ref:S,className:"flex-1 min-h-0",children:x.jsxs("div",{className:Ce("transition-all duration-300",Me?"p-4 space-y-3":"p-6 space-y-6"),children:[!Me&&ae?.text?x.jsx(tE,{tasks:ae.suggestions,initialPrompt:ae.text,onTaskClick:se,disabled:vt}):x.jsx(eE,{messages:ee,onSendMessage:W,iconUrl:a.iconUrl,callTool:fe}),x.jsx("div",{ref:b})]})}),k&&x.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:x.jsx(Et,{onClick:Ie,size:"icon",className:"h-10 w-10 rounded-full bg-white/90 backdrop-blur-sm shadow-lg border border-lavender-200/60 hover:bg-white hover:shadow-xl transition-all duration-200",children:x.jsx(As,{className:"w-5 h-5 text-slate-700"})})}),x.jsx(nE,{className:"mt-2",onRetry:G,onStartNewSession:T,showRetryButton:D,startNewConnection:R,clearError:I,error:$,isConnected:at})]})})})}function rE(){return x.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[x.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[x.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),x.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),x.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),x.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function iE({agentId:n,config:i}){const[a,o]=w.useState(!1);w.useEffect(()=>{o(!0)},[]);const s=()=>{o(!1),i?.onClose?.()};return x.jsx(lE,{isOpen:a,agentId:n,config:{...i,environment:i.environment??"production",onClose:s,title:i.title??"Medi Clinic",iconUrl:i.iconUrl??"https://cdn.eka.care/bot-icon.svg"}})}const Kh=(n,i,a)=>{Rb.createRoot(n).render(x.jsx(w.StrictMode,{children:x.jsx(iE,{agentId:i,config:a||{}})}))};typeof window<"u"&&(window.renderMedAssist=Kh);const Qh=w.forwardRef(({className:n,...i},a)=>x.jsx("textarea",{className:Ce("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:a,...i}));Qh.displayName="Textarea";function Zh({file:n,onRemove:i,isPreview:a=!0,className:o=""}){const[s,c]=w.useState(!1),[f,h]=w.useState(""),p=n?.type?.startsWith("image/")??!1,m=n?.type==="application/pdf";w.useEffect(()=>{if(p){const S=URL.createObjectURL(n);return h(S),()=>URL.revokeObjectURL(S)}},[n,p]),w.useEffect(()=>{c(!1)},[n]);const g=()=>p?"text-green-600":"text-gray-600",y=S=>{if(S===0)return"0 B";const b=1024,k=["B","KB","MB","GB"],M=Math.floor(Math.log(S)/Math.log(b));return`${(S/Math.pow(b,M)).toFixed(1)} ${k[M]}`.toLowerCase()};return!p||s?x.jsxs("div",{className:`relative group inline-flex flex-shrink-0 bg-white border border-neutral-300 rounded-lg flex items-center gap-3 px-3 py-2.5 max-w-full ${a?"hover:bg-neutral-50":""} ${o}`,children:[x.jsx("div",{className:`flex-shrink-0 ${g()}`,children:x.jsx(cS,{className:"h-5 w-5"})}),x.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&x.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&x.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:y(n.size)})]}),a&&i&&x.jsx("button",{onClick:i,"aria-label":`Remove ${n.name}`,className:"flex-shrink-0 flex items-center justify-center w-5 h-5 text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] transition-colors",children:x.jsx(Ns,{className:"h-4 w-4"})})]}):x.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[x.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${a?"hover:bg-neutral-100 cursor-pointer":""}`,children:f&&x.jsx("img",{src:f,alt:n.name,className:"w-full h-full object-cover",onError:()=>c(!0)})}),a&&i&&x.jsx("button",{onClick:i,"aria-label":`Remove ${n.name}`,className:"absolute top-0 right-0 bg-[var(--color-muted)] text-black rounded-full w-5 h-5 flex items-center justify-center hover:bg-[var(--color-muted-foreground)] transition-colors z-10 transform translate-x-1 -translate-y-1",children:x.jsx(Ns,{className:"h-3 w-3 text-black"})})]})}function Jh({files:n,onRemoveFile:i,isPreview:a=!0,className:o=""}){if(n.length===0)return null;const s=n.filter(f=>f.type?.startsWith("image/")),c=n.filter(f=>!f.type?.startsWith("image/"));return x.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[c.map(f=>{const h=n.indexOf(f);return x.jsx(Zh,{file:f,onRemove:i?()=>i(h):void 0,isPreview:a},`${f.name}-${f.size}-${h}`)}),s.length>0&&x.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:s.map(f=>{const h=n.indexOf(f);return x.jsx(Zh,{file:f,onRemove:i?()=>i(h):void 0,isPreview:a},`${f.name}-${f.size}-${h}`)})})]})}function aE({value:n,onChange:i,onSend:a,onFileChange:o,onRemoveFile:s,onRecording:c,isRecording:f,hasAttachment:h,attachmentFiles:p,isDisabled:m,placeholder:g,isMobile:y,recordingStatus:S}){const b=w.useRef(null),k=w.useRef(null),M=n.trim().length>0||h,U=(m||S!==_t.IDLE)&&!f,R=Ce("rounded-full transition-all duration-200 ",f?"bg-gradient-to-r from-rose-400 via-lavender-500 to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]":U?"text-lavender-300 cursor-not-allowed shadow-none":"text-lavender-600 hover:bg-gray-100"),D=j=>{const z=Array.from(j.target.files||[]);z.length>0&&o(z)},I=()=>{m||b.current?.click()},$=j=>{j.key==="Enter"&&!j.shiftKey&&M&&!m&&(j.preventDefault(),a())},V=j=>{j.style.height="auto",j.style.overflow="hidden";const z=j.scrollHeight,K=40,ae=120,te=Math.max(K,Math.min(z,ae));j.style.height=te+"px",z>ae?j.style.overflow="auto":j.style.overflow="hidden"},A=j=>{V(j.currentTarget)};return w.useEffect(()=>{k.current&&V(k.current)},[n]),w.useEffect(()=>{!m&&!y&&k.current?.focus()},[m]),x.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl px-4 py-2",children:[h&&p.length>0&&x.jsx("div",{className:"mb-2 pb-2 border-b border-white/20",children:x.jsx(Jh,{files:p,onRemoveFile:s,isPreview:!0})}),x.jsx("input",{ref:b,type:"file",multiple:!0,max:3,accept:"image/jpeg, image/png, image/jpg, application/pdf",className:"hidden",onChange:D,disabled:m,title:"Attach file","aria-label":"Attach file"}),x.jsxs("div",{className:Ce("flex items-center gap-2 bg-white/70 backdrop-blur rounded-xl px-4 py-2 shadow-md focus-within:border-lavender-100/50 focus-within:ring-2 focus-within:ring-lavender-400/50 transition-all",f||h?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",m&&"opacity-60"),children:[h&&p.length>0&&x.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[p.length," file(s)"]}),x.jsx(Qh,{ref:k,onInput:A,placeholder:g,value:n,onChange:j=>i(j.target.value),rows:1,maxLength:1e3,autoFocus:!m,style:{wordBreak:"break-word",overflowWrap:"anywhere",minHeight:"40px",maxHeight:"120px",fontSize:window.innerWidth<=768?"16px":"14px"},onKeyPress:$,disabled:m,title:"Enter your message",className:"flex-1 border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm !placeholder:text-gray-400 bg-transparent disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap"}),S===_t.IDLE&&x.jsx(Et,{type:"button",variant:"ghost",size:"icon",onClick:I,disabled:m,className:`rounded-full transition-all ${h?"bg-lavender-200/30 text-lavender-600 hover:bg-lavender-200/40":"hover:bg-gray-100 text-lavender-600 hover:text-gray-700"}`,title:"Attach file",children:x.jsx(mS,{className:"w-5 h-5"})}),f?x.jsx(Et,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white hover:from-red-500 hover:to-rose-600 shadow-lg transition-all duration-200 hover:scale-105 active:scale-95",title:"Stop recording",children:x.jsx(gS,{className:"w-4 h-4"})}):!M&&x.jsx(Et,{type:"button",variant:"ghost",size:"icon",onClick:c,disabled:U,className:R,title:"Start recording",children:x.jsx(hS,{className:"w-5 h-5"})}),M&&!m&&x.jsx(Et,{type:"button",size:"icon",onClick:a,className:"h-10 w-10 bg-gradient-to-r from-lavender-400 to-lavender-500 hover:from-lavender-500 hover:to-lavender-600 rounded-full text-white transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95",children:x.jsx(pS,{className:"w-4 h-4"})})]})]})}const oE=Object.freeze(Object.defineProperty({__proto__:null,default:aE},Symbol.toStringTag,{value:"Module"}));function _A(){}function AA(){}function sE(n,i){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const uE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fE={};function Wh(n,i){return(fE.jsx?cE:uE).test(n)}const dE=/[ \t\n\f\r]/g;function hE(n){return typeof n=="object"?n.type==="text"?$h(n.value):!1:$h(n)}function $h(n){return n.replace(dE,"")===""}class wi{constructor(i,a,o){this.normal=a,this.property=i,o&&(this.space=o)}}wi.prototype.normal={},wi.prototype.property={},wi.prototype.space=void 0;function em(n,i){const a={},o={};for(const s of n)Object.assign(a,s.property),Object.assign(o,s.normal);return new wi(a,o,i)}function Vs(n){return n.toLowerCase()}class Lt{constructor(i,a){this.attribute=a,this.property=i}}Lt.prototype.attribute="",Lt.prototype.booleanish=!1,Lt.prototype.boolean=!1,Lt.prototype.commaOrSpaceSeparated=!1,Lt.prototype.commaSeparated=!1,Lt.prototype.defined=!1,Lt.prototype.mustUseProperty=!1,Lt.prototype.number=!1,Lt.prototype.overloadedBoolean=!1,Lt.prototype.property="",Lt.prototype.spaceSeparated=!1,Lt.prototype.space=void 0;let mE=0;const Ne=Hl(),dt=Hl(),Gs=Hl(),re=Hl(),et=Hl(),mr=Hl(),Qt=Hl();function Hl(){return 2**++mE}const Ps=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:dt,commaOrSpaceSeparated:Qt,commaSeparated:mr,number:re,overloadedBoolean:Gs,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Fs=Object.keys(Ps);class Xs extends Lt{constructor(i,a,o,s){let c=-1;if(super(i,a),tm(this,"space",s),typeof o=="number")for(;++c<Fs.length;){const f=Fs[c];tm(this,Fs[c],(o&Ps[f])===Ps[f])}}}Xs.prototype.defined=!0;function tm(n,i,a){a&&(n[i]=a)}function pr(n){const i={},a={};for(const[o,s]of Object.entries(n.properties)){const c=new Xs(o,n.transform(n.attributes||{},o),s,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(c.mustUseProperty=!0),i[o]=c,a[Vs(o)]=o,a[Vs(c.attribute)]=o}return new wi(i,a,n.space)}const nm=pr({properties:{ariaActiveDescendant:null,ariaAtomic:dt,ariaAutoComplete:null,ariaBusy:dt,ariaChecked:dt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:dt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:dt,ariaFlowTo:et,ariaGrabbed:dt,ariaHasPopup:null,ariaHidden:dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:re,ariaLive:null,ariaModal:dt,ariaMultiLine:dt,ariaMultiSelectable:dt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:dt,ariaReadOnly:dt,ariaRelevant:null,ariaRequired:dt,ariaRoleDescription:et,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:dt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(n,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function lm(n,i){return i in n?n[i]:i}function rm(n,i){return lm(n,i.toLowerCase())}const pE=pr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:mr,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:et,autoFocus:Ne,autoPlay:Ne,blocking:et,capture:null,charSet:null,checked:Ne,cite:null,className:et,cols:re,colSpan:null,content:null,contentEditable:dt,controls:Ne,controlsList:et,coords:re|mr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Gs,draggable:dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:et,height:re,hidden:Gs,high:re,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:et,itemRef:et,itemScope:Ne,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:re,pattern:null,ping:et,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:et,required:Ne,reversed:Ne,rows:re,rowSpan:re,sandbox:et,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:dt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:dt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:rm}),gE=pr({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:Qt,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:mr,g2:mr,glyphName:mr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,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:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lm}),im=pr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,i){return"xlink:"+i.slice(5).toLowerCase()}}),am=pr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rm}),om=pr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,i){return"xml:"+i.slice(3).toLowerCase()}}),yE={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"},vE=/[A-Z]/g,sm=/-[a-z]/g,bE=/^data[-\w.:]+$/i;function SE(n,i){const a=Vs(i);let o=i,s=Lt;if(a in n.normal)return n.property[n.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&bE.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(sm,xE);o="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!sm.test(c)){let f=c.replace(vE,EE);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}s=Xs}return new s(o,i)}function EE(n){return"-"+n.toLowerCase()}function xE(n){return n.charAt(1).toUpperCase()}const TE=em([nm,pE,im,am,om],"html"),Ks=em([nm,gE,im,am,om],"svg");function CE(n){return n.join(" ").trim()}var gr={},Qs,um;function wE(){if(um)return Qs;um=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
43
|
-
`,m="/",g="*",y="",S="comment",b="declaration";function k(U,R){if(typeof U!="string")throw new TypeError("First argument must be a string");if(!U)return[];R=R||{};var D=1,I=1;function $(ce){var ee=ce.match(i);ee&&(D+=ee.length);var B=ce.lastIndexOf(p);I=~B?ce.length-B:I+ce.length}function V(){var ce={line:D,column:I};return function(ee){return ee.position=new A(ce),K(),ee}}function A(ce){this.start=ce,this.end={line:D,column:I},this.source=R.source}A.prototype.content=U;function j(ce){var ee=new Error(R.source+":"+D+":"+I+": "+ce);if(ee.reason=ce,ee.filename=R.source,ee.line=D,ee.column=I,ee.source=U,!R.silent)throw ee}function z(ce){var ee=ce.exec(U);if(ee){var B=ee[0];return $(B),U=U.slice(B.length),ee}}function K(){z(a)}function ae(ce){var ee;for(ce=ce||[];ee=te();)ee!==!1&&ce.push(ee);return ce}function te(){var ce=V();if(!(m!=U.charAt(0)||g!=U.charAt(1))){for(var ee=2;y!=U.charAt(ee)&&(g!=U.charAt(ee)||m!=U.charAt(ee+1));)++ee;if(ee+=2,y===U.charAt(ee-1))return j("End of comment missing");var B=U.slice(2,ee-2);return I+=2,$(B),U=U.slice(ee),I+=2,ce({type:S,comment:B})}}function oe(){var ce=V(),ee=z(o);if(ee){if(te(),!z(s))return j("property missing ':'");var B=z(c),W=ce({type:b,property:M(ee[0].replace(n,y)),value:B?M(B[0].replace(n,y)):y});return z(f),W}}function _e(){var ce=[];ae(ce);for(var ee;ee=oe();)ee!==!1&&(ce.push(ee),ae(ce));return ce}return K(),_e()}function M(U){return U?U.replace(h,y):y}return Qs=k,Qs}var cm;function _E(){if(cm)return gr;cm=1;var n=gr&&gr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(gr,"__esModule",{value:!0}),gr.default=a;const i=n(wE());function a(o,s){let c=null;if(!o||typeof o!="string")return c;const f=(0,i.default)(o),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:g}=p;h?s(m,g,p):g&&(c=c||{},c[m]=g)}),c}return gr}var _i={},fm;function AE(){if(fm)return _i;fm=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(m){return!m||a.test(m)||n.test(m)},f=function(m,g){return g.toUpperCase()},h=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),c(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(s,h):m=m.replace(o,h),m.replace(i,f))};return _i.camelCase=p,_i}var Ai,dm;function NE(){if(dm)return Ai;dm=1;var n=Ai&&Ai.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=n(_E()),a=AE();function o(s,c){var f={};return!s||typeof s!="string"||(0,i.default)(s,function(h,p){h&&p&&(f[(0,a.camelCase)(h,c)]=p)}),f}return o.default=o,Ai=o,Ai}var RE=NE();const OE=fs(RE),hm=mm("end"),Zs=mm("start");function mm(n){return i;function i(a){const o=a&&a.position&&a.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function kE(n){const i=Zs(n),a=hm(n);if(i&&a)return{start:i,end:a}}function Ni(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?pm(n.position):"start"in n||"end"in n?pm(n):"line"in n||"column"in n?Js(n):""}function Js(n){return gm(n&&n.line)+":"+gm(n&&n.column)}function pm(n){return Js(n&&n.start)+"-"+Js(n&&n.end)}function gm(n){return n&&typeof n=="number"?n:1}class zt extends Error{constructor(i,a,o){super(),typeof a=="string"&&(o=a,a=void 0);let s="",c={},f=!1;if(a&&("line"in a&&"column"in a?c={place:a}:"start"in a&&"end"in a?c={place:a}:"type"in a?c={ancestors:[a],place:a.position}:c={...a}),typeof i=="string"?s=i:!c.cause&&i&&(f=!0,s=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?c.ruleId=o:(c.source=o.slice(0,p),c.ruleId=o.slice(p+1))}if(!c.place&&c.ancestors&&c.ancestors){const p=c.ancestors[c.ancestors.length-1];p&&(c.place=p.position)}const h=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=Ni(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}zt.prototype.file="",zt.prototype.name="",zt.prototype.reason="",zt.prototype.message="",zt.prototype.stack="",zt.prototype.column=void 0,zt.prototype.line=void 0,zt.prototype.ancestors=void 0,zt.prototype.cause=void 0,zt.prototype.fatal=void 0,zt.prototype.place=void 0,zt.prototype.ruleId=void 0,zt.prototype.source=void 0;const Ws={}.hasOwnProperty,ME=new Map,zE=/[A-Z]/g,DE=new Set(["table","tbody","thead","tfoot","tr"]),jE=new Set(["td","th"]),ym="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function LE(n,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=i.filePath||void 0;let o;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=GE(a,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=VE(a,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:o,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Ks:TE,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=vm(s,n,void 0);return c&&typeof c!="string"?c:s.create(n,s.Fragment,{children:c||void 0},void 0)}function vm(n,i,a){if(i.type==="element")return UE(n,i,a);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return BE(n,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return HE(n,i,a);if(i.type==="mdxjsEsm")return IE(n,i);if(i.type==="root")return qE(n,i,a);if(i.type==="text")return YE(n,i)}function UE(n,i,a){const o=n.schema;let s=o;i.tagName.toLowerCase()==="svg"&&o.space==="html"&&(s=Ks,n.schema=s),n.ancestors.push(i);const c=Sm(n,i.tagName,!1),f=PE(n,i);let h=eu(n,i);return DE.has(i.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!hE(p):!0})),bm(n,f,c,i),$s(f,h),n.ancestors.pop(),n.schema=o,n.create(i,c,f,a)}function BE(n,i){if(i.data&&i.data.estree&&n.evaluater){const o=i.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ri(n,i.position)}function IE(n,i){if(i.data&&i.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(i.data.estree);Ri(n,i.position)}function HE(n,i,a){const o=n.schema;let s=o;i.name==="svg"&&o.space==="html"&&(s=Ks,n.schema=s),n.ancestors.push(i);const c=i.name===null?n.Fragment:Sm(n,i.name,!0),f=FE(n,i),h=eu(n,i);return bm(n,f,c,i),$s(f,h),n.ancestors.pop(),n.schema=o,n.create(i,c,f,a)}function qE(n,i,a){const o={};return $s(o,eu(n,i)),n.create(i,n.Fragment,o,a)}function YE(n,i){return i.value}function bm(n,i,a,o){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(i.node=o)}function $s(n,i){if(i.length>0){const a=i.length>1?i:i[0];a&&(n.children=a)}}function VE(n,i,a){return o;function o(s,c,f,h){const m=Array.isArray(f.children)?a:i;return h?m(c,f,h):m(c,f)}}function GE(n,i){return a;function a(o,s,c,f){const h=Array.isArray(c.children),p=Zs(o);return i(s,c,f,h,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function PE(n,i){const a={};let o,s;for(s in i.properties)if(s!=="children"&&Ws.call(i.properties,s)){const c=XE(n,s,i.properties[s]);if(c){const[f,h]=c;n.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&jE.has(i.tagName)?o=h:a[f]=h}}if(o){const c=a.style||(a.style={});c[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return a}function FE(n,i){const a={};for(const o of i.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const c=o.data.estree.body[0];c.type;const f=c.expression;f.type;const h=f.properties[0];h.type,Object.assign(a,n.evaluater.evaluateExpression(h.argument))}else Ri(n,i.position);else{const s=o.name;let c;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const h=o.value.data.estree.body[0];h.type,c=n.evaluater.evaluateExpression(h.expression)}else Ri(n,i.position);else c=o.value===null?!0:o.value;a[s]=c}return a}function eu(n,i){const a=[];let o=-1;const s=n.passKeys?new Map:ME;for(;++o<i.children.length;){const c=i.children[o];let f;if(n.passKeys){const p=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=vm(n,c,f);h!==void 0&&a.push(h)}return a}function XE(n,i,a){const o=SE(n.schema,i);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=o.commaSeparated?sE(a):CE(a)),o.property==="style"){let s=typeof a=="object"?a:KE(n,String(a));return n.stylePropertyNameCase==="css"&&(s=QE(s)),["style",s]}return[n.elementAttributeNameCase==="react"&&o.space?yE[o.property]||o.property:o.attribute,a]}}function KE(n,i){try{return OE(i,{reactCompat:!0})}catch(a){if(n.ignoreInvalidStyle)return{};const o=a,s=new zt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=ym+"#cannot-parse-style-attribute",s}}function Sm(n,i,a){let o;if(!a)o={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let c=-1,f;for(;++c<s.length;){const h=Wh(s[c])?{type:"Identifier",name:s[c]}:{type:"Literal",value:s[c]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(c&&h.type==="Literal"),optional:!1}:h}o=f}else o=Wh(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(o.type==="Literal"){const s=o.value;return Ws.call(n.components,s)?n.components[s]:s}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ri(n)}function Ri(n,i){const a=new zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=n.filePath||void 0,a.url=ym+"#cannot-handle-mdx-estrees-without-createevaluater",a}function QE(n){const i={};let a;for(a in n)Ws.call(n,a)&&(i[ZE(a)]=n[a]);return i}function ZE(n){let i=n.replace(zE,JE);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function JE(n){return"-"+n.toLowerCase()}const tu={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"]},WE={};function $E(n,i){const a=WE,o=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Em(n,o,s)}function Em(n,i,a){if(ex(n)){if("value"in n)return n.type==="html"&&!a?"":n.value;if(i&&"alt"in n&&n.alt)return n.alt;if("children"in n)return xm(n.children,i,a)}return Array.isArray(n)?xm(n,i,a):""}function xm(n,i,a){const o=[];let s=-1;for(;++s<n.length;)o[s]=Em(n[s],i,a);return o.join("")}function ex(n){return!!(n&&typeof n=="object")}const Tm=document.createElement("i");function nu(n){const i="&"+n+";";Tm.innerHTML=i;const a=Tm.textContent;return a.charCodeAt(a.length-1)===59&&n!=="semi"||a===i?!1:a}function An(n,i,a,o){const s=n.length;let c=0,f;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,a=a>0?a:0,o.length<1e4)f=Array.from(o),f.unshift(i,a),n.splice(...f);else for(a&&n.splice(i,a);c<o.length;)f=o.slice(c,c+1e4),f.unshift(i,0),n.splice(...f),c+=1e4,i+=1e4}function sn(n,i){return n.length>0?(An(n,n.length,0,i),n):i}const Cm={}.hasOwnProperty;function tx(n){const i={};let a=-1;for(;++a<n.length;)nx(i,n[a]);return i}function nx(n,i){let a;for(a in i){const s=(Cm.call(n,a)?n[a]:void 0)||(n[a]={}),c=i[a];let f;if(c)for(f in c){Cm.call(s,f)||(s[f]=[]);const h=c[f];lx(s[f],Array.isArray(h)?h:h?[h]:[])}}}function lx(n,i){let a=-1;const o=[];for(;++a<i.length;)(i[a].add==="after"?n:o).push(i[a]);An(n,0,0,o)}function wm(n,i){const a=Number.parseInt(n,i);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function yr(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=ol(/[A-Za-z]/),Zt=ol(/[\dA-Za-z]/),rx=ol(/[#-'*+\--9=?A-Z^-~]/);function lu(n){return n!==null&&(n<32||n===127)}const ru=ol(/\d/),ix=ol(/[\dA-Fa-f]/),ax=ol(/[!-/:-@[-`{-~]/);function Te(n){return n!==null&&n<-2}function Ut(n){return n!==null&&(n<0||n===32)}function Ye(n){return n===-2||n===-1||n===32}const ox=ol(new RegExp("\\p{P}|\\p{S}","u")),sx=ol(/\s/);function ol(n){return i;function i(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function vr(n){const i=[];let a=-1,o=0,s=0;for(;++a<n.length;){const c=n.charCodeAt(a);let f="";if(c===37&&Zt(n.charCodeAt(a+1))&&Zt(n.charCodeAt(a+2)))s=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(f=String.fromCharCode(c));else if(c>55295&&c<57344){const h=n.charCodeAt(a+1);c<56320&&h>56319&&h<57344?(f=String.fromCharCode(c,h),s=1):f="�"}else f=String.fromCharCode(c);f&&(i.push(n.slice(o,a),encodeURIComponent(f)),o=a+s+1,f=""),s&&(a+=s,s=0)}return i.join("")+n.slice(o)}function tt(n,i,a,o){const s=o?o-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(p){return Ye(p)?(n.enter(a),h(p)):i(p)}function h(p){return Ye(p)&&c++<s?(n.consume(p),h):(n.exit(a),i(p))}}const ux={tokenize:cx};function cx(n){const i=n.attempt(this.parser.constructs.contentInitial,o,s);let a;return i;function o(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),tt(n,i,"linePrefix")}function s(h){return n.enter("paragraph"),c(h)}function c(h){const p=n.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,f(h)}function f(h){if(h===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(h);return}return Te(h)?(n.consume(h),n.exit("chunkText"),c):(n.consume(h),f)}}const fx={tokenize:dx},_m={tokenize:hx};function dx(n){const i=this,a=[];let o=0,s,c,f;return h;function h(I){if(o<a.length){const $=a[o];return i.containerState=$[1],n.attempt($[0].continuation,p,m)(I)}return m(I)}function p(I){if(o++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&D();const $=i.events.length;let V=$,A;for(;V--;)if(i.events[V][0]==="exit"&&i.events[V][1].type==="chunkFlow"){A=i.events[V][1].end;break}R(o);let j=$;for(;j<i.events.length;)i.events[j][1].end={...A},j++;return An(i.events,V+1,0,i.events.slice($)),i.events.length=j,m(I)}return h(I)}function m(I){if(o===a.length){if(!s)return S(I);if(s.currentConstruct&&s.currentConstruct.concrete)return k(I);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},n.check(_m,g,y)(I)}function g(I){return s&&D(),R(o),S(I)}function y(I){return i.parser.lazy[i.now().line]=o!==a.length,f=i.now().offset,k(I)}function S(I){return i.containerState={},n.attempt(_m,b,k)(I)}function b(I){return o++,a.push([i.currentConstruct,i.containerState]),S(I)}function k(I){if(I===null){s&&D(),R(0),n.consume(I);return}return s=s||i.parser.flow(i.now()),n.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:c}),M(I)}function M(I){if(I===null){U(n.exit("chunkFlow"),!0),R(0),n.consume(I);return}return Te(I)?(n.consume(I),U(n.exit("chunkFlow")),o=0,i.interrupt=void 0,h):(n.consume(I),M)}function U(I,$){const V=i.sliceStream(I);if($&&V.push(null),I.previous=c,c&&(c.next=I),c=I,s.defineSkip(I.start),s.write(V),i.parser.lazy[I.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<f&&(!s.events[A][1].end||s.events[A][1].end.offset>f))return;const j=i.events.length;let z=j,K,ae;for(;z--;)if(i.events[z][0]==="exit"&&i.events[z][1].type==="chunkFlow"){if(K){ae=i.events[z][1].end;break}K=!0}for(R(o),A=j;A<i.events.length;)i.events[A][1].end={...ae},A++;An(i.events,z+1,0,i.events.slice(j)),i.events.length=A}}function R(I){let $=a.length;for(;$-- >I;){const V=a[$];i.containerState=V[1],V[0].exit.call(i,n)}a.length=I}function D(){s.write([null]),c=void 0,s=void 0,i.containerState._closeFlow=void 0}}function hx(n,i,a){return tt(n,n.attempt(this.parser.constructs.document,i,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Am(n){if(n===null||Ut(n)||sx(n))return 1;if(ox(n))return 2}function iu(n,i,a){const o=[];let s=-1;for(;++s<n.length;){const c=n[s].resolveAll;c&&!o.includes(c)&&(i=c(i,a),o.push(c))}return i}const au={name:"attention",resolveAll:mx,tokenize:px};function mx(n,i){let a=-1,o,s,c,f,h,p,m,g;for(;++a<n.length;)if(n[a][0]==="enter"&&n[a][1].type==="attentionSequence"&&n[a][1]._close){for(o=a;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&i.sliceSerialize(n[o][1]).charCodeAt(0)===i.sliceSerialize(n[a][1]).charCodeAt(0)){if((n[o][1]._close||n[a][1]._open)&&(n[a][1].end.offset-n[a][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[a][1].end.offset-n[a][1].start.offset)%3))continue;p=n[o][1].end.offset-n[o][1].start.offset>1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1;const y={...n[o][1].end},S={...n[a][1].start};Nm(y,-p),Nm(S,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...n[o][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:S},c={type:p>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[a][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},n[o][1].end={...f.start},n[a][1].start={...h.end},m=[],n[o][1].end.offset-n[o][1].start.offset&&(m=sn(m,[["enter",n[o][1],i],["exit",n[o][1],i]])),m=sn(m,[["enter",s,i],["enter",f,i],["exit",f,i],["enter",c,i]]),m=sn(m,iu(i.parser.constructs.insideSpan.null,n.slice(o+1,a),i)),m=sn(m,[["exit",c,i],["enter",h,i],["exit",h,i],["exit",s,i]]),n[a][1].end.offset-n[a][1].start.offset?(g=2,m=sn(m,[["enter",n[a][1],i],["exit",n[a][1],i]])):g=0,An(n,o-1,a-o+3,m),a=o+m.length-g-2;break}}for(a=-1;++a<n.length;)n[a][1].type==="attentionSequence"&&(n[a][1].type="data");return n}function px(n,i){const a=this.parser.constructs.attentionMarkers.null,o=this.previous,s=Am(o);let c;return f;function f(p){return c=p,n.enter("attentionSequence"),h(p)}function h(p){if(p===c)return n.consume(p),h;const m=n.exit("attentionSequence"),g=Am(p),y=!g||g===2&&s||a.includes(p),S=!s||s===2&&g||a.includes(o);return m._open=!!(c===42?y:y&&(s||!S)),m._close=!!(c===42?S:S&&(g||!y)),i(p)}}function Nm(n,i){n.column+=i,n.offset+=i,n._bufferIndex+=i}const gx={name:"autolink",tokenize:yx};function yx(n,i,a){let o=0;return s;function s(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),c}function c(b){return Nn(b)?(n.consume(b),f):b===64?a(b):m(b)}function f(b){return b===43||b===45||b===46||Zt(b)?(o=1,h(b)):m(b)}function h(b){return b===58?(n.consume(b),o=0,p):(b===43||b===45||b===46||Zt(b))&&o++<32?(n.consume(b),h):(o=0,m(b))}function p(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),i):b===null||b===32||b===60||lu(b)?a(b):(n.consume(b),p)}function m(b){return b===64?(n.consume(b),g):rx(b)?(n.consume(b),m):a(b)}function g(b){return Zt(b)?y(b):a(b)}function y(b){return b===46?(n.consume(b),o=0,g):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),i):S(b)}function S(b){if((b===45||Zt(b))&&o++<63){const k=b===45?S:y;return n.consume(b),k}return a(b)}}const Ua={partial:!0,tokenize:vx};function vx(n,i,a){return o;function o(c){return Ye(c)?tt(n,s,"linePrefix")(c):s(c)}function s(c){return c===null||Te(c)?i(c):a(c)}}const Rm={continuation:{tokenize:Sx},exit:Ex,name:"blockQuote",tokenize:bx};function bx(n,i,a){const o=this;return s;function s(f){if(f===62){const h=o.containerState;return h.open||(n.enter("blockQuote",{_container:!0}),h.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),c}return a(f)}function c(f){return Ye(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),i):(n.exit("blockQuotePrefix"),i(f))}}function Sx(n,i,a){const o=this;return s;function s(f){return Ye(f)?tt(n,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return n.attempt(Rm,i,a)(f)}}function Ex(n){n.exit("blockQuote")}const Om={name:"characterEscape",tokenize:xx};function xx(n,i,a){return o;function o(c){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(c),n.exit("escapeMarker"),s}function s(c){return ax(c)?(n.enter("characterEscapeValue"),n.consume(c),n.exit("characterEscapeValue"),n.exit("characterEscape"),i):a(c)}}const km={name:"characterReference",tokenize:Tx};function Tx(n,i,a){const o=this;let s=0,c,f;return h;function h(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),p}function p(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),m):(n.enter("characterReferenceValue"),c=31,f=Zt,g(y))}function m(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),c=6,f=ix,g):(n.enter("characterReferenceValue"),c=7,f=ru,g(y))}function g(y){if(y===59&&s){const S=n.exit("characterReferenceValue");return f===Zt&&!nu(o.sliceSerialize(S))?a(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),i)}return f(y)&&s++<c?(n.consume(y),g):a(y)}}const Mm={partial:!0,tokenize:wx},zm={concrete:!0,name:"codeFenced",tokenize:Cx};function Cx(n,i,a){const o=this,s={partial:!0,tokenize:V};let c=0,f=0,h;return p;function p(A){return m(A)}function m(A){const j=o.events[o.events.length-1];return c=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,h=A,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===h?(f++,n.consume(A),g):f<3?a(A):(n.exit("codeFencedFenceSequence"),Ye(A)?tt(n,y,"whitespace")(A):y(A))}function y(A){return A===null||Te(A)?(n.exit("codeFencedFence"),o.interrupt?i(A):n.check(Mm,M,$)(A)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||Te(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(A)):Ye(A)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),tt(n,b,"whitespace")(A)):A===96&&A===h?a(A):(n.consume(A),S)}function b(A){return A===null||Te(A)?y(A):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||Te(A)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(A)):A===96&&A===h?a(A):(n.consume(A),k)}function M(A){return n.attempt(s,$,U)(A)}function U(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),R}function R(A){return c>0&&Ye(A)?tt(n,D,"linePrefix",c+1)(A):D(A)}function D(A){return A===null||Te(A)?n.check(Mm,M,$)(A):(n.enter("codeFlowValue"),I(A))}function I(A){return A===null||Te(A)?(n.exit("codeFlowValue"),D(A)):(n.consume(A),I)}function $(A){return n.exit("codeFenced"),i(A)}function V(A,j,z){let K=0;return ae;function ae(ee){return A.enter("lineEnding"),A.consume(ee),A.exit("lineEnding"),te}function te(ee){return A.enter("codeFencedFence"),Ye(ee)?tt(A,oe,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):oe(ee)}function oe(ee){return ee===h?(A.enter("codeFencedFenceSequence"),_e(ee)):z(ee)}function _e(ee){return ee===h?(K++,A.consume(ee),_e):K>=f?(A.exit("codeFencedFenceSequence"),Ye(ee)?tt(A,ce,"whitespace")(ee):ce(ee)):z(ee)}function ce(ee){return ee===null||Te(ee)?(A.exit("codeFencedFence"),j(ee)):z(ee)}}}function wx(n,i,a){const o=this;return s;function s(f){return f===null?a(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c)}function c(f){return o.parser.lazy[o.now().line]?a(f):i(f)}}const ou={name:"codeIndented",tokenize:Ax},_x={partial:!0,tokenize:Nx};function Ax(n,i,a){const o=this;return s;function s(m){return n.enter("codeIndented"),tt(n,c,"linePrefix",5)(m)}function c(m){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?f(m):a(m)}function f(m){return m===null?p(m):Te(m)?n.attempt(_x,f,p)(m):(n.enter("codeFlowValue"),h(m))}function h(m){return m===null||Te(m)?(n.exit("codeFlowValue"),f(m)):(n.consume(m),h)}function p(m){return n.exit("codeIndented"),i(m)}}function Nx(n,i,a){const o=this;return s;function s(f){return o.parser.lazy[o.now().line]?a(f):Te(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):tt(n,c,"linePrefix",5)(f)}function c(f){const h=o.events[o.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(f):Te(f)?s(f):a(f)}}const Rx={name:"codeText",previous:kx,resolve:Ox,tokenize:Mx};function Ox(n){let i=n.length-4,a=3,o,s;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[i][1].type==="lineEnding"||n[i][1].type==="space")){for(o=a;++o<i;)if(n[o][1].type==="codeTextData"){n[a][1].type="codeTextPadding",n[i][1].type="codeTextPadding",a+=2,i-=2;break}}for(o=a-1,i++;++o<=i;)s===void 0?o!==i&&n[o][1].type!=="lineEnding"&&(s=o):(o===i||n[o][1].type==="lineEnding")&&(n[s][1].type="codeTextData",o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),i-=o-s-2,o=s+2),s=void 0);return n}function kx(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Mx(n,i,a){let o=0,s,c;return f;function f(y){return n.enter("codeText"),n.enter("codeTextSequence"),h(y)}function h(y){return y===96?(n.consume(y),o++,h):(n.exit("codeTextSequence"),p(y))}function p(y){return y===null?a(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),p):y===96?(c=n.enter("codeTextSequence"),s=0,g(y)):Te(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),p):(n.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||Te(y)?(n.exit("codeTextData"),p(y)):(n.consume(y),m)}function g(y){return y===96?(n.consume(y),s++,g):s===o?(n.exit("codeTextSequence"),n.exit("codeText"),i(y)):(c.type="codeTextData",m(y))}}class zx{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,a){const o=a??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(i,o):i>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(i,a,o){const s=a||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return o&&Oi(this.left,o),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Oi(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Oi(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const a=this.left.splice(i,Number.POSITIVE_INFINITY);Oi(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Oi(this.left,a.reverse())}}}function Oi(n,i){let a=0;if(i.length<1e4)n.push(...i);else for(;a<i.length;)n.push(...i.slice(a,a+1e4)),a+=1e4}function Dm(n){const i={};let a=-1,o,s,c,f,h,p,m;const g=new zx(n);for(;++a<g.length;){for(;a in i;)a=i[a];if(o=g.get(a),a&&o[1].type==="chunkFlow"&&g.get(a-1)[1].type==="listItemPrefix"&&(p=o[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(o[0]==="enter")o[1].contentType&&(Object.assign(i,Dx(g,a)),a=i[a],m=!0);else if(o[1]._container){for(c=a,s=void 0;c--;)if(f=g.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(o[1].end={...g.get(s)[1].start},h=g.slice(s,a),h.unshift(o),g.splice(s,a-s+1,h))}}return An(n,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function Dx(n,i){const a=n.get(i)[1],o=n.get(i)[2];let s=i-1;const c=[];let f=a._tokenizer;f||(f=o.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let g,y,S=-1,b=a,k=0,M=0;const U=[M];for(;b;){for(;n.get(++s)[1]!==b;);c.push(s),b._tokenizer||(g=o.sliceStream(b),b.next||g.push(null),y&&f.defineSkip(b.start),b._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(g),b._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=a;++S<h.length;)h[S][0]==="exit"&&h[S-1][0]==="enter"&&h[S][1].type===h[S-1][1].type&&h[S][1].start.line!==h[S][1].end.line&&(M=S+1,U.push(M),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(f.events=[],b?(b._tokenizer=void 0,b.previous=void 0):U.pop(),S=U.length;S--;){const R=h.slice(U[S],U[S+1]),D=c.pop();p.push([D,D+R.length-1]),n.splice(D,2,R)}for(p.reverse(),S=-1;++S<p.length;)m[k+p[S][0]]=k+p[S][1],k+=p[S][1]-p[S][0]-1;return m}const jx={resolve:Ux,tokenize:Bx},Lx={partial:!0,tokenize:Ix};function Ux(n){return Dm(n),n}function Bx(n,i){let a;return o;function o(h){return n.enter("content"),a=n.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?c(h):Te(h)?n.check(Lx,f,c)(h):(n.consume(h),s)}function c(h){return n.exit("chunkContent"),n.exit("content"),i(h)}function f(h){return n.consume(h),n.exit("chunkContent"),a.next=n.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function Ix(n,i,a){const o=this;return s;function s(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),tt(n,c,"linePrefix")}function c(f){if(f===null||Te(f))return a(f);const h=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(f):n.interrupt(o.parser.constructs.flow,a,i)(f)}}function jm(n,i,a,o,s,c,f,h,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(R){return R===60?(n.enter(o),n.enter(s),n.enter(c),n.consume(R),n.exit(c),S):R===null||R===32||R===41||lu(R)?a(R):(n.enter(o),n.enter(f),n.enter(h),n.enter("chunkString",{contentType:"string"}),M(R))}function S(R){return R===62?(n.enter(c),n.consume(R),n.exit(c),n.exit(s),n.exit(o),i):(n.enter(h),n.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===62?(n.exit("chunkString"),n.exit(h),S(R)):R===null||R===60||Te(R)?a(R):(n.consume(R),R===92?k:b)}function k(R){return R===60||R===62||R===92?(n.consume(R),b):b(R)}function M(R){return!g&&(R===null||R===41||Ut(R))?(n.exit("chunkString"),n.exit(h),n.exit(f),n.exit(o),i(R)):g<m&&R===40?(n.consume(R),g++,M):R===41?(n.consume(R),g--,M):R===null||R===32||R===40||lu(R)?a(R):(n.consume(R),R===92?U:M)}function U(R){return R===40||R===41||R===92?(n.consume(R),M):M(R)}}function Lm(n,i,a,o,s,c){const f=this;let h=0,p;return m;function m(b){return n.enter(o),n.enter(s),n.consume(b),n.exit(s),n.enter(c),g}function g(b){return h>999||b===null||b===91||b===93&&!p||b===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?a(b):b===93?(n.exit(c),n.enter(s),n.consume(b),n.exit(s),n.exit(o),i):Te(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),g):(n.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Te(b)||h++>999?(n.exit("chunkString"),g(b)):(n.consume(b),p||(p=!Ye(b)),b===92?S:y)}function S(b){return b===91||b===92||b===93?(n.consume(b),h++,y):y(b)}}function Um(n,i,a,o,s,c){let f;return h;function h(S){return S===34||S===39||S===40?(n.enter(o),n.enter(s),n.consume(S),n.exit(s),f=S===40?41:S,p):a(S)}function p(S){return S===f?(n.enter(s),n.consume(S),n.exit(s),n.exit(o),i):(n.enter(c),m(S))}function m(S){return S===f?(n.exit(c),p(f)):S===null?a(S):Te(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),tt(n,m,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===f||S===null||Te(S)?(n.exit("chunkString"),m(S)):(n.consume(S),S===92?y:g)}function y(S){return S===f||S===92?(n.consume(S),g):g(S)}}function ki(n,i){let a;return o;function o(s){return Te(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),a=!0,o):Ye(s)?tt(n,o,a?"linePrefix":"lineSuffix")(s):i(s)}}const Hx={name:"definition",tokenize:Yx},qx={partial:!0,tokenize:Vx};function Yx(n,i,a){const o=this;let s;return c;function c(b){return n.enter("definition"),f(b)}function f(b){return Lm.call(o,n,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return s=yr(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),p):a(b)}function p(b){return Ut(b)?ki(n,m)(b):m(b)}function m(b){return jm(n,g,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return n.attempt(qx,y,y)(b)}function y(b){return Ye(b)?tt(n,S,"whitespace")(b):S(b)}function S(b){return b===null||Te(b)?(n.exit("definition"),o.parser.defined.push(s),i(b)):a(b)}}function Vx(n,i,a){return o;function o(h){return Ut(h)?ki(n,s)(h):a(h)}function s(h){return Um(n,c,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function c(h){return Ye(h)?tt(n,f,"whitespace")(h):f(h)}function f(h){return h===null||Te(h)?i(h):a(h)}}const Gx={name:"hardBreakEscape",tokenize:Px};function Px(n,i,a){return o;function o(c){return n.enter("hardBreakEscape"),n.consume(c),s}function s(c){return Te(c)?(n.exit("hardBreakEscape"),i(c)):a(c)}}const Fx={name:"headingAtx",resolve:Xx,tokenize:Kx};function Xx(n,i){let a=n.length-2,o=3,s,c;return n[o][1].type==="whitespace"&&(o+=2),a-2>o&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(o===a-1||a-4>o&&n[a-2][1].type==="whitespace")&&(a-=o+1===a?2:4),a>o&&(s={type:"atxHeadingText",start:n[o][1].start,end:n[a][1].end},c={type:"chunkText",start:n[o][1].start,end:n[a][1].end,contentType:"text"},An(n,o,a-o+1,[["enter",s,i],["enter",c,i],["exit",c,i],["exit",s,i]])),n}function Kx(n,i,a){let o=0;return s;function s(g){return n.enter("atxHeading"),c(g)}function c(g){return n.enter("atxHeadingSequence"),f(g)}function f(g){return g===35&&o++<6?(n.consume(g),f):g===null||Ut(g)?(n.exit("atxHeadingSequence"),h(g)):a(g)}function h(g){return g===35?(n.enter("atxHeadingSequence"),p(g)):g===null||Te(g)?(n.exit("atxHeading"),i(g)):Ye(g)?tt(n,h,"whitespace")(g):(n.enter("atxHeadingText"),m(g))}function p(g){return g===35?(n.consume(g),p):(n.exit("atxHeadingSequence"),h(g))}function m(g){return g===null||g===35||Ut(g)?(n.exit("atxHeadingText"),h(g)):(n.consume(g),m)}}const Qx=["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"],Bm=["pre","script","style","textarea"],Zx={concrete:!0,name:"htmlFlow",resolveTo:$x,tokenize:e1},Jx={partial:!0,tokenize:n1},Wx={partial:!0,tokenize:t1};function $x(n){let i=n.length;for(;i--&&!(n[i][0]==="enter"&&n[i][1].type==="htmlFlow"););return i>1&&n[i-2][1].type==="linePrefix"&&(n[i][1].start=n[i-2][1].start,n[i+1][1].start=n[i-2][1].start,n.splice(i-2,2)),n}function e1(n,i,a){const o=this;let s,c,f,h,p;return m;function m(T){return g(T)}function g(T){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(T),y}function y(T){return T===33?(n.consume(T),S):T===47?(n.consume(T),c=!0,M):T===63?(n.consume(T),s=3,o.interrupt?i:C):Nn(T)?(n.consume(T),f=String.fromCharCode(T),U):a(T)}function S(T){return T===45?(n.consume(T),s=2,b):T===91?(n.consume(T),s=5,h=0,k):Nn(T)?(n.consume(T),s=4,o.interrupt?i:C):a(T)}function b(T){return T===45?(n.consume(T),o.interrupt?i:C):a(T)}function k(T){const ne="CDATA[";return T===ne.charCodeAt(h++)?(n.consume(T),h===ne.length?o.interrupt?i:oe:k):a(T)}function M(T){return Nn(T)?(n.consume(T),f=String.fromCharCode(T),U):a(T)}function U(T){if(T===null||T===47||T===62||Ut(T)){const ne=T===47,fe=f.toLowerCase();return!ne&&!c&&Bm.includes(fe)?(s=1,o.interrupt?i(T):oe(T)):Qx.includes(f.toLowerCase())?(s=6,ne?(n.consume(T),R):o.interrupt?i(T):oe(T)):(s=7,o.interrupt&&!o.parser.lazy[o.now().line]?a(T):c?D(T):I(T))}return T===45||Zt(T)?(n.consume(T),f+=String.fromCharCode(T),U):a(T)}function R(T){return T===62?(n.consume(T),o.interrupt?i:oe):a(T)}function D(T){return Ye(T)?(n.consume(T),D):ae(T)}function I(T){return T===47?(n.consume(T),ae):T===58||T===95||Nn(T)?(n.consume(T),$):Ye(T)?(n.consume(T),I):ae(T)}function $(T){return T===45||T===46||T===58||T===95||Zt(T)?(n.consume(T),$):V(T)}function V(T){return T===61?(n.consume(T),A):Ye(T)?(n.consume(T),V):I(T)}function A(T){return T===null||T===60||T===61||T===62||T===96?a(T):T===34||T===39?(n.consume(T),p=T,j):Ye(T)?(n.consume(T),A):z(T)}function j(T){return T===p?(n.consume(T),p=null,K):T===null||Te(T)?a(T):(n.consume(T),j)}function z(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ut(T)?V(T):(n.consume(T),z)}function K(T){return T===47||T===62||Ye(T)?I(T):a(T)}function ae(T){return T===62?(n.consume(T),te):a(T)}function te(T){return T===null||Te(T)?oe(T):Ye(T)?(n.consume(T),te):a(T)}function oe(T){return T===45&&s===2?(n.consume(T),B):T===60&&s===1?(n.consume(T),W):T===62&&s===4?(n.consume(T),_):T===63&&s===3?(n.consume(T),C):T===93&&s===5?(n.consume(T),le):Te(T)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(Jx,G,_e)(T)):T===null||Te(T)?(n.exit("htmlFlowData"),_e(T)):(n.consume(T),oe)}function _e(T){return n.check(Wx,ce,G)(T)}function ce(T){return n.enter("lineEnding"),n.consume(T),n.exit("lineEnding"),ee}function ee(T){return T===null||Te(T)?_e(T):(n.enter("htmlFlowData"),oe(T))}function B(T){return T===45?(n.consume(T),C):oe(T)}function W(T){return T===47?(n.consume(T),f="",Z):oe(T)}function Z(T){if(T===62){const ne=f.toLowerCase();return Bm.includes(ne)?(n.consume(T),_):oe(T)}return Nn(T)&&f.length<8?(n.consume(T),f+=String.fromCharCode(T),Z):oe(T)}function le(T){return T===93?(n.consume(T),C):oe(T)}function C(T){return T===62?(n.consume(T),_):T===45&&s===2?(n.consume(T),C):oe(T)}function _(T){return T===null||Te(T)?(n.exit("htmlFlowData"),G(T)):(n.consume(T),_)}function G(T){return n.exit("htmlFlow"),i(T)}}function t1(n,i,a){const o=this;return s;function s(f){return Te(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c):a(f)}function c(f){return o.parser.lazy[o.now().line]?a(f):i(f)}}function n1(n,i,a){return o;function o(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(Ua,i,a)}}const l1={name:"htmlText",tokenize:r1};function r1(n,i,a){const o=this;let s,c,f;return h;function h(C){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(C),p}function p(C){return C===33?(n.consume(C),m):C===47?(n.consume(C),V):C===63?(n.consume(C),I):Nn(C)?(n.consume(C),z):a(C)}function m(C){return C===45?(n.consume(C),g):C===91?(n.consume(C),c=0,k):Nn(C)?(n.consume(C),D):a(C)}function g(C){return C===45?(n.consume(C),b):a(C)}function y(C){return C===null?a(C):C===45?(n.consume(C),S):Te(C)?(f=y,W(C)):(n.consume(C),y)}function S(C){return C===45?(n.consume(C),b):y(C)}function b(C){return C===62?B(C):C===45?S(C):y(C)}function k(C){const _="CDATA[";return C===_.charCodeAt(c++)?(n.consume(C),c===_.length?M:k):a(C)}function M(C){return C===null?a(C):C===93?(n.consume(C),U):Te(C)?(f=M,W(C)):(n.consume(C),M)}function U(C){return C===93?(n.consume(C),R):M(C)}function R(C){return C===62?B(C):C===93?(n.consume(C),R):M(C)}function D(C){return C===null||C===62?B(C):Te(C)?(f=D,W(C)):(n.consume(C),D)}function I(C){return C===null?a(C):C===63?(n.consume(C),$):Te(C)?(f=I,W(C)):(n.consume(C),I)}function $(C){return C===62?B(C):I(C)}function V(C){return Nn(C)?(n.consume(C),A):a(C)}function A(C){return C===45||Zt(C)?(n.consume(C),A):j(C)}function j(C){return Te(C)?(f=j,W(C)):Ye(C)?(n.consume(C),j):B(C)}function z(C){return C===45||Zt(C)?(n.consume(C),z):C===47||C===62||Ut(C)?K(C):a(C)}function K(C){return C===47?(n.consume(C),B):C===58||C===95||Nn(C)?(n.consume(C),ae):Te(C)?(f=K,W(C)):Ye(C)?(n.consume(C),K):B(C)}function ae(C){return C===45||C===46||C===58||C===95||Zt(C)?(n.consume(C),ae):te(C)}function te(C){return C===61?(n.consume(C),oe):Te(C)?(f=te,W(C)):Ye(C)?(n.consume(C),te):K(C)}function oe(C){return C===null||C===60||C===61||C===62||C===96?a(C):C===34||C===39?(n.consume(C),s=C,_e):Te(C)?(f=oe,W(C)):Ye(C)?(n.consume(C),oe):(n.consume(C),ce)}function _e(C){return C===s?(n.consume(C),s=void 0,ee):C===null?a(C):Te(C)?(f=_e,W(C)):(n.consume(C),_e)}function ce(C){return C===null||C===34||C===39||C===60||C===61||C===96?a(C):C===47||C===62||Ut(C)?K(C):(n.consume(C),ce)}function ee(C){return C===47||C===62||Ut(C)?K(C):a(C)}function B(C){return C===62?(n.consume(C),n.exit("htmlTextData"),n.exit("htmlText"),i):a(C)}function W(C){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),Z}function Z(C){return Ye(C)?tt(n,le,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):le(C)}function le(C){return n.enter("htmlTextData"),f(C)}}const su={name:"labelEnd",resolveAll:s1,resolveTo:u1,tokenize:c1},i1={tokenize:f1},a1={tokenize:d1},o1={tokenize:h1};function s1(n){let i=-1;const a=[];for(;++i<n.length;){const o=n[i][1];if(a.push(n[i]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const s=o.type==="labelImage"?4:2;o.type="data",i+=s}}return n.length!==a.length&&An(n,0,n.length,a),n}function u1(n,i){let a=n.length,o=0,s,c,f,h;for(;a--;)if(s=n[a][1],c){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;n[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(n[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(c=a,s.type!=="labelLink")){o=2;break}}else s.type==="labelEnd"&&(f=a);const p={type:n[c][1].type==="labelLink"?"link":"image",start:{...n[c][1].start},end:{...n[n.length-1][1].end}},m={type:"label",start:{...n[c][1].start},end:{...n[f][1].end}},g={type:"labelText",start:{...n[c+o+2][1].end},end:{...n[f-2][1].start}};return h=[["enter",p,i],["enter",m,i]],h=sn(h,n.slice(c+1,c+o+3)),h=sn(h,[["enter",g,i]]),h=sn(h,iu(i.parser.constructs.insideSpan.null,n.slice(c+o+4,f-3),i)),h=sn(h,[["exit",g,i],n[f-2],n[f-1],["exit",m,i]]),h=sn(h,n.slice(f+1)),h=sn(h,[["exit",p,i]]),An(n,c,n.length,h),n}function c1(n,i,a){const o=this;let s=o.events.length,c,f;for(;s--;)if((o.events[s][1].type==="labelImage"||o.events[s][1].type==="labelLink")&&!o.events[s][1]._balanced){c=o.events[s][1];break}return h;function h(S){return c?c._inactive?y(S):(f=o.parser.defined.includes(yr(o.sliceSerialize({start:c.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(S),n.exit("labelMarker"),n.exit("labelEnd"),p):a(S)}function p(S){return S===40?n.attempt(i1,g,f?g:y)(S):S===91?n.attempt(a1,g,f?m:y)(S):f?g(S):y(S)}function m(S){return n.attempt(o1,g,y)(S)}function g(S){return i(S)}function y(S){return c._balanced=!0,a(S)}}function f1(n,i,a){return o;function o(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),s}function s(y){return Ut(y)?ki(n,c)(y):c(y)}function c(y){return y===41?g(y):jm(n,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return Ut(y)?ki(n,p)(y):g(y)}function h(y){return a(y)}function p(y){return y===34||y===39||y===40?Um(n,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Ut(y)?ki(n,g)(y):g(y)}function g(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),i):a(y)}}function d1(n,i,a){const o=this;return s;function s(h){return Lm.call(o,n,c,f,"reference","referenceMarker","referenceString")(h)}function c(h){return o.parser.defined.includes(yr(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?i(h):a(h)}function f(h){return a(h)}}function h1(n,i,a){return o;function o(c){return n.enter("reference"),n.enter("referenceMarker"),n.consume(c),n.exit("referenceMarker"),s}function s(c){return c===93?(n.enter("referenceMarker"),n.consume(c),n.exit("referenceMarker"),n.exit("reference"),i):a(c)}}const m1={name:"labelStartImage",resolveAll:su.resolveAll,tokenize:p1};function p1(n,i,a){const o=this;return s;function s(h){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(h),n.exit("labelImageMarker"),c}function c(h){return h===91?(n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),n.exit("labelImage"),f):a(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in o.parser.constructs?a(h):i(h)}}const g1={name:"labelStartLink",resolveAll:su.resolveAll,tokenize:y1};function y1(n,i,a){const o=this;return s;function s(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?a(f):i(f)}}const uu={name:"lineEnding",tokenize:v1};function v1(n,i){return a;function a(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),tt(n,i,"linePrefix")}}const Ba={name:"thematicBreak",tokenize:b1};function b1(n,i,a){let o=0,s;return c;function c(m){return n.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(n.enter("thematicBreakSequence"),p(m)):o>=3&&(m===null||Te(m))?(n.exit("thematicBreak"),i(m)):a(m)}function p(m){return m===s?(n.consume(m),o++,p):(n.exit("thematicBreakSequence"),Ye(m)?tt(n,h,"whitespace")(m):h(m))}}const Bt={continuation:{tokenize:T1},exit:w1,name:"list",tokenize:x1},S1={partial:!0,tokenize:_1},E1={partial:!0,tokenize:C1};function x1(n,i,a){const o=this,s=o.events[o.events.length-1];let c=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(b){const k=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:ru(b)){if(o.containerState.type||(o.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(Ba,a,m)(b):m(b);if(!o.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(b)}return a(b)}function p(b){return ru(b)&&++f<10?(n.consume(b),p):(!o.interrupt||f<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),m(b)):a(b)}function m(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,n.check(Ua,o.interrupt?a:g,n.attempt(S1,S,y))}function g(b){return o.containerState.initialBlankLine=!0,c++,S(b)}function y(b){return Ye(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),S):a(b)}function S(b){return o.containerState.size=c+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,i(b)}}function T1(n,i,a){const o=this;return o.containerState._closeFlow=void 0,n.check(Ua,s,c);function s(h){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,tt(n,i,"listItemIndent",o.containerState.size+1)(h)}function c(h){return o.containerState.furtherBlankLines||!Ye(h)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(h)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(E1,i,f)(h))}function f(h){return o.containerState._closeFlow=!0,o.interrupt=void 0,tt(n,n.attempt(Bt,i,a),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function C1(n,i,a){const o=this;return tt(n,s,"listItemIndent",o.containerState.size+1);function s(c){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?i(c):a(c)}}function w1(n){n.exit(this.containerState.type)}function _1(n,i,a){const o=this;return tt(n,s,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(c){const f=o.events[o.events.length-1];return!Ye(c)&&f&&f[1].type==="listItemPrefixWhitespace"?i(c):a(c)}}const Im={name:"setextUnderline",resolveTo:A1,tokenize:N1};function A1(n,i){let a=n.length,o,s,c;for(;a--;)if(n[a][0]==="enter"){if(n[a][1].type==="content"){o=a;break}n[a][1].type==="paragraph"&&(s=a)}else n[a][1].type==="content"&&n.splice(a,1),!c&&n[a][1].type==="definition"&&(c=a);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[s][1].type="setextHeadingText",c?(n.splice(s,0,["enter",f,i]),n.splice(c+1,0,["exit",n[o][1],i]),n[o][1].end={...n[c][1].end}):n[o][1]=f,n.push(["exit",f,i]),n}function N1(n,i,a){const o=this;let s;return c;function c(m){let g=o.events.length,y;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){y=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||y)?(n.enter("setextHeadingLine"),s=m,f(m)):a(m)}function f(m){return n.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(n.consume(m),h):(n.exit("setextHeadingLineSequence"),Ye(m)?tt(n,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Te(m)?(n.exit("setextHeadingLine"),i(m)):a(m)}}const R1={tokenize:O1};function O1(n){const i=this,a=n.attempt(Ua,o,n.attempt(this.parser.constructs.flowInitial,s,tt(n,n.attempt(this.parser.constructs.flow,s,n.attempt(jx,s)),"linePrefix")));return a;function o(c){if(c===null){n.consume(c);return}return n.enter("lineEndingBlank"),n.consume(c),n.exit("lineEndingBlank"),i.currentConstruct=void 0,a}function s(c){if(c===null){n.consume(c);return}return n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),i.currentConstruct=void 0,a}}const k1={resolveAll:qm()},M1=Hm("string"),z1=Hm("text");function Hm(n){return{resolveAll:qm(n==="text"?D1:void 0),tokenize:i};function i(a){const o=this,s=this.parser.constructs[n],c=a.attempt(s,f,h);return f;function f(g){return m(g)?c(g):h(g)}function h(g){if(g===null){a.consume(g);return}return a.enter("data"),a.consume(g),p}function p(g){return m(g)?(a.exit("data"),c(g)):(a.consume(g),p)}function m(g){if(g===null)return!0;const y=s[g];let S=-1;if(y)for(;++S<y.length;){const b=y[S];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function qm(n){return i;function i(a,o){let s=-1,c;for(;++s<=a.length;)c===void 0?a[s]&&a[s][1].type==="data"&&(c=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==c+2&&(a[c][1].end=a[s-1][1].end,a.splice(c+2,s-c-2),s=c+2),c=void 0);return n?n(a,o):a}}function D1(n,i){let a=0;for(;++a<=n.length;)if((a===n.length||n[a][1].type==="lineEnding")&&n[a-1][1].type==="data"){const o=n[a-1][1],s=i.sliceStream(o);let c=s.length,f=-1,h=0,p;for(;c--;){const m=s[c];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)p=!0,h++;else if(m!==-1){c++;break}}if(i._contentTypeTextTrailing&&a===n.length&&(h=0),h){const m={type:a===n.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:o.start._bufferIndex+f,_index:o.start._index+c,line:o.end.line,column:o.end.column-h,offset:o.end.offset-h},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):(n.splice(a,0,["enter",m,i],["exit",m,i]),a+=2)}a++}return n}const j1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Hx},disable:{null:[]},document:{42:Bt,43:Bt,45:Bt,48:Bt,49:Bt,50:Bt,51:Bt,52:Bt,53:Bt,54:Bt,55:Bt,56:Bt,57:Bt,62:Rm},flow:{35:Fx,42:Ba,45:[Im,Ba],60:Zx,61:Im,95:Ba,96:zm,126:zm},flowInitial:{[-2]:ou,[-1]:ou,32:ou},insideSpan:{null:[au,k1]},string:{38:km,92:Om},text:{[-5]:uu,[-4]:uu,[-3]:uu,33:m1,38:km,42:au,60:[gx,l1],91:g1,92:[Gx,Om],93:su,95:au,96:Rx}},Symbol.toStringTag,{value:"Module"}));function L1(n,i,a){let o={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},c=[];let f=[],h=[];const p={attempt:j(V),check:j(A),consume:D,enter:I,exit:$,interrupt:j(A,{interrupt:!0})},m={code:null,containerState:{},defineSkip:M,events:[],now:k,parser:n,previous:null,sliceSerialize:S,sliceStream:b,write:y};let g=i.tokenize.call(m,p);return i.resolveAll&&c.push(i),m;function y(te){return f=sn(f,te),U(),f[f.length-1]!==null?[]:(z(i,0),m.events=iu(c,m.events,m),m.events)}function S(te,oe){return B1(b(te),oe)}function b(te){return U1(f,te)}function k(){const{_bufferIndex:te,_index:oe,line:_e,column:ce,offset:ee}=o;return{_bufferIndex:te,_index:oe,line:_e,column:ce,offset:ee}}function M(te){s[te.line]=te.column,ae()}function U(){let te;for(;o._index<f.length;){const oe=f[o._index];if(typeof oe=="string")for(te=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===te&&o._bufferIndex<oe.length;)R(oe.charCodeAt(o._bufferIndex));else R(oe)}}function R(te){g=g(te)}function D(te){Te(te)?(o.line++,o.column=1,o.offset+=te===-3?2:1,ae()):te!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),m.previous=te}function I(te,oe){const _e=oe||{};return _e.type=te,_e.start=k(),m.events.push(["enter",_e,m]),h.push(_e),_e}function $(te){const oe=h.pop();return oe.end=k(),m.events.push(["exit",oe,m]),oe}function V(te,oe){z(te,oe.from)}function A(te,oe){oe.restore()}function j(te,oe){return _e;function _e(ce,ee,B){let W,Z,le,C;return Array.isArray(ce)?G(ce):"tokenize"in ce?G([ce]):_(ce);function _(pe){return ge;function ge(Ie){const Me=Ie!==null&&pe[Ie],at=Ie!==null&&pe.null,vt=[...Array.isArray(Me)?Me:Me?[Me]:[],...Array.isArray(at)?at:at?[at]:[]];return G(vt)(Ie)}}function G(pe){return W=pe,Z=0,pe.length===0?B:T(pe[Z])}function T(pe){return ge;function ge(Ie){return C=K(),le=pe,pe.partial||(m.currentConstruct=pe),pe.name&&m.parser.constructs.disable.null.includes(pe.name)?fe():pe.tokenize.call(oe?Object.assign(Object.create(m),oe):m,p,ne,fe)(Ie)}}function ne(pe){return te(le,C),ee}function fe(pe){return C.restore(),++Z<W.length?T(W[Z]):B}}}function z(te,oe){te.resolveAll&&!c.includes(te)&&c.push(te),te.resolve&&An(m.events,oe,m.events.length-oe,te.resolve(m.events.slice(oe),m)),te.resolveTo&&(m.events=te.resolveTo(m.events,m))}function K(){const te=k(),oe=m.previous,_e=m.currentConstruct,ce=m.events.length,ee=Array.from(h);return{from:ce,restore:B};function B(){o=te,m.previous=oe,m.currentConstruct=_e,m.events.length=ce,h=ee,ae()}}function ae(){o.line in s&&o.column<2&&(o.column=s[o.line],o.offset+=s[o.line]-1)}}function U1(n,i){const a=i.start._index,o=i.start._bufferIndex,s=i.end._index,c=i.end._bufferIndex;let f;if(a===s)f=[n[a].slice(o,c)];else{if(f=n.slice(a,s),o>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(o):f.shift()}c>0&&f.push(n[s].slice(0,c))}return f}function B1(n,i){let a=-1;const o=[];let s;for(;++a<n.length;){const c=n[a];let f;if(typeof c=="string")f=c;else switch(c){case-5:{f="\r";break}case-4:{f=`
|
|
42
|
+
`}),x.jsxs(si,{className:z,children:[x.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:x.jsx(ZS,{onClose:i,title:c,iconUrl:a,startNewConversation:o})}),x.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:s}),h&&x.jsxs("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:[x.jsx(w.Suspense,{fallback:null,children:x.jsx(WS,{value:h.value,onChange:h.onChange,onSend:h.onSend,onFileChange:h.onFileChange,onRemoveFile:h.onRemoveFile,onRecording:h.onRecording,isRecording:h.isRecording,hasAttachment:h.hasAttachment,attachmentFiles:h.attachmentFiles,isDisabled:h.isDisabled,isMobile:g,placeholder:h.placeholder,recordingStatus:h.recordingStatus})}),f&&p==="development"&&x.jsx("div",{className:"px-6 flex justify-center items-center",children:x.jsxs("p",{className:"text-[8px] text-gray-600 font-mono opacity-50",children:["Session ID: ",f]})})]})]})]})}function Kh(){const[n,i]=w.useState(typeof navigator<"u"?navigator.onLine:!0);return w.useEffect(()=>{const a=()=>i(!0),o=()=>i(!1);return window.addEventListener("online",a),window.addEventListener("offline",o),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",o)}},[]),{isOnline:n}}const Vs=5,eE=10*1024*1024,tE=({environment:n,baseUrl:i,context:a})=>{const[o,s]=w.useState([]),[c,f]=w.useState(!1),[h,p]=w.useState(0),[m,g]=w.useState(!1),[y,S]=w.useState([]),b=w.useRef(null),M=w.useRef(null),{isOnline:O}=Kh(),{agentId:z,setSessionId:_,setSessionToken:q,sessionId:B,sessionToken:$,setError:G,setConnectionStatus:N,setShowRetryButton:D,setStartNewConnection:j,setIsStreaming:K,setIsWaitingForResponse:ae,isStreaming:le,initialMessage:oe,isWaitingForResponse:_e,setProgressMessage:ue,setRecordingStatus:ee,clearSession:U,addMessageToSession:W,getMessagesForSession:Z,updateMessageInSession:ne,setInitialMessage:C,userId:A,fileUploadPerSession:V,setFileUploadPerSession:T}=dr();w.useEffect(()=>{O?m?ce()&&(N(ze.ConnectionStatus.CONNECTED),pe()):N(ze.ConnectionStatus.CONNECTING):N(ze.ConnectionStatus.NOT_CONNECTED)},[O,m]),w.useEffect(()=>{if(B){const fe=Z(B)||[];s(fe),S([])}},[B]),w.useEffect(()=>{if(g(!1),!z)return;const fe=new ze.SynapseSDK({agentId:z,environment:n,userId:A,callbacks:{onError:se=>{if(se instanceof ze.SynapseError)switch(se.code){case ze.SynapseErrorCode.SESSION:N(ze.ConnectionStatus.NOT_CONNECTED),D(!0);break;case ze.SynapseErrorCode.RECORDING:G({title:"Recording failed",description:se?.displayMessage||"Please try again later"});break;default:G({title:"Something went wrong",description:"Please try again later"}),D(!0);break}},onSessionRefreshed:se=>{se?.session_id&&se?.session_token&&(_(se.session_id),q(se.session_token))}},...i&&{serverUrl:i},...a&&{context:a}});return b.current=fe,g(!0),()=>{g(!1),b.current?.endSession(),b.current=null,M.current&&(clearTimeout(M.current),M.current=null)}},[z,n,A]),w.useEffect(()=>{const fe=o[o.length-1];!fe?.role||!B||(fe?.role===Ft.USER?W(B,fe):!le&&!fe.isStored&&(s(se=>{const ve=[...se];return ve[ve.length-1]={...fe,isStored:!0},ve}),W(B,{...fe,isStored:!0})))},[o,le]),w.useEffect(()=>{const fe=o[o.length-1];return()=>{fe&&!fe?.isStored&&B&&W(B,{...fe,isStored:!0})}},[]),w.useEffect(()=>(M.current&&(clearTimeout(M.current),M.current=null),_e&&!le?M.current=setTimeout(()=>{ae(!1),M.current=null},3e4):le&&M.current&&(clearTimeout(M.current),M.current=null),()=>{M.current&&(clearTimeout(M.current),M.current=null)}),[_e,le,ae]);const te=async(fe=!1)=>{try{if(!b.current){G({title:"SDK not initialized",description:"Please ensure agentId is configured"}),f(!1);return}f(!0);let se;fe?(await U(),pe(),se=await b.current.startSession()):se=await b.current.startSession({session_id:B||"",session_token:$||""}),se?.session_id&&se?.session_token&&(_(se.session_id),q(se.session_token),(se?.initial_message?.text||se?.initial_message?.suggestions?.length)&&C(se.initial_message)),He()}catch{G({title:"Something Went wrong!",description:"Please try again later."}),f(!1);return}finally{f(!1)}},ce=()=>b.current?.isConnected()??!1,ge=()=>{b.current?.endSession()},pe=()=>{p(0),D(!1),j(!1),G(null)},He=()=>{b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,fe=>{const se=fe;if(se.data?.text&&se.messageId){le||(ae(!1),K(!0));const ve=se.data.text,Ce=se.messageId;s(Me=>{const Ge=Me[Me.length-1];if(Ge&&Ge.id===Ce&&Ge.role===Ft.ASSISTANT){const dt=[...Me];return dt[dt.length-1]={...Ge,content:Ge.content+ve},dt}else return[...Me,{id:Ce,content:ve,role:Ft.ASSISTANT,timestamp:fr(Date.now()),isStored:!1}]})}}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{K(!1),ue(null)}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{pe(),N(ze.ConnectionStatus.CONNECTED)}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,fe=>{const se=fe;if(!se?.messageId||!se?.data||!se?.data?.details?.component)return;const ve=se.messageId,Ce=se.timestamp??Date.now();s(Me=>{const Ge=Me[Me.length-1];if(Ge.id===ve&&Ge.role===Ft.ASSISTANT){const dt=[...Me],nt={...Ge,toolEscalationData:{...se.data,isResponded:!1},isResponseFromTool:!0};return dt[Me.length-1]=nt,ne(B,ve,nt),dt}else{const dt={id:ve,content:se.data?.details?.input?.text||"",role:Ft.ASSISTANT,toolEscalationData:{...se.data,isResponded:!1},isResponseFromTool:!0,timestamp:fr(Ce),isStored:!1};return[...Me,dt]}})}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,fe=>{N(ze.ConnectionStatus.NOT_CONNECTED),h<2?(p(se=>se+1),D(!0)):j(!0)}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.ERROR,fe=>{const se=fe.message||fe.displayMessage||"Something went wrong";G({title:se,description:"Please try again later"}),D(!0),ee(wt.IDLE)}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,async fe=>{const se=fe;se?.data?.text&&(s(ve=>[...ve,{id:Date.now().toString(),content:se.data.text||"",role:Ft.USER,timestamp:fr(Date.now()),isStored:!0}]),ee(wt.IDLE)),K(!1),ae(!1),ue(null)}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,fe=>{const se=fe;se.data?.text&&(ae(!1),ue(se.data.text))}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.TOOL_START,fe=>{const se=fe;if(se.data?.name&&se.messageId){const ve=se.messageId;s(Ce=>{const Me=Ce[Ce.length-1];if(Me&&Me.id===ve&&Me.role===Ft.ASSISTANT){const Ge=[...Ce];return Ge[Ge.length-1]={...Me,toolCallStatus:`Calling tool: ${se.data.name}...`},B&&ne(B,ve,{toolCallStatus:`Calling tool: ${se.data.name}...`}),Ge}return Ce})}}),b.current?.on(ze.SYNAPSE_REALTIME_EVENTS.TOOL_END,fe=>{const se=fe;if(se.data?.name&&se.messageId){const ve=se.messageId;s(Ce=>{const Me=Ce[Ce.length-1];if(Me&&Me.id===ve&&Me.role===Ft.ASSISTANT){const Ge=[...Ce];return Ge[Ge.length-1]={...Me,toolCallStatus:"Tool call completed."},B&&ne(B,ve,{toolCallStatus:"Tool call completed."}),Ge}return Ce})}})},Oe=async({message:fe,messageId:se,files:ve,audio:Ce,toolCalled:Me})=>{if(!ce()||ve&&ve.length<0&&fe?.trim()===""&&!Ce?.audio)return;if(ve&&ve.length>3){G({title:"Maximum 3 files are allowed to be sent at a time",description:"Please try again"});return}if(ve&&ve.length>0&&ve.reduce((F,re)=>F+re.size,0)>10*1024*1024){G({title:"Total file size limit of 10MB exceeded",description:"Please reduce the size of the files or try again with less files"});return}if(ve&&ve.length>0&&ve.length+V>Vs){const F=Vs-V;G({title:`You can only upload up to ${Vs} files per session`,description:`${F<=0?"Maximum file upload limit reached":`You have ${F} file${F===1?"":"s"} upload${F===1?"":"s"} left`}`});return}else ve&&ve.length&&T(V+ve.length);G(null),D(!1);const Ge=o.length==2&&y.length==2?y:null,dt=o.length-1,nt=dt>=0?o[dt]:null,br=nt?nt?.isResponseFromTool||nt.role===Ft.ASSISTANT&&nt.toolEscalationData:null;await b.current?.sendMessage({message:fe,files:ve,audio:Ce,...Ge&&{initial_prompts:Ge},...br&&!Me?{tool_declined:!0,tool_id:nt?.toolEscalationData?.tool_id||""}:{}}),(fe||ve&&ve.length>0)&&(s(F=>{const re=[...F],Se=re.length-1;return br&&Se>=0&&re[Se].toolEscalationData&&(re[Se]={...re[Se],toolEscalationData:{...re[Se].toolEscalationData,tool_id:null,isResponded:!0}},ne(B,re[dt].id||Date.now().toString(),re[dt])),[...re,{id:se||Date.now().toString(),content:fe||"",files:ve||[],role:Ft.USER,timestamp:fr(Date.now()),isStored:!0}]}),ae(!0))};return{sendMessage:Oe,startSession:te,incomingMessages:o,loading:c,endSession:ge,isReady:m,startRecording:async()=>{if(!ce())throw new Error("Not connected to the server");try{await b.current?.startRecording({onChunks:async fe=>{ee(wt.PROCESSING),await Oe({audio:fe}),ee(wt.TRANSCRIBING)},onError(fe){ee(wt.IDLE)}}),ee(wt.LISTENING)}catch(fe){throw ee(wt.IDLE),fe}},stopRecording:()=>{ce()&&b.current?.endRecording()},handleRetry:async()=>{if(!ce())pe(),await te(!1);else{const fe=o[o.length-1];fe&&fe.role===Ft.USER&&b.current?.sendMessage({message:fe.content,files:fe.files||[],messageId:fe.id})}},isValidFile:fe=>fe.type.toLowerCase()&&!["application/pdf","image/jpeg","image/jpg","image/png"].includes(fe.type)?(G({title:`File type not supported: ${fe.name}`,description:"Only PDF, images (JPG, JPEG, PNG) are allowed."}),!1):fe.size>3*1024*1024?(G({title:"File size limit of 3MB exceeded",description:"Please reduce the size of the file or try again with a smaller file"}),!1):!0,handleStartNewConnection:async()=>{pe(),await U(),await te(!0)},callTool:async(fe,se)=>{try{if(!ce())throw new Error("Not connected to the server");const ve=await b.current?.callTool(fe,se);if(!ve)throw new Error("Failed to call tool");return ve}catch(ve){throw ve}},handleInitialTaskClick:async fe=>{if(!oe?.suggestions?.length||!fe)return;const se=oe.suggestions.find(ve=>ve.value===fe);if(!se||!se.response){await Oe({message:fe});return}s(ve=>[...ve,{id:Date.now().toString(),content:fe,role:Ft.USER,timestamp:fr(Date.now()),isStored:!0}]),ae(!0),await P0(1e3),ae(!1),s(ve=>[...ve,{id:Date.now().toString(),content:se.response||"Please try again",role:Ft.ASSISTANT,timestamp:fr(Date.now()),isStored:!1}]),S([{role:"user",text:fe},{role:"assistant",text:se.response}])}}},nE=w.lazy(()=>Promise.resolve().then(()=>qC)),lE=w.lazy(()=>Promise.resolve().then(()=>GC)),rE=w.lazy(()=>Promise.resolve().then(()=>FC).then(n=>({default:n.ConnectionStatus})));function iE({isOpen:n,agentId:i,config:a}){const[o,s]=w.useState(""),[c,f]=w.useState(!1),[h,p]=w.useState(!1),[m,g]=w.useState([]),y=w.useRef(!1),S=w.useRef(null),b=w.useRef(null),[M,O]=w.useState(!1),{setAgentId:z,startNewConnection:_,showRetryButton:q,clearError:B,error:$,connectionStatus:G,recordingStatus:N,isWaitingForResponse:D,isStreaming:j,setError:K,initialMessage:ae,sessionId:le,setUserId:oe,userId:_e,setContext:ue}=dr(),{incomingMessages:ee,loading:U,sendMessage:W,startSession:Z,isReady:ne,startRecording:C,stopRecording:A,handleRetry:V,handleStartNewConnection:T,isValidFile:te,callTool:ce,handleInitialTaskClick:ge}=tE({environment:"production",baseUrl:a.environment==="development"&&a.baseUrl?a.baseUrl:void 0,context:a?.context});w.useEffect(()=>{if(i){if(z(i),!_e){const Ce=crypto?.randomUUID?.()||Date.now().toString();oe(Ce)}a?.context&&ue(a?.context),n&&ne&&!y.current&&(y.current=!0,Z(!1))}},[n,ne,i]);const pe=()=>S.current?.querySelector("[data-radix-scroll-area-viewport]")||null,He=()=>{const Ce=pe();Ce&&(Ce.scrollTo({top:Ce.scrollHeight,behavior:"smooth"}),O(!1))};w.useEffect(()=>{He()},[ee,j]);const Oe=ee.length>0,at=G===ze.ConnectionStatus.CONNECTED,vt=U||!at||D||j,Qt=U||!at,cl=w.useMemo(()=>N===wt.IDLE?null:N===wt.LISTENING?"Listening...":N===wt.PROCESSING?"Processing...":N===wt.TRANSCRIBING?"Transcribing...":null,[N]),on=Qt?"Connecting...":cl&&N!==wt.IDLE?cl:D||j?"Please wait for the response...":"Ask me anything…",Ln=async()=>{if(!vt&&(o.trim()||c||h)){const Ce=Date.now().toString();m.length>0?(await W({files:m,message:o.trim(),messageId:Ce}),g([]),p(!1)):o.trim()&&await W({message:o,messageId:Ce}),s(""),f(!1),p(!1),setTimeout(()=>{He()},100)}},Un=async Ce=>{Ce&&await ge(Ce)},fe=Ce=>{if(Ce&&Ce.length>0){const Me=Ce.filter(Ge=>!!te(Ge));if(Me?.length+m.length>3){K({title:"You can only upload up to 3 files at a time",description:"Please remove some files and try again."});return}if(Me?.length>0&&Me.reduce((Ge,dt)=>Ge+dt.size,0)>10*1024*1024){K({title:`Total file size limit of ${eE} MB exceeded`,description:"Please reduce the size of the files or try again with less files"});return}if(Me?.length>0)Ce=Me;else return}g(Me=>(p((Me?.length??0)+(Ce?.length??0)>0),[...Me,...Ce]))},se=Ce=>{g(Me=>{const Ge=Me.filter((dt,nt)=>nt!==Ce);return p(Ge.length>0),Ge})},ve=async()=>{if(c)await A(),f(!1);else{if(vt)return;try{await C(),f(!0)}catch{}}};return x.jsx($S,{isOpen:n,onClose:a.onClose,title:a.title,iconUrl:a.iconUrl,onStartNewSession:()=>Z(!0),sessionId:le,environment:a.environment,displayMode:a.displayMode??"widget",chatComposer:{value:o,onChange:s,onSend:Ln,onFileChange:fe,onRemoveFile:se,onRecording:ve,isRecording:c,hasAttachment:h,attachmentFiles:m,isDisabled:vt,placeholder:on,recordingStatus:N},children:!U&&x.jsx(w.Suspense,{fallback:x.jsx(aE,{}),children:x.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[x.jsx(Ld,{ref:S,className:"flex-1 min-h-0",children:x.jsxs("div",{className:Te("transition-all duration-300",Oe?"p-4 space-y-3":"p-6 space-y-6"),children:[!Oe&&ae?.text?x.jsx(lE,{tasks:ae.suggestions,initialPrompt:ae.text,onTaskClick:Un,disabled:vt}):x.jsx(nE,{messages:ee,onSendMessage:W,iconUrl:a.iconUrl,callTool:ce}),x.jsx("div",{ref:b})]})}),M&&x.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:x.jsx(Et,{onClick:He,size:"icon",className:"h-10 w-10 rounded-full bg-white/90 backdrop-blur-sm shadow-lg border border-lavender-200/60 hover:bg-white hover:shadow-xl transition-all duration-200",children:x.jsx(As,{className:"w-5 h-5 text-slate-700"})})}),x.jsx(rE,{className:"mt-2",onRetry:V,onStartNewSession:T,showRetryButton:q,startNewConnection:_,clearError:B,error:$,isConnected:at})]})})})}function aE(){return x.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[x.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[x.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),x.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),x.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),x.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function oE({agentId:n,config:i}){const[a,o]=w.useState(!1);w.useEffect(()=>{o(!0)},[]);const s=()=>{o(!1),i?.onClose?.()};return x.jsx(iE,{isOpen:a,agentId:n,config:{...i,environment:i.environment??"production",onClose:s,title:i.title??"Medi Clinic",iconUrl:i.iconUrl??"https://cdn.eka.care/bot-icon.svg"}})}const Qh=(n,i,a)=>{Ob.createRoot(n).render(x.jsx(w.StrictMode,{children:x.jsx(oE,{agentId:i,config:a||{}})}))};typeof window<"u"&&(window.renderMedAssist=Qh);const Zh=w.forwardRef(({className:n,...i},a)=>x.jsx("textarea",{className:Te("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:a,...i}));Zh.displayName="Textarea";function Jh({file:n,onRemove:i,isPreview:a=!0,className:o=""}){const[s,c]=w.useState(!1),[f,h]=w.useState(""),p=n?.type?.startsWith("image/")??!1,m=n?.type==="application/pdf";w.useEffect(()=>{if(p){const S=URL.createObjectURL(n);return h(S),()=>URL.revokeObjectURL(S)}},[n,p]),w.useEffect(()=>{c(!1)},[n]);const g=()=>p?"text-green-600":"text-gray-600",y=S=>{if(S===0)return"0 B";const b=1024,M=["B","KB","MB","GB"],O=Math.floor(Math.log(S)/Math.log(b));return`${(S/Math.pow(b,O)).toFixed(1)} ${M[O]}`.toLowerCase()};return!p||s?x.jsxs("div",{className:`relative group inline-flex flex-shrink-0 bg-white border border-neutral-300 rounded-lg flex items-center gap-3 px-3 py-2.5 max-w-full ${a?"hover:bg-neutral-50":""} ${o}`,children:[x.jsx("div",{className:`flex-shrink-0 ${g()}`,children:x.jsx(fS,{className:"h-5 w-5"})}),x.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&x.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&x.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:y(n.size)})]}),a&&i&&x.jsx("button",{onClick:i,"aria-label":`Remove ${n.name}`,className:"flex-shrink-0 flex items-center justify-center w-5 h-5 text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] transition-colors",children:x.jsx(Ns,{className:"h-4 w-4"})})]}):x.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[x.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${a?"hover:bg-neutral-100 cursor-pointer":""}`,children:f&&x.jsx("img",{src:f,alt:n.name,className:"w-full h-full object-cover",onError:()=>c(!0)})}),a&&i&&x.jsx("button",{onClick:i,"aria-label":`Remove ${n.name}`,className:"absolute top-0 right-0 bg-[var(--color-muted)] text-black rounded-full w-5 h-5 flex items-center justify-center hover:bg-[var(--color-muted-foreground)] transition-colors z-10 transform translate-x-1 -translate-y-1",children:x.jsx(Ns,{className:"h-3 w-3 text-black"})})]})}function Wh({files:n,onRemoveFile:i,isPreview:a=!0,className:o=""}){if(n.length===0)return null;const s=n.filter(f=>f.type?.startsWith("image/")),c=n.filter(f=>!f.type?.startsWith("image/"));return x.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[c.map(f=>{const h=n.indexOf(f);return x.jsx(Jh,{file:f,onRemove:i?()=>i(h):void 0,isPreview:a},`${f.name}-${f.size}-${h}`)}),s.length>0&&x.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:s.map(f=>{const h=n.indexOf(f);return x.jsx(Jh,{file:f,onRemove:i?()=>i(h):void 0,isPreview:a},`${f.name}-${f.size}-${h}`)})})]})}function sE({value:n,onChange:i,onSend:a,onFileChange:o,onRemoveFile:s,onRecording:c,isRecording:f,hasAttachment:h,attachmentFiles:p,isDisabled:m,placeholder:g,isMobile:y,recordingStatus:S}){const b=w.useRef(null),M=w.useRef(null),O=n.trim().length>0||h,z=(m||S!==wt.IDLE)&&!f,_=Te("rounded-full transition-all duration-200 ",f?"bg-gradient-to-r from-rose-400 via-lavender-500 to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]":z?"text-lavender-300 cursor-not-allowed shadow-none":"text-lavender-600 hover:bg-gray-100"),q=D=>{const j=Array.from(D.target.files||[]);j.length>0&&o(j)},B=()=>{m||b.current?.click()},$=D=>{D.key==="Enter"&&!D.shiftKey&&O&&!m&&(D.preventDefault(),a())},G=D=>{D.style.height="auto",D.style.overflow="hidden";const j=D.scrollHeight,K=40,ae=120,le=Math.max(K,Math.min(j,ae));D.style.height=le+"px",j>ae?D.style.overflow="auto":D.style.overflow="hidden"},N=D=>{G(D.currentTarget)};return w.useEffect(()=>{M.current&&G(M.current)},[n]),w.useEffect(()=>{!m&&!y&&M.current?.focus()},[m]),x.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl px-4 py-2",children:[h&&p.length>0&&x.jsx("div",{className:"mb-2 pb-2 border-b border-white/20",children:x.jsx(Wh,{files:p,onRemoveFile:s,isPreview:!0})}),x.jsx("input",{ref:b,type:"file",multiple:!0,max:3,accept:"image/jpeg, image/png, image/jpg, application/pdf",className:"hidden",onChange:q,disabled:m,title:"Attach file","aria-label":"Attach file"}),x.jsxs("div",{className:Te("flex items-center gap-2 bg-white/70 backdrop-blur rounded-xl px-4 py-2 shadow-md focus-within:border-lavender-100/50 focus-within:ring-2 focus-within:ring-lavender-400/50 transition-all",f||h?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",m&&"opacity-60"),children:[h&&p.length>0&&x.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[p.length," file(s)"]}),x.jsx(Zh,{ref:M,onInput:N,placeholder:g,value:n,onChange:D=>i(D.target.value),rows:1,maxLength:1e3,autoFocus:!m,style:{wordBreak:"break-word",overflowWrap:"anywhere",minHeight:"40px",maxHeight:"120px",fontSize:window.innerWidth<=768?"16px":"14px"},onKeyPress:$,disabled:m,title:"Enter your message",className:"flex-1 border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm !placeholder:text-gray-400 bg-transparent disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap"}),S===wt.IDLE&&x.jsx(Et,{type:"button",variant:"ghost",size:"icon",onClick:B,disabled:m,className:`rounded-full transition-all ${h?"bg-lavender-200/30 text-lavender-600 hover:bg-lavender-200/40":"hover:bg-gray-100 text-lavender-600 hover:text-gray-700"}`,title:"Attach file",children:x.jsx(pS,{className:"w-5 h-5"})}),f?x.jsx(Et,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white hover:from-red-500 hover:to-rose-600 shadow-lg transition-all duration-200 hover:scale-105 active:scale-95",title:"Stop recording",children:x.jsx(yS,{className:"w-4 h-4"})}):!O&&x.jsx(Et,{type:"button",variant:"ghost",size:"icon",onClick:c,disabled:z,className:_,title:"Start recording",children:x.jsx(mS,{className:"w-5 h-5"})}),O&&!m&&x.jsx(Et,{type:"button",size:"icon",onClick:a,className:"h-10 w-10 bg-gradient-to-r from-lavender-400 to-lavender-500 hover:from-lavender-500 hover:to-lavender-600 rounded-full text-white transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95",children:x.jsx(gS,{className:"w-4 h-4"})})]})]})}const uE=Object.freeze(Object.defineProperty({__proto__:null,default:sE},Symbol.toStringTag,{value:"Module"}));function NA(){}function RA(){}function cE(n,i){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const fE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hE={};function $h(n,i){return(hE.jsx?dE:fE).test(n)}const mE=/[ \t\n\f\r]/g;function pE(n){return typeof n=="object"?n.type==="text"?em(n.value):!1:em(n)}function em(n){return n.replace(mE,"")===""}class wi{constructor(i,a,o){this.normal=a,this.property=i,o&&(this.space=o)}}wi.prototype.normal={},wi.prototype.property={},wi.prototype.space=void 0;function tm(n,i){const a={},o={};for(const s of n)Object.assign(a,s.property),Object.assign(o,s.normal);return new wi(a,o,i)}function Gs(n){return n.toLowerCase()}class jt{constructor(i,a){this.attribute=a,this.property=i}}jt.prototype.attribute="",jt.prototype.booleanish=!1,jt.prototype.boolean=!1,jt.prototype.commaOrSpaceSeparated=!1,jt.prototype.commaSeparated=!1,jt.prototype.defined=!1,jt.prototype.mustUseProperty=!1,jt.prototype.number=!1,jt.prototype.overloadedBoolean=!1,jt.prototype.property="",jt.prototype.spaceSeparated=!1,jt.prototype.space=void 0;let gE=0;const Ne=Hl(),ft=Hl(),Ps=Hl(),ie=Hl(),et=Hl(),hr=Hl(),Xt=Hl();function Hl(){return 2**++gE}const Fs=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:ft,commaOrSpaceSeparated:Xt,commaSeparated:hr,number:ie,overloadedBoolean:Ps,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Xs=Object.keys(Fs);class Ks extends jt{constructor(i,a,o,s){let c=-1;if(super(i,a),nm(this,"space",s),typeof o=="number")for(;++c<Xs.length;){const f=Xs[c];nm(this,Xs[c],(o&Fs[f])===Fs[f])}}}Ks.prototype.defined=!0;function nm(n,i,a){a&&(n[i]=a)}function mr(n){const i={},a={};for(const[o,s]of Object.entries(n.properties)){const c=new Ks(o,n.transform(n.attributes||{},o),s,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(c.mustUseProperty=!0),i[o]=c,a[Gs(o)]=o,a[Gs(c.attribute)]=o}return new wi(i,a,n.space)}const lm=mr({properties:{ariaActiveDescendant:null,ariaAtomic:ft,ariaAutoComplete:null,ariaBusy:ft,ariaChecked:ft,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:ft,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:ft,ariaFlowTo:et,ariaGrabbed:ft,ariaHasPopup:null,ariaHidden:ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:ie,ariaLive:null,ariaModal:ft,ariaMultiLine:ft,ariaMultiSelectable:ft,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:ft,ariaReadOnly:ft,ariaRelevant:null,ariaRequired:ft,ariaRoleDescription:et,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:ft,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(n,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function rm(n,i){return i in n?n[i]:i}function im(n,i){return rm(n,i.toLowerCase())}const yE=mr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hr,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:et,autoFocus:Ne,autoPlay:Ne,blocking:et,capture:null,charSet:null,checked:Ne,cite:null,className:et,cols:ie,colSpan:null,content:null,contentEditable:ft,controls:Ne,controlsList:et,coords:ie|hr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Ps,draggable:ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:et,height:ie,hidden:Ps,high:ie,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:et,itemRef:et,itemScope:Ne,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:ie,pattern:null,ping:et,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:et,required:Ne,reversed:Ne,rows:ie,rowSpan:ie,sandbox:et,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:ft,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:ft,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:im}),vE=mr({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:Xt,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:hr,g2:hr,glyphName:hr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:Xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,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:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xt,rev:Xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xt,requiredFeatures:Xt,requiredFonts:Xt,requiredFormats:Xt,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:Xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xt,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rm}),am=mr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,i){return"xlink:"+i.slice(5).toLowerCase()}}),om=mr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:im}),sm=mr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,i){return"xml:"+i.slice(3).toLowerCase()}}),bE={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"},SE=/[A-Z]/g,um=/-[a-z]/g,EE=/^data[-\w.:]+$/i;function xE(n,i){const a=Gs(i);let o=i,s=jt;if(a in n.normal)return n.property[n.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&EE.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(um,CE);o="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!um.test(c)){let f=c.replace(SE,TE);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}s=Ks}return new s(o,i)}function TE(n){return"-"+n.toLowerCase()}function CE(n){return n.charAt(1).toUpperCase()}const wE=tm([lm,yE,am,om,sm],"html"),Qs=tm([lm,vE,am,om,sm],"svg");function _E(n){return n.join(" ").trim()}var pr={},Zs,cm;function AE(){if(cm)return Zs;cm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
43
|
+
`,m="/",g="*",y="",S="comment",b="declaration";function M(z,_){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];_=_||{};var q=1,B=1;function $(ue){var ee=ue.match(i);ee&&(q+=ee.length);var U=ue.lastIndexOf(p);B=~U?ue.length-U:B+ue.length}function G(){var ue={line:q,column:B};return function(ee){return ee.position=new N(ue),K(),ee}}function N(ue){this.start=ue,this.end={line:q,column:B},this.source=_.source}N.prototype.content=z;function D(ue){var ee=new Error(_.source+":"+q+":"+B+": "+ue);if(ee.reason=ue,ee.filename=_.source,ee.line=q,ee.column=B,ee.source=z,!_.silent)throw ee}function j(ue){var ee=ue.exec(z);if(ee){var U=ee[0];return $(U),z=z.slice(U.length),ee}}function K(){j(a)}function ae(ue){var ee;for(ue=ue||[];ee=le();)ee!==!1&&ue.push(ee);return ue}function le(){var ue=G();if(!(m!=z.charAt(0)||g!=z.charAt(1))){for(var ee=2;y!=z.charAt(ee)&&(g!=z.charAt(ee)||m!=z.charAt(ee+1));)++ee;if(ee+=2,y===z.charAt(ee-1))return D("End of comment missing");var U=z.slice(2,ee-2);return B+=2,$(U),z=z.slice(ee),B+=2,ue({type:S,comment:U})}}function oe(){var ue=G(),ee=j(o);if(ee){if(le(),!j(s))return D("property missing ':'");var U=j(c),W=ue({type:b,property:O(ee[0].replace(n,y)),value:U?O(U[0].replace(n,y)):y});return j(f),W}}function _e(){var ue=[];ae(ue);for(var ee;ee=oe();)ee!==!1&&(ue.push(ee),ae(ue));return ue}return K(),_e()}function O(z){return z?z.replace(h,y):y}return Zs=M,Zs}var fm;function NE(){if(fm)return pr;fm=1;var n=pr&&pr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(pr,"__esModule",{value:!0}),pr.default=a;const i=n(AE());function a(o,s){let c=null;if(!o||typeof o!="string")return c;const f=(0,i.default)(o),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:g}=p;h?s(m,g,p):g&&(c=c||{},c[m]=g)}),c}return pr}var _i={},dm;function RE(){if(dm)return _i;dm=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,a=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(m){return!m||a.test(m)||n.test(m)},f=function(m,g){return g.toUpperCase()},h=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),c(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(s,h):m=m.replace(o,h),m.replace(i,f))};return _i.camelCase=p,_i}var Ai,hm;function OE(){if(hm)return Ai;hm=1;var n=Ai&&Ai.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=n(NE()),a=RE();function o(s,c){var f={};return!s||typeof s!="string"||(0,i.default)(s,function(h,p){h&&p&&(f[(0,a.camelCase)(h,c)]=p)}),f}return o.default=o,Ai=o,Ai}var kE=OE();const ME=fs(kE),mm=pm("end"),Js=pm("start");function pm(n){return i;function i(a){const o=a&&a.position&&a.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function zE(n){const i=Js(n),a=mm(n);if(i&&a)return{start:i,end:a}}function Ni(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?gm(n.position):"start"in n||"end"in n?gm(n):"line"in n||"column"in n?Ws(n):""}function Ws(n){return ym(n&&n.line)+":"+ym(n&&n.column)}function gm(n){return Ws(n&&n.start)+"-"+Ws(n&&n.end)}function ym(n){return n&&typeof n=="number"?n:1}class Mt extends Error{constructor(i,a,o){super(),typeof a=="string"&&(o=a,a=void 0);let s="",c={},f=!1;if(a&&("line"in a&&"column"in a?c={place:a}:"start"in a&&"end"in a?c={place:a}:"type"in a?c={ancestors:[a],place:a.position}:c={...a}),typeof i=="string"?s=i:!c.cause&&i&&(f=!0,s=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?c.ruleId=o:(c.source=o.slice(0,p),c.ruleId=o.slice(p+1))}if(!c.place&&c.ancestors&&c.ancestors){const p=c.ancestors[c.ancestors.length-1];p&&(c.place=p.position)}const h=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=Ni(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mt.prototype.file="",Mt.prototype.name="",Mt.prototype.reason="",Mt.prototype.message="",Mt.prototype.stack="",Mt.prototype.column=void 0,Mt.prototype.line=void 0,Mt.prototype.ancestors=void 0,Mt.prototype.cause=void 0,Mt.prototype.fatal=void 0,Mt.prototype.place=void 0,Mt.prototype.ruleId=void 0,Mt.prototype.source=void 0;const $s={}.hasOwnProperty,DE=new Map,jE=/[A-Z]/g,LE=new Set(["table","tbody","thead","tfoot","tr"]),UE=new Set(["td","th"]),vm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BE(n,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=i.filePath||void 0;let o;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=FE(a,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=PE(a,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:o,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Qs:wE,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=bm(s,n,void 0);return c&&typeof c!="string"?c:s.create(n,s.Fragment,{children:c||void 0},void 0)}function bm(n,i,a){if(i.type==="element")return IE(n,i,a);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return HE(n,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return YE(n,i,a);if(i.type==="mdxjsEsm")return qE(n,i);if(i.type==="root")return VE(n,i,a);if(i.type==="text")return GE(n,i)}function IE(n,i,a){const o=n.schema;let s=o;i.tagName.toLowerCase()==="svg"&&o.space==="html"&&(s=Qs,n.schema=s),n.ancestors.push(i);const c=Em(n,i.tagName,!1),f=XE(n,i);let h=tu(n,i);return LE.has(i.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!pE(p):!0})),Sm(n,f,c,i),eu(f,h),n.ancestors.pop(),n.schema=o,n.create(i,c,f,a)}function HE(n,i){if(i.data&&i.data.estree&&n.evaluater){const o=i.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ri(n,i.position)}function qE(n,i){if(i.data&&i.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(i.data.estree);Ri(n,i.position)}function YE(n,i,a){const o=n.schema;let s=o;i.name==="svg"&&o.space==="html"&&(s=Qs,n.schema=s),n.ancestors.push(i);const c=i.name===null?n.Fragment:Em(n,i.name,!0),f=KE(n,i),h=tu(n,i);return Sm(n,f,c,i),eu(f,h),n.ancestors.pop(),n.schema=o,n.create(i,c,f,a)}function VE(n,i,a){const o={};return eu(o,tu(n,i)),n.create(i,n.Fragment,o,a)}function GE(n,i){return i.value}function Sm(n,i,a,o){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(i.node=o)}function eu(n,i){if(i.length>0){const a=i.length>1?i:i[0];a&&(n.children=a)}}function PE(n,i,a){return o;function o(s,c,f,h){const m=Array.isArray(f.children)?a:i;return h?m(c,f,h):m(c,f)}}function FE(n,i){return a;function a(o,s,c,f){const h=Array.isArray(c.children),p=Js(o);return i(s,c,f,h,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function XE(n,i){const a={};let o,s;for(s in i.properties)if(s!=="children"&&$s.call(i.properties,s)){const c=QE(n,s,i.properties[s]);if(c){const[f,h]=c;n.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&UE.has(i.tagName)?o=h:a[f]=h}}if(o){const c=a.style||(a.style={});c[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return a}function KE(n,i){const a={};for(const o of i.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const c=o.data.estree.body[0];c.type;const f=c.expression;f.type;const h=f.properties[0];h.type,Object.assign(a,n.evaluater.evaluateExpression(h.argument))}else Ri(n,i.position);else{const s=o.name;let c;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const h=o.value.data.estree.body[0];h.type,c=n.evaluater.evaluateExpression(h.expression)}else Ri(n,i.position);else c=o.value===null?!0:o.value;a[s]=c}return a}function tu(n,i){const a=[];let o=-1;const s=n.passKeys?new Map:DE;for(;++o<i.children.length;){const c=i.children[o];let f;if(n.passKeys){const p=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=bm(n,c,f);h!==void 0&&a.push(h)}return a}function QE(n,i,a){const o=xE(n.schema,i);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=o.commaSeparated?cE(a):_E(a)),o.property==="style"){let s=typeof a=="object"?a:ZE(n,String(a));return n.stylePropertyNameCase==="css"&&(s=JE(s)),["style",s]}return[n.elementAttributeNameCase==="react"&&o.space?bE[o.property]||o.property:o.attribute,a]}}function ZE(n,i){try{return ME(i,{reactCompat:!0})}catch(a){if(n.ignoreInvalidStyle)return{};const o=a,s=new Mt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=vm+"#cannot-parse-style-attribute",s}}function Em(n,i,a){let o;if(!a)o={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let c=-1,f;for(;++c<s.length;){const h=$h(s[c])?{type:"Identifier",name:s[c]}:{type:"Literal",value:s[c]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(c&&h.type==="Literal"),optional:!1}:h}o=f}else o=$h(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(o.type==="Literal"){const s=o.value;return $s.call(n.components,s)?n.components[s]:s}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ri(n)}function Ri(n,i){const a=new Mt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=n.filePath||void 0,a.url=vm+"#cannot-handle-mdx-estrees-without-createevaluater",a}function JE(n){const i={};let a;for(a in n)$s.call(n,a)&&(i[WE(a)]=n[a]);return i}function WE(n){let i=n.replace(jE,$E);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function $E(n){return"-"+n.toLowerCase()}const nu={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"]},ex={};function tx(n,i){const a=ex,o=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,s=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return xm(n,o,s)}function xm(n,i,a){if(nx(n)){if("value"in n)return n.type==="html"&&!a?"":n.value;if(i&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Tm(n.children,i,a)}return Array.isArray(n)?Tm(n,i,a):""}function Tm(n,i,a){const o=[];let s=-1;for(;++s<n.length;)o[s]=xm(n[s],i,a);return o.join("")}function nx(n){return!!(n&&typeof n=="object")}const Cm=document.createElement("i");function lu(n){const i="&"+n+";";Cm.innerHTML=i;const a=Cm.textContent;return a.charCodeAt(a.length-1)===59&&n!=="semi"||a===i?!1:a}function wn(n,i,a,o){const s=n.length;let c=0,f;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,a=a>0?a:0,o.length<1e4)f=Array.from(o),f.unshift(i,a),n.splice(...f);else for(a&&n.splice(i,a);c<o.length;)f=o.slice(c,c+1e4),f.unshift(i,0),n.splice(...f),c+=1e4,i+=1e4}function an(n,i){return n.length>0?(wn(n,n.length,0,i),n):i}const wm={}.hasOwnProperty;function lx(n){const i={};let a=-1;for(;++a<n.length;)rx(i,n[a]);return i}function rx(n,i){let a;for(a in i){const s=(wm.call(n,a)?n[a]:void 0)||(n[a]={}),c=i[a];let f;if(c)for(f in c){wm.call(s,f)||(s[f]=[]);const h=c[f];ix(s[f],Array.isArray(h)?h:h?[h]:[])}}}function ix(n,i){let a=-1;const o=[];for(;++a<i.length;)(i[a].add==="after"?n:o).push(i[a]);wn(n,0,0,o)}function _m(n,i){const a=Number.parseInt(n,i);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function gr(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const _n=ol(/[A-Za-z]/),Kt=ol(/[\dA-Za-z]/),ax=ol(/[#-'*+\--9=?A-Z^-~]/);function ru(n){return n!==null&&(n<32||n===127)}const iu=ol(/\d/),ox=ol(/[\dA-Fa-f]/),sx=ol(/[!-/:-@[-`{-~]/);function xe(n){return n!==null&&n<-2}function Lt(n){return n!==null&&(n<0||n===32)}function Ve(n){return n===-2||n===-1||n===32}const ux=ol(new RegExp("\\p{P}|\\p{S}","u")),cx=ol(/\s/);function ol(n){return i;function i(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function yr(n){const i=[];let a=-1,o=0,s=0;for(;++a<n.length;){const c=n.charCodeAt(a);let f="";if(c===37&&Kt(n.charCodeAt(a+1))&&Kt(n.charCodeAt(a+2)))s=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(f=String.fromCharCode(c));else if(c>55295&&c<57344){const h=n.charCodeAt(a+1);c<56320&&h>56319&&h<57344?(f=String.fromCharCode(c,h),s=1):f="�"}else f=String.fromCharCode(c);f&&(i.push(n.slice(o,a),encodeURIComponent(f)),o=a+s+1,f=""),s&&(a+=s,s=0)}return i.join("")+n.slice(o)}function tt(n,i,a,o){const s=o?o-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(p){return Ve(p)?(n.enter(a),h(p)):i(p)}function h(p){return Ve(p)&&c++<s?(n.consume(p),h):(n.exit(a),i(p))}}const fx={tokenize:dx};function dx(n){const i=n.attempt(this.parser.constructs.contentInitial,o,s);let a;return i;function o(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),tt(n,i,"linePrefix")}function s(h){return n.enter("paragraph"),c(h)}function c(h){const p=n.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,f(h)}function f(h){if(h===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(h);return}return xe(h)?(n.consume(h),n.exit("chunkText"),c):(n.consume(h),f)}}const hx={tokenize:mx},Am={tokenize:px};function mx(n){const i=this,a=[];let o=0,s,c,f;return h;function h(B){if(o<a.length){const $=a[o];return i.containerState=$[1],n.attempt($[0].continuation,p,m)(B)}return m(B)}function p(B){if(o++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&q();const $=i.events.length;let G=$,N;for(;G--;)if(i.events[G][0]==="exit"&&i.events[G][1].type==="chunkFlow"){N=i.events[G][1].end;break}_(o);let D=$;for(;D<i.events.length;)i.events[D][1].end={...N},D++;return wn(i.events,G+1,0,i.events.slice($)),i.events.length=D,m(B)}return h(B)}function m(B){if(o===a.length){if(!s)return S(B);if(s.currentConstruct&&s.currentConstruct.concrete)return M(B);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},n.check(Am,g,y)(B)}function g(B){return s&&q(),_(o),S(B)}function y(B){return i.parser.lazy[i.now().line]=o!==a.length,f=i.now().offset,M(B)}function S(B){return i.containerState={},n.attempt(Am,b,M)(B)}function b(B){return o++,a.push([i.currentConstruct,i.containerState]),S(B)}function M(B){if(B===null){s&&q(),_(0),n.consume(B);return}return s=s||i.parser.flow(i.now()),n.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:c}),O(B)}function O(B){if(B===null){z(n.exit("chunkFlow"),!0),_(0),n.consume(B);return}return xe(B)?(n.consume(B),z(n.exit("chunkFlow")),o=0,i.interrupt=void 0,h):(n.consume(B),O)}function z(B,$){const G=i.sliceStream(B);if($&&G.push(null),B.previous=c,c&&(c.next=B),c=B,s.defineSkip(B.start),s.write(G),i.parser.lazy[B.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<f&&(!s.events[N][1].end||s.events[N][1].end.offset>f))return;const D=i.events.length;let j=D,K,ae;for(;j--;)if(i.events[j][0]==="exit"&&i.events[j][1].type==="chunkFlow"){if(K){ae=i.events[j][1].end;break}K=!0}for(_(o),N=D;N<i.events.length;)i.events[N][1].end={...ae},N++;wn(i.events,j+1,0,i.events.slice(D)),i.events.length=N}}function _(B){let $=a.length;for(;$-- >B;){const G=a[$];i.containerState=G[1],G[0].exit.call(i,n)}a.length=B}function q(){s.write([null]),c=void 0,s=void 0,i.containerState._closeFlow=void 0}}function px(n,i,a){return tt(n,n.attempt(this.parser.constructs.document,i,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Nm(n){if(n===null||Lt(n)||cx(n))return 1;if(ux(n))return 2}function au(n,i,a){const o=[];let s=-1;for(;++s<n.length;){const c=n[s].resolveAll;c&&!o.includes(c)&&(i=c(i,a),o.push(c))}return i}const ou={name:"attention",resolveAll:gx,tokenize:yx};function gx(n,i){let a=-1,o,s,c,f,h,p,m,g;for(;++a<n.length;)if(n[a][0]==="enter"&&n[a][1].type==="attentionSequence"&&n[a][1]._close){for(o=a;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&i.sliceSerialize(n[o][1]).charCodeAt(0)===i.sliceSerialize(n[a][1]).charCodeAt(0)){if((n[o][1]._close||n[a][1]._open)&&(n[a][1].end.offset-n[a][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[a][1].end.offset-n[a][1].start.offset)%3))continue;p=n[o][1].end.offset-n[o][1].start.offset>1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1;const y={...n[o][1].end},S={...n[a][1].start};Rm(y,-p),Rm(S,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...n[o][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:S},c={type:p>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[a][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},n[o][1].end={...f.start},n[a][1].start={...h.end},m=[],n[o][1].end.offset-n[o][1].start.offset&&(m=an(m,[["enter",n[o][1],i],["exit",n[o][1],i]])),m=an(m,[["enter",s,i],["enter",f,i],["exit",f,i],["enter",c,i]]),m=an(m,au(i.parser.constructs.insideSpan.null,n.slice(o+1,a),i)),m=an(m,[["exit",c,i],["enter",h,i],["exit",h,i],["exit",s,i]]),n[a][1].end.offset-n[a][1].start.offset?(g=2,m=an(m,[["enter",n[a][1],i],["exit",n[a][1],i]])):g=0,wn(n,o-1,a-o+3,m),a=o+m.length-g-2;break}}for(a=-1;++a<n.length;)n[a][1].type==="attentionSequence"&&(n[a][1].type="data");return n}function yx(n,i){const a=this.parser.constructs.attentionMarkers.null,o=this.previous,s=Nm(o);let c;return f;function f(p){return c=p,n.enter("attentionSequence"),h(p)}function h(p){if(p===c)return n.consume(p),h;const m=n.exit("attentionSequence"),g=Nm(p),y=!g||g===2&&s||a.includes(p),S=!s||s===2&&g||a.includes(o);return m._open=!!(c===42?y:y&&(s||!S)),m._close=!!(c===42?S:S&&(g||!y)),i(p)}}function Rm(n,i){n.column+=i,n.offset+=i,n._bufferIndex+=i}const vx={name:"autolink",tokenize:bx};function bx(n,i,a){let o=0;return s;function s(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),c}function c(b){return _n(b)?(n.consume(b),f):b===64?a(b):m(b)}function f(b){return b===43||b===45||b===46||Kt(b)?(o=1,h(b)):m(b)}function h(b){return b===58?(n.consume(b),o=0,p):(b===43||b===45||b===46||Kt(b))&&o++<32?(n.consume(b),h):(o=0,m(b))}function p(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),i):b===null||b===32||b===60||ru(b)?a(b):(n.consume(b),p)}function m(b){return b===64?(n.consume(b),g):ax(b)?(n.consume(b),m):a(b)}function g(b){return Kt(b)?y(b):a(b)}function y(b){return b===46?(n.consume(b),o=0,g):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),i):S(b)}function S(b){if((b===45||Kt(b))&&o++<63){const M=b===45?S:y;return n.consume(b),M}return a(b)}}const Ua={partial:!0,tokenize:Sx};function Sx(n,i,a){return o;function o(c){return Ve(c)?tt(n,s,"linePrefix")(c):s(c)}function s(c){return c===null||xe(c)?i(c):a(c)}}const Om={continuation:{tokenize:xx},exit:Tx,name:"blockQuote",tokenize:Ex};function Ex(n,i,a){const o=this;return s;function s(f){if(f===62){const h=o.containerState;return h.open||(n.enter("blockQuote",{_container:!0}),h.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),c}return a(f)}function c(f){return Ve(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),i):(n.exit("blockQuotePrefix"),i(f))}}function xx(n,i,a){const o=this;return s;function s(f){return Ve(f)?tt(n,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return n.attempt(Om,i,a)(f)}}function Tx(n){n.exit("blockQuote")}const km={name:"characterEscape",tokenize:Cx};function Cx(n,i,a){return o;function o(c){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(c),n.exit("escapeMarker"),s}function s(c){return sx(c)?(n.enter("characterEscapeValue"),n.consume(c),n.exit("characterEscapeValue"),n.exit("characterEscape"),i):a(c)}}const Mm={name:"characterReference",tokenize:wx};function wx(n,i,a){const o=this;let s=0,c,f;return h;function h(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),p}function p(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),m):(n.enter("characterReferenceValue"),c=31,f=Kt,g(y))}function m(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),c=6,f=ox,g):(n.enter("characterReferenceValue"),c=7,f=iu,g(y))}function g(y){if(y===59&&s){const S=n.exit("characterReferenceValue");return f===Kt&&!lu(o.sliceSerialize(S))?a(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),i)}return f(y)&&s++<c?(n.consume(y),g):a(y)}}const zm={partial:!0,tokenize:Ax},Dm={concrete:!0,name:"codeFenced",tokenize:_x};function _x(n,i,a){const o=this,s={partial:!0,tokenize:G};let c=0,f=0,h;return p;function p(N){return m(N)}function m(N){const D=o.events[o.events.length-1];return c=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,h=N,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(N)}function g(N){return N===h?(f++,n.consume(N),g):f<3?a(N):(n.exit("codeFencedFenceSequence"),Ve(N)?tt(n,y,"whitespace")(N):y(N))}function y(N){return N===null||xe(N)?(n.exit("codeFencedFence"),o.interrupt?i(N):n.check(zm,O,$)(N)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),S(N))}function S(N){return N===null||xe(N)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(N)):Ve(N)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),tt(n,b,"whitespace")(N)):N===96&&N===h?a(N):(n.consume(N),S)}function b(N){return N===null||xe(N)?y(N):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),M(N))}function M(N){return N===null||xe(N)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(N)):N===96&&N===h?a(N):(n.consume(N),M)}function O(N){return n.attempt(s,$,z)(N)}function z(N){return n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),_}function _(N){return c>0&&Ve(N)?tt(n,q,"linePrefix",c+1)(N):q(N)}function q(N){return N===null||xe(N)?n.check(zm,O,$)(N):(n.enter("codeFlowValue"),B(N))}function B(N){return N===null||xe(N)?(n.exit("codeFlowValue"),q(N)):(n.consume(N),B)}function $(N){return n.exit("codeFenced"),i(N)}function G(N,D,j){let K=0;return ae;function ae(ee){return N.enter("lineEnding"),N.consume(ee),N.exit("lineEnding"),le}function le(ee){return N.enter("codeFencedFence"),Ve(ee)?tt(N,oe,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):oe(ee)}function oe(ee){return ee===h?(N.enter("codeFencedFenceSequence"),_e(ee)):j(ee)}function _e(ee){return ee===h?(K++,N.consume(ee),_e):K>=f?(N.exit("codeFencedFenceSequence"),Ve(ee)?tt(N,ue,"whitespace")(ee):ue(ee)):j(ee)}function ue(ee){return ee===null||xe(ee)?(N.exit("codeFencedFence"),D(ee)):j(ee)}}}function Ax(n,i,a){const o=this;return s;function s(f){return f===null?a(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c)}function c(f){return o.parser.lazy[o.now().line]?a(f):i(f)}}const su={name:"codeIndented",tokenize:Rx},Nx={partial:!0,tokenize:Ox};function Rx(n,i,a){const o=this;return s;function s(m){return n.enter("codeIndented"),tt(n,c,"linePrefix",5)(m)}function c(m){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?f(m):a(m)}function f(m){return m===null?p(m):xe(m)?n.attempt(Nx,f,p)(m):(n.enter("codeFlowValue"),h(m))}function h(m){return m===null||xe(m)?(n.exit("codeFlowValue"),f(m)):(n.consume(m),h)}function p(m){return n.exit("codeIndented"),i(m)}}function Ox(n,i,a){const o=this;return s;function s(f){return o.parser.lazy[o.now().line]?a(f):xe(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):tt(n,c,"linePrefix",5)(f)}function c(f){const h=o.events[o.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(f):xe(f)?s(f):a(f)}}const kx={name:"codeText",previous:zx,resolve:Mx,tokenize:Dx};function Mx(n){let i=n.length-4,a=3,o,s;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[i][1].type==="lineEnding"||n[i][1].type==="space")){for(o=a;++o<i;)if(n[o][1].type==="codeTextData"){n[a][1].type="codeTextPadding",n[i][1].type="codeTextPadding",a+=2,i-=2;break}}for(o=a-1,i++;++o<=i;)s===void 0?o!==i&&n[o][1].type!=="lineEnding"&&(s=o):(o===i||n[o][1].type==="lineEnding")&&(n[s][1].type="codeTextData",o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),i-=o-s-2,o=s+2),s=void 0);return n}function zx(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Dx(n,i,a){let o=0,s,c;return f;function f(y){return n.enter("codeText"),n.enter("codeTextSequence"),h(y)}function h(y){return y===96?(n.consume(y),o++,h):(n.exit("codeTextSequence"),p(y))}function p(y){return y===null?a(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),p):y===96?(c=n.enter("codeTextSequence"),s=0,g(y)):xe(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),p):(n.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||xe(y)?(n.exit("codeTextData"),p(y)):(n.consume(y),m)}function g(y){return y===96?(n.consume(y),s++,g):s===o?(n.exit("codeTextSequence"),n.exit("codeText"),i(y)):(c.type="codeTextData",m(y))}}class jx{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,a){const o=a??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(i,o):i>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(i,a,o){const s=a||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return o&&Oi(this.left,o),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Oi(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Oi(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const a=this.left.splice(i,Number.POSITIVE_INFINITY);Oi(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Oi(this.left,a.reverse())}}}function Oi(n,i){let a=0;if(i.length<1e4)n.push(...i);else for(;a<i.length;)n.push(...i.slice(a,a+1e4)),a+=1e4}function jm(n){const i={};let a=-1,o,s,c,f,h,p,m;const g=new jx(n);for(;++a<g.length;){for(;a in i;)a=i[a];if(o=g.get(a),a&&o[1].type==="chunkFlow"&&g.get(a-1)[1].type==="listItemPrefix"&&(p=o[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(o[0]==="enter")o[1].contentType&&(Object.assign(i,Lx(g,a)),a=i[a],m=!0);else if(o[1]._container){for(c=a,s=void 0;c--;)if(f=g.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(o[1].end={...g.get(s)[1].start},h=g.slice(s,a),h.unshift(o),g.splice(s,a-s+1,h))}}return wn(n,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function Lx(n,i){const a=n.get(i)[1],o=n.get(i)[2];let s=i-1;const c=[];let f=a._tokenizer;f||(f=o.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let g,y,S=-1,b=a,M=0,O=0;const z=[O];for(;b;){for(;n.get(++s)[1]!==b;);c.push(s),b._tokenizer||(g=o.sliceStream(b),b.next||g.push(null),y&&f.defineSkip(b.start),b._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(g),b._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=a;++S<h.length;)h[S][0]==="exit"&&h[S-1][0]==="enter"&&h[S][1].type===h[S-1][1].type&&h[S][1].start.line!==h[S][1].end.line&&(O=S+1,z.push(O),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(f.events=[],b?(b._tokenizer=void 0,b.previous=void 0):z.pop(),S=z.length;S--;){const _=h.slice(z[S],z[S+1]),q=c.pop();p.push([q,q+_.length-1]),n.splice(q,2,_)}for(p.reverse(),S=-1;++S<p.length;)m[M+p[S][0]]=M+p[S][1],M+=p[S][1]-p[S][0]-1;return m}const Ux={resolve:Ix,tokenize:Hx},Bx={partial:!0,tokenize:qx};function Ix(n){return jm(n),n}function Hx(n,i){let a;return o;function o(h){return n.enter("content"),a=n.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?c(h):xe(h)?n.check(Bx,f,c)(h):(n.consume(h),s)}function c(h){return n.exit("chunkContent"),n.exit("content"),i(h)}function f(h){return n.consume(h),n.exit("chunkContent"),a.next=n.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,s}}function qx(n,i,a){const o=this;return s;function s(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),tt(n,c,"linePrefix")}function c(f){if(f===null||xe(f))return a(f);const h=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?i(f):n.interrupt(o.parser.constructs.flow,a,i)(f)}}function Lm(n,i,a,o,s,c,f,h,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(_){return _===60?(n.enter(o),n.enter(s),n.enter(c),n.consume(_),n.exit(c),S):_===null||_===32||_===41||ru(_)?a(_):(n.enter(o),n.enter(f),n.enter(h),n.enter("chunkString",{contentType:"string"}),O(_))}function S(_){return _===62?(n.enter(c),n.consume(_),n.exit(c),n.exit(s),n.exit(o),i):(n.enter(h),n.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===62?(n.exit("chunkString"),n.exit(h),S(_)):_===null||_===60||xe(_)?a(_):(n.consume(_),_===92?M:b)}function M(_){return _===60||_===62||_===92?(n.consume(_),b):b(_)}function O(_){return!g&&(_===null||_===41||Lt(_))?(n.exit("chunkString"),n.exit(h),n.exit(f),n.exit(o),i(_)):g<m&&_===40?(n.consume(_),g++,O):_===41?(n.consume(_),g--,O):_===null||_===32||_===40||ru(_)?a(_):(n.consume(_),_===92?z:O)}function z(_){return _===40||_===41||_===92?(n.consume(_),O):O(_)}}function Um(n,i,a,o,s,c){const f=this;let h=0,p;return m;function m(b){return n.enter(o),n.enter(s),n.consume(b),n.exit(s),n.enter(c),g}function g(b){return h>999||b===null||b===91||b===93&&!p||b===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?a(b):b===93?(n.exit(c),n.enter(s),n.consume(b),n.exit(s),n.exit(o),i):xe(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),g):(n.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||xe(b)||h++>999?(n.exit("chunkString"),g(b)):(n.consume(b),p||(p=!Ve(b)),b===92?S:y)}function S(b){return b===91||b===92||b===93?(n.consume(b),h++,y):y(b)}}function Bm(n,i,a,o,s,c){let f;return h;function h(S){return S===34||S===39||S===40?(n.enter(o),n.enter(s),n.consume(S),n.exit(s),f=S===40?41:S,p):a(S)}function p(S){return S===f?(n.enter(s),n.consume(S),n.exit(s),n.exit(o),i):(n.enter(c),m(S))}function m(S){return S===f?(n.exit(c),p(f)):S===null?a(S):xe(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),tt(n,m,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===f||S===null||xe(S)?(n.exit("chunkString"),m(S)):(n.consume(S),S===92?y:g)}function y(S){return S===f||S===92?(n.consume(S),g):g(S)}}function ki(n,i){let a;return o;function o(s){return xe(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),a=!0,o):Ve(s)?tt(n,o,a?"linePrefix":"lineSuffix")(s):i(s)}}const Yx={name:"definition",tokenize:Gx},Vx={partial:!0,tokenize:Px};function Gx(n,i,a){const o=this;let s;return c;function c(b){return n.enter("definition"),f(b)}function f(b){return Um.call(o,n,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return s=gr(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),p):a(b)}function p(b){return Lt(b)?ki(n,m)(b):m(b)}function m(b){return Lm(n,g,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return n.attempt(Vx,y,y)(b)}function y(b){return Ve(b)?tt(n,S,"whitespace")(b):S(b)}function S(b){return b===null||xe(b)?(n.exit("definition"),o.parser.defined.push(s),i(b)):a(b)}}function Px(n,i,a){return o;function o(h){return Lt(h)?ki(n,s)(h):a(h)}function s(h){return Bm(n,c,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function c(h){return Ve(h)?tt(n,f,"whitespace")(h):f(h)}function f(h){return h===null||xe(h)?i(h):a(h)}}const Fx={name:"hardBreakEscape",tokenize:Xx};function Xx(n,i,a){return o;function o(c){return n.enter("hardBreakEscape"),n.consume(c),s}function s(c){return xe(c)?(n.exit("hardBreakEscape"),i(c)):a(c)}}const Kx={name:"headingAtx",resolve:Qx,tokenize:Zx};function Qx(n,i){let a=n.length-2,o=3,s,c;return n[o][1].type==="whitespace"&&(o+=2),a-2>o&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(o===a-1||a-4>o&&n[a-2][1].type==="whitespace")&&(a-=o+1===a?2:4),a>o&&(s={type:"atxHeadingText",start:n[o][1].start,end:n[a][1].end},c={type:"chunkText",start:n[o][1].start,end:n[a][1].end,contentType:"text"},wn(n,o,a-o+1,[["enter",s,i],["enter",c,i],["exit",c,i],["exit",s,i]])),n}function Zx(n,i,a){let o=0;return s;function s(g){return n.enter("atxHeading"),c(g)}function c(g){return n.enter("atxHeadingSequence"),f(g)}function f(g){return g===35&&o++<6?(n.consume(g),f):g===null||Lt(g)?(n.exit("atxHeadingSequence"),h(g)):a(g)}function h(g){return g===35?(n.enter("atxHeadingSequence"),p(g)):g===null||xe(g)?(n.exit("atxHeading"),i(g)):Ve(g)?tt(n,h,"whitespace")(g):(n.enter("atxHeadingText"),m(g))}function p(g){return g===35?(n.consume(g),p):(n.exit("atxHeadingSequence"),h(g))}function m(g){return g===null||g===35||Lt(g)?(n.exit("atxHeadingText"),h(g)):(n.consume(g),m)}}const Jx=["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"],Im=["pre","script","style","textarea"],Wx={concrete:!0,name:"htmlFlow",resolveTo:t1,tokenize:n1},$x={partial:!0,tokenize:r1},e1={partial:!0,tokenize:l1};function t1(n){let i=n.length;for(;i--&&!(n[i][0]==="enter"&&n[i][1].type==="htmlFlow"););return i>1&&n[i-2][1].type==="linePrefix"&&(n[i][1].start=n[i-2][1].start,n[i+1][1].start=n[i-2][1].start,n.splice(i-2,2)),n}function n1(n,i,a){const o=this;let s,c,f,h,p;return m;function m(T){return g(T)}function g(T){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(T),y}function y(T){return T===33?(n.consume(T),S):T===47?(n.consume(T),c=!0,O):T===63?(n.consume(T),s=3,o.interrupt?i:C):_n(T)?(n.consume(T),f=String.fromCharCode(T),z):a(T)}function S(T){return T===45?(n.consume(T),s=2,b):T===91?(n.consume(T),s=5,h=0,M):_n(T)?(n.consume(T),s=4,o.interrupt?i:C):a(T)}function b(T){return T===45?(n.consume(T),o.interrupt?i:C):a(T)}function M(T){const te="CDATA[";return T===te.charCodeAt(h++)?(n.consume(T),h===te.length?o.interrupt?i:oe:M):a(T)}function O(T){return _n(T)?(n.consume(T),f=String.fromCharCode(T),z):a(T)}function z(T){if(T===null||T===47||T===62||Lt(T)){const te=T===47,ce=f.toLowerCase();return!te&&!c&&Im.includes(ce)?(s=1,o.interrupt?i(T):oe(T)):Jx.includes(f.toLowerCase())?(s=6,te?(n.consume(T),_):o.interrupt?i(T):oe(T)):(s=7,o.interrupt&&!o.parser.lazy[o.now().line]?a(T):c?q(T):B(T))}return T===45||Kt(T)?(n.consume(T),f+=String.fromCharCode(T),z):a(T)}function _(T){return T===62?(n.consume(T),o.interrupt?i:oe):a(T)}function q(T){return Ve(T)?(n.consume(T),q):ae(T)}function B(T){return T===47?(n.consume(T),ae):T===58||T===95||_n(T)?(n.consume(T),$):Ve(T)?(n.consume(T),B):ae(T)}function $(T){return T===45||T===46||T===58||T===95||Kt(T)?(n.consume(T),$):G(T)}function G(T){return T===61?(n.consume(T),N):Ve(T)?(n.consume(T),G):B(T)}function N(T){return T===null||T===60||T===61||T===62||T===96?a(T):T===34||T===39?(n.consume(T),p=T,D):Ve(T)?(n.consume(T),N):j(T)}function D(T){return T===p?(n.consume(T),p=null,K):T===null||xe(T)?a(T):(n.consume(T),D)}function j(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Lt(T)?G(T):(n.consume(T),j)}function K(T){return T===47||T===62||Ve(T)?B(T):a(T)}function ae(T){return T===62?(n.consume(T),le):a(T)}function le(T){return T===null||xe(T)?oe(T):Ve(T)?(n.consume(T),le):a(T)}function oe(T){return T===45&&s===2?(n.consume(T),U):T===60&&s===1?(n.consume(T),W):T===62&&s===4?(n.consume(T),A):T===63&&s===3?(n.consume(T),C):T===93&&s===5?(n.consume(T),ne):xe(T)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check($x,V,_e)(T)):T===null||xe(T)?(n.exit("htmlFlowData"),_e(T)):(n.consume(T),oe)}function _e(T){return n.check(e1,ue,V)(T)}function ue(T){return n.enter("lineEnding"),n.consume(T),n.exit("lineEnding"),ee}function ee(T){return T===null||xe(T)?_e(T):(n.enter("htmlFlowData"),oe(T))}function U(T){return T===45?(n.consume(T),C):oe(T)}function W(T){return T===47?(n.consume(T),f="",Z):oe(T)}function Z(T){if(T===62){const te=f.toLowerCase();return Im.includes(te)?(n.consume(T),A):oe(T)}return _n(T)&&f.length<8?(n.consume(T),f+=String.fromCharCode(T),Z):oe(T)}function ne(T){return T===93?(n.consume(T),C):oe(T)}function C(T){return T===62?(n.consume(T),A):T===45&&s===2?(n.consume(T),C):oe(T)}function A(T){return T===null||xe(T)?(n.exit("htmlFlowData"),V(T)):(n.consume(T),A)}function V(T){return n.exit("htmlFlow"),i(T)}}function l1(n,i,a){const o=this;return s;function s(f){return xe(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),c):a(f)}function c(f){return o.parser.lazy[o.now().line]?a(f):i(f)}}function r1(n,i,a){return o;function o(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(Ua,i,a)}}const i1={name:"htmlText",tokenize:a1};function a1(n,i,a){const o=this;let s,c,f;return h;function h(C){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(C),p}function p(C){return C===33?(n.consume(C),m):C===47?(n.consume(C),G):C===63?(n.consume(C),B):_n(C)?(n.consume(C),j):a(C)}function m(C){return C===45?(n.consume(C),g):C===91?(n.consume(C),c=0,M):_n(C)?(n.consume(C),q):a(C)}function g(C){return C===45?(n.consume(C),b):a(C)}function y(C){return C===null?a(C):C===45?(n.consume(C),S):xe(C)?(f=y,W(C)):(n.consume(C),y)}function S(C){return C===45?(n.consume(C),b):y(C)}function b(C){return C===62?U(C):C===45?S(C):y(C)}function M(C){const A="CDATA[";return C===A.charCodeAt(c++)?(n.consume(C),c===A.length?O:M):a(C)}function O(C){return C===null?a(C):C===93?(n.consume(C),z):xe(C)?(f=O,W(C)):(n.consume(C),O)}function z(C){return C===93?(n.consume(C),_):O(C)}function _(C){return C===62?U(C):C===93?(n.consume(C),_):O(C)}function q(C){return C===null||C===62?U(C):xe(C)?(f=q,W(C)):(n.consume(C),q)}function B(C){return C===null?a(C):C===63?(n.consume(C),$):xe(C)?(f=B,W(C)):(n.consume(C),B)}function $(C){return C===62?U(C):B(C)}function G(C){return _n(C)?(n.consume(C),N):a(C)}function N(C){return C===45||Kt(C)?(n.consume(C),N):D(C)}function D(C){return xe(C)?(f=D,W(C)):Ve(C)?(n.consume(C),D):U(C)}function j(C){return C===45||Kt(C)?(n.consume(C),j):C===47||C===62||Lt(C)?K(C):a(C)}function K(C){return C===47?(n.consume(C),U):C===58||C===95||_n(C)?(n.consume(C),ae):xe(C)?(f=K,W(C)):Ve(C)?(n.consume(C),K):U(C)}function ae(C){return C===45||C===46||C===58||C===95||Kt(C)?(n.consume(C),ae):le(C)}function le(C){return C===61?(n.consume(C),oe):xe(C)?(f=le,W(C)):Ve(C)?(n.consume(C),le):K(C)}function oe(C){return C===null||C===60||C===61||C===62||C===96?a(C):C===34||C===39?(n.consume(C),s=C,_e):xe(C)?(f=oe,W(C)):Ve(C)?(n.consume(C),oe):(n.consume(C),ue)}function _e(C){return C===s?(n.consume(C),s=void 0,ee):C===null?a(C):xe(C)?(f=_e,W(C)):(n.consume(C),_e)}function ue(C){return C===null||C===34||C===39||C===60||C===61||C===96?a(C):C===47||C===62||Lt(C)?K(C):(n.consume(C),ue)}function ee(C){return C===47||C===62||Lt(C)?K(C):a(C)}function U(C){return C===62?(n.consume(C),n.exit("htmlTextData"),n.exit("htmlText"),i):a(C)}function W(C){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),Z}function Z(C){return Ve(C)?tt(n,ne,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ne(C)}function ne(C){return n.enter("htmlTextData"),f(C)}}const uu={name:"labelEnd",resolveAll:c1,resolveTo:f1,tokenize:d1},o1={tokenize:h1},s1={tokenize:m1},u1={tokenize:p1};function c1(n){let i=-1;const a=[];for(;++i<n.length;){const o=n[i][1];if(a.push(n[i]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const s=o.type==="labelImage"?4:2;o.type="data",i+=s}}return n.length!==a.length&&wn(n,0,n.length,a),n}function f1(n,i){let a=n.length,o=0,s,c,f,h;for(;a--;)if(s=n[a][1],c){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;n[a][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(n[a][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(c=a,s.type!=="labelLink")){o=2;break}}else s.type==="labelEnd"&&(f=a);const p={type:n[c][1].type==="labelLink"?"link":"image",start:{...n[c][1].start},end:{...n[n.length-1][1].end}},m={type:"label",start:{...n[c][1].start},end:{...n[f][1].end}},g={type:"labelText",start:{...n[c+o+2][1].end},end:{...n[f-2][1].start}};return h=[["enter",p,i],["enter",m,i]],h=an(h,n.slice(c+1,c+o+3)),h=an(h,[["enter",g,i]]),h=an(h,au(i.parser.constructs.insideSpan.null,n.slice(c+o+4,f-3),i)),h=an(h,[["exit",g,i],n[f-2],n[f-1],["exit",m,i]]),h=an(h,n.slice(f+1)),h=an(h,[["exit",p,i]]),wn(n,c,n.length,h),n}function d1(n,i,a){const o=this;let s=o.events.length,c,f;for(;s--;)if((o.events[s][1].type==="labelImage"||o.events[s][1].type==="labelLink")&&!o.events[s][1]._balanced){c=o.events[s][1];break}return h;function h(S){return c?c._inactive?y(S):(f=o.parser.defined.includes(gr(o.sliceSerialize({start:c.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(S),n.exit("labelMarker"),n.exit("labelEnd"),p):a(S)}function p(S){return S===40?n.attempt(o1,g,f?g:y)(S):S===91?n.attempt(s1,g,f?m:y)(S):f?g(S):y(S)}function m(S){return n.attempt(u1,g,y)(S)}function g(S){return i(S)}function y(S){return c._balanced=!0,a(S)}}function h1(n,i,a){return o;function o(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),s}function s(y){return Lt(y)?ki(n,c)(y):c(y)}function c(y){return y===41?g(y):Lm(n,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return Lt(y)?ki(n,p)(y):g(y)}function h(y){return a(y)}function p(y){return y===34||y===39||y===40?Bm(n,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return Lt(y)?ki(n,g)(y):g(y)}function g(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),i):a(y)}}function m1(n,i,a){const o=this;return s;function s(h){return Um.call(o,n,c,f,"reference","referenceMarker","referenceString")(h)}function c(h){return o.parser.defined.includes(gr(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?i(h):a(h)}function f(h){return a(h)}}function p1(n,i,a){return o;function o(c){return n.enter("reference"),n.enter("referenceMarker"),n.consume(c),n.exit("referenceMarker"),s}function s(c){return c===93?(n.enter("referenceMarker"),n.consume(c),n.exit("referenceMarker"),n.exit("reference"),i):a(c)}}const g1={name:"labelStartImage",resolveAll:uu.resolveAll,tokenize:y1};function y1(n,i,a){const o=this;return s;function s(h){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(h),n.exit("labelImageMarker"),c}function c(h){return h===91?(n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),n.exit("labelImage"),f):a(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in o.parser.constructs?a(h):i(h)}}const v1={name:"labelStartLink",resolveAll:uu.resolveAll,tokenize:b1};function b1(n,i,a){const o=this;return s;function s(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?a(f):i(f)}}const cu={name:"lineEnding",tokenize:S1};function S1(n,i){return a;function a(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),tt(n,i,"linePrefix")}}const Ba={name:"thematicBreak",tokenize:E1};function E1(n,i,a){let o=0,s;return c;function c(m){return n.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(n.enter("thematicBreakSequence"),p(m)):o>=3&&(m===null||xe(m))?(n.exit("thematicBreak"),i(m)):a(m)}function p(m){return m===s?(n.consume(m),o++,p):(n.exit("thematicBreakSequence"),Ve(m)?tt(n,h,"whitespace")(m):h(m))}}const Ut={continuation:{tokenize:w1},exit:A1,name:"list",tokenize:C1},x1={partial:!0,tokenize:N1},T1={partial:!0,tokenize:_1};function C1(n,i,a){const o=this,s=o.events[o.events.length-1];let c=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(b){const M=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(M==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:iu(b)){if(o.containerState.type||(o.containerState.type=M,n.enter(M,{_container:!0})),M==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(Ba,a,m)(b):m(b);if(!o.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(b)}return a(b)}function p(b){return iu(b)&&++f<10?(n.consume(b),p):(!o.interrupt||f<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),m(b)):a(b)}function m(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,n.check(Ua,o.interrupt?a:g,n.attempt(x1,S,y))}function g(b){return o.containerState.initialBlankLine=!0,c++,S(b)}function y(b){return Ve(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),S):a(b)}function S(b){return o.containerState.size=c+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,i(b)}}function w1(n,i,a){const o=this;return o.containerState._closeFlow=void 0,n.check(Ua,s,c);function s(h){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,tt(n,i,"listItemIndent",o.containerState.size+1)(h)}function c(h){return o.containerState.furtherBlankLines||!Ve(h)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(h)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(T1,i,f)(h))}function f(h){return o.containerState._closeFlow=!0,o.interrupt=void 0,tt(n,n.attempt(Ut,i,a),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function _1(n,i,a){const o=this;return tt(n,s,"listItemIndent",o.containerState.size+1);function s(c){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?i(c):a(c)}}function A1(n){n.exit(this.containerState.type)}function N1(n,i,a){const o=this;return tt(n,s,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(c){const f=o.events[o.events.length-1];return!Ve(c)&&f&&f[1].type==="listItemPrefixWhitespace"?i(c):a(c)}}const Hm={name:"setextUnderline",resolveTo:R1,tokenize:O1};function R1(n,i){let a=n.length,o,s,c;for(;a--;)if(n[a][0]==="enter"){if(n[a][1].type==="content"){o=a;break}n[a][1].type==="paragraph"&&(s=a)}else n[a][1].type==="content"&&n.splice(a,1),!c&&n[a][1].type==="definition"&&(c=a);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[s][1].type="setextHeadingText",c?(n.splice(s,0,["enter",f,i]),n.splice(c+1,0,["exit",n[o][1],i]),n[o][1].end={...n[c][1].end}):n[o][1]=f,n.push(["exit",f,i]),n}function O1(n,i,a){const o=this;let s;return c;function c(m){let g=o.events.length,y;for(;g--;)if(o.events[g][1].type!=="lineEnding"&&o.events[g][1].type!=="linePrefix"&&o.events[g][1].type!=="content"){y=o.events[g][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||y)?(n.enter("setextHeadingLine"),s=m,f(m)):a(m)}function f(m){return n.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(n.consume(m),h):(n.exit("setextHeadingLineSequence"),Ve(m)?tt(n,p,"lineSuffix")(m):p(m))}function p(m){return m===null||xe(m)?(n.exit("setextHeadingLine"),i(m)):a(m)}}const k1={tokenize:M1};function M1(n){const i=this,a=n.attempt(Ua,o,n.attempt(this.parser.constructs.flowInitial,s,tt(n,n.attempt(this.parser.constructs.flow,s,n.attempt(Ux,s)),"linePrefix")));return a;function o(c){if(c===null){n.consume(c);return}return n.enter("lineEndingBlank"),n.consume(c),n.exit("lineEndingBlank"),i.currentConstruct=void 0,a}function s(c){if(c===null){n.consume(c);return}return n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),i.currentConstruct=void 0,a}}const z1={resolveAll:Ym()},D1=qm("string"),j1=qm("text");function qm(n){return{resolveAll:Ym(n==="text"?L1:void 0),tokenize:i};function i(a){const o=this,s=this.parser.constructs[n],c=a.attempt(s,f,h);return f;function f(g){return m(g)?c(g):h(g)}function h(g){if(g===null){a.consume(g);return}return a.enter("data"),a.consume(g),p}function p(g){return m(g)?(a.exit("data"),c(g)):(a.consume(g),p)}function m(g){if(g===null)return!0;const y=s[g];let S=-1;if(y)for(;++S<y.length;){const b=y[S];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function Ym(n){return i;function i(a,o){let s=-1,c;for(;++s<=a.length;)c===void 0?a[s]&&a[s][1].type==="data"&&(c=s,s++):(!a[s]||a[s][1].type!=="data")&&(s!==c+2&&(a[c][1].end=a[s-1][1].end,a.splice(c+2,s-c-2),s=c+2),c=void 0);return n?n(a,o):a}}function L1(n,i){let a=0;for(;++a<=n.length;)if((a===n.length||n[a][1].type==="lineEnding")&&n[a-1][1].type==="data"){const o=n[a-1][1],s=i.sliceStream(o);let c=s.length,f=-1,h=0,p;for(;c--;){const m=s[c];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)p=!0,h++;else if(m!==-1){c++;break}}if(i._contentTypeTextTrailing&&a===n.length&&(h=0),h){const m={type:a===n.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:o.start._bufferIndex+f,_index:o.start._index+c,line:o.end.line,column:o.end.column-h,offset:o.end.offset-h},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):(n.splice(a,0,["enter",m,i],["exit",m,i]),a+=2)}a++}return n}const U1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Yx},disable:{null:[]},document:{42:Ut,43:Ut,45:Ut,48:Ut,49:Ut,50:Ut,51:Ut,52:Ut,53:Ut,54:Ut,55:Ut,56:Ut,57:Ut,62:Om},flow:{35:Kx,42:Ba,45:[Hm,Ba],60:Wx,61:Hm,95:Ba,96:Dm,126:Dm},flowInitial:{[-2]:su,[-1]:su,32:su},insideSpan:{null:[ou,z1]},string:{38:Mm,92:km},text:{[-5]:cu,[-4]:cu,[-3]:cu,33:g1,38:Mm,42:ou,60:[vx,i1],91:v1,92:[Fx,km],93:uu,95:ou,96:kx}},Symbol.toStringTag,{value:"Module"}));function B1(n,i,a){let o={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const s={},c=[];let f=[],h=[];const p={attempt:D(G),check:D(N),consume:q,enter:B,exit:$,interrupt:D(N,{interrupt:!0})},m={code:null,containerState:{},defineSkip:O,events:[],now:M,parser:n,previous:null,sliceSerialize:S,sliceStream:b,write:y};let g=i.tokenize.call(m,p);return i.resolveAll&&c.push(i),m;function y(le){return f=an(f,le),z(),f[f.length-1]!==null?[]:(j(i,0),m.events=au(c,m.events,m),m.events)}function S(le,oe){return H1(b(le),oe)}function b(le){return I1(f,le)}function M(){const{_bufferIndex:le,_index:oe,line:_e,column:ue,offset:ee}=o;return{_bufferIndex:le,_index:oe,line:_e,column:ue,offset:ee}}function O(le){s[le.line]=le.column,ae()}function z(){let le;for(;o._index<f.length;){const oe=f[o._index];if(typeof oe=="string")for(le=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===le&&o._bufferIndex<oe.length;)_(oe.charCodeAt(o._bufferIndex));else _(oe)}}function _(le){g=g(le)}function q(le){xe(le)?(o.line++,o.column=1,o.offset+=le===-3?2:1,ae()):le!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),m.previous=le}function B(le,oe){const _e=oe||{};return _e.type=le,_e.start=M(),m.events.push(["enter",_e,m]),h.push(_e),_e}function $(le){const oe=h.pop();return oe.end=M(),m.events.push(["exit",oe,m]),oe}function G(le,oe){j(le,oe.from)}function N(le,oe){oe.restore()}function D(le,oe){return _e;function _e(ue,ee,U){let W,Z,ne,C;return Array.isArray(ue)?V(ue):"tokenize"in ue?V([ue]):A(ue);function A(ge){return pe;function pe(He){const Oe=He!==null&&ge[He],at=He!==null&&ge.null,vt=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(at)?at:at?[at]:[]];return V(vt)(He)}}function V(ge){return W=ge,Z=0,ge.length===0?U:T(ge[Z])}function T(ge){return pe;function pe(He){return C=K(),ne=ge,ge.partial||(m.currentConstruct=ge),ge.name&&m.parser.constructs.disable.null.includes(ge.name)?ce():ge.tokenize.call(oe?Object.assign(Object.create(m),oe):m,p,te,ce)(He)}}function te(ge){return le(ne,C),ee}function ce(ge){return C.restore(),++Z<W.length?T(W[Z]):U}}}function j(le,oe){le.resolveAll&&!c.includes(le)&&c.push(le),le.resolve&&wn(m.events,oe,m.events.length-oe,le.resolve(m.events.slice(oe),m)),le.resolveTo&&(m.events=le.resolveTo(m.events,m))}function K(){const le=M(),oe=m.previous,_e=m.currentConstruct,ue=m.events.length,ee=Array.from(h);return{from:ue,restore:U};function U(){o=le,m.previous=oe,m.currentConstruct=_e,m.events.length=ue,h=ee,ae()}}function ae(){o.line in s&&o.column<2&&(o.column=s[o.line],o.offset+=s[o.line]-1)}}function I1(n,i){const a=i.start._index,o=i.start._bufferIndex,s=i.end._index,c=i.end._bufferIndex;let f;if(a===s)f=[n[a].slice(o,c)];else{if(f=n.slice(a,s),o>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(o):f.shift()}c>0&&f.push(n[s].slice(0,c))}return f}function H1(n,i){let a=-1;const o=[];let s;for(;++a<n.length;){const c=n[a];let f;if(typeof c=="string")f=c;else switch(c){case-5:{f="\r";break}case-4:{f=`
|
|
44
44
|
`;break}case-3:{f=`\r
|
|
45
|
-
`;break}case-2:{f=i?" ":" ";break}case-1:{if(!i&&s)continue;f=" ";break}default:f=String.fromCharCode(c)}s=c===-2,o.push(f)}return o.join("")}function I1(n){const o={constructs:tx([j1,...(n||{}).extensions||[]]),content:s(ux),defined:[],document:s(fx),flow:s(R1),lazy:{},string:s(M1),text:s(z1)};return o;function s(c){return f;function f(h){return L1(o,c,h)}}}function H1(n){for(;!Dm(n););return n}const Ym=/[\0\t\n\r]/g;function q1(){let n=1,i="",a=!0,o;return s;function s(c,f,h){const p=[];let m,g,y,S,b;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),y=0,i="",a&&(c.charCodeAt(0)===65279&&y++,a=void 0);y<c.length;){if(Ym.lastIndex=y,m=Ym.exec(c),S=m&&m.index!==void 0?m.index:c.length,b=c.charCodeAt(S),!m){i=c.slice(y);break}if(b===10&&y===S&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),y<S&&(p.push(c.slice(y,S)),n+=S-y),b){case 0:{p.push(65533),n++;break}case 9:{for(g=Math.ceil(n/4)*4,p.push(-2);n++<g;)p.push(-1);break}case 10:{p.push(-4),n=1;break}default:o=!0,n=1}y=S+1}return h&&(o&&p.push(-5),i&&p.push(i),p.push(null)),p}}const Y1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function V1(n){return n.replace(Y1,G1)}function G1(n,i,a){if(i)return i;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),c=s===120||s===88;return wm(a.slice(c?2:1),c?16:10)}return nu(a)||n}const Vm={}.hasOwnProperty;function P1(n,i,a){return typeof i!="string"&&(a=i,i=void 0),F1(a)(H1(I1(a).document().write(q1()(n,i,!0))))}function F1(n){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(Ve),autolinkProtocol:K,autolinkEmail:K,atxHeading:c(ue),blockQuote:c(at),characterEscape:K,characterReference:K,codeFenced:c(vt),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(vt,f),codeText:c(Jt,f),codeTextData:K,data:K,codeFlowValue:K,definition:c(cl),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(un),hardBreakEscape:c(se),hardBreakTrailing:c(se),htmlFlow:c(Se,f),htmlFlowData:K,htmlText:c(Se,f),htmlTextData:K,image:c(rt),label:f,link:c(Ve),listItem:c(Je),listItemValue:S,listOrdered:c(Ee,y),listUnordered:c(Ee),paragraph:c(Tt),reference:T,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(ue),strong:c(Yl),thematicBreak:c(It)},exit:{atxHeading:p(),atxHeadingSequence:V,autolink:p(),autolinkEmail:Me,autolinkProtocol:Ie,blockQuote:p(),characterEscapeValue:ae,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:ge,codeFenced:p(U),codeFencedFence:M,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:ae,codeIndented:p(R),codeText:p(ee),codeTextData:ae,data:ae,definition:p(),definitionDestinationString:$,definitionLabelString:D,definitionTitleString:I,emphasis:p(),hardBreakEscape:p(oe),hardBreakTrailing:p(oe),htmlFlow:p(_e),htmlFlowData:ae,htmlText:p(ce),htmlTextData:ae,image:p(W),label:le,labelText:Z,lineEnding:te,link:p(B),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ne,resourceDestinationString:C,resourceTitleString:_,resource:G,setextHeading:p(z),setextHeadingLineSequence:j,setextHeadingText:A,strong:p(),thematicBreak:p()}};Gm(i,(n||{}).mdastExtensions||[]);const a={};return o;function o(F){let ie={type:"root",children:[]};const xe={stack:[ie],tokenStack:[],config:i,enter:h,exit:m,buffer:f,resume:g,data:a},ze=[];let Pe=-1;for(;++Pe<F.length;)if(F[Pe][1].type==="listOrdered"||F[Pe][1].type==="listUnordered")if(F[Pe][0]==="enter")ze.push(Pe);else{const Wt=ze.pop();Pe=s(F,Wt,Pe)}for(Pe=-1;++Pe<F.length;){const Wt=i[F[Pe][0]];Vm.call(Wt,F[Pe][1].type)&&Wt[F[Pe][1].type].call(Object.assign({sliceSerialize:F[Pe][2].sliceSerialize},xe),F[Pe][1])}if(xe.tokenStack.length>0){const Wt=xe.tokenStack[xe.tokenStack.length-1];(Wt[1]||Pm).call(xe,void 0,Wt[0])}for(ie.position={start:sl(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:sl(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<i.transforms.length;)ie=i.transforms[Pe](ie)||ie;return ie}function s(F,ie,xe){let ze=ie-1,Pe=-1,Wt=!1,Bn,Dt,bt,Ht;for(;++ze<=xe;){const We=F[ze];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Pe++:Pe--,Ht=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Bn&&!Ht&&!Pe&&!bt&&(bt=ze),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!Pe&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Pe===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Bn){let fl=ze;for(Dt=void 0;fl--;){const En=F[fl];if(En[1].type==="lineEnding"||En[1].type==="lineEndingBlank"){if(En[0]==="exit")continue;Dt&&(F[Dt][1].type="lineEndingBlank",Wt=!0),En[1].type="lineEnding",Dt=fl}else if(!(En[1].type==="linePrefix"||En[1].type==="blockQuotePrefix"||En[1].type==="blockQuotePrefixWhitespace"||En[1].type==="blockQuoteMarker"||En[1].type==="listItemIndent"))break}bt&&(!Dt||bt<Dt)&&(Bn._spread=!0),Bn.end=Object.assign({},Dt?F[Dt][1].start:We[1].end),F.splice(Dt||ze,0,["exit",Bn,We[2]]),ze++,xe++}if(We[1].type==="listItemPrefix"){const fl={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};Bn=fl,F.splice(ze,0,["enter",fl,We[2]]),ze++,xe++,bt=void 0,Ht=!0}}}return F[ie][1]._spread=Wt,xe}function c(F,ie){return xe;function xe(ze){h.call(this,F(ze),ze),ie&&ie.call(this,ze)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(F,ie,xe){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([ie,xe||void 0]),F.position={start:sl(ie.start),end:void 0}}function p(F){return ie;function ie(xe){F&&F.call(this,xe),m.call(this,xe)}}function m(F,ie){const xe=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==F.type&&(ie?ie.call(this,F,ze[0]):(ze[1]||Pm).call(this,F,ze[0]));else throw new Error("Cannot close `"+F.type+"` ("+Ni({start:F.start,end:F.end})+"): it’s not open");xe.position.end=sl(F.end)}function g(){return $E(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function S(F){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function b(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=F}function k(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=F}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function U(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function R(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.value=F.replace(/(\r?\n|\r)$/g,"")}function D(F){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=yr(this.sliceSerialize(F)).toLowerCase()}function I(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.title=F}function $(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.url=F}function V(F){const ie=this.stack[this.stack.length-1];if(!ie.depth){const xe=this.sliceSerialize(F).length;ie.depth=xe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function j(F){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function K(F){const xe=this.stack[this.stack.length-1].children;let ze=xe[xe.length-1];(!ze||ze.type!=="text")&&(ze=ut(),ze.position={start:sl(F.start),end:void 0},xe.push(ze)),this.stack.push(ze)}function ae(F){const ie=this.stack.pop();ie.value+=this.sliceSerialize(F),ie.position.end=sl(F.end)}function te(F){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ie.children[ie.children.length-1];xe.position.end=sl(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ie.type)&&(K.call(this,F),ae.call(this,F))}function oe(){this.data.atHardBreak=!0}function _e(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.value=F}function ce(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.value=F}function ee(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.value=F}function B(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ie,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function W(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ie,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function Z(F){const ie=this.sliceSerialize(F),xe=this.stack[this.stack.length-2];xe.label=V1(ie),xe.identifier=yr(ie).toLowerCase()}function le(){const F=this.stack[this.stack.length-1],ie=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const ze=F.children;xe.children=ze}else xe.alt=ie}function C(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.url=F}function _(){const F=this.resume(),ie=this.stack[this.stack.length-1];ie.title=F}function G(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ne(F){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=yr(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function fe(F){this.data.characterReferenceType=F.type}function pe(F){const ie=this.sliceSerialize(F),xe=this.data.characterReferenceType;let ze;xe?(ze=wm(ie,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=nu(ie);const Pe=this.stack[this.stack.length-1];Pe.value+=ze}function ge(F){const ie=this.stack.pop();ie.position.end=sl(F.end)}function Ie(F){ae.call(this,F);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(F)}function Me(F){ae.call(this,F);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(F)}function at(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function Jt(){return{type:"inlineCode",value:""}}function cl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function un(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function se(){return{type:"break"}}function Se(){return{type:"html",value:""}}function rt(){return{type:"image",title:null,url:"",alt:null}}function Ve(){return{type:"link",title:null,url:"",children:[]}}function Ee(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Je(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Tt(){return{type:"paragraph",children:[]}}function Yl(){return{type:"strong",children:[]}}function ut(){return{type:"text",value:""}}function It(){return{type:"thematicBreak"}}}function sl(n){return{line:n.line,column:n.column,offset:n.offset}}function Gm(n,i){let a=-1;for(;++a<i.length;){const o=i[a];Array.isArray(o)?Gm(n,o):X1(n,o)}}function X1(n,i){let a;for(a in i)if(Vm.call(i,a))switch(a){case"canContainEols":{const o=i[a];o&&n[a].push(...o);break}case"transforms":{const o=i[a];o&&n[a].push(...o);break}case"enter":case"exit":{const o=i[a];o&&Object.assign(n[a],o);break}}}function Pm(n,i){throw n?new Error("Cannot close `"+n.type+"` ("+Ni({start:n.start,end:n.end})+"): a different token (`"+i.type+"`, "+Ni({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Ni({start:i.start,end:i.end})+") is still open")}function K1(n){const i=this;i.parser=a;function a(o){return P1(o,{...i.data("settings"),...n,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function Q1(n,i){const a={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(i),!0)};return n.patch(i,a),n.applyData(i,a)}function Z1(n,i){const a={type:"element",tagName:"br",properties:{},children:[]};return n.patch(i,a),[n.applyData(i,a),{type:"text",value:`
|
|
46
|
-
`}]}function
|
|
47
|
-
`:"",o={};i.lang&&(o.className=["language-"+i.lang]);let s={type:"element",tagName:"code",properties:o,children:[{type:"text",value:a}]};return i.meta&&(s.data={meta:i.meta}),n.patch(i,s),s=n.applyData(i,s),s={type:"element",tagName:"pre",properties:{},children:[s]},n.patch(i,s),s}function
|
|
45
|
+
`;break}case-2:{f=i?" ":" ";break}case-1:{if(!i&&s)continue;f=" ";break}default:f=String.fromCharCode(c)}s=c===-2,o.push(f)}return o.join("")}function q1(n){const o={constructs:lx([U1,...(n||{}).extensions||[]]),content:s(fx),defined:[],document:s(hx),flow:s(k1),lazy:{},string:s(D1),text:s(j1)};return o;function s(c){return f;function f(h){return B1(o,c,h)}}}function Y1(n){for(;!jm(n););return n}const Vm=/[\0\t\n\r]/g;function V1(){let n=1,i="",a=!0,o;return s;function s(c,f,h){const p=[];let m,g,y,S,b;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),y=0,i="",a&&(c.charCodeAt(0)===65279&&y++,a=void 0);y<c.length;){if(Vm.lastIndex=y,m=Vm.exec(c),S=m&&m.index!==void 0?m.index:c.length,b=c.charCodeAt(S),!m){i=c.slice(y);break}if(b===10&&y===S&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),y<S&&(p.push(c.slice(y,S)),n+=S-y),b){case 0:{p.push(65533),n++;break}case 9:{for(g=Math.ceil(n/4)*4,p.push(-2);n++<g;)p.push(-1);break}case 10:{p.push(-4),n=1;break}default:o=!0,n=1}y=S+1}return h&&(o&&p.push(-5),i&&p.push(i),p.push(null)),p}}const G1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function P1(n){return n.replace(G1,F1)}function F1(n,i,a){if(i)return i;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),c=s===120||s===88;return _m(a.slice(c?2:1),c?16:10)}return lu(a)||n}const Gm={}.hasOwnProperty;function X1(n,i,a){return typeof i!="string"&&(a=i,i=void 0),K1(a)(Y1(q1(a).document().write(V1()(n,i,!0))))}function K1(n){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ve),autolinkProtocol:K,autolinkEmail:K,atxHeading:c(Ln),blockQuote:c(at),characterEscape:K,characterReference:K,codeFenced:c(vt),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(vt,f),codeText:c(Qt,f),codeTextData:K,data:K,codeFlowValue:K,definition:c(cl),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(on),hardBreakEscape:c(Un),hardBreakTrailing:c(Un),htmlFlow:c(fe,f),htmlFlowData:K,htmlText:c(fe,f),htmlTextData:K,image:c(se),label:f,link:c(ve),listItem:c(Me),listItemValue:S,listOrdered:c(Ce,y),listUnordered:c(Ce),paragraph:c(Ge),reference:T,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(Ln),strong:c(dt),thematicBreak:c(br)},exit:{atxHeading:p(),atxHeadingSequence:G,autolink:p(),autolinkEmail:Oe,autolinkProtocol:He,blockQuote:p(),characterEscapeValue:ae,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ge,characterReference:pe,codeFenced:p(z),codeFencedFence:O,codeFencedFenceInfo:b,codeFencedFenceMeta:M,codeFlowValue:ae,codeIndented:p(_),codeText:p(ee),codeTextData:ae,data:ae,definition:p(),definitionDestinationString:$,definitionLabelString:q,definitionTitleString:B,emphasis:p(),hardBreakEscape:p(oe),hardBreakTrailing:p(oe),htmlFlow:p(_e),htmlFlowData:ae,htmlText:p(ue),htmlTextData:ae,image:p(W),label:ne,labelText:Z,lineEnding:le,link:p(U),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:te,resourceDestinationString:C,resourceTitleString:A,resource:V,setextHeading:p(j),setextHeadingLineSequence:D,setextHeadingText:N,strong:p(),thematicBreak:p()}};Pm(i,(n||{}).mdastExtensions||[]);const a={};return o;function o(F){let re={type:"root",children:[]};const Se={stack:[re],tokenStack:[],config:i,enter:h,exit:m,buffer:f,resume:g,data:a},De=[];let Fe=-1;for(;++Fe<F.length;)if(F[Fe][1].type==="listOrdered"||F[Fe][1].type==="listUnordered")if(F[Fe][0]==="enter")De.push(Fe);else{const Zt=De.pop();Fe=s(F,Zt,Fe)}for(Fe=-1;++Fe<F.length;){const Zt=i[F[Fe][0]];Gm.call(Zt,F[Fe][1].type)&&Zt[F[Fe][1].type].call(Object.assign({sliceSerialize:F[Fe][2].sliceSerialize},Se),F[Fe][1])}if(Se.tokenStack.length>0){const Zt=Se.tokenStack[Se.tokenStack.length-1];(Zt[1]||Fm).call(Se,void 0,Zt[0])}for(re.position={start:sl(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:sl(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<i.transforms.length;)re=i.transforms[Fe](re)||re;return re}function s(F,re,Se){let De=re-1,Fe=-1,Zt=!1,Bn,zt,bt,Bt;for(;++De<=Se;){const We=F[De];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Fe++:Fe--,Bt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Bn&&!Bt&&!Fe&&!bt&&(bt=De),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Fe&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Fe===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Bn){let fl=De;for(zt=void 0;fl--;){const bn=F[fl];if(bn[1].type==="lineEnding"||bn[1].type==="lineEndingBlank"){if(bn[0]==="exit")continue;zt&&(F[zt][1].type="lineEndingBlank",Zt=!0),bn[1].type="lineEnding",zt=fl}else if(!(bn[1].type==="linePrefix"||bn[1].type==="blockQuotePrefix"||bn[1].type==="blockQuotePrefixWhitespace"||bn[1].type==="blockQuoteMarker"||bn[1].type==="listItemIndent"))break}bt&&(!zt||bt<zt)&&(Bn._spread=!0),Bn.end=Object.assign({},zt?F[zt][1].start:We[1].end),F.splice(zt||De,0,["exit",Bn,We[2]]),De++,Se++}if(We[1].type==="listItemPrefix"){const fl={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};Bn=fl,F.splice(De,0,["enter",fl,We[2]]),De++,Se++,bt=void 0,Bt=!0}}}return F[re][1]._spread=Zt,Se}function c(F,re){return Se;function Se(De){h.call(this,F(De),De),re&&re.call(this,De)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(F,re,Se){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([re,Se||void 0]),F.position={start:sl(re.start),end:void 0}}function p(F){return re;function re(Se){F&&F.call(this,Se),m.call(this,Se)}}function m(F,re){const Se=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==F.type&&(re?re.call(this,F,De[0]):(De[1]||Fm).call(this,F,De[0]));else throw new Error("Cannot close `"+F.type+"` ("+Ni({start:F.start,end:F.end})+"): it’s not open");Se.position.end=sl(F.end)}function g(){return tx(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function S(F){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function b(){const F=this.resume(),re=this.stack[this.stack.length-1];re.lang=F}function M(){const F=this.resume(),re=this.stack[this.stack.length-1];re.meta=F}function O(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function z(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F.replace(/(\r?\n|\r)$/g,"")}function q(F){const re=this.resume(),Se=this.stack[this.stack.length-1];Se.label=re,Se.identifier=gr(this.sliceSerialize(F)).toLowerCase()}function B(){const F=this.resume(),re=this.stack[this.stack.length-1];re.title=F}function $(){const F=this.resume(),re=this.stack[this.stack.length-1];re.url=F}function G(F){const re=this.stack[this.stack.length-1];if(!re.depth){const Se=this.sliceSerialize(F).length;re.depth=Se}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function D(F){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function K(F){const Se=this.stack[this.stack.length-1].children;let De=Se[Se.length-1];(!De||De.type!=="text")&&(De=nt(),De.position={start:sl(F.start),end:void 0},Se.push(De)),this.stack.push(De)}function ae(F){const re=this.stack.pop();re.value+=this.sliceSerialize(F),re.position.end=sl(F.end)}function le(F){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Se=re.children[re.children.length-1];Se.position.end=sl(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(re.type)&&(K.call(this,F),ae.call(this,F))}function oe(){this.data.atHardBreak=!0}function _e(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function ue(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function ee(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function U(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=re,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function W(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=re,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function Z(F){const re=this.sliceSerialize(F),Se=this.stack[this.stack.length-2];Se.label=P1(re),Se.identifier=gr(re).toLowerCase()}function ne(){const F=this.stack[this.stack.length-1],re=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){const De=F.children;Se.children=De}else Se.alt=re}function C(){const F=this.resume(),re=this.stack[this.stack.length-1];re.url=F}function A(){const F=this.resume(),re=this.stack[this.stack.length-1];re.title=F}function V(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function te(F){const re=this.resume(),Se=this.stack[this.stack.length-1];Se.label=re,Se.identifier=gr(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function ce(F){this.data.characterReferenceType=F.type}function ge(F){const re=this.sliceSerialize(F),Se=this.data.characterReferenceType;let De;Se?(De=_m(re,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=lu(re);const Fe=this.stack[this.stack.length-1];Fe.value+=De}function pe(F){const re=this.stack.pop();re.position.end=sl(F.end)}function He(F){ae.call(this,F);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(F)}function Oe(F){ae.call(this,F);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(F)}function at(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function Qt(){return{type:"inlineCode",value:""}}function cl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function on(){return{type:"emphasis",children:[]}}function Ln(){return{type:"heading",depth:0,children:[]}}function Un(){return{type:"break"}}function fe(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function ve(){return{type:"link",title:null,url:"",children:[]}}function Ce(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Me(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Ge(){return{type:"paragraph",children:[]}}function dt(){return{type:"strong",children:[]}}function nt(){return{type:"text",value:""}}function br(){return{type:"thematicBreak"}}}function sl(n){return{line:n.line,column:n.column,offset:n.offset}}function Pm(n,i){let a=-1;for(;++a<i.length;){const o=i[a];Array.isArray(o)?Pm(n,o):Q1(n,o)}}function Q1(n,i){let a;for(a in i)if(Gm.call(i,a))switch(a){case"canContainEols":{const o=i[a];o&&n[a].push(...o);break}case"transforms":{const o=i[a];o&&n[a].push(...o);break}case"enter":case"exit":{const o=i[a];o&&Object.assign(n[a],o);break}}}function Fm(n,i){throw n?new Error("Cannot close `"+n.type+"` ("+Ni({start:n.start,end:n.end})+"): a different token (`"+i.type+"`, "+Ni({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Ni({start:i.start,end:i.end})+") is still open")}function Z1(n){const i=this;i.parser=a;function a(o){return X1(o,{...i.data("settings"),...n,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function J1(n,i){const a={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(i),!0)};return n.patch(i,a),n.applyData(i,a)}function W1(n,i){const a={type:"element",tagName:"br",properties:{},children:[]};return n.patch(i,a),[n.applyData(i,a),{type:"text",value:`
|
|
46
|
+
`}]}function $1(n,i){const a=i.value?i.value+`
|
|
47
|
+
`:"",o={};i.lang&&(o.className=["language-"+i.lang]);let s={type:"element",tagName:"code",properties:o,children:[{type:"text",value:a}]};return i.meta&&(s.data={meta:i.meta}),n.patch(i,s),s=n.applyData(i,s),s={type:"element",tagName:"pre",properties:{},children:[s]},n.patch(i,s),s}function eT(n,i){const a={type:"element",tagName:"del",properties:{},children:n.all(i)};return n.patch(i,a),n.applyData(i,a)}function tT(n,i){const a={type:"element",tagName:"em",properties:{},children:n.all(i)};return n.patch(i,a),n.applyData(i,a)}function nT(n,i){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(i.identifier).toUpperCase(),s=yr(o.toLowerCase()),c=n.footnoteOrder.indexOf(o);let f,h=n.footnoteCounts.get(o);h===void 0?(h=0,n.footnoteOrder.push(o),f=n.footnoteOrder.length):f=c+1,h+=1,n.footnoteCounts.set(o,h);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(i,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(i,m),n.applyData(i,m)}function lT(n,i){const a={type:"element",tagName:"h"+i.depth,properties:{},children:n.all(i)};return n.patch(i,a),n.applyData(i,a)}function rT(n,i){if(n.options.allowDangerousHtml){const a={type:"raw",value:i.value};return n.patch(i,a),n.applyData(i,a)}}function Xm(n,i){const a=i.referenceType;let o="]";if(a==="collapsed"?o+="[]":a==="full"&&(o+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+o}];const s=n.all(i),c=s[0];c&&c.type==="text"?c.value="["+c.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=o:s.push({type:"text",value:o}),s}function iT(n,i){const a=String(i.identifier).toUpperCase(),o=n.definitionById.get(a);if(!o)return Xm(n,i);const s={src:yr(o.url||""),alt:i.alt};o.title!==null&&o.title!==void 0&&(s.title=o.title);const c={type:"element",tagName:"img",properties:s,children:[]};return n.patch(i,c),n.applyData(i,c)}function aT(n,i){const a={src:yr(i.url)};i.alt!==null&&i.alt!==void 0&&(a.alt=i.alt),i.title!==null&&i.title!==void 0&&(a.title=i.title);const o={type:"element",tagName:"img",properties:a,children:[]};return n.patch(i,o),n.applyData(i,o)}function oT(n,i){const a={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};n.patch(i,a);const o={type:"element",tagName:"code",properties:{},children:[a]};return n.patch(i,o),n.applyData(i,o)}function sT(n,i){const a=String(i.identifier).toUpperCase(),o=n.definitionById.get(a);if(!o)return Xm(n,i);const s={href:yr(o.url||"")};o.title!==null&&o.title!==void 0&&(s.title=o.title);const c={type:"element",tagName:"a",properties:s,children:n.all(i)};return n.patch(i,c),n.applyData(i,c)}function uT(n,i){const a={href:yr(i.url)};i.title!==null&&i.title!==void 0&&(a.title=i.title);const o={type:"element",tagName:"a",properties:a,children:n.all(i)};return n.patch(i,o),n.applyData(i,o)}function cT(n,i,a){const o=n.all(i),s=a?fT(a):Km(i),c={},f=[];if(typeof i.checked=="boolean"){const g=o[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},o.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let h=-1;for(;++h<o.length;){const g=o[h];(s||h!==0||g.type!=="element"||g.tagName!=="p")&&f.push({type:"text",value:`
|
|
48
48
|
`}),g.type==="element"&&g.tagName==="p"&&!s?f.push(...g.children):f.push(g)}const p=o[o.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
|
|
49
|
-
`});const m={type:"element",tagName:"li",properties:c,children:f};return n.patch(i,m),n.applyData(i,m)}function
|
|
49
|
+
`});const m={type:"element",tagName:"li",properties:c,children:f};return n.patch(i,m),n.applyData(i,m)}function fT(n){let i=!1;if(n.type==="list"){i=n.spread||!1;const a=n.children;let o=-1;for(;!i&&++o<a.length;)i=Km(a[o])}return i}function Km(n){const i=n.spread;return i??n.children.length>1}function dT(n,i){const a={},o=n.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(a.start=i.start);++s<o.length;){const f=o[s];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const c={type:"element",tagName:i.ordered?"ol":"ul",properties:a,children:n.wrap(o,!0)};return n.patch(i,c),n.applyData(i,c)}function hT(n,i){const a={type:"element",tagName:"p",properties:{},children:n.all(i)};return n.patch(i,a),n.applyData(i,a)}function mT(n,i){const a={type:"root",children:n.wrap(n.all(i))};return n.patch(i,a),n.applyData(i,a)}function pT(n,i){const a={type:"element",tagName:"strong",properties:{},children:n.all(i)};return n.patch(i,a),n.applyData(i,a)}function gT(n,i){const a=n.all(i),o=a.shift(),s=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(i.children[0],f),s.push(f)}if(a.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(a,!0)},h=Js(i.children[1]),p=mm(i.children[i.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const c={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(i,c),n.applyData(i,c)}function yT(n,i,a){const o=a?a.children:void 0,c=(o?o.indexOf(i):1)===0?"th":"td",f=a&&a.type==="table"?a.align:void 0,h=f?f.length:i.children.length;let p=-1;const m=[];for(;++p<h;){const y=i.children[p],S={},b=f?f[p]:void 0;b&&(S.align=b);let M={type:"element",tagName:c,properties:S,children:[]};y&&(M.children=n.all(y),n.patch(y,M),M=n.applyData(y,M)),m.push(M)}const g={type:"element",tagName:"tr",properties:{},children:n.wrap(m,!0)};return n.patch(i,g),n.applyData(i,g)}function vT(n,i){const a={type:"element",tagName:"td",properties:{},children:n.all(i)};return n.patch(i,a),n.applyData(i,a)}const Qm=9,Zm=32;function bT(n){const i=String(n),a=/\r?\n|\r/g;let o=a.exec(i),s=0;const c=[];for(;o;)c.push(Jm(i.slice(s,o.index),s>0,!0),o[0]),s=o.index+o[0].length,o=a.exec(i);return c.push(Jm(i.slice(s),s>0,!1)),c.join("")}function Jm(n,i,a){let o=0,s=n.length;if(i){let c=n.codePointAt(o);for(;c===Qm||c===Zm;)o++,c=n.codePointAt(o)}if(a){let c=n.codePointAt(s-1);for(;c===Qm||c===Zm;)s--,c=n.codePointAt(s-1)}return s>o?n.slice(o,s):""}function ST(n,i){const a={type:"text",value:bT(String(i.value))};return n.patch(i,a),n.applyData(i,a)}function ET(n,i){const a={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(i,a),n.applyData(i,a)}const xT={blockquote:J1,break:W1,code:$1,delete:eT,emphasis:tT,footnoteReference:nT,heading:lT,html:rT,imageReference:iT,image:aT,inlineCode:oT,linkReference:sT,link:uT,listItem:cT,list:dT,paragraph:hT,root:mT,strong:pT,table:gT,tableCell:vT,tableRow:yT,text:ST,thematicBreak:ET,toml:Ia,yaml:Ia,definition:Ia,footnoteDefinition:Ia};function Ia(){}const Wm=-1,Ha=0,Mi=1,qa=2,fu=3,du=4,hu=5,mu=6,$m=7,ep=8,tp=typeof self=="object"?self:globalThis,TT=(n,i)=>{const a=(s,c)=>(n.set(c,s),s),o=s=>{if(n.has(s))return n.get(s);const[c,f]=i[s];switch(c){case Ha:case Wm:return a(f,s);case Mi:{const h=a([],s);for(const p of f)h.push(o(p));return h}case qa:{const h=a({},s);for(const[p,m]of f)h[o(p)]=o(m);return h}case fu:return a(new Date(f),s);case du:{const{source:h,flags:p}=f;return a(new RegExp(h,p),s)}case hu:{const h=a(new Map,s);for(const[p,m]of f)h.set(o(p),o(m));return h}case mu:{const h=a(new Set,s);for(const p of f)h.add(o(p));return h}case $m:{const{name:h,message:p}=f;return a(new tp[h](p),s)}case ep:return a(BigInt(f),s);case"BigInt":return a(Object(BigInt(f)),s);case"ArrayBuffer":return a(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return a(new DataView(h),f)}}return a(new tp[c](f),s)};return o},np=n=>TT(new Map,n)(0),vr="",{toString:CT}={},{keys:wT}=Object,zi=n=>{const i=typeof n;if(i!=="object"||!n)return[Ha,i];const a=CT.call(n).slice(8,-1);switch(a){case"Array":return[Mi,vr];case"Object":return[qa,vr];case"Date":return[fu,vr];case"RegExp":return[du,vr];case"Map":return[hu,vr];case"Set":return[mu,vr];case"DataView":return[Mi,a]}return a.includes("Array")?[Mi,a]:a.includes("Error")?[$m,a]:[qa,a]},Ya=([n,i])=>n===Ha&&(i==="function"||i==="symbol"),_T=(n,i,a,o)=>{const s=(f,h)=>{const p=o.push(f)-1;return a.set(h,p),p},c=f=>{if(a.has(f))return a.get(f);let[h,p]=zi(f);switch(h){case Ha:{let g=f;switch(p){case"bigint":h=ep,g=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return s([Wm],f)}return s([h,g],f)}case Mi:{if(p){let S=f;return p==="DataView"?S=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(S=new Uint8Array(f)),s([p,[...S]],f)}const g=[],y=s([h,g],f);for(const S of f)g.push(c(S));return y}case qa:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(i&&"toJSON"in f)return c(f.toJSON());const g=[],y=s([h,g],f);for(const S of wT(f))(n||!Ya(zi(f[S])))&&g.push([c(S),c(f[S])]);return y}case fu:return s([h,f.toISOString()],f);case du:{const{source:g,flags:y}=f;return s([h,{source:g,flags:y}],f)}case hu:{const g=[],y=s([h,g],f);for(const[S,b]of f)(n||!(Ya(zi(S))||Ya(zi(b))))&&g.push([c(S),c(b)]);return y}case mu:{const g=[],y=s([h,g],f);for(const S of f)(n||!Ya(zi(S)))&&g.push(c(S));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return c},lp=(n,{json:i,lossy:a}={})=>{const o=[];return _T(!(i||a),!!i,new Map,o)(n),o},Va=typeof structuredClone=="function"?(n,i)=>i&&("json"in i||"lossy"in i)?np(lp(n,i)):structuredClone(n):(n,i)=>np(lp(n,i));function AT(n,i){const a=[{type:"text",value:"↩"}];return i>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),a}function NT(n,i){return"Back to reference "+(n+1)+(i>1?"-"+i:"")}function RT(n){const i=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",a=n.options.footnoteBackContent||AT,o=n.options.footnoteBackLabel||NT,s=n.options.footnoteLabel||"Footnotes",c=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<n.footnoteOrder.length;){const m=n.footnoteById.get(n.footnoteOrder[p]);if(!m)continue;const g=n.all(m),y=String(m.identifier).toUpperCase(),S=yr(y.toLowerCase());let b=0;const M=[],O=n.footnoteCounts.get(y);for(;O!==void 0&&++b<=O;){M.length>0&&M.push({type:"text",value:" "});let q=typeof a=="string"?a:a(p,b);typeof q=="string"&&(q={type:"text",value:q}),M.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+S+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,b),className:["data-footnote-backref"]},children:Array.isArray(q)?q:[q]})}const z=g[g.length-1];if(z&&z.type==="element"&&z.tagName==="p"){const q=z.children[z.children.length-1];q&&q.type==="text"?q.value+=" ":z.children.push({type:"text",value:" "}),z.children.push(...M)}else g.push(...M);const _={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:n.wrap(g,!0)};n.patch(m,_),h.push(_)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...Va(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
50
50
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(h,!0)},{type:"text",value:`
|
|
51
|
-
`}]}}const
|
|
51
|
+
`}]}}const rp=(function(n){if(n==null)return zT;if(typeof n=="function")return Ga(n);if(typeof n=="object")return Array.isArray(n)?OT(n):kT(n);if(typeof n=="string")return MT(n);throw new Error("Expected function, string, or object as test")});function OT(n){const i=[];let a=-1;for(;++a<n.length;)i[a]=rp(n[a]);return Ga(o);function o(...s){let c=-1;for(;++c<i.length;)if(i[c].apply(this,s))return!0;return!1}}function kT(n){const i=n;return Ga(a);function a(o){const s=o;let c;for(c in n)if(s[c]!==i[c])return!1;return!0}}function MT(n){return Ga(i);function i(a){return a&&a.type===n}}function Ga(n){return i;function i(a,o,s){return!!(DT(a)&&n.call(this,a,typeof o=="number"?o:void 0,s||void 0))}}function zT(){return!0}function DT(n){return n!==null&&typeof n=="object"&&"type"in n}function IA(n){return n}const ip=[],jT=!0,ap=!1,LT="skip";function UT(n,i,a,o){let s;typeof i=="function"&&typeof a!="function"?(o=a,a=i):s=i;const c=rp(s),f=o?-1:1;h(n,void 0,[])();function h(p,m,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return S;function S(){let b=ip,M,O,z;if((!i||c(p,m,g[g.length-1]||void 0))&&(b=BT(a(p,g)),b[0]===ap))return b;if("children"in p&&p.children){const _=p;if(_.children&&b[0]!==LT)for(O=(o?_.children.length:-1)+f,z=g.concat(_);O>-1&&O<_.children.length;){const q=_.children[O];if(M=h(q,O,z)(),M[0]===ap)return M;O=typeof M[1]=="number"?M[1]:O+f}}return b}}}function BT(n){return Array.isArray(n)?n:typeof n=="number"?[jT,n]:n==null?ip:[n]}function op(n,i,a,o){let s,c,f;typeof i=="function"&&typeof a!="function"?(c=void 0,f=i,s=a):(c=i,f=a,s=o),UT(n,c,h,s);function h(p,m){const g=m[m.length-1],y=g?g.children.indexOf(p):void 0;return f(p,y,g)}}const pu={}.hasOwnProperty,IT={};function HT(n,i){const a=i||IT,o=new Map,s=new Map,c=new Map,f={...xT,...a.handlers},h={all:m,applyData:YT,definitionById:o,footnoteById:s,footnoteCounts:c,footnoteOrder:[],handlers:f,one:p,options:a,patch:qT,wrap:GT};return op(n,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?o:s,S=String(g.identifier).toUpperCase();y.has(S)||y.set(S,g)}}),h;function p(g,y){const S=g.type,b=h.handlers[S];if(pu.call(h.handlers,S)&&b)return b(h,g,y);if(h.options.passThrough&&h.options.passThrough.includes(S)){if("children"in g){const{children:O,...z}=g,_=Va(z);return _.children=h.all(g),_}return Va(g)}return(h.options.unknownHandler||VT)(h,g,y)}function m(g){const y=[];if("children"in g){const S=g.children;let b=-1;for(;++b<S.length;){const M=h.one(S[b],g);if(M){if(b&&S[b-1].type==="break"&&(!Array.isArray(M)&&M.type==="text"&&(M.value=sp(M.value)),!Array.isArray(M)&&M.type==="element")){const O=M.children[0];O&&O.type==="text"&&(O.value=sp(O.value))}Array.isArray(M)?y.push(...M):y.push(M)}}}return y}}function qT(n,i){n.position&&(i.position=zE(n))}function YT(n,i){let a=i;if(n&&n.data){const o=n.data.hName,s=n.data.hChildren,c=n.data.hProperties;if(typeof o=="string")if(a.type==="element")a.tagName=o;else{const f="children"in a?a.children:[a];a={type:"element",tagName:o,properties:{},children:f}}a.type==="element"&&c&&Object.assign(a.properties,Va(c)),"children"in a&&a.children&&s!==null&&s!==void 0&&(a.children=s)}return a}function VT(n,i){const a=i.data||{},o="value"in i&&!(pu.call(a,"hProperties")||pu.call(a,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:n.all(i)};return n.patch(i,o),n.applyData(i,o)}function GT(n,i){const a=[];let o=-1;for(i&&a.push({type:"text",value:`
|
|
52
52
|
`});++o<n.length;)o&&a.push({type:"text",value:`
|
|
53
53
|
`}),a.push(n[o]);return i&&n.length>0&&a.push({type:"text",value:`
|
|
54
|
-
`}),a}function
|
|
55
|
-
`},s),c}function VT(n,i){return n&&"run"in n?async function(a,o){const s=sp(a,{file:o,...i});await n.run(s,o)}:function(a,o){return sp(a,{file:o,...n||i})}}function up(n){if(n)throw n}var pu,cp;function GT(){if(cp)return pu;cp=1;var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},c=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var g=n.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var S;for(S in m);return typeof S>"u"||n.call(m,S)},f=function(m,g){a&&g.name==="__proto__"?a(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},h=function(m,g){if(g==="__proto__")if(n.call(m,g)){if(o)return o(m,g).value}else return;return m[g]};return pu=function p(){var m,g,y,S,b,k,M=arguments[0],U=1,R=arguments.length,D=!1;for(typeof M=="boolean"&&(D=M,M=arguments[1]||{},U=2),(M==null||typeof M!="object"&&typeof M!="function")&&(M={});U<R;++U)if(m=arguments[U],m!=null)for(g in m)y=h(M,g),S=h(m,g),M!==S&&(D&&S&&(c(S)||(b=s(S)))?(b?(b=!1,k=y&&s(y)?y:[]):k=y&&c(y)?y:{},f(M,{name:g,newValue:p(D,k,S)})):typeof S<"u"&&f(M,{name:g,newValue:S}));return M},pu}var PT=GT();const gu=fs(PT);function yu(n){if(typeof n!="object"||n===null)return!1;const i=Object.getPrototypeOf(n);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function FT(){const n=[],i={run:a,use:o};return i;function a(...s){let c=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...s);function h(p,...m){const g=n[++c];let y=-1;if(p){f(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,g?XT(g,h)(...m):f(null,...m)}}function o(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return n.push(s),i}}function XT(n,i){let a;return o;function o(...f){const h=n.length>f.length;let p;h&&f.push(s);try{p=n.apply(this,f)}catch(m){const g=m;if(h&&a)throw g;return s(g)}h||(p&&p.then&&typeof p.then=="function"?p.then(c,s):p instanceof Error?s(p):c(p))}function s(f,...h){a||(a=!0,i(f,...h))}function c(f){s(null,f)}}const Rn={basename:KT,dirname:QT,extname:ZT,join:JT,sep:"/"};function KT(n,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Di(n);let a=0,o=-1,s=n.length,c;if(i===void 0||i.length===0||i.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else o<0&&(c=!0,o=s+1);return o<0?"":n.slice(a,o)}if(i===n)return"";let f=-1,h=i.length-1;for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else f<0&&(c=!0,f=s+1),h>-1&&(n.codePointAt(s)===i.codePointAt(h--)?h<0&&(o=s):(h=-1,o=f));return a===o?o=f:o<0&&(o=n.length),n.slice(a,o)}function QT(n){if(Di(n),n.length===0)return".";let i=-1,a=n.length,o;for(;--a;)if(n.codePointAt(a)===47){if(o){i=a;break}}else o||(o=!0);return i<0?n.codePointAt(0)===47?"/":".":i===1&&n.codePointAt(0)===47?"//":n.slice(0,i)}function ZT(n){Di(n);let i=n.length,a=-1,o=0,s=-1,c=0,f;for(;i--;){const h=n.codePointAt(i);if(h===47){if(f){o=i+1;break}continue}a<0&&(f=!0,a=i+1),h===46?s<0?s=i:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||a<0||c===0||c===1&&s===a-1&&s===o+1?"":n.slice(s,a)}function JT(...n){let i=-1,a;for(;++i<n.length;)Di(n[i]),n[i]&&(a=a===void 0?n[i]:a+"/"+n[i]);return a===void 0?".":WT(a)}function WT(n){Di(n);const i=n.codePointAt(0)===47;let a=$T(n,!i);return a.length===0&&!i&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),i?"/"+a:a}function $T(n,i){let a="",o=0,s=-1,c=0,f=-1,h,p;for(;++f<=n.length;){if(f<n.length)h=n.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||c===1))if(s!==f-1&&c===2){if(a.length<2||o!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",o=0):(a=a.slice(0,p),o=a.length-1-a.lastIndexOf("/")),s=f,c=0;continue}}else if(a.length>0){a="",o=0,s=f,c=0;continue}}i&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+n.slice(s+1,f):a=n.slice(s+1,f),o=f-s-1;s=f,c=0}else h===46&&c>-1?c++:c=-1}return a}function Di(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const eC={cwd:tC};function tC(){return"/"}function vu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function nC(n){if(typeof n=="string")n=new URL(n);else if(!vu(n)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(n.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return lC(n)}function lC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const i=n.pathname;let a=-1;for(;++a<i.length;)if(i.codePointAt(a)===37&&i.codePointAt(a+1)===50){const o=i.codePointAt(a+2);if(o===70||o===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const bu=["history","path","basename","stem","extname","dirname"];class fp{constructor(i){let a;i?vu(i)?a={path:i}:typeof i=="string"||rC(i)?a={value:i}:a=i:a={},this.cwd="cwd"in a?"":eC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<bu.length;){const c=bu[o];c in a&&a[c]!==void 0&&a[c]!==null&&(this[c]=c==="history"?[...a[c]]:a[c])}let s;for(s in a)bu.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?Rn.basename(this.path):void 0}set basename(i){Eu(i,"basename"),Su(i,"basename"),this.path=Rn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Rn.dirname(this.path):void 0}set dirname(i){dp(this.basename,"dirname"),this.path=Rn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Rn.extname(this.path):void 0}set extname(i){if(Su(i,"extname"),dp(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){vu(i)&&(i=nC(i)),Eu(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Rn.basename(this.path,this.extname):void 0}set stem(i){Eu(i,"stem"),Su(i,"stem"),this.path=Rn.join(this.dirname||"",i+(this.extname||""))}fail(i,a,o){const s=this.message(i,a,o);throw s.fatal=!0,s}info(i,a,o){const s=this.message(i,a,o);return s.fatal=void 0,s}message(i,a,o){const s=new zt(i,a,o);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function Su(n,i){if(n&&n.includes(Rn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Rn.sep+"`")}function Eu(n,i){if(!n)throw new Error("`"+i+"` cannot be empty")}function dp(n,i){if(!n)throw new Error("Setting `"+i+"` requires `path` to be set too")}function rC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const iC=(function(n){const o=this.constructor.prototype,s=o[n],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,o),c}),aC={}.hasOwnProperty;class xu extends iC{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=FT()}copy(){const i=new xu;let a=-1;for(;++a<this.attachers.length;){const o=this.attachers[a];i.use(...o)}return i.data(gu(!0,{},this.namespace)),i}data(i,a){return typeof i=="string"?arguments.length===2?(wu("data",this.frozen),this.namespace[i]=a,this):aC.call(this.namespace,i)&&this.namespace[i]||void 0:i?(wu("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const s=a.call(i,...o);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const a=Pa(i),o=this.parser||this.Parser;return Tu("parse",o),o(String(a),a)}process(i,a){const o=this;return this.freeze(),Tu("process",this.parser||this.Parser),Cu("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(c,f){const h=Pa(i),p=o.parse(h);o.run(p,h,function(g,y,S){if(g||!y||!S)return m(g);const b=y,k=o.stringify(b,S);uC(k)?S.value=k:S.result=k,m(g,S)});function m(g,y){g||!y?f(g):c?c(y):a(void 0,y)}}}processSync(i){let a=!1,o;return this.freeze(),Tu("processSync",this.parser||this.Parser),Cu("processSync",this.compiler||this.Compiler),this.process(i,s),mp("processSync","process",a),o;function s(c,f){a=!0,up(c),o=f}}run(i,a,o){hp(i),this.freeze();const s=this.transformers;return!o&&typeof a=="function"&&(o=a,a=void 0),o?c(void 0,o):new Promise(c);function c(f,h){const p=Pa(a);s.run(i,p,m);function m(g,y,S){const b=y||i;g?h(g):f?f(b):o(void 0,b,S)}}}runSync(i,a){let o=!1,s;return this.run(i,a,c),mp("runSync","run",o),s;function c(f,h){up(f),s=h,o=!0}}stringify(i,a){this.freeze();const o=Pa(a),s=this.compiler||this.Compiler;return Cu("stringify",s),hp(i),s(i,o)}use(i,...a){const o=this.attachers,s=this.namespace;if(wu("use",this.frozen),i!=null)if(typeof i=="function")p(i,a);else if(typeof i=="object")Array.isArray(i)?h(i):f(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(m.plugins),m.settings&&(s.settings=gu(!0,s.settings,m.settings))}function h(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];c(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,S=-1;for(;++y<o.length;)if(o[y][0]===m){S=y;break}if(S===-1)o.push([m,...g]);else if(g.length>0){let[b,...k]=g;const M=o[S][1];yu(M)&&yu(b)&&(b=gu(!0,M,b)),o[S]=[m,b,...k]}}}}const oC=new xu().freeze();function Tu(n,i){if(typeof i!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Cu(n,i){if(typeof i!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function wu(n,i){if(i)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function hp(n){if(!yu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function mp(n,i,a){if(!a)throw new Error("`"+n+"` finished async. Use `"+i+"` instead")}function Pa(n){return sC(n)?n:new fp(n)}function sC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function uC(n){return typeof n=="string"||cC(n)}function cC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const fC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",pp=[],gp={allowDangerousHtml:!0},dC=/^(https?|ircs?|mailto|xmpp)$/i,hC=[{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 mC(n){const i=pC(n),a=gC(n);return yC(i.runSync(i.parse(a),a),n)}function pC(n){const i=n.rehypePlugins||pp,a=n.remarkPlugins||pp,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...gp}:gp;return oC().use(K1).use(a).use(VT,o).use(i)}function gC(n){const i=n.children||"",a=new fp;return typeof i=="string"&&(a.value=i),a}function yC(n,i){const a=i.allowedElements,o=i.allowElement,s=i.components,c=i.disallowedElements,f=i.skipHtml,h=i.unwrapDisallowed,p=i.urlTransform||vC;for(const g of hC)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+fC+g.id,void 0);return ap(n,m),LE(n,{Fragment:x.Fragment,components:s,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function m(g,y,S){if(g.type==="raw"&&S&&typeof y=="number")return f?S.children.splice(y,1):S.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in tu)if(Object.hasOwn(tu,b)&&Object.hasOwn(g.properties,b)){const k=g.properties[b],M=tu[b];(M===null||M.includes(g.tagName))&&(g.properties[b]=p(String(k||""),b,g))}}if(g.type==="element"){let b=a?!a.includes(g.tagName):c?c.includes(g.tagName):!1;if(!b&&o&&typeof y=="number"&&(b=!o(g,y,S)),b&&S&&typeof y=="number")return h&&g.children?S.children.splice(y,1,...g.children):S.children.splice(y,1),y}}}function vC(n){const i=n.indexOf(":"),a=n.indexOf("?"),o=n.indexOf("#"),s=n.indexOf("/");return i===-1||s!==-1&&i>s||a!==-1&&i>a||o!==-1&&i>o||dC.test(n.slice(0,i))?n:""}function bC({text:n,maxWidth:i="200px",className:a="",icon:o,onClick:s,disabled:c=!1}){const[f,h]=w.useState(!1),p=w.useRef(null),m=w.useRef(null);return w.useEffect(()=>{const g=()=>{if(p.current&&m.current){const y=p.current.offsetWidth,S=m.current.scrollWidth;h(S>y)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,i]),n?x.jsxs("div",{ref:p,onClick:c?void 0:s,className:Ce("inline-flex items-center gap-2 rounded-full border border-lavender-200/60 bg-white/80 px-3 py-1 shadow-sm text-xs text-slate-700 hover: cursor-pointer",a,c?"opacity-50 cursor-not-allowed":""),style:{maxWidth:i},title:n,children:[o&&x.jsx("span",{className:"text-lavender-500",children:o}),x.jsx("div",{className:"pill-marquee-wrapper",children:x.jsx("span",{ref:m,className:Ce("block whitespace-normal",f?"pill-marquee":""),children:n})})]}):null}var SC=Ff[" useInsertionEffect ".trim().toString()]||rl;function EC({prop:n,defaultProp:i,onChange:a=()=>{},caller:o}){const[s,c,f]=xC({defaultProp:i,onChange:a}),h=n!==void 0,p=h?n:s;{const g=w.useRef(n!==void 0);w.useEffect(()=>{const y=g.current;if(y!==h){const S=y?"controlled":"uncontrolled",b=h?"controlled":"uncontrolled"}g.current=h},[h,o])}const m=w.useCallback(g=>{if(h){const y=TC(g)?g(n):g;y!==n&&f.current?.(y)}else c(g)},[h,n,c,f]);return[p,m]}function xC({defaultProp:n,onChange:i}){const[a,o]=w.useState(n),s=w.useRef(a),c=w.useRef(i);return SC(()=>{c.current=i},[i]),w.useEffect(()=>{s.current!==a&&(c.current?.(a),s.current=a)},[a,s]),[a,o,c]}function TC(n){return typeof n=="function"}function CC(n){const i=w.useRef({value:n,previous:n});return w.useMemo(()=>(i.current.value!==n&&(i.current.previous=i.current.value,i.current.value=n),i.current.previous),[n])}function wC(n){const[i,a]=w.useState(void 0);return rl(()=>{if(n){a({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let f,h;if("borderBoxSize"in c){const p=c.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,h=m.blockSize}else f=n.offsetWidth,h=n.offsetHeight;a({width:f,height:h})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else a(void 0)},[n]),i}var Fa="Checkbox",[_C]=td(Fa),[AC,_u]=_C(Fa);function NC(n){const{__scopeCheckbox:i,checked:a,children:o,defaultChecked:s,disabled:c,form:f,name:h,onCheckedChange:p,required:m,value:g="on",internal_do_not_use_render:y}=n,[S,b]=EC({prop:a,defaultProp:s??!1,onChange:p,caller:Fa}),[k,M]=w.useState(null),[U,R]=w.useState(null),D=w.useRef(!1),I=k?!!f||!!k.closest("form"):!0,$={checked:S,disabled:c,setChecked:b,control:k,setControl:M,name:h,form:f,value:g,hasConsumerStoppedPropagationRef:D,required:m,defaultChecked:ul(s)?!1:s,isFormControl:I,bubbleInput:U,setBubbleInput:R};return x.jsx(AC,{scope:i,...$,children:RC(y)?y($):o})}var yp="CheckboxTrigger",vp=w.forwardRef(({__scopeCheckbox:n,onKeyDown:i,onClick:a,...o},s)=>{const{control:c,value:f,disabled:h,checked:p,required:m,setControl:g,setChecked:y,hasConsumerStoppedPropagationRef:S,isFormControl:b,bubbleInput:k}=_u(yp,n),M=Dn(s,g),U=w.useRef(p);return w.useEffect(()=>{const R=c?.form;if(R){const D=()=>y(U.current);return R.addEventListener("reset",D),()=>R.removeEventListener("reset",D)}},[c,y]),x.jsx(ll.button,{type:"button",role:"checkbox","aria-checked":ul(p)?"mixed":p,"aria-required":m,"data-state":Tp(p),"data-disabled":h?"":void 0,disabled:h,value:f,...o,ref:M,onKeyDown:jn(i,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:jn(a,R=>{y(D=>ul(D)?!0:!D),k&&b&&(S.current=R.isPropagationStopped(),S.current||R.stopPropagation())})})});vp.displayName=yp;var Au=w.forwardRef((n,i)=>{const{__scopeCheckbox:a,name:o,checked:s,defaultChecked:c,required:f,disabled:h,value:p,onCheckedChange:m,form:g,...y}=n;return x.jsx(NC,{__scopeCheckbox:a,checked:s,defaultChecked:c,disabled:h,required:f,onCheckedChange:m,name:o,form:g,value:p,internal_do_not_use_render:({isFormControl:S})=>x.jsxs(x.Fragment,{children:[x.jsx(vp,{...y,ref:i,__scopeCheckbox:a}),S&&x.jsx(xp,{__scopeCheckbox:a})]})})});Au.displayName=Fa;var bp="CheckboxIndicator",Sp=w.forwardRef((n,i)=>{const{__scopeCheckbox:a,forceMount:o,...s}=n,c=_u(bp,a);return x.jsx(or,{present:o||ul(c.checked)||c.checked===!0,children:x.jsx(ll.span,{"data-state":Tp(c.checked),"data-disabled":c.disabled?"":void 0,...s,ref:i,style:{pointerEvents:"none",...n.style}})})});Sp.displayName=bp;var Ep="CheckboxBubbleInput",xp=w.forwardRef(({__scopeCheckbox:n,...i},a)=>{const{control:o,hasConsumerStoppedPropagationRef:s,checked:c,defaultChecked:f,required:h,disabled:p,name:m,value:g,form:y,bubbleInput:S,setBubbleInput:b}=_u(Ep,n),k=Dn(a,b),M=CC(c),U=wC(o);w.useEffect(()=>{const D=S;if(!D)return;const I=window.HTMLInputElement.prototype,V=Object.getOwnPropertyDescriptor(I,"checked").set,A=!s.current;if(M!==c&&V){const j=new Event("click",{bubbles:A});D.indeterminate=ul(c),V.call(D,ul(c)?!1:c),D.dispatchEvent(j)}},[S,M,c,s]);const R=w.useRef(ul(c)?!1:c);return x.jsx(ll.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??R.current,required:h,disabled:p,name:m,value:g,form:y,...i,tabIndex:-1,ref:k,style:{...i.style,...U,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xp.displayName=Ep;function RC(n){return typeof n=="function"}function ul(n){return n==="indeterminate"}function Tp(n){return ul(n)?"indeterminate":n?"checked":"unchecked"}const Nu=w.forwardRef(({className:n,...i},a)=>x.jsx(Au,{ref:a,className:Ce("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...i,children:x.jsx(Sp,{className:Ce("grid place-content-center text-current"),children:x.jsx(Pd,{className:"h-4 w-4"})})}));Nu.displayName=Au.displayName;var ql=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(ql||{});function OC({options:n,selectedValues:i,onSelectionChange:a,additionalOption:o,className:s,required:c=!0,maxSelections:f,error:h,disabled:p}){const m=o?{id:`extra-${o}`,label:o==="all_of_the_above"?"All of the above":"None of the above",value:o==="all_of_the_above"?"All of the above":"None of the above"}:null,g=R=>m?R.filter(D=>D!==m.value):R,y=R=>m?o==="none_of_the_above"?R?[m.value]:[]:o==="all_of_the_above"?R?[...n.map(D=>D.value),m.value]:g(i):R?[...i,m.value]:g(i):i,S=(R,D)=>{const I=m?g(i):i;return D?f&&I.length>=f?null:[...I,R]:I.filter($=>$!==R)},b=R=>!(c&&R.length===0&&i.length===1),k=(R,D)=>{const $=m&&R===m.value?y(D):S(R,D);$!==null&&b($)&&a($)},M=!c||i.length>0,U=m?i.filter(R=>R!==m.value).length:i.length;return n.length?x.jsxs("div",{className:Ce("bg-gray-50","rounded-lg","p-4","border border-gray-200",s),children:[x.jsxs("div",{className:"space-y-3",children:[n.map(R=>{const D=p||f&&U>=f&&!i.includes(R.value);return x.jsxs("div",{className:"flex items-center space-x-3",children:[x.jsx(Nu,{id:R.id,checked:!!i.includes(R.value),disabled:!!D,onCheckedChange:I=>k(R.value,!!I),className:"mt-0.5 border border-muted-foreground"}),x.jsx("label",{htmlFor:R.id,className:Ce("text-sm font-medium leading-none cursor-pointer",D?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:R.label})]},R.id)}),m&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"border-t border-gray-300 my-3"}),x.jsxs("div",{className:"flex items-center space-x-3",children:[x.jsx(Nu,{id:m.id,checked:i.includes(m.value),onCheckedChange:R=>k(m.value,R),className:"mt-0.5 border border-muted-foreground"}),x.jsx("label",{htmlFor:m.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:m.label})]})]})]}),h&&x.jsx("p",{className:"text-sm text-red-500 mt-3",children:h}),c&&!M&&x.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),f&&U>=f&&x.jsx("p",{className:"text-sm text-blue-600 mt-3",children:f===1?"You can select only 1 option":`Maximum ${f} selections allowed`})]}):null}const kC=n=>n?n.split(" ").map(i=>i[0]).slice(0,2).join("").toUpperCase():"DR",MC=n=>{const i=new Date(n),a=i.toLocaleDateString(void 0,{weekday:"short"}),o=i.toLocaleDateString(void 0,{day:"2-digit"});return{weekday:a,dayNum:o}};function zC({value:n,onValueChange:i,placeholder:a="Select an option",className:o,triggerClassName:s,contentClassName:c,disabled:f=!1,options:h=[],size:p="default"}){const[m,g]=w.useState(!1),y=w.useRef(null),S=w.useRef(null),b=h.find(U=>U.value===n);w.useEffect(()=>{const U=R=>{m&&R.key==="Escape"&&(g(!1),S.current?.focus())};return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[m]);const k=U=>{i?.(U),g(!1),S.current?.focus()},M=()=>{f||g(!m)};return x.jsxs("div",{className:Ce("relative w-full",o),children:[x.jsxs("button",{ref:S,type:"button",onClick:M,disabled:f,className:Ce('border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*="text-"])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 overflow-hidden',p==="default"?"min-h-9":"min-h-8",s),"aria-expanded":m,"aria-haspopup":"listbox",children:[x.jsx("span",{className:Ce("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!b&&"text-muted-foreground"),children:b?b.label:a}),x.jsx(As,{className:Ce("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",m&&"rotate-180")})]}),m&&x.jsx("div",{ref:y,className:Ce("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[300px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto rounded-md shadow-md mt-1",c),role:"listbox",children:x.jsx("div",{className:"p-1",children:h.length===0?x.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground text-center",children:"No options available"}):h.map(U=>{const R=U.value===n;return x.jsxs("div",{onClick:()=>k(U.value),className:Ce("relative flex w-full cursor-pointer items-center gap-1 rounded-sm py-2.5 px-3 text-sm outline-none select-none transition-colors duration-150","hover:bg-accent hover:text-accent-foreground","focus-visible:bg-accent focus-visible:text-accent-foreground","active:bg-accent/80",R&&"bg-accent/50 text-foreground",f&&"pointer-events-none opacity-50 cursor-not-allowed"),role:"option","aria-selected":R,tabIndex:f?-1:0,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),f||k(U.value))},children:[x.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:U.label}),R&&x.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:x.jsx(Pd,{className:"size-4 text-foreground"})})]},U.value)})})})]})}function DC({doctor:n,doctorDetails:i,callTool:a,onBook:o,callbacks:s,disabled:c,error:f}){const[h,p]=w.useState(!1),[m,g]=w.useState(null),[y,S]=w.useState(null),[b,k]=w.useState(""),[M,U]=w.useState(0),[R,D]=w.useState(!1),[I,$]=w.useState(!1),[V,A]=w.useState({});w.useEffect(()=>{!n.hospital_id&&i.hospitals.length?k(i.hospitals[0].hospital_id):n.hospital_id&&k(n.hospital_id)},[n.hospital_id,i.hospitals]);const j=w.useCallback(async le=>{if(!(!b||!n.doctor_id))try{D(!0);const C={doctor_id:n.doctor_id,hospital_id:b},_=await a(le,C);_.available_dates.length&&A(G=>({...G,[b]:_.available_dates.map(T=>({date:T,slots:[]}))}))}catch{}finally{D(!1)}},[b,n.doctor_id]);w.useEffect(()=>{s?.[ke.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES]&&!n?.availability?.length&&b&&j(s[ke.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name)},[s,n.availability,b,j]);const z=w.useMemo(()=>V[b]||[],[V,b]),K=w.useMemo(()=>{if(!z.length)return null;const le=M,C=Math.min(le+3,z.length);return z.slice(le,C).map(_=>({slots:_.slots,date:_.date,...MC(_.date),hasSlots:_.slots.length>0}))},[z,M]),ae=w.useMemo(()=>y&&z.find(le=>le.date===y)||null,[z,y]),te=le=>{g(le)},oe=w.useCallback(()=>{U(le=>Math.max(0,le-3)),g(null)},[]),_e=w.useCallback(()=>{const le=Math.max(0,z.length-3);U(C=>Math.min(le,C+3)),g(null)},[z.length]),ce=w.useCallback(async(le,C)=>{try{$(!0);const _=await a(le,C);_.slots.length&&A(G=>{const T=G[C.hospital_id]||[],ne=T.findIndex(fe=>fe.date===C.date);if(ne>=0){const fe=[...T];return fe[ne]={date:C.date,slots:_.slots},{...G,[C.hospital_id]:fe}}else return{...G,[C.hospital_id]:[...T,{date:C.date,slots:_.slots}]}})}catch{}finally{$(!1)}},[a]),ee=w.useCallback(async le=>{if(y===le)return;S(le),!z.find(T=>T.date===le)?.slots.length&&n.doctor_id&&b&&s?.[ke.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS]&&n.doctor_id&&await ce(s[ke.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS].tool_name,{doctor_id:n.doctor_id,hospital_id:b,date:le});const G=z.find(T=>T.date===le);n?.selected_date===le&&n?.slot_preference&&G?.slots.includes(n.slot_preference)?g(n.slot_preference):g(null)},[z,b]);w.useEffect(()=>{if(y||!z.length)return;const le=n.selected_date||z[0]?.date;le&&ee(le).catch(console.error)},[n.selected_date,z,y,ee]);const B=()=>{o&&m&&y&&o({date:y,time:m,doctorData:{doctor:i,hospital_id:b}})},W=M>0,Z=M<Math.max(0,z.length-3);return i?x.jsxs(si,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[x.jsx(Xd,{className:"flex flex-row items-center justify-between gap-3 bg-lavender-50 rounded-t-xl p-4 border-b border-lavender-100 overflow-hidden",children:x.jsxs("div",{className:"flex items-center gap-3",children:[i.profile_pic&&x.jsxs(ui,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[x.jsx(oh,{src:i.profile_pic,alt:`${i.name} profile photo`,crossOrigin:"anonymous"}),x.jsx(ci,{className:"bg-lavender-100 text-lavender-700",children:kC(i.name)})]}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[x.jsx("h3",{className:" text-base font-bold text-slate-900",children:i.name}),i.profile_link?x.jsx("a",{href:i.profile_link,target:"_blank",rel:"noreferrer",className:"text-xs font-semibold text-lavender-600 hover:text-lavender-700 hover:underline",children:"View profile"}):null]}),x.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[i.specialty,i.experience&&x.jsxs(x.Fragment,{children:[" • ",i.experience]})]})]})]})}),x.jsxs(Kd,{className:"px-4 py-2",children:[x.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[i?.timings&&x.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[x.jsx(uS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),x.jsx("span",{className:"text-slate-600 text-xs",children:i?.timings})]}),i.languages?x.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[x.jsx(fS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),x.jsx("span",{className:"text-slate-600",children:i.languages})]}):null,i?.hospitals&&i.hospitals?.length>1?b&&x.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[x.jsx(Gd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),x.jsx(zC,{options:i.hospitals.map(le=>({value:le.hospital_id,label:le.name||""})),placeholder:"Select Hospital",disabled:c,onValueChange:le=>k(le),value:b})]}):x.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[x.jsx(Gd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),x.jsx("span",{className:"text-slate-600",children:i.hospitals?.[0].name||""})]})]}),z.length||R?x.jsx(Et,{type:"button",variant:"outline","aria-expanded":h,"aria-controls":"ap-slots",onClick:()=>p(le=>!le),disabled:R,className:"mt-3 w-full border-lavender-500 text-lavender-600 hover:bg-lavender-50 hover:border-lavender-600 disabled:opacity-50",children:R?x.jsxs(x.Fragment,{children:[x.jsx(Fd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"mr-1",children:h?"Hide slots":"Show available slots"}),x.jsx(As,{className:Ce("h-4 w-4 transition-transform",h&&"rotate-180"),"aria-hidden":!0})]})}):x.jsx("div",{className:"mt-3 w-full flex items-center justify-center py-3 px-4 bg-lavender-50 border border-lavender-200 rounded-lg",children:x.jsx("span",{className:"text-sm text-slate-600 font-medium",children:"No details available"})}),h&&z.length&&x.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:K?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[x.jsx(Et,{type:"button",variant:"outline",size:"icon",onClick:oe,"aria-label":"Previous 3 days",disabled:c||!W,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:x.jsx(oS,{className:"h-4 w-4"})}),x.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:K.map((le,C)=>{const _=y===le.date,G=!le.hasSlots;return x.jsxs(Et,{type:"button",variant:"outline",onClick:()=>!G&&ee(le.date),disabled:G||c,"aria-current":_?"date":void 0,className:Ce("flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",_&&"border-lavender-500 ring-2 ring-lavender-200 bg-lavender-50 shadow-sm",G&&"border-slate-200 bg-slate-50 text-slate-300 cursor-not-allowed",!_&&!G&&"border-slate-200 bg-white hover:bg-lavender-50 hover:border-lavender-300"),children:[x.jsx("span",{className:Ce("text-[10px] tracking-wide w-full text-center font-medium",_&&"text-lavender-700",G&&"text-slate-300",!_&&!G&&"text-slate-600"),children:le.weekday}),x.jsx("span",{className:Ce("text-xs font-bold w-full text-center",_&&"text-lavender-700",G&&"text-slate-300",!_&&!G&&"text-slate-900"),children:le.dayNum})]},`${le.date}-${C}`)})}),x.jsx(Et,{type:"button",variant:"outline",size:"icon",onClick:_e,"aria-label":"Next 3 days",disabled:c||!Z,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:x.jsx(sS,{className:"h-4 w-4"})})]}),x.jsx("div",{className:"px-0.5 py-3",children:I?x.jsxs("div",{className:"flex items-center justify-center py-4",children:[x.jsx(Fd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),x.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):ae?.slots?.length?x.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:ae.slots.map((le,C)=>{const _=m===le;return x.jsxs(Et,{type:"button",variant:"outline",onClick:()=>te(le),"aria-pressed":_,disabled:c,className:Ce("inline-flex h-9 items-center justify-center gap-2 rounded-lg px-3 text-xs font-semibold transition-all",_?"border-lavender-600 bg-lavender-600 text-white shadow-sm hover:bg-lavender-700 hover:border-lavender-700":"border-lavender-200 bg-white text-slate-900 hover:bg-lavender-50 hover:border-lavender-300"),children:[x.jsx(aS,{className:Ce("h-3.5 w-3.5 flex-shrink-0",_?"text-white":"text-lavender-600")}),x.jsx("span",{className:"truncate",children:le})]},le||`slot-${C}`)})}):x.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),x.jsx("div",{className:"px-0.5 pb-1.5",children:x.jsxs(Et,{type:"button",onClick:B,disabled:!m||c,"aria-disabled":!m,className:"w-full h-10 gap-2 bg-lavender-600 text-white hover:bg-lavender-700 disabled:opacity-60 shadow-sm font-semibold",children:["Book appointment",x.jsx(iS,{className:"h-4 w-4"})]})})]}):x.jsx("div",{className:"px-1 pb-2 pt-1",children:x.jsx("p",{className:"text-sm text-slate-600",children:f||"No availability provided."})})})]})]}):null}function jC({doctorAvailabilities:n,doctorDetails:i,callbacks:a,onBook:o,disabled:s=!1,callTool:c}){const[f,h]=w.useState({}),[p,m]=w.useState(!1),[g,y]=w.useState(null),[S,b]=w.useState(0),k=n.length,M=Math.min(3,n.length),U=k-M;w.useEffect(()=>{(async()=>{m(!0),y(null);const V=n.slice(0,M).filter(z=>z.doctor_id).map(async z=>{try{const K=await R(z.doctor_id);return{doctorId:z.doctor_id,doctorDetails:K||null}}catch{return{doctorId:z.doctor_id,doctorDetails:null}}}),A=await Promise.allSettled(V),j={};A.forEach(z=>{if(z.status==="fulfilled"){const{doctorId:K,doctorDetails:ae}=z.value;K&&ae&&(j[K]=ae)}}),h(j),b(Object.keys(j).length),m(!1)})()},[]);const R=async I=>i?i[I]:a&&a[ke.SYNAPSE_TOOL_CALLBACK_NAME.DOCTOR_DETAILS]&&await c(a[ke.SYNAPSE_TOOL_CALLBACK_NAME.DOCTOR_DETAILS].tool_name,{doctor_id:I})||null,D=async()=>{if(S>=n.length)return;m(!0),y(null);const $=n.slice(S).filter(j=>j.doctor_id).map(async j=>{try{const z=await R(j.doctor_id);return{doctorId:j.doctor_id,detail:z}}catch{return{doctorId:j.doctor_id,detail:null}}}),V=await Promise.allSettled($),A={};V.forEach(j=>{if(j.status==="fulfilled"){const{doctorId:z,detail:K}=j.value;z&&K&&(A[z]=K)}}),h(j=>({...j,...A})),b(j=>j+Object.keys(A).length),m(!1)};return p&&S===0?x.jsx("div",{className:"flex items-center justify-center py-8",children:x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),x.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):S===0?x.jsx("div",{className:"flex items-center justify-center py-2",children:x.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):x.jsxs("div",{className:"space-y-4",children:[x.jsx("div",{className:"space-y-4",children:n.map((I,$)=>I?.doctor_id&&f[I.doctor_id]&&x.jsx(DC,{doctor:I,doctorDetails:f[I.doctor_id],callTool:c,onBook:o,callbacks:a,disabled:s},`${$}`))}),S<k&&x.jsx("div",{className:"flex justify-center",children:x.jsx(Et,{variant:"outline",onClick:D,disabled:p,className:"px-6 py-2",children:p?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--color-primary)] mr-2"}),"Loading more doctors..."]}):`Show more (${U} more)`})}),g&&S>0&&x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-sm text-red-500 mb-2",children:g}),x.jsx(Et,{variant:"outline",size:"sm",onClick:D,disabled:p,children:"Retry loading more"})]})]})}function LC({role:n,content:i,timestamp:a,iconUrl:o,files:s,isLastMessage:c,progressMessage:f,toolEscalationData:h,toolCallStatus:p,callTool:m,onSendMessage:g}){const y=n==="user",[S,b]=w.useState([]),{isStreaming:k}=hr(),M=async V=>{const A=Date.now().toString();await g({message:V,messageId:A,toolCalled:!0})},U=async V=>{await g({message:`I want to book an appointment for ${V.doctorData?.doctor?.name||"the doctor"} on ${V.date} for ${V.time}`,toolCalled:!0})},R=V=>{b(V)},D=()=>{if(!h?.details?.input?.additional_option)return;const V=h.details?.input?.additional_option;if(typeof V=="string"&&(V===ql.NOTA||V===ql.AOTA))return V;if(typeof V=="object"&&V!==null){if(V.NOTA===ql.NOTA)return ql.NOTA;if(V.AOTA===ql.AOTA)return ql.AOTA}},I=()=>{const V=h?.details?.input?.options;return V?Array.isArray(V)?V.map((A,j)=>({id:`option-${j}`,label:A.label,value:A.value})):Object.keys(V).map((A,j)=>({id:`option-${j}`,label:A,value:A})):[]},$=async()=>{if(S.length>0){const V=S.join(", "),A=Date.now().toString();await g({message:V,messageId:A,toolCalled:!0})}};return x.jsx("div",{className:Ce("flex",y?"justify-end":"justify-start"),children:x.jsxs("div",{className:Ce("flex gap-3",y?"flex-row-reverse":"flex-row",h?.details?.component===ke.SYNAPSE_COMPONENTS.MULTI?"max-w-md":y?"max-w-[60%]":"max-w-xs"),children:[!y&&x.jsx(ui,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:x.jsx(ci,{className:"bg-transparent text-white text-xs font-bold",children:o?x.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):x.jsx(Vd,{className:"w-full h-full"})})}),x.jsxs(si,{className:Ce("px-4 py-2 rounded-2xl shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",y?"bg-lavender-100/95 backdrop-blur-md text-slate-900 rounded-br-none border border-lavender-200/60":"bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",h&&"w-full"),children:[p&&!y&&x.jsx("div",{className:"text-xs text-slate-500 mb-2 pb-2 border-b border-slate-200",children:p}),!p&&f&&!y&&c&&x.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:f}),i&&x.jsx("div",{className:"text-sm markdown-content mb-3",children:x.jsx(mC,{children:`${i} ${!y&&k?"...":""}`})}),s&&s.length>0&&x.jsx("div",{className:"mt-2",children:x.jsx(Jh,{files:s,isPreview:!1,className:""})}),h?.details?.component===ke.SYNAPSE_COMPONENTS.PILL&&h?.details?.input?.options&&x.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:h.details?.input?.options.map((V,A)=>x.jsx(bC,{disabled:h?.isResponded,text:V?.label||"",onClick:()=>M(V?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},A))}),h?.details?.component===ke.SYNAPSE_COMPONENTS.MULTI&&h?.details?.input?.options&&x.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[x.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),x.jsx(OC,{options:I(),selectedValues:S,onSelectionChange:R,additionalOption:D(),disabled:h?.isResponded}),x.jsx(Et,{onClick:$,disabled:S.length===0||h?.isResponded,className:Ce("w-full rounded-lg px-4 py-2 text-sm font-medium transition-all","bg-blue-100 hover:bg-blue-200 text-blue-600 border border-blue-200","disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200","shadow-sm hover:shadow-md active:scale-[0.98] "),children:"Confirm"})]}),h?.details?.component===ke.SYNAPSE_COMPONENTS.DOCTOR_CARD&&h?.details?.input?.doctors&&m?x.jsx("div",{className:"mt-3",children:x.jsx(jC,{doctorAvailabilities:h?.details?.input?.doctors,doctorDetails:h?.details?.input?.doctor_details,callTool:m,callbacks:h?.details?._meta?.callbacks,onBook:U,disabled:h?.isResponded})}):null,f&&!y&&c&&x.jsx("p",{className:"text-sm font-medium text-teal-600",children:f}),a&&x.jsx("p",{className:Ce("text-xs mt-2 text-right","text-slate-500"),children:a})]})]})})}function UC({messages:n,onSendMessage:i,iconUrl:a,callTool:o}){const s=hr(f=>f.isWaitingForResponse),c=hr(f=>f.progressMessage);return x.jsxs(x.Fragment,{children:[(n&&n.length>0||c)&&x.jsx(x.Fragment,{children:n.map((f,h)=>x.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:h===n.length-1?"last-message":void 0,children:x.jsx(LC,{role:f.role,content:f.content,files:f.files||[],iconUrl:a,toolEscalationData:f.toolEscalationData,timestamp:f.timestamp,onSendMessage:i,isLastMessage:h===n.length-1,progressMessage:c,toolCallStatus:f.toolCallStatus,callTool:o})},f.id))}),s&&x.jsx(BC,{iconUrl:a})]})}function BC({iconUrl:n}){return x.jsx("div",{className:"animate-slideUp",children:x.jsx("div",{className:"flex justify-start",children:x.jsxs("div",{className:"flex gap-3",children:[x.jsx(ui,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:x.jsx(ci,{className:"bg-transparent text-white text-xs font-bold",children:n?x.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):x.jsx(Vd,{className:"w-4 h-4"})})}),x.jsx(si,{className:"px-4 py-2 rounded-2xl shadow-none bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",children:x.jsx("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[0,1,2].map(i=>x.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${i*150}ms`}},i))})})]})})})}const IC=Object.freeze(Object.defineProperty({__proto__:null,default:UC},Symbol.toStringTag,{value:"Module"}));function HC({onTaskClick:n,disabled:i,tasks:a}){return a?.length?x.jsx("div",{className:"grid grid-cols-2 gap-3",children:a.map(o=>x.jsx(Et,{type:"button",variant:"ghost",disabled:i,onClick:()=>n(o.value||""),className:"h-auto w-full flex flex-col items-start bg-white shadow-lg ring-1 ring-lavender-100 backdrop-blur-sm rounded-2xl p-4 hover:bg-white/95 hover:border-lavender-300 hover:shadow-lg transition-all text-left group",children:x.jsx("div",{className:"flex items-start justify-between gap-3",children:x.jsx("h3",{className:"font-semibold text-sm text-slate-900 text-wrap group-hover:text-lavender-600 transition-colors",children:o.label||""})})},o.value))}):null}function qC({initialPrompt:n,tasks:i,onTaskClick:a,disabled:o}){return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:x.jsx("h1",{className:"text-xl-minus font-semibold text-slate-900",children:n||"How can I assist you today?"})}),x.jsx(HC,{onTaskClick:a,disabled:o,tasks:i})]})}const YC=Object.freeze(Object.defineProperty({__proto__:null,default:qC},Symbol.toStringTag,{value:"Module"}));function VC({className:n="",onRetry:i,onStartNewSession:a,showRetryButton:o,startNewConnection:s,clearError:c,error:f,isConnected:h}){const{isOnline:p}=Xh(),[m,g]=w.useState(!0);return w.useEffect(()=>{if(!s&&!o&&!!f){g(!0);const b=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(b)}g(!0)},[f,s,o]),s?x.jsx("div",{className:Ce("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:x.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:f?.title??"Something went wrong"}),x.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),x.jsxs("button",{onClick:()=>{c(),a?.()},className:"p-2 bg-[#3B71F7] text-white text-xs font-semibold rounded-lg hover:bg-[#2E5CD9] transition-colors flex items-center gap-2 flex-shrink-0",children:[x.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),x.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o&&f?.title?x.jsx("div",{className:Ce("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:x.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:f?.title}),x.jsx("div",{className:"text-slate-500 text-xs mt-1",children:f?.description??"Please check your connection and try again"})]}),x.jsxs("button",{onClick:()=>{c(),i?.()},className:"px-4 py-2 bg-lavender-600 text-white text-sm font-semibold rounded-lg hover:bg-lavender-700 transition-colors flex items-center gap-2 flex-shrink-0",children:[x.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Retry"]})]})}):h&&p&&!f?.title||!s&&!o&&!m?null:x.jsx("div",{className:Ce("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:x.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:p?f?.title||"Connecting...":"No internet connection"}),x.jsx("div",{className:"text-slate-500 text-xs mt-1",children:p?f?.description??"Please wait while we try to connect":"Please check your internet connection"})]}),!h&&x.jsx("div",{className:"flex-shrink-0",children:x.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const GC=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:VC},Symbol.toStringTag,{value:"Module"}));return cs.renderMedAssist=Kh,Object.defineProperty(cs,Symbol.toStringTag,{value:"Module"}),cs})({});
|
|
54
|
+
`}),a}function sp(n){let i=0,a=n.charCodeAt(i);for(;a===9||a===32;)i++,a=n.charCodeAt(i);return n.slice(i)}function up(n,i){const a=HT(n,i),o=a.one(n,void 0),s=RT(a),c=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
|
|
55
|
+
`},s),c}function PT(n,i){return n&&"run"in n?async function(a,o){const s=up(a,{file:o,...i});await n.run(s,o)}:function(a,o){return up(a,{file:o,...n||i})}}function cp(n){if(n)throw n}var gu,fp;function FT(){if(fp)return gu;fp=1;var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},c=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var g=n.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var S;for(S in m);return typeof S>"u"||n.call(m,S)},f=function(m,g){a&&g.name==="__proto__"?a(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},h=function(m,g){if(g==="__proto__")if(n.call(m,g)){if(o)return o(m,g).value}else return;return m[g]};return gu=function p(){var m,g,y,S,b,M,O=arguments[0],z=1,_=arguments.length,q=!1;for(typeof O=="boolean"&&(q=O,O=arguments[1]||{},z=2),(O==null||typeof O!="object"&&typeof O!="function")&&(O={});z<_;++z)if(m=arguments[z],m!=null)for(g in m)y=h(O,g),S=h(m,g),O!==S&&(q&&S&&(c(S)||(b=s(S)))?(b?(b=!1,M=y&&s(y)?y:[]):M=y&&c(y)?y:{},f(O,{name:g,newValue:p(q,M,S)})):typeof S<"u"&&f(O,{name:g,newValue:S}));return O},gu}var XT=FT();const yu=fs(XT);function vu(n){if(typeof n!="object"||n===null)return!1;const i=Object.getPrototypeOf(n);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function KT(){const n=[],i={run:a,use:o};return i;function a(...s){let c=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...s);function h(p,...m){const g=n[++c];let y=-1;if(p){f(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,g?QT(g,h)(...m):f(null,...m)}}function o(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return n.push(s),i}}function QT(n,i){let a;return o;function o(...f){const h=n.length>f.length;let p;h&&f.push(s);try{p=n.apply(this,f)}catch(m){const g=m;if(h&&a)throw g;return s(g)}h||(p&&p.then&&typeof p.then=="function"?p.then(c,s):p instanceof Error?s(p):c(p))}function s(f,...h){a||(a=!0,i(f,...h))}function c(f){s(null,f)}}const An={basename:ZT,dirname:JT,extname:WT,join:$T,sep:"/"};function ZT(n,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Di(n);let a=0,o=-1,s=n.length,c;if(i===void 0||i.length===0||i.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else o<0&&(c=!0,o=s+1);return o<0?"":n.slice(a,o)}if(i===n)return"";let f=-1,h=i.length-1;for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else f<0&&(c=!0,f=s+1),h>-1&&(n.codePointAt(s)===i.codePointAt(h--)?h<0&&(o=s):(h=-1,o=f));return a===o?o=f:o<0&&(o=n.length),n.slice(a,o)}function JT(n){if(Di(n),n.length===0)return".";let i=-1,a=n.length,o;for(;--a;)if(n.codePointAt(a)===47){if(o){i=a;break}}else o||(o=!0);return i<0?n.codePointAt(0)===47?"/":".":i===1&&n.codePointAt(0)===47?"//":n.slice(0,i)}function WT(n){Di(n);let i=n.length,a=-1,o=0,s=-1,c=0,f;for(;i--;){const h=n.codePointAt(i);if(h===47){if(f){o=i+1;break}continue}a<0&&(f=!0,a=i+1),h===46?s<0?s=i:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||a<0||c===0||c===1&&s===a-1&&s===o+1?"":n.slice(s,a)}function $T(...n){let i=-1,a;for(;++i<n.length;)Di(n[i]),n[i]&&(a=a===void 0?n[i]:a+"/"+n[i]);return a===void 0?".":eC(a)}function eC(n){Di(n);const i=n.codePointAt(0)===47;let a=tC(n,!i);return a.length===0&&!i&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),i?"/"+a:a}function tC(n,i){let a="",o=0,s=-1,c=0,f=-1,h,p;for(;++f<=n.length;){if(f<n.length)h=n.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||c===1))if(s!==f-1&&c===2){if(a.length<2||o!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",o=0):(a=a.slice(0,p),o=a.length-1-a.lastIndexOf("/")),s=f,c=0;continue}}else if(a.length>0){a="",o=0,s=f,c=0;continue}}i&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+n.slice(s+1,f):a=n.slice(s+1,f),o=f-s-1;s=f,c=0}else h===46&&c>-1?c++:c=-1}return a}function Di(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const nC={cwd:lC};function lC(){return"/"}function bu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function rC(n){if(typeof n=="string")n=new URL(n);else if(!bu(n)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(n.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return iC(n)}function iC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const i=n.pathname;let a=-1;for(;++a<i.length;)if(i.codePointAt(a)===37&&i.codePointAt(a+1)===50){const o=i.codePointAt(a+2);if(o===70||o===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const Su=["history","path","basename","stem","extname","dirname"];class dp{constructor(i){let a;i?bu(i)?a={path:i}:typeof i=="string"||aC(i)?a={value:i}:a=i:a={},this.cwd="cwd"in a?"":nC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<Su.length;){const c=Su[o];c in a&&a[c]!==void 0&&a[c]!==null&&(this[c]=c==="history"?[...a[c]]:a[c])}let s;for(s in a)Su.includes(s)||(this[s]=a[s])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(i){xu(i,"basename"),Eu(i,"basename"),this.path=An.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(i){hp(this.basename,"dirname"),this.path=An.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(i){if(Eu(i,"extname"),hp(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=An.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){bu(i)&&(i=rC(i)),xu(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(i){xu(i,"stem"),Eu(i,"stem"),this.path=An.join(this.dirname||"",i+(this.extname||""))}fail(i,a,o){const s=this.message(i,a,o);throw s.fatal=!0,s}info(i,a,o){const s=this.message(i,a,o);return s.fatal=void 0,s}message(i,a,o){const s=new Mt(i,a,o);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function Eu(n,i){if(n&&n.includes(An.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+An.sep+"`")}function xu(n,i){if(!n)throw new Error("`"+i+"` cannot be empty")}function hp(n,i){if(!n)throw new Error("Setting `"+i+"` requires `path` to be set too")}function aC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const oC=(function(n){const o=this.constructor.prototype,s=o[n],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,o),c}),sC={}.hasOwnProperty;class Tu extends oC{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=KT()}copy(){const i=new Tu;let a=-1;for(;++a<this.attachers.length;){const o=this.attachers[a];i.use(...o)}return i.data(yu(!0,{},this.namespace)),i}data(i,a){return typeof i=="string"?arguments.length===2?(_u("data",this.frozen),this.namespace[i]=a,this):sC.call(this.namespace,i)&&this.namespace[i]||void 0:i?(_u("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const s=a.call(i,...o);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const a=Pa(i),o=this.parser||this.Parser;return Cu("parse",o),o(String(a),a)}process(i,a){const o=this;return this.freeze(),Cu("process",this.parser||this.Parser),wu("process",this.compiler||this.Compiler),a?s(void 0,a):new Promise(s);function s(c,f){const h=Pa(i),p=o.parse(h);o.run(p,h,function(g,y,S){if(g||!y||!S)return m(g);const b=y,M=o.stringify(b,S);fC(M)?S.value=M:S.result=M,m(g,S)});function m(g,y){g||!y?f(g):c?c(y):a(void 0,y)}}}processSync(i){let a=!1,o;return this.freeze(),Cu("processSync",this.parser||this.Parser),wu("processSync",this.compiler||this.Compiler),this.process(i,s),pp("processSync","process",a),o;function s(c,f){a=!0,cp(c),o=f}}run(i,a,o){mp(i),this.freeze();const s=this.transformers;return!o&&typeof a=="function"&&(o=a,a=void 0),o?c(void 0,o):new Promise(c);function c(f,h){const p=Pa(a);s.run(i,p,m);function m(g,y,S){const b=y||i;g?h(g):f?f(b):o(void 0,b,S)}}}runSync(i,a){let o=!1,s;return this.run(i,a,c),pp("runSync","run",o),s;function c(f,h){cp(f),s=h,o=!0}}stringify(i,a){this.freeze();const o=Pa(a),s=this.compiler||this.Compiler;return wu("stringify",s),mp(i),s(i,o)}use(i,...a){const o=this.attachers,s=this.namespace;if(_u("use",this.frozen),i!=null)if(typeof i=="function")p(i,a);else if(typeof i=="object")Array.isArray(i)?h(i):f(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");h(m.plugins),m.settings&&(s.settings=yu(!0,s.settings,m.settings))}function h(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];c(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,S=-1;for(;++y<o.length;)if(o[y][0]===m){S=y;break}if(S===-1)o.push([m,...g]);else if(g.length>0){let[b,...M]=g;const O=o[S][1];vu(O)&&vu(b)&&(b=yu(!0,O,b)),o[S]=[m,b,...M]}}}}const uC=new Tu().freeze();function Cu(n,i){if(typeof i!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function wu(n,i){if(typeof i!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function _u(n,i){if(i)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mp(n){if(!vu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function pp(n,i,a){if(!a)throw new Error("`"+n+"` finished async. Use `"+i+"` instead")}function Pa(n){return cC(n)?n:new dp(n)}function cC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function fC(n){return typeof n=="string"||dC(n)}function dC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const hC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gp=[],yp={allowDangerousHtml:!0},mC=/^(https?|ircs?|mailto|xmpp)$/i,pC=[{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 gC(n){const i=yC(n),a=vC(n);return bC(i.runSync(i.parse(a),a),n)}function yC(n){const i=n.rehypePlugins||gp,a=n.remarkPlugins||gp,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...yp}:yp;return uC().use(Z1).use(a).use(PT,o).use(i)}function vC(n){const i=n.children||"",a=new dp;return typeof i=="string"&&(a.value=i),a}function bC(n,i){const a=i.allowedElements,o=i.allowElement,s=i.components,c=i.disallowedElements,f=i.skipHtml,h=i.unwrapDisallowed,p=i.urlTransform||SC;for(const g of pC)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+hC+g.id,void 0);return op(n,m),BE(n,{Fragment:x.Fragment,components:s,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function m(g,y,S){if(g.type==="raw"&&S&&typeof y=="number")return f?S.children.splice(y,1):S.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in nu)if(Object.hasOwn(nu,b)&&Object.hasOwn(g.properties,b)){const M=g.properties[b],O=nu[b];(O===null||O.includes(g.tagName))&&(g.properties[b]=p(String(M||""),b,g))}}if(g.type==="element"){let b=a?!a.includes(g.tagName):c?c.includes(g.tagName):!1;if(!b&&o&&typeof y=="number"&&(b=!o(g,y,S)),b&&S&&typeof y=="number")return h&&g.children?S.children.splice(y,1,...g.children):S.children.splice(y,1),y}}}function SC(n){const i=n.indexOf(":"),a=n.indexOf("?"),o=n.indexOf("#"),s=n.indexOf("/");return i===-1||s!==-1&&i>s||a!==-1&&i>a||o!==-1&&i>o||mC.test(n.slice(0,i))?n:""}function EC({text:n,maxWidth:i="200px",className:a="",icon:o,onClick:s,disabled:c=!1}){const[f,h]=w.useState(!1),p=w.useRef(null),m=w.useRef(null);return w.useEffect(()=>{const g=()=>{if(p.current&&m.current){const y=p.current.offsetWidth,S=m.current.scrollWidth;h(S>y)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,i]),n?x.jsxs("div",{ref:p,onClick:c?void 0:s,className:Te("inline-flex items-center gap-2 rounded-full border border-lavender-200/60 bg-white/80 px-3 py-1 shadow-sm text-xs text-slate-700 hover: cursor-pointer",a,c?"opacity-50 cursor-not-allowed":""),style:{maxWidth:i},title:n,children:[o&&x.jsx("span",{className:"text-lavender-500",children:o}),x.jsx("div",{className:"pill-marquee-wrapper",children:x.jsx("span",{ref:m,className:Te("block whitespace-normal",f?"pill-marquee":""),children:n})})]}):null}var xC=Xf[" useInsertionEffect ".trim().toString()]||rl;function TC({prop:n,defaultProp:i,onChange:a=()=>{},caller:o}){const[s,c,f]=CC({defaultProp:i,onChange:a}),h=n!==void 0,p=h?n:s;{const g=w.useRef(n!==void 0);w.useEffect(()=>{const y=g.current;if(y!==h){const S=y?"controlled":"uncontrolled",b=h?"controlled":"uncontrolled"}g.current=h},[h,o])}const m=w.useCallback(g=>{if(h){const y=wC(g)?g(n):g;y!==n&&f.current?.(y)}else c(g)},[h,n,c,f]);return[p,m]}function CC({defaultProp:n,onChange:i}){const[a,o]=w.useState(n),s=w.useRef(a),c=w.useRef(i);return xC(()=>{c.current=i},[i]),w.useEffect(()=>{s.current!==a&&(c.current?.(a),s.current=a)},[a,s]),[a,o,c]}function wC(n){return typeof n=="function"}function _C(n){const i=w.useRef({value:n,previous:n});return w.useMemo(()=>(i.current.value!==n&&(i.current.previous=i.current.value,i.current.value=n),i.current.previous),[n])}function AC(n){const[i,a]=w.useState(void 0);return rl(()=>{if(n){a({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let f,h;if("borderBoxSize"in c){const p=c.borderBoxSize,m=Array.isArray(p)?p[0]:p;f=m.inlineSize,h=m.blockSize}else f=n.offsetWidth,h=n.offsetHeight;a({width:f,height:h})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else a(void 0)},[n]),i}var Fa="Checkbox",[NC]=nd(Fa),[RC,Au]=NC(Fa);function OC(n){const{__scopeCheckbox:i,checked:a,children:o,defaultChecked:s,disabled:c,form:f,name:h,onCheckedChange:p,required:m,value:g="on",internal_do_not_use_render:y}=n,[S,b]=TC({prop:a,defaultProp:s??!1,onChange:p,caller:Fa}),[M,O]=w.useState(null),[z,_]=w.useState(null),q=w.useRef(!1),B=M?!!f||!!M.closest("form"):!0,$={checked:S,disabled:c,setChecked:b,control:M,setControl:O,name:h,form:f,value:g,hasConsumerStoppedPropagationRef:q,required:m,defaultChecked:ul(s)?!1:s,isFormControl:B,bubbleInput:z,setBubbleInput:_};return x.jsx(RC,{scope:i,...$,children:kC(y)?y($):o})}var vp="CheckboxTrigger",bp=w.forwardRef(({__scopeCheckbox:n,onKeyDown:i,onClick:a,...o},s)=>{const{control:c,value:f,disabled:h,checked:p,required:m,setControl:g,setChecked:y,hasConsumerStoppedPropagationRef:S,isFormControl:b,bubbleInput:M}=Au(vp,n),O=Mn(s,g),z=w.useRef(p);return w.useEffect(()=>{const _=c?.form;if(_){const q=()=>y(z.current);return _.addEventListener("reset",q),()=>_.removeEventListener("reset",q)}},[c,y]),x.jsx(ll.button,{type:"button",role:"checkbox","aria-checked":ul(p)?"mixed":p,"aria-required":m,"data-state":Cp(p),"data-disabled":h?"":void 0,disabled:h,value:f,...o,ref:O,onKeyDown:zn(i,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:zn(a,_=>{y(q=>ul(q)?!0:!q),M&&b&&(S.current=_.isPropagationStopped(),S.current||_.stopPropagation())})})});bp.displayName=vp;var Nu=w.forwardRef((n,i)=>{const{__scopeCheckbox:a,name:o,checked:s,defaultChecked:c,required:f,disabled:h,value:p,onCheckedChange:m,form:g,...y}=n;return x.jsx(OC,{__scopeCheckbox:a,checked:s,defaultChecked:c,disabled:h,required:f,onCheckedChange:m,name:o,form:g,value:p,internal_do_not_use_render:({isFormControl:S})=>x.jsxs(x.Fragment,{children:[x.jsx(bp,{...y,ref:i,__scopeCheckbox:a}),S&&x.jsx(Tp,{__scopeCheckbox:a})]})})});Nu.displayName=Fa;var Sp="CheckboxIndicator",Ep=w.forwardRef((n,i)=>{const{__scopeCheckbox:a,forceMount:o,...s}=n,c=Au(Sp,a);return x.jsx(ar,{present:o||ul(c.checked)||c.checked===!0,children:x.jsx(ll.span,{"data-state":Cp(c.checked),"data-disabled":c.disabled?"":void 0,...s,ref:i,style:{pointerEvents:"none",...n.style}})})});Ep.displayName=Sp;var xp="CheckboxBubbleInput",Tp=w.forwardRef(({__scopeCheckbox:n,...i},a)=>{const{control:o,hasConsumerStoppedPropagationRef:s,checked:c,defaultChecked:f,required:h,disabled:p,name:m,value:g,form:y,bubbleInput:S,setBubbleInput:b}=Au(xp,n),M=Mn(a,b),O=_C(c),z=AC(o);w.useEffect(()=>{const q=S;if(!q)return;const B=window.HTMLInputElement.prototype,G=Object.getOwnPropertyDescriptor(B,"checked").set,N=!s.current;if(O!==c&&G){const D=new Event("click",{bubbles:N});q.indeterminate=ul(c),G.call(q,ul(c)?!1:c),q.dispatchEvent(D)}},[S,O,c,s]);const _=w.useRef(ul(c)?!1:c);return x.jsx(ll.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??_.current,required:h,disabled:p,name:m,value:g,form:y,...i,tabIndex:-1,ref:M,style:{...i.style,...z,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Tp.displayName=xp;function kC(n){return typeof n=="function"}function ul(n){return n==="indeterminate"}function Cp(n){return ul(n)?"indeterminate":n?"checked":"unchecked"}const Ru=w.forwardRef(({className:n,...i},a)=>x.jsx(Nu,{ref:a,className:Te("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...i,children:x.jsx(Ep,{className:Te("grid place-content-center text-current"),children:x.jsx(Fd,{className:"h-4 w-4"})})}));Ru.displayName=Nu.displayName;var ql=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(ql||{});function MC({options:n,selectedValues:i,onSelectionChange:a,additionalOption:o,className:s,required:c=!0,maxSelections:f,error:h,disabled:p}){const m=o?{id:`extra-${o}`,label:o==="all_of_the_above"?"All of the above":"None of the above",value:o==="all_of_the_above"?"All of the above":"None of the above"}:null,g=_=>m?_.filter(q=>q!==m.value):_,y=_=>m?o==="none_of_the_above"?_?[m.value]:[]:o==="all_of_the_above"?_?[...n.map(q=>q.value),m.value]:g(i):_?[...i,m.value]:g(i):i,S=(_,q)=>{const B=m?g(i):i;return q?f&&B.length>=f?null:[...B,_]:B.filter($=>$!==_)},b=_=>!(c&&_.length===0&&i.length===1),M=(_,q)=>{const $=m&&_===m.value?y(q):S(_,q);$!==null&&b($)&&a($)},O=!c||i.length>0,z=m?i.filter(_=>_!==m.value).length:i.length;return n.length?x.jsxs("div",{className:Te("bg-gray-50","rounded-lg","p-4","border border-gray-200",s),children:[x.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const q=p||f&&z>=f&&!i.includes(_.value);return x.jsxs("div",{className:"flex items-center space-x-3",children:[x.jsx(Ru,{id:_.id,checked:!!i.includes(_.value),disabled:!!q,onCheckedChange:B=>M(_.value,!!B),className:"mt-0.5 border border-muted-foreground"}),x.jsx("label",{htmlFor:_.id,className:Te("text-sm font-medium leading-none cursor-pointer",q?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:_.label})]},_.id)}),m&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"border-t border-gray-300 my-3"}),x.jsxs("div",{className:"flex items-center space-x-3",children:[x.jsx(Ru,{id:m.id,checked:i.includes(m.value),onCheckedChange:_=>M(m.value,_),className:"mt-0.5 border border-muted-foreground"}),x.jsx("label",{htmlFor:m.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:m.label})]})]})]}),h&&x.jsx("p",{className:"text-sm text-red-500 mt-3",children:h}),c&&!O&&x.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),f&&z>=f&&x.jsx("p",{className:"text-sm text-blue-600 mt-3",children:f===1?"You can select only 1 option":`Maximum ${f} selections allowed`})]}):null}const zC=n=>n?n.split(" ").map(i=>i[0]).slice(0,2).join("").toUpperCase():"DR",DC=n=>{const i=new Date(n),a=i.toLocaleDateString(void 0,{weekday:"short"}),o=i.toLocaleDateString(void 0,{day:"2-digit"});return{weekday:a,dayNum:o}};function jC({value:n,onValueChange:i,placeholder:a="Select an option",className:o,triggerClassName:s,contentClassName:c,disabled:f=!1,options:h=[],size:p="default"}){const[m,g]=w.useState(!1),y=w.useRef(null),S=w.useRef(null),b=h.find(z=>z.value===n);w.useEffect(()=>{const z=_=>{m&&_.key==="Escape"&&(g(!1),S.current?.focus())};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[m]);const M=z=>{i?.(z),g(!1),S.current?.focus()},O=()=>{f||g(!m)};return x.jsxs("div",{className:Te("relative w-full",o),children:[x.jsxs("button",{ref:S,type:"button",onClick:O,disabled:f,className:Te('border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*="text-"])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 overflow-hidden',p==="default"?"min-h-9":"min-h-8",s),"aria-expanded":m,"aria-haspopup":"listbox",children:[x.jsx("span",{className:Te("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!b&&"text-muted-foreground"),children:b?b.label:a}),x.jsx(As,{className:Te("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",m&&"rotate-180")})]}),m&&x.jsx("div",{ref:y,className:Te("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[300px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto rounded-md shadow-md mt-1",c),role:"listbox",children:x.jsx("div",{className:"p-1",children:h.length===0?x.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground text-center",children:"No options available"}):h.map(z=>{const _=z.value===n;return x.jsxs("div",{onClick:()=>M(z.value),className:Te("relative flex w-full cursor-pointer items-center gap-1 rounded-sm py-2.5 px-3 text-sm outline-none select-none transition-colors duration-150","hover:bg-accent hover:text-accent-foreground","focus-visible:bg-accent focus-visible:text-accent-foreground","active:bg-accent/80",_&&"bg-accent/50 text-foreground",f&&"pointer-events-none opacity-50 cursor-not-allowed"),role:"option","aria-selected":_,tabIndex:f?-1:0,onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),f||M(z.value))},children:[x.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:z.label}),_&&x.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:x.jsx(Fd,{className:"size-4 text-foreground"})})]},z.value)})})})]})}function LC({doctor:n,doctorDetails:i,callTool:a,onBook:o,callbacks:s,disabled:c,error:f}){const[h,p]=w.useState(!1),[m,g]=w.useState(null),[y,S]=w.useState(null),[b,M]=w.useState(""),[O,z]=w.useState(0),[_,q]=w.useState(!1),[B,$]=w.useState(!1),[G,N]=w.useState({});w.useEffect(()=>{!n.hospital_id&&i.hospitals.length?M(i.hospitals[0].hospital_id):n.hospital_id&&M(n.hospital_id)},[n.hospital_id,i.hospitals]),w.useEffect(()=>{if(n?.availability?.length){const ne=n.hospital_id||b;ne&&N(C=>({...C,[ne]:n.availability}))}},[n?.availability,n?.hospital_id]);const D=w.useCallback(async ne=>{if(!(!b||!n.doctor_id))try{q(!0);const C={doctor_id:n.doctor_id,hospital_id:b},A=await a(ne,C);A.available_dates.length&&N(V=>({...V,[b]:A.available_dates.map(T=>({date:T,slots:[]}))}))}catch{}finally{q(!1)}},[b,n.doctor_id]);w.useEffect(()=>{s?.[ze.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES]&&!n?.availability?.length&&b&&D(s[ze.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name)},[s,n.availability,b,D]);const j=w.useMemo(()=>G[b]||[],[G,b]),K=w.useMemo(()=>{if(!j.length)return null;const ne=O,C=Math.min(ne+3,j.length);return j.slice(ne,C).map(A=>({slots:A.slots,date:A.date,...DC(A.date),hasSlots:A.slots.length>0}))},[j,O]),ae=w.useMemo(()=>y&&j.find(ne=>ne.date===y)||null,[j,y]),le=ne=>{g(ne)},oe=w.useCallback(()=>{z(ne=>Math.max(0,ne-3)),g(null)},[]),_e=w.useCallback(()=>{const ne=Math.max(0,j.length-3);z(C=>Math.min(ne,C+3)),g(null)},[j.length]),ue=w.useCallback(async(ne,C)=>{try{$(!0);const A=await a(ne,C);A.slots.length&&N(V=>{const T=V[C.hospital_id]||[],te=T.findIndex(ce=>ce.date===C.date);if(te>=0){const ce=[...T];return ce[te]={date:C.date,slots:A.slots},{...V,[C.hospital_id]:ce}}else return{...V,[C.hospital_id]:[...T,{date:C.date,slots:A.slots}]}})}catch{}finally{$(!1)}},[a]),ee=w.useCallback(async ne=>{if(y===ne)return;S(ne),!j.find(T=>T.date===ne)?.slots.length&&n.doctor_id&&b&&s?.[ze.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS]&&n.doctor_id&&await ue(s[ze.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS].tool_name,{doctor_id:n.doctor_id,hospital_id:b,date:ne});const V=j.find(T=>T.date===ne);n?.selected_date===ne&&n?.slot_preference&&V?.slots.includes(n.slot_preference)?g(n.slot_preference):g(null)},[j,b]);w.useEffect(()=>{if(y||!j.length)return;const ne=n.selected_date||j[0]?.date;ne&&ee(ne).catch(console.error)},[n.selected_date,j,y,ee]);const U=()=>{o&&m&&y&&o({date:y,time:m,doctorData:{doctor:i,hospital_id:b}})},W=O>0,Z=O<Math.max(0,j.length-3);return i?x.jsxs(si,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[x.jsx(Kd,{className:"flex flex-row items-center justify-between gap-3 bg-lavender-50 rounded-t-xl p-4 border-b border-lavender-100 overflow-hidden",children:x.jsxs("div",{className:"flex items-center gap-3",children:[i.profile_pic&&x.jsxs(ui,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[x.jsx(sh,{src:i.profile_pic,alt:`${i.name} profile photo`,crossOrigin:"anonymous"}),x.jsx(ci,{className:"bg-lavender-100 text-lavender-700",children:zC(i.name)})]}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[x.jsx("h3",{className:" text-base font-bold text-slate-900",children:i.name}),i.profile_link?x.jsx("a",{href:i.profile_link,target:"_blank",rel:"noreferrer",className:"text-xs font-semibold text-lavender-600 hover:text-lavender-700 hover:underline",children:"View profile"}):null]}),x.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[i.specialty,i.experience&&x.jsxs(x.Fragment,{children:[" • ",i.experience]})]})]})]})}),x.jsxs(Qd,{className:"px-4 py-2",children:[x.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[i?.timings&&x.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[x.jsx(cS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),x.jsx("span",{className:"text-slate-600 text-xs",children:i?.timings})]}),i.languages?x.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[x.jsx(dS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),x.jsx("span",{className:"text-slate-600",children:i.languages})]}):null,i?.hospitals&&i.hospitals?.length>1?b&&x.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[x.jsx(Pd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),x.jsx(jC,{options:i.hospitals.map(ne=>({value:ne.hospital_id,label:ne.name||""})),placeholder:"Select Hospital",disabled:c,onValueChange:ne=>M(ne),value:b})]}):x.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[x.jsx(Pd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),x.jsx("span",{className:"text-slate-600",children:i.hospitals?.[0].name||""})]})]}),j.length||_?x.jsx(Et,{type:"button",variant:"outline","aria-expanded":h,"aria-controls":"ap-slots",onClick:()=>p(ne=>!ne),disabled:_,className:"mt-3 w-full border-lavender-500 text-lavender-600 hover:bg-lavender-50 hover:border-lavender-600 disabled:opacity-50",children:_?x.jsxs(x.Fragment,{children:[x.jsx(Xd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"mr-1",children:h?"Hide slots":"Show available slots"}),x.jsx(As,{className:Te("h-4 w-4 transition-transform",h&&"rotate-180"),"aria-hidden":!0})]})}):x.jsx("div",{className:"mt-3 w-full flex items-center justify-center py-3 px-4 bg-lavender-50 border border-lavender-200 rounded-lg",children:x.jsx("span",{className:"text-sm text-slate-600 font-medium",children:"No details available"})}),h&&j.length&&x.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:K?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[x.jsx(Et,{type:"button",variant:"outline",size:"icon",onClick:oe,"aria-label":"Previous 3 days",disabled:c||!W,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:x.jsx(sS,{className:"h-4 w-4"})}),x.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:K.map((ne,C)=>{const A=y===ne.date,V=!ne.hasSlots;return x.jsxs(Et,{type:"button",variant:"outline",onClick:()=>!V&&ee(ne.date),disabled:V||c,"aria-current":A?"date":void 0,className:Te("flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",A&&"border-lavender-500 ring-2 ring-lavender-200 bg-lavender-50 shadow-sm",V&&"border-slate-200 bg-slate-50 text-slate-300 cursor-not-allowed",!A&&!V&&"border-slate-200 bg-white hover:bg-lavender-50 hover:border-lavender-300"),children:[x.jsx("span",{className:Te("text-[10px] tracking-wide w-full text-center font-medium",A&&"text-lavender-700",V&&"text-slate-300",!A&&!V&&"text-slate-600"),children:ne.weekday}),x.jsx("span",{className:Te("text-xs font-bold w-full text-center",A&&"text-lavender-700",V&&"text-slate-300",!A&&!V&&"text-slate-900"),children:ne.dayNum})]},`${ne.date}-${C}`)})}),x.jsx(Et,{type:"button",variant:"outline",size:"icon",onClick:_e,"aria-label":"Next 3 days",disabled:c||!Z,className:"h-8 w-8 flex-shrink-0 rounded-md border-lavender-200 bg-white text-lavender-700 hover:bg-lavender-50 hover:border-lavender-300 disabled:opacity-50",children:x.jsx(uS,{className:"h-4 w-4"})})]}),x.jsx("div",{className:"px-0.5 py-3",children:B?x.jsxs("div",{className:"flex items-center justify-center py-4",children:[x.jsx(Xd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),x.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):ae?.slots?.length?x.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:ae.slots.map((ne,C)=>{const A=m===ne;return x.jsxs(Et,{type:"button",variant:"outline",onClick:()=>le(ne),"aria-pressed":A,disabled:c,className:Te("inline-flex h-9 items-center justify-center gap-2 rounded-lg px-3 text-xs font-semibold transition-all",A?"border-lavender-600 bg-lavender-600 text-white shadow-sm hover:bg-lavender-700 hover:border-lavender-700":"border-lavender-200 bg-white text-slate-900 hover:bg-lavender-50 hover:border-lavender-300"),children:[x.jsx(oS,{className:Te("h-3.5 w-3.5 flex-shrink-0",A?"text-white":"text-lavender-600")}),x.jsx("span",{className:"truncate",children:ne})]},ne||`slot-${C}`)})}):x.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),x.jsx("div",{className:"px-0.5 pb-1.5",children:x.jsxs(Et,{type:"button",onClick:U,disabled:!m||c,"aria-disabled":!m,className:"w-full h-10 gap-2 bg-lavender-600 text-white hover:bg-lavender-700 disabled:opacity-60 shadow-sm font-semibold",children:["Book appointment",x.jsx(aS,{className:"h-4 w-4"})]})})]}):x.jsx("div",{className:"px-1 pb-2 pt-1",children:x.jsx("p",{className:"text-sm text-slate-600",children:f||"No availability provided."})})})]})]}):null}function UC({doctorAvailabilities:n,doctorDetails:i,callbacks:a,onBook:o,disabled:s=!1,callTool:c}){const[f,h]=w.useState({}),[p,m]=w.useState(!1),[g,y]=w.useState(null),[S,b]=w.useState(0),M=n.length,O=Math.min(3,n.length),z=M-O;w.useEffect(()=>{(async()=>{m(!0),y(null);const G=n.slice(0,O).filter(j=>j.doctor_id).map(async j=>{try{const K=await _(j.doctor_id);return{doctorId:j.doctor_id,doctorDetails:K||null}}catch{return{doctorId:j.doctor_id,doctorDetails:null}}}),N=await Promise.allSettled(G),D={};N.forEach(j=>{if(j.status==="fulfilled"){const{doctorId:K,doctorDetails:ae}=j.value;K&&ae&&(D[K]=ae)}}),h(D),b(Object.keys(D).length),m(!1)})()},[]);const _=async B=>i?i[B]:a&&a[ze.SYNAPSE_TOOL_CALLBACK_NAME.DOCTOR_DETAILS]&&await c(a[ze.SYNAPSE_TOOL_CALLBACK_NAME.DOCTOR_DETAILS].tool_name,{doctor_id:B})||null,q=async()=>{if(S>=n.length)return;m(!0),y(null);const $=n.slice(S).filter(D=>D.doctor_id).map(async D=>{try{const j=await _(D.doctor_id);return{doctorId:D.doctor_id,detail:j}}catch{return{doctorId:D.doctor_id,detail:null}}}),G=await Promise.allSettled($),N={};G.forEach(D=>{if(D.status==="fulfilled"){const{doctorId:j,detail:K}=D.value;j&&K&&(N[j]=K)}}),h(D=>({...D,...N})),b(D=>D+Object.keys(N).length),m(!1)};return p&&S===0?x.jsx("div",{className:"flex items-center justify-center py-8",children:x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),x.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):S===0?x.jsx("div",{className:"flex items-center justify-center py-2",children:x.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):x.jsxs("div",{className:"space-y-4",children:[x.jsx("div",{className:"space-y-4",children:n.map((B,$)=>B?.doctor_id&&f[B.doctor_id]&&x.jsx(LC,{doctor:B,doctorDetails:f[B.doctor_id],callTool:c,onBook:o,callbacks:a,disabled:s},`${$}`))}),S<M&&x.jsx("div",{className:"flex justify-center",children:x.jsx(Et,{variant:"outline",onClick:q,disabled:p,className:"px-6 py-2",children:p?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--color-primary)] mr-2"}),"Loading more doctors..."]}):`Show more (${z} more)`})}),g&&S>0&&x.jsxs("div",{className:"text-center",children:[x.jsx("p",{className:"text-sm text-red-500 mb-2",children:g}),x.jsx(Et,{variant:"outline",size:"sm",onClick:q,disabled:p,children:"Retry loading more"})]})]})}function BC({role:n,content:i,timestamp:a,iconUrl:o,files:s,isLastMessage:c,progressMessage:f,toolEscalationData:h,toolCallStatus:p,callTool:m,onSendMessage:g}){const y=n==="user",[S,b]=w.useState([]),{isStreaming:M}=dr(),O=async G=>{const N=Date.now().toString();await g({message:G,messageId:N,toolCalled:!0})},z=async G=>{await g({message:`I want to book an appointment for ${G.doctorData?.doctor?.name||"the doctor"} on ${G.date} for ${G.time}`,toolCalled:!0})},_=G=>{b(G)},q=()=>{if(!h?.details?.input?.additional_option)return;const G=h.details?.input?.additional_option;if(typeof G=="string"&&(G===ql.NOTA||G===ql.AOTA))return G;if(typeof G=="object"&&G!==null){if(G.NOTA===ql.NOTA)return ql.NOTA;if(G.AOTA===ql.AOTA)return ql.AOTA}},B=()=>{const G=h?.details?.input?.options;return G?Array.isArray(G)?G.map((N,D)=>({id:`option-${D}`,label:N.label,value:N.value})):Object.keys(G).map((N,D)=>({id:`option-${D}`,label:N,value:N})):[]},$=async()=>{if(S.length>0){const G=S.join(", "),N=Date.now().toString();await g({message:G,messageId:N,toolCalled:!0})}};return x.jsx("div",{className:Te("flex",y?"justify-end":"justify-start"),children:x.jsxs("div",{className:Te("flex gap-3",y?"flex-row-reverse":"flex-row",h?.details?.component===ze.SYNAPSE_COMPONENTS.MULTI?"max-w-md":y?"max-w-[60%]":"max-w-xs"),children:[!y&&x.jsx(ui,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:x.jsx(ci,{className:"bg-transparent text-white text-xs font-bold",children:o?x.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):x.jsx(Gd,{className:"w-full h-full"})})}),x.jsxs(si,{className:Te("px-4 py-2 rounded-2xl shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",y?"bg-lavender-100/95 backdrop-blur-md text-slate-900 rounded-br-none border border-lavender-200/60":"bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",h&&"w-full"),children:[p&&!y&&x.jsx("div",{className:"text-xs text-slate-500 mb-2 pb-2 border-b border-slate-200",children:p}),!p&&f&&!y&&c&&x.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:f}),i&&x.jsx("div",{className:"text-sm markdown-content mb-3",children:x.jsx(gC,{children:`${i} ${!y&&M?"...":""}`})}),s&&s.length>0&&x.jsx("div",{className:"mt-2",children:x.jsx(Wh,{files:s,isPreview:!1,className:""})}),h?.details?.component===ze.SYNAPSE_COMPONENTS.PILL&&h?.details?.input?.options&&x.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:h.details?.input?.options.map((G,N)=>x.jsx(EC,{disabled:h?.isResponded,text:G?.label||"",onClick:()=>O(G?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},N))}),h?.details?.component===ze.SYNAPSE_COMPONENTS.MULTI&&h?.details?.input?.options&&x.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[x.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),x.jsx(MC,{options:B(),selectedValues:S,onSelectionChange:_,additionalOption:q(),disabled:h?.isResponded}),x.jsx(Et,{onClick:$,disabled:S.length===0||h?.isResponded,className:Te("w-full rounded-lg px-4 py-2 text-sm font-medium transition-all","bg-blue-100 hover:bg-blue-200 text-blue-600 border border-blue-200","disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200","shadow-sm hover:shadow-md active:scale-[0.98] "),children:"Confirm"})]}),h?.details?.component===ze.SYNAPSE_COMPONENTS.DOCTOR_CARD&&h?.details?.input?.doctors&&m?x.jsx("div",{className:"mt-3",children:x.jsx(UC,{doctorAvailabilities:h?.details?.input?.doctors,doctorDetails:h?.details?.input?.doctor_details,callTool:m,callbacks:h?.details?._meta?.callbacks,onBook:z,disabled:h?.isResponded})}):null,f&&!y&&c&&x.jsx("p",{className:"text-sm font-medium text-teal-600",children:f}),a&&x.jsx("p",{className:Te("text-xs mt-2 text-right","text-slate-500"),children:a})]})]})})}function IC({messages:n,onSendMessage:i,iconUrl:a,callTool:o}){const s=dr(f=>f.isWaitingForResponse),c=dr(f=>f.progressMessage);return x.jsxs(x.Fragment,{children:[(n&&n.length>0||c)&&x.jsx(x.Fragment,{children:n.map((f,h)=>x.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:h===n.length-1?"last-message":void 0,children:x.jsx(BC,{role:f.role,content:f.content,files:f.files||[],iconUrl:a,toolEscalationData:f.toolEscalationData,timestamp:f.timestamp,onSendMessage:i,isLastMessage:h===n.length-1,progressMessage:c,toolCallStatus:f.toolCallStatus,callTool:o})},f.id))}),s&&x.jsx(HC,{iconUrl:a})]})}function HC({iconUrl:n}){return x.jsx("div",{className:"animate-slideUp",children:x.jsx("div",{className:"flex justify-start",children:x.jsxs("div",{className:"flex gap-3",children:[x.jsx(ui,{className:"w-8 h-8 bg-gradient-to-br from-lavender-400 to-lavender-500 text-white text-xs font-bold flex-shrink-0",children:x.jsx(ci,{className:"bg-transparent text-white text-xs font-bold",children:n?x.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):x.jsx(Gd,{className:"w-4 h-4"})})}),x.jsx(si,{className:"px-4 py-2 rounded-2xl shadow-none bg-white/80 backdrop-blur-md text-slate-800 shadow-sm rounded-bl-none border border-lavender-200/40",children:x.jsx("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[0,1,2].map(i=>x.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${i*150}ms`}},i))})})]})})})}const qC=Object.freeze(Object.defineProperty({__proto__:null,default:IC},Symbol.toStringTag,{value:"Module"}));function YC({onTaskClick:n,disabled:i,tasks:a}){return a?.length?x.jsx("div",{className:"grid grid-cols-2 gap-3",children:a.map(o=>x.jsx(Et,{type:"button",variant:"ghost",disabled:i,onClick:()=>n(o.value||""),className:"h-auto w-full flex flex-col items-start bg-white shadow-lg ring-1 ring-lavender-100 backdrop-blur-sm rounded-2xl p-4 hover:bg-white/95 hover:border-lavender-300 hover:shadow-lg transition-all text-left group",children:x.jsx("div",{className:"flex items-start justify-between gap-3",children:x.jsx("h3",{className:"font-semibold text-sm text-slate-900 text-wrap group-hover:text-lavender-600 transition-colors",children:o.label||""})})},o.value))}):null}function VC({initialPrompt:n,tasks:i,onTaskClick:a,disabled:o}){return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:x.jsx("h1",{className:"text-xl-minus font-semibold text-slate-900",children:n||"How can I assist you today?"})}),x.jsx(YC,{onTaskClick:a,disabled:o,tasks:i})]})}const GC=Object.freeze(Object.defineProperty({__proto__:null,default:VC},Symbol.toStringTag,{value:"Module"}));function PC({className:n="",onRetry:i,onStartNewSession:a,showRetryButton:o,startNewConnection:s,clearError:c,error:f,isConnected:h}){const{isOnline:p}=Kh(),[m,g]=w.useState(!0);return w.useEffect(()=>{if(!s&&!o&&!!f){g(!0);const b=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(b)}g(!0)},[f,s,o]),s?x.jsx("div",{className:Te("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:x.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:f?.title??"Something went wrong"}),x.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),x.jsxs("button",{onClick:()=>{c(),a?.()},className:"p-2 bg-[#3B71F7] text-white text-xs font-semibold rounded-lg hover:bg-[#2E5CD9] transition-colors flex items-center gap-2 flex-shrink-0",children:[x.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),x.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o&&f?.title?x.jsx("div",{className:Te("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:x.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:f?.title}),x.jsx("div",{className:"text-slate-500 text-xs mt-1",children:f?.description??"Please check your connection and try again"})]}),x.jsxs("button",{onClick:()=>{c(),i?.()},className:"px-4 py-2 bg-lavender-600 text-white text-sm font-semibold rounded-lg hover:bg-lavender-700 transition-colors flex items-center gap-2 flex-shrink-0",children:[x.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Retry"]})]})}):h&&p&&!f?.title||!s&&!o&&!m?null:x.jsx("div",{className:Te("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:x.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:p?f?.title||"Connecting...":"No internet connection"}),x.jsx("div",{className:"text-slate-500 text-xs mt-1",children:p?f?.description??"Please wait while we try to connect":"Please check your internet connection"})]}),!h&&x.jsx("div",{className:"flex-shrink-0",children:x.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const FC=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:PC},Symbol.toStringTag,{value:"Module"}));return cs.renderMedAssist=Qh,Object.defineProperty(cs,Symbol.toStringTag,{value:"Module"}),cs})({});
|
|
56
56
|
//# sourceMappingURL=medassist-widget.js.map
|