@eka-care/medassist-widget-embed 0.0.3 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- var MedAssistWidget=(function(fs){"use strict";function lb(n,l){for(var i=0;i<l.length;i++){const o=l[i];if(typeof o!="string"&&!Array.isArray(o)){for(const s in o)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(o,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>o[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var xl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ds(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var hs={exports:{}},ra={};var qf;function ob(){if(qf)return ra;qf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(o,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:n,type:o,key:c,ref:s!==void 0?s:null,props:u}}return ra.Fragment=l,ra.jsx=i,ra.jsxs=i,ra}var Yf;function sb(){return Yf||(Yf=1,hs.exports=ob()),hs.exports}var F=sb(),ms={exports:{}},Le={};var Pf;function ub(){if(Pf)return Le;Pf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=v&&A[v]||A["@@iterator"],typeof A=="function"?A:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(A,j,N){this.props=A,this.context=j,this.refs=T,this.updater=N||C}_.prototype.isReactComponent={},_.prototype.setState=function(A,j){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,j,"setState")},_.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function k(){}k.prototype=_.prototype;function O(A,j,N){this.props=A,this.context=j,this.refs=T,this.updater=N||C}var H=O.prototype=new k;H.constructor=O,E(H,_.prototype),H.isPureReactComponent=!0;var B=Array.isArray;function z(){}var L={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function q(A,j,N){var ne=N.ref;return{$$typeof:n,type:A,key:j,ref:ne!==void 0?ne:null,props:N}}function le(A,j){return q(A.type,j,A.props)}function ce(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function M(A){var j={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(N){return j[N]})}var $=/\/+/g;function w(A,j){return typeof A=="object"&&A!==null&&A.key!=null?M(""+A.key):j.toString(36)}function G(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(z,z):(A.status="pending",A.then(function(j){A.status==="pending"&&(A.status="fulfilled",A.value=j)},function(j){A.status==="pending"&&(A.status="rejected",A.reason=j)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function V(A,j,N,ne,fe){var ge=typeof A;(ge==="undefined"||ge==="boolean")&&(A=null);var de=!1;if(A===null)de=!0;else switch(ge){case"bigint":case"string":case"number":de=!0;break;case"object":switch(A.$$typeof){case n:case l:de=!0;break;case y:return de=A._init,V(de(A._payload),j,N,ne,fe)}}if(de)return fe=fe(A),de=ne===""?"."+w(A,0):ne,B(fe)?(N="",de!=null&&(N=de.replace($,"$&/")+"/"),V(fe,j,N,"",function(Me){return Me})):fe!=null&&(ce(fe)&&(fe=le(fe,N+(fe.key==null||A&&A.key===fe.key?"":(""+fe.key).replace($,"$&/")+"/")+de)),j.push(fe)),1;de=0;var Te=ne===""?".":ne+":";if(B(A))for(var ke=0;ke<A.length;ke++)ne=A[ke],ge=Te+w(ne,ke),de+=V(ne,j,N,ge,fe);else if(ke=b(A),typeof ke=="function")for(A=ke.call(A),ke=0;!(ne=A.next()).done;)ne=ne.value,ge=Te+w(ne,ke++),de+=V(ne,j,N,ge,fe);else if(ge==="object"){if(typeof A.then=="function")return V(G(A),j,N,ne,fe);throw j=String(A),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return de}function Z(A,j,N){if(A==null)return A;var ne=[],fe=0;return V(A,ne,"","",function(ge){return j.call(N,ge,fe++)}),ne}function ae(A){if(A._status===-1){var j=A._result;j=j(),j.then(function(N){(A._status===0||A._status===-1)&&(A._status=1,A._result=N)},function(N){(A._status===0||A._status===-1)&&(A._status=2,A._result=N)}),A._status===-1&&(A._status=0,A._result=j)}if(A._status===1)return A._result.default;throw A._result}var se=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=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(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},D={map:Z,forEach:function(A,j,N){Z(A,function(){j.apply(this,arguments)},N)},count:function(A){var j=0;return Z(A,function(){j++}),j},toArray:function(A){return Z(A,function(j){return j})||[]},only:function(A){if(!ce(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Le.Activity=g,Le.Children=D,Le.Component=_,Le.Fragment=i,Le.Profiler=s,Le.PureComponent=O,Le.StrictMode=o,Le.Suspense=h,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Le.__COMPILER_RUNTIME={__proto__:null,c:function(A){return L.H.useMemoCache(A)}},Le.cache=function(A){return function(){return A.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(A,j,N){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ne=E({},A.props),fe=A.key;if(j!=null)for(ge in j.key!==void 0&&(fe=""+j.key),j)!P.call(j,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&j.ref===void 0||(ne[ge]=j[ge]);var ge=arguments.length-2;if(ge===1)ne.children=N;else if(1<ge){for(var de=Array(ge),Te=0;Te<ge;Te++)de[Te]=arguments[Te+2];ne.children=de}return q(A.type,fe,ne)},Le.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},Le.createElement=function(A,j,N){var ne,fe={},ge=null;if(j!=null)for(ne in j.key!==void 0&&(ge=""+j.key),j)P.call(j,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(fe[ne]=j[ne]);var de=arguments.length-2;if(de===1)fe.children=N;else if(1<de){for(var Te=Array(de),ke=0;ke<de;ke++)Te[ke]=arguments[ke+2];fe.children=Te}if(A&&A.defaultProps)for(ne in de=A.defaultProps,de)fe[ne]===void 0&&(fe[ne]=de[ne]);return q(A,ge,fe)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(A){return{$$typeof:d,render:A}},Le.isValidElement=ce,Le.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:ae}},Le.memo=function(A,j){return{$$typeof:p,type:A,compare:j===void 0?null:j}},Le.startTransition=function(A){var j=L.T,N={};L.T=N;try{var ne=A(),fe=L.S;fe!==null&&fe(N,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(z,se)}catch(ge){se(ge)}finally{j!==null&&N.types!==null&&(j.types=N.types),L.T=j}},Le.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Le.use=function(A){return L.H.use(A)},Le.useActionState=function(A,j,N){return L.H.useActionState(A,j,N)},Le.useCallback=function(A,j){return L.H.useCallback(A,j)},Le.useContext=function(A){return L.H.useContext(A)},Le.useDebugValue=function(){},Le.useDeferredValue=function(A,j){return L.H.useDeferredValue(A,j)},Le.useEffect=function(A,j){return L.H.useEffect(A,j)},Le.useEffectEvent=function(A){return L.H.useEffectEvent(A)},Le.useId=function(){return L.H.useId()},Le.useImperativeHandle=function(A,j,N){return L.H.useImperativeHandle(A,j,N)},Le.useInsertionEffect=function(A,j){return L.H.useInsertionEffect(A,j)},Le.useLayoutEffect=function(A,j){return L.H.useLayoutEffect(A,j)},Le.useMemo=function(A,j){return L.H.useMemo(A,j)},Le.useOptimistic=function(A,j){return L.H.useOptimistic(A,j)},Le.useReducer=function(A,j,N){return L.H.useReducer(A,j,N)},Le.useRef=function(A){return L.H.useRef(A)},Le.useState=function(A){return L.H.useState(A)},Le.useSyncExternalStore=function(A,j,N){return L.H.useSyncExternalStore(A,j,N)},Le.useTransition=function(){return L.H.useTransition()},Le.version="19.2.0",Le}var Ff;function wl(){return Ff||(Ff=1,ms.exports=ub()),ms.exports}var K=wl();const ia=ds(K),Vf=lb({__proto__:null,default:ia},[K]);var ps={exports:{}},aa={},gs={exports:{}},ys={};var Gf;function cb(){return Gf||(Gf=1,(function(n){function l(V,Z){var ae=V.length;V.push(Z);e:for(;0<ae;){var se=ae-1>>>1,D=V[se];if(0<s(D,Z))V[se]=Z,V[ae]=D,ae=se;else break e}}function i(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var Z=V[0],ae=V.pop();if(ae!==Z){V[0]=ae;e:for(var se=0,D=V.length,A=D>>>1;se<A;){var j=2*(se+1)-1,N=V[j],ne=j+1,fe=V[ne];if(0>s(N,ae))ne<D&&0>s(fe,N)?(V[se]=fe,V[ne]=ae,se=ne):(V[se]=N,V[j]=ae,se=j);else if(ne<D&&0>s(fe,ae))V[se]=fe,V[ne]=ae,se=ne;else break e}}return Z}function s(V,Z){var ae=V.sortIndex-Z.sortIndex;return ae!==0?ae:V.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();n.unstable_now=function(){return c.now()-d}}var h=[],p=[],y=1,g=null,v=3,b=!1,C=!1,E=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function H(V){for(var Z=i(p);Z!==null;){if(Z.callback===null)o(p);else if(Z.startTime<=V)o(p),Z.sortIndex=Z.expirationTime,l(h,Z);else break;Z=i(p)}}function B(V){if(E=!1,H(V),!C)if(i(h)!==null)C=!0,z||(z=!0,M());else{var Z=i(p);Z!==null&&G(B,Z.startTime-V)}}var z=!1,L=-1,P=5,q=-1;function le(){return T?!0:!(n.unstable_now()-q<P)}function ce(){if(T=!1,z){var V=n.unstable_now();q=V;var Z=!0;try{e:{C=!1,E&&(E=!1,k(L),L=-1),b=!0;var ae=v;try{t:{for(H(V),g=i(h);g!==null&&!(g.expirationTime>V&&le());){var se=g.callback;if(typeof se=="function"){g.callback=null,v=g.priorityLevel;var D=se(g.expirationTime<=V);if(V=n.unstable_now(),typeof D=="function"){g.callback=D,H(V),Z=!0;break t}g===i(h)&&o(h),H(V)}else o(h);g=i(h)}if(g!==null)Z=!0;else{var A=i(p);A!==null&&G(B,A.startTime-V),Z=!1}}break e}finally{g=null,v=ae,b=!1}Z=void 0}}finally{Z?M():z=!1}}}var M;if(typeof O=="function")M=function(){O(ce)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,w=$.port2;$.port1.onmessage=ce,M=function(){w.postMessage(null)}}else M=function(){_(ce,0)};function G(V,Z){L=_(function(){V(n.unstable_now())},Z)}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(V){V.callback=null},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(V){switch(v){case 1:case 2:case 3:var Z=3;break;default:Z=v}var ae=v;v=Z;try{return V()}finally{v=ae}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(V,Z){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ae=v;v=V;try{return Z()}finally{v=ae}},n.unstable_scheduleCallback=function(V,Z,ae){var se=n.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?se+ae:se):ae=se,V){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=ae+D,V={id:y++,callback:Z,priorityLevel:V,startTime:ae,expirationTime:D,sortIndex:-1},ae>se?(V.sortIndex=ae,l(p,V),i(h)===null&&V===i(p)&&(E?(k(L),L=-1):E=!0,G(B,ae-se))):(V.sortIndex=D,l(h,V),C||b||(C=!0,z||(z=!0,M()))),V},n.unstable_shouldYield=le,n.unstable_wrapCallback=function(V){var Z=v;return function(){var ae=v;v=Z;try{return V.apply(this,arguments)}finally{v=ae}}}})(ys)),ys}var Xf;function fb(){return Xf||(Xf=1,gs.exports=cb()),gs.exports}var bs={exports:{}},Bt={};var Zf;function db(){if(Zf)return Bt;Zf=1;var n=wl();function l(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,p,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:p,implementation:y}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Bt.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return u(h,p,null,y)},Bt.flushSync=function(h){var p=c.T,y=o.p;try{if(c.T=null,o.p=2,h)return h()}finally{c.T=p,o.p=y,o.d.f()}},Bt.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(h,p))},Bt.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Bt.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,g=d(y,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:b}):y==="script"&&o.d.X(h,{crossOrigin:g,integrity:v,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Bt.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=d(p.as,p.crossOrigin);o.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(h)},Bt.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,g=d(y,p.crossOrigin);o.d.L(h,y,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Bt.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=d(p.as,p.crossOrigin);o.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(h)},Bt.requestFormReset=function(h){o.d.r(h)},Bt.unstable_batchedUpdates=function(h,p){return h(p)},Bt.useFormState=function(h,p,y){return c.H.useFormState(h,p,y)},Bt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Bt.version="19.2.0",Bt}var Kf;function Qf(){if(Kf)return bs.exports;Kf=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(l){console.error(l)}}return n(),bs.exports=db(),bs.exports}var Jf;function hb(){if(Jf)return aa;Jf=1;var n=fb(),l=wl(),i=Qf();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 u(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function c(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 d(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 h(e){if(u(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,a=t;;){var f=r.return;if(f===null)break;var m=f.alternate;if(m===null){if(a=f.return,a!==null){r=a;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===r)return h(f),e;if(m===a)return h(f),t;m=m.sibling}throw Error(o(188))}if(r.return!==a.return)r=f,a=m;else{for(var S=!1,R=f.child;R;){if(R===r){S=!0,r=f,a=m;break}if(R===a){S=!0,a=f,r=m;break}R=R.sibling}if(!S){for(R=m.child;R;){if(R===r){S=!0,r=m,a=f;break}if(R===a){S=!0,a=m,r=f;break}R=R.sibling}if(!S)throw Error(o(189))}}if(r.alternate!==a)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),O=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=ce&&e[ce]||e["@@iterator"],typeof e=="function"?e:null)}var $=Symbol.for("react.client.reference");function w(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case _:return"Profiler";case T:return"StrictMode";case B:return"Suspense";case z:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case O:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return t=e.displayName||null,t!==null?t:w(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return w(e(t))}catch{}}return null}var G=Array.isArray,V=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},se=[],D=-1;function A(e){return{current:e}}function j(e){0>D||(e.current=se[D],se[D]=null,D--)}function N(e,t){D++,se[D]=e.current,e.current=t}var ne=A(null),fe=A(null),ge=A(null),de=A(null);function Te(e,t){switch(N(ge,t),N(fe,e),N(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?R0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=R0(t),e=N0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(ne),N(ne,e)}function ke(){j(ne),j(fe),j(ge)}function Me(e){e.memoizedState!==null&&N(de,e);var t=ne.current,r=N0(t,e.type);t!==r&&(N(fe,e),N(ne,r))}function De(e){fe.current===e&&(j(ne),j(fe)),de.current===e&&(j(de),vl._currentValue=ae)}var nt,yt;function x(e){if(nt===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);nt=t&&t[1]||"",yt=-1<r.stack.indexOf(`
1
+ var MedAssistWidget=(function(hs){"use strict";function Ab(n,l){for(var i=0;i<l.length;i++){const o=l[i];if(typeof o!="string"&&!Array.isArray(o)){for(const u in o)if(u!=="default"&&!(u in n)){const s=Object.getOwnPropertyDescriptor(o,u);s&&Object.defineProperty(n,u,s.get?s:{enumerable:!0,get:()=>o[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var Rl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ms(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ps={exports:{}},oa={};var Gf;function kb(){if(Gf)return oa;Gf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(o,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var f in u)f!=="key"&&(s[f]=u[f])}else s=u;return u=s.ref,{$$typeof:n,type:o,key:c,ref:u!==void 0?u:null,props:s}}return oa.Fragment=l,oa.jsx=i,oa.jsxs=i,oa}var Xf;function Nb(){return Xf||(Xf=1,ps.exports=kb()),ps.exports}var O=Nb(),gs={exports:{}},Ue={};var Zf;function Rb(){if(Zf)return Ue;Zf=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(N,B,z){this.props=N,this.context=B,this.refs=T,this.updater=z||w}_.prototype.isReactComponent={},_.prototype.setState=function(N,B){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,B,"setState")},_.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function A(){}A.prototype=_.prototype;function k(N,B,z){this.props=N,this.context=B,this.refs=T,this.updater=z||w}var q=k.prototype=new A;q.constructor=k,E(q,_.prototype),q.isPureReactComponent=!0;var H=Array.isArray;function M(){}var I={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function F(N,B,z){var re=z.ref;return{$$typeof:n,type:N,key:B,ref:re!==void 0?re:null,props:z}}function $(N,B){return F(N.type,B,N.props)}function ie(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function D(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(z){return B[z]})}var ne=/\/+/g;function C(N,B){return typeof N=="object"&&N!==null&&N.key!=null?D(""+N.key):B.toString(36)}function V(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(M,M):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function Z(N,B,z,re,ce){var we=typeof N;(we==="undefined"||we==="boolean")&&(N=null);var Te=!1;if(N===null)Te=!0;else switch(we){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(N.$$typeof){case n:case l:Te=!0;break;case g:return Te=N._init,Z(Te(N._payload),B,z,re,ce)}}if(Te)return ce=ce(N),Te=re===""?"."+C(N,0):re,H(ce)?(z="",Te!=null&&(z=Te.replace(ne,"$&/")+"/"),Z(ce,B,z,"",function(He){return He})):ce!=null&&(ie(ce)&&(ce=$(ce,z+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(ne,"$&/")+"/")+Te)),B.push(ce)),1;Te=0;var ke=re===""?".":re+":";if(H(N))for(var Ae=0;Ae<N.length;Ae++)re=N[Ae],we=ke+C(re,Ae),Te+=Z(re,B,z,we,ce);else if(Ae=b(N),typeof Ae=="function")for(N=Ae.call(N),Ae=0;!(re=N.next()).done;)re=re.value,we=ke+C(re,Ae++),Te+=Z(re,B,z,we,ce);else if(we==="object"){if(typeof N.then=="function")return Z(V(N),B,z,re,ce);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(N,B,z){if(N==null)return N;var re=[],ce=0;return Z(N,re,"","",function(we){return B.call(z,we,ce++)}),re}function se(N){if(N._status===-1){var B=N._result;B=B(),B.then(function(z){(N._status===0||N._status===-1)&&(N._status=1,N._result=z)},function(z){(N._status===0||N._status===-1)&&(N._status=2,N._result=z)}),N._status===-1&&(N._status=0,N._result=B)}if(N._status===1)return N._result.default;throw N._result}var de=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}},L={map:Q,forEach:function(N,B,z){Q(N,function(){B.apply(this,arguments)},z)},count:function(N){var B=0;return Q(N,function(){B++}),B},toArray:function(N){return Q(N,function(B){return B})||[]},only:function(N){if(!ie(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Ue.Activity=y,Ue.Children=L,Ue.Component=_,Ue.Fragment=i,Ue.Profiler=u,Ue.PureComponent=k,Ue.StrictMode=o,Ue.Suspense=m,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(N){return I.H.useMemoCache(N)}},Ue.cache=function(N){return function(){return N.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(N,B,z){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=E({},N.props),ce=N.key;if(B!=null)for(we in B.key!==void 0&&(ce=""+B.key),B)!Y.call(B,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&B.ref===void 0||(re[we]=B[we]);var we=arguments.length-2;if(we===1)re.children=z;else if(1<we){for(var Te=Array(we),ke=0;ke<we;ke++)Te[ke]=arguments[ke+2];re.children=Te}return F(N.type,ce,re)},Ue.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:s,_context:N},N},Ue.createElement=function(N,B,z){var re,ce={},we=null;if(B!=null)for(re in B.key!==void 0&&(we=""+B.key),B)Y.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ce[re]=B[re]);var Te=arguments.length-2;if(Te===1)ce.children=z;else if(1<Te){for(var ke=Array(Te),Ae=0;Ae<Te;Ae++)ke[Ae]=arguments[Ae+2];ce.children=ke}if(N&&N.defaultProps)for(re in Te=N.defaultProps,Te)ce[re]===void 0&&(ce[re]=Te[re]);return F(N,we,ce)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(N){return{$$typeof:f,render:N}},Ue.isValidElement=ie,Ue.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:se}},Ue.memo=function(N,B){return{$$typeof:h,type:N,compare:B===void 0?null:B}},Ue.startTransition=function(N){var B=I.T,z={};I.T=z;try{var re=N(),ce=I.S;ce!==null&&ce(z,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(M,de)}catch(we){de(we)}finally{B!==null&&z.types!==null&&(B.types=z.types),I.T=B}},Ue.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ue.use=function(N){return I.H.use(N)},Ue.useActionState=function(N,B,z){return I.H.useActionState(N,B,z)},Ue.useCallback=function(N,B){return I.H.useCallback(N,B)},Ue.useContext=function(N){return I.H.useContext(N)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(N,B){return I.H.useDeferredValue(N,B)},Ue.useEffect=function(N,B){return I.H.useEffect(N,B)},Ue.useEffectEvent=function(N){return I.H.useEffectEvent(N)},Ue.useId=function(){return I.H.useId()},Ue.useImperativeHandle=function(N,B,z){return I.H.useImperativeHandle(N,B,z)},Ue.useInsertionEffect=function(N,B){return I.H.useInsertionEffect(N,B)},Ue.useLayoutEffect=function(N,B){return I.H.useLayoutEffect(N,B)},Ue.useMemo=function(N,B){return I.H.useMemo(N,B)},Ue.useOptimistic=function(N,B){return I.H.useOptimistic(N,B)},Ue.useReducer=function(N,B,z){return I.H.useReducer(N,B,z)},Ue.useRef=function(N){return I.H.useRef(N)},Ue.useState=function(N){return I.H.useState(N)},Ue.useSyncExternalStore=function(N,B,z){return I.H.useSyncExternalStore(N,B,z)},Ue.useTransition=function(){return I.H.useTransition()},Ue.version="19.2.0",Ue}var Kf;function Ol(){return Kf||(Kf=1,gs.exports=Rb()),gs.exports}var P=Ol();const sa=ms(P),Qf=Ab({__proto__:null,default:sa},[P]);var ys={exports:{}},ua={},bs={exports:{}},vs={};var Jf;function Ob(){return Jf||(Jf=1,(function(n){function l(Z,Q){var se=Z.length;Z.push(Q);e:for(;0<se;){var de=se-1>>>1,L=Z[de];if(0<u(L,Q))Z[de]=Q,Z[se]=L,se=de;else break e}}function i(Z){return Z.length===0?null:Z[0]}function o(Z){if(Z.length===0)return null;var Q=Z[0],se=Z.pop();if(se!==Q){Z[0]=se;e:for(var de=0,L=Z.length,N=L>>>1;de<N;){var B=2*(de+1)-1,z=Z[B],re=B+1,ce=Z[re];if(0>u(z,se))re<L&&0>u(ce,z)?(Z[de]=ce,Z[re]=se,de=re):(Z[de]=z,Z[B]=se,de=B);else if(re<L&&0>u(ce,se))Z[de]=ce,Z[re]=se,de=re;else break e}}return Q}function u(Z,Q){var se=Z.sortIndex-Q.sortIndex;return se!==0?se:Z.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();n.unstable_now=function(){return c.now()-f}}var m=[],h=[],g=1,y=null,v=3,b=!1,w=!1,E=!1,T=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function q(Z){for(var Q=i(h);Q!==null;){if(Q.callback===null)o(h);else if(Q.startTime<=Z)o(h),Q.sortIndex=Q.expirationTime,l(m,Q);else break;Q=i(h)}}function H(Z){if(E=!1,q(Z),!w)if(i(m)!==null)w=!0,M||(M=!0,D());else{var Q=i(h);Q!==null&&V(H,Q.startTime-Z)}}var M=!1,I=-1,Y=5,F=-1;function $(){return T?!0:!(n.unstable_now()-F<Y)}function ie(){if(T=!1,M){var Z=n.unstable_now();F=Z;var Q=!0;try{e:{w=!1,E&&(E=!1,A(I),I=-1),b=!0;var se=v;try{t:{for(q(Z),y=i(m);y!==null&&!(y.expirationTime>Z&&$());){var de=y.callback;if(typeof de=="function"){y.callback=null,v=y.priorityLevel;var L=de(y.expirationTime<=Z);if(Z=n.unstable_now(),typeof L=="function"){y.callback=L,q(Z),Q=!0;break t}y===i(m)&&o(m),q(Z)}else o(m);y=i(m)}if(y!==null)Q=!0;else{var N=i(h);N!==null&&V(H,N.startTime-Z),Q=!1}}break e}finally{y=null,v=se,b=!1}Q=void 0}}finally{Q?D():M=!1}}}var D;if(typeof k=="function")D=function(){k(ie)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,C=ne.port2;ne.port1.onmessage=ie,D=function(){C.postMessage(null)}}else D=function(){_(ie,0)};function V(Z,Q){I=_(function(){Z(n.unstable_now())},Q)}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(Z){Z.callback=null},n.unstable_forceFrameRate=function(Z){0>Z||125<Z||(Y=0<Z?Math.floor(1e3/Z):5)},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(Z){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var se=v;v=Q;try{return Z()}finally{v=se}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(Z,Q){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var se=v;v=Z;try{return Q()}finally{v=se}},n.unstable_scheduleCallback=function(Z,Q,se){var de=n.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?de+se:de):se=de,Z){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=se+L,Z={id:g++,callback:Q,priorityLevel:Z,startTime:se,expirationTime:L,sortIndex:-1},se>de?(Z.sortIndex=se,l(h,Z),i(m)===null&&Z===i(h)&&(E?(A(I),I=-1):E=!0,V(H,se-de))):(Z.sortIndex=L,l(m,Z),w||b||(w=!0,M||(M=!0,D()))),Z},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(Z){var Q=v;return function(){var se=v;v=Q;try{return Z.apply(this,arguments)}finally{v=se}}}})(vs)),vs}var Wf;function zb(){return Wf||(Wf=1,bs.exports=Ob()),bs.exports}var Ss={exports:{}},Ut={};var $f;function Mb(){if($f)return Ut;$f=1;var n=Ol();function l(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(m,h,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:y==null?null:""+y,children:m,containerInfo:h,implementation:g}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.createPortal=function(m,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return s(m,h,null,g)},Ut.flushSync=function(m){var h=c.T,g=o.p;try{if(c.T=null,o.p=2,m)return m()}finally{c.T=h,o.p=g,o.d.f()}},Ut.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(m,h))},Ut.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},Ut.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?o.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:b}):g==="script"&&o.d.X(m,{crossOrigin:y,integrity:v,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ut.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);o.d.M(m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(m)},Ut.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin);o.d.L(m,g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ut.preloadModule=function(m,h){if(typeof m=="string")if(h){var g=f(h.as,h.crossOrigin);o.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(m)},Ut.requestFormReset=function(m){o.d.r(m)},Ut.unstable_batchedUpdates=function(m,h){return m(h)},Ut.useFormState=function(m,h,g){return c.H.useFormState(m,h,g)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.0",Ut}var ed;function td(){if(ed)return Ss.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(),Ss.exports=Mb(),Ss.exports}var nd;function Db(){if(nd)return ua;nd=1;var n=zb(),l=Ol(),i=td();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function c(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 f(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(s(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,a=t;;){var d=r.return;if(d===null)break;var p=d.alternate;if(p===null){if(a=d.return,a!==null){r=a;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===r)return m(d),e;if(p===a)return m(d),t;p=p.sibling}throw Error(o(188))}if(r.return!==a.return)r=d,a=p;else{for(var x=!1,R=d.child;R;){if(R===r){x=!0,r=d,a=p;break}if(R===a){x=!0,a=d,r=p;break}R=R.sibling}if(!x){for(R=p.child;R;){if(R===r){x=!0,r=p,a=d;break}if(R===a){x=!0,a=p,r=d;break}R=R.sibling}if(!x)throw Error(o(189))}}if(r.alternate!==a)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?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,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var ne=Symbol.for("react.client.reference");function C(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case _:return"Profiler";case T:return"StrictMode";case H:return"Suspense";case M:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case k:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:C(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return C(e(t))}catch{}}return null}var V=Array.isArray,Z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},de=[],L=-1;function N(e){return{current:e}}function B(e){0>L||(e.current=de[L],de[L]=null,L--)}function z(e,t){L++,de[L]=e.current,e.current=t}var re=N(null),ce=N(null),we=N(null),Te=N(null);function ke(e,t){switch(z(we,t),z(ce,e),z(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Q0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Q0(t),e=J0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(re),z(re,e)}function Ae(){B(re),B(ce),B(we)}function He(e){e.memoizedState!==null&&z(Te,e);var t=re.current,r=J0(t,e.type);t!==r&&(z(ce,e),z(re,r))}function ve(e){ce.current===e&&(B(re),B(ce)),Te.current===e&&(B(Te),Tl._currentValue=se)}var ze,je;function S(e){if(ze===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ze=t&&t[1]||"",je=-1<r.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+nt+e+yt}var me=!1;function ue(e,t){if(!e||me)return"";me=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(oe){var ie=oe}Reflect.construct(e,[],ye)}else{try{ye.call()}catch(oe){ie=oe}e.call(ye.prototype)}}else{try{throw Error()}catch(oe){ie=oe}(ye=e())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(oe){if(oe&&ie&&typeof oe.stack=="string")return[oe.stack,ie.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=a.DetermineComponentFrameRoot(),S=m[0],R=m[1];if(S&&R){var Y=S.split(`
4
- `),te=R.split(`
5
- `);for(f=a=0;a<Y.length&&!Y[a].includes("DetermineComponentFrameRoot");)a++;for(;f<te.length&&!te[f].includes("DetermineComponentFrameRoot");)f++;if(a===Y.length||f===te.length)for(a=Y.length-1,f=te.length-1;1<=a&&0<=f&&Y[a]!==te[f];)f--;for(;1<=a&&0<=f;a--,f--)if(Y[a]!==te[f]){if(a!==1||f!==1)do if(a--,f--,0>f||Y[a]!==te[f]){var he=`
6
- `+Y[a].replace(" at new "," at ");return e.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",e.displayName)),he}while(1<=a&&0<=f);break}}}finally{me=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?x(r):""}function I(e,t){switch(e.tag){case 26:case 27:case 5:return x(e.type);case 16:return x("Lazy");case 13:return e.child!==t&&t!==null?x("Suspense Fallback"):x("Suspense");case 19:return x("SuspenseList");case 0:case 15:return ue(e.type,!1);case 11:return ue(e.type.render,!1);case 1:return ue(e.type,!0);case 31:return x("Activity");default:return""}}function U(e){try{var t="",r=null;do t+=I(e,r),r=e,e=e.return;while(e);return t}catch(a){return`
3
+ `+ze+e+je}var K=!1;function W(e,t){if(!e||K)return"";K=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(fe){var ue=fe}Reflect.construct(e,[],ye)}else{try{ye.call()}catch(fe){ue=fe}e.call(ye.prototype)}}else{try{throw Error()}catch(fe){ue=fe}(ye=e())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(fe){if(fe&&ue&&typeof fe.stack=="string")return[fe.stack,ue.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=a.DetermineComponentFrameRoot(),x=p[0],R=p[1];if(x&&R){var G=x.split(`
4
+ `),oe=R.split(`
5
+ `);for(d=a=0;a<G.length&&!G[a].includes("DetermineComponentFrameRoot");)a++;for(;d<oe.length&&!oe[d].includes("DetermineComponentFrameRoot");)d++;if(a===G.length||d===oe.length)for(a=G.length-1,d=oe.length-1;1<=a&&0<=d&&G[a]!==oe[d];)d--;for(;1<=a&&0<=d;a--,d--)if(G[a]!==oe[d]){if(a!==1||d!==1)do if(a--,d--,0>d||G[a]!==oe[d]){var me=`
6
+ `+G[a].replace(" at new "," at ");return e.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",e.displayName)),me}while(1<=a&&0<=d);break}}}finally{K=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?S(r):""}function U(e,t){switch(e.tag){case 26:case 27:case 5:return S(e.type);case 16:return S("Lazy");case 13:return e.child!==t&&t!==null?S("Suspense Fallback"):S("Suspense");case 19:return S("SuspenseList");case 0:case 15:return W(e.type,!1);case 11:return W(e.type.render,!1);case 1:return W(e.type,!0);case 31:return S("Activity");default:return""}}function j(e){try{var t="",r=null;do t+=U(e,r),r=e,e=e.return;while(e);return t}catch(a){return`
7
7
  Error generating stack: `+a.message+`
8
- `+a.stack}}var Q=Object.prototype.hasOwnProperty,be=n.unstable_scheduleCallback,Se=n.unstable_cancelCallback,re=n.unstable_shouldYield,_e=n.unstable_requestPaint,Ce=n.unstable_now,xe=n.unstable_getCurrentPriorityLevel,W=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,we=n.unstable_NormalPriority,Ue=n.unstable_LowPriority,Xe=n.unstable_IdlePriority,mt=n.log,It=n.unstable_setDisableYieldValue,Pe=null,pt=null;function Rt(e){if(typeof mt=="function"&&It(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Pe,e)}catch{}}var Fe=Math.clz32?Math.clz32:ku,xn=Math.log,$t=Math.LN2;function ku(e){return e>>>=0,e===0?32:31-(xn(e)/$t|0)|0}var bi=256,Pr=262144,zn=4194304;function fn(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 Jl(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var f=0,m=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var R=a&134217727;return R!==0?(a=R&~m,a!==0?f=fn(a):(S&=R,S!==0?f=fn(S):r||(r=R&~e,r!==0&&(f=fn(r))))):(R=a&~m,R!==0?f=fn(R):S!==0?f=fn(S):r||(r=a&~e,r!==0&&(f=fn(r)))),f===0?0:t!==0&&t!==f&&(t&m)===0&&(m=f&-f,r=t&-t,m>=r||m===32&&(r&4194048)!==0)?t:f}function za(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function kw(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=zn;return zn<<=1,(zn&62914560)===0&&(zn=4194304),e}function Au(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ma(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Aw(e,t,r,a,f,m){var S=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var R=e.entanglements,Y=e.expirationTimes,te=e.hiddenUpdates;for(r=S&~r;0<r;){var he=31-Fe(r),ye=1<<he;R[he]=0,Y[he]=-1;var ie=te[he];if(ie!==null)for(te[he]=null,he=0;he<ie.length;he++){var oe=ie[he];oe!==null&&(oe.lane&=-536870913)}r&=~ye}a!==0&&fp(e,a,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(S&~t))}function fp(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Fe(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function dp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var a=31-Fe(r),f=1<<a;f&t|e[a]&t&&(e[a]|=t),r&=~f}}function hp(e,t){var r=t&-t;return r=(r&42)!==0?1:Ru(r),(r&(e.suspendedLanes|t))!==0?0:r}function Ru(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 Nu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mp(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:$0(e.type))}function pp(e,t){var r=Z.p;try{return Z.p=e,t()}finally{Z.p=r}}var dr=Math.random().toString(36).slice(2),zt="__reactFiber$"+dr,Ft="__reactProps$"+dr,vi="__reactContainer$"+dr,Ou="__reactEvents$"+dr,Rw="__reactListeners$"+dr,Nw="__reactHandles$"+dr,gp="__reactResources$"+dr,Da="__reactMarker$"+dr;function zu(e){delete e[zt],delete e[Ft],delete e[Ou],delete e[Rw],delete e[Nw]}function Si(e){var t=e[zt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vi]||r[zt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=B0(e);e!==null;){if(r=e[zt])return r;e=B0(e)}return t}e=r,r=e.parentNode}return null}function Ei(e){if(e=e[zt]||e[vi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ja(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function _i(e){var t=e[gp];return t||(t=e[gp]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[Da]=!0}var yp=new Set,bp={};function Fr(e,t){xi(e,t),xi(e+"Capture",t)}function xi(e,t){for(bp[e]=t,e=0;e<t.length;e++)yp.add(t[e])}var Ow=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]*$"),vp={},Sp={};function zw(e){return Q.call(Sp,e)?!0:Q.call(vp,e)?!1:Ow.test(e)?Sp[e]=!0:(vp[e]=!0,!1)}function Wl(e,t,r){if(zw(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function $l(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function qn(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ep(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mw(e,t,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var f=a.get,m=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(S){r=""+S,m.call(this,S)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(S){r=""+S},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mu(e){if(!e._valueTracker){var t=Ep(e)?"checked":"value";e._valueTracker=Mw(e,t,""+e[t])}}function _p(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Ep(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function eo(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 Dw=/[\n"\\]/g;function hn(e){return e.replace(Dw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Du(e,t,r,a,f,m,S,R){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),t!=null?S==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),t!=null?ju(e,S,dn(t)):r!=null?ju(e,S,dn(r)):a!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+dn(R):e.removeAttribute("name")}function xp(e,t,r,a,f,m,S,R){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),t!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||t!=null)){Mu(e);return}r=r!=null?""+dn(r):"",t=t!=null?""+dn(t):r,R||t===e.value||(e.value=t),e.defaultValue=t}a=a??f,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=R?e.checked:!!a,e.defaultChecked=!!a,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),Mu(e)}function ju(e,t,r){t==="number"&&eo(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function wi(e,t,r,a){if(e=e.options,t){t={};for(var f=0;f<r.length;f++)t["$"+r[f]]=!0;for(r=0;r<e.length;r++)f=t.hasOwnProperty("$"+e[r].value),e[r].selected!==f&&(e[r].selected=f),f&&a&&(e[r].defaultSelected=!0)}else{for(r=""+dn(r),t=null,f=0;f<e.length;f++){if(e[f].value===r){e[f].selected=!0,a&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function wp(e,t,r){if(t!=null&&(t=""+dn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+dn(r):""}function Cp(e,t,r,a){if(t==null){if(a!=null){if(r!=null)throw Error(o(92));if(G(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),t=r}r=dn(t),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),Mu(e)}function Ci(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var jw=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 Tp(e,t,r){var a=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,r):typeof r!="number"||r===0||jw.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function kp(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var f in t)a=t[f],t.hasOwnProperty(f)&&r[f]!==a&&Tp(e,f,a)}else for(var m in t)t.hasOwnProperty(m)&&Tp(e,m,t[m])}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 Uw=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"]]),Bw=/^[\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 to(e){return Bw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yn(){}var Bu=null;function Lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ti=null,ki=null;function Ap(e){var t=Ei(e);if(t&&(e=t.stateNode)){var r=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(Du(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+hn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var f=a[Ft]||null;if(!f)throw Error(o(90));Du(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<r.length;t++)a=r[t],a.form===e.form&&_p(a)}break e;case"textarea":wp(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&wi(e,!!r.multiple,t,!1)}}}var Iu=!1;function Rp(e,t,r){if(Iu)return e(t,r);Iu=!0;try{var a=e(t);return a}finally{if(Iu=!1,(Ti!==null||ki!==null)&&(Po(),Ti&&(t=Ti,e=ki,ki=Ti=null,Ap(t),e)))for(t=0;t<e.length;t++)Ap(e[t])}}function Ua(e,t){var r=e.stateNode;if(r===null)return null;var a=r[Ft]||null;if(a===null)return null;r=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hu=!1;if(Pn)try{var Ba={};Object.defineProperty(Ba,"passive",{get:function(){Hu=!0}}),window.addEventListener("test",Ba,Ba),window.removeEventListener("test",Ba,Ba)}catch{Hu=!1}var hr=null,qu=null,no=null;function Np(){if(no)return no;var e,t=qu,r=t.length,a,f="value"in hr?hr.value:hr.textContent,m=f.length;for(e=0;e<r&&t[e]===f[e];e++);var S=r-e;for(a=1;a<=S&&t[r-a]===f[m-a];a++);return no=f.slice(e,1<a?1-a:void 0)}function ro(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 io(){return!0}function Op(){return!1}function Vt(e){function t(r,a,f,m,S){this._reactName=r,this._targetInst=f,this.type=a,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(r=e[R],this[R]=r?r(m):m[R]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?io:Op,this.isPropagationStopped=Op,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=io)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=io)},persist:function(){},isPersistent:io}),t}var Vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ao=Vt(Vr),La=g({},Vr,{view:0,detail:0}),Lw=Vt(La),Yu,Pu,Ia,lo=g({},La,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vu,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!==Ia&&(Ia&&e.type==="mousemove"?(Yu=e.screenX-Ia.screenX,Pu=e.screenY-Ia.screenY):Pu=Yu=0,Ia=e),Yu)},movementY:function(e){return"movementY"in e?e.movementY:Pu}}),zp=Vt(lo),Iw=g({},lo,{dataTransfer:0}),Hw=Vt(Iw),qw=g({},La,{relatedTarget:0}),Fu=Vt(qw),Yw=g({},Vr,{animationName:0,elapsedTime:0,pseudoElement:0}),Pw=Vt(Yw),Fw=g({},Vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vw=Vt(Fw),Gw=g({},Vr,{data:0}),Mp=Vt(Gw),Xw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zw={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"},Kw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kw[e])?!!t[e]:!1}function Vu(){return Qw}var Jw=g({},La,{key:function(e){if(e.key){var t=Xw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vu,charCode:function(e){return e.type==="keypress"?ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ww=Vt(Jw),$w=g({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dp=Vt($w),e2=g({},La,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vu}),t2=Vt(e2),n2=g({},Vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),r2=Vt(n2),i2=g({},lo,{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}),a2=Vt(i2),l2=g({},Vr,{newState:0,oldState:0}),o2=Vt(l2),s2=[9,13,27,32],Gu=Pn&&"CompositionEvent"in window,Ha=null;Pn&&"documentMode"in document&&(Ha=document.documentMode);var u2=Pn&&"TextEvent"in window&&!Ha,jp=Pn&&(!Gu||Ha&&8<Ha&&11>=Ha),Up=" ",Bp=!1;function Lp(e,t){switch(e){case"keyup":return s2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ip(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ai=!1;function c2(e,t){switch(e){case"compositionend":return Ip(t);case"keypress":return t.which!==32?null:(Bp=!0,Up);case"textInput":return e=t.data,e===Up&&Bp?null:e;default:return null}}function f2(e,t){if(Ai)return e==="compositionend"||!Gu&&Lp(e,t)?(e=Np(),no=qu=hr=null,Ai=!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 jp&&t.locale!=="ko"?null:t.data;default:return null}}var d2={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 Hp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!d2[e.type]:t==="textarea"}function qp(e,t,r,a){Ti?ki?ki.push(a):ki=[a]:Ti=a,t=Qo(t,"onChange"),0<t.length&&(r=new ao("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var qa=null,Ya=null;function h2(e){x0(e,0)}function oo(e){var t=ja(e);if(_p(t))return e}function Yp(e,t){if(e==="change")return t}var Pp=!1;if(Pn){var Xu;if(Pn){var Zu="oninput"in document;if(!Zu){var Fp=document.createElement("div");Fp.setAttribute("oninput","return;"),Zu=typeof Fp.oninput=="function"}Xu=Zu}else Xu=!1;Pp=Xu&&(!document.documentMode||9<document.documentMode)}function Vp(){qa&&(qa.detachEvent("onpropertychange",Gp),Ya=qa=null)}function Gp(e){if(e.propertyName==="value"&&oo(Ya)){var t=[];qp(t,Ya,e,Lu(e)),Rp(h2,t)}}function m2(e,t,r){e==="focusin"?(Vp(),qa=t,Ya=r,qa.attachEvent("onpropertychange",Gp)):e==="focusout"&&Vp()}function p2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oo(Ya)}function g2(e,t){if(e==="click")return oo(t)}function y2(e,t){if(e==="input"||e==="change")return oo(t)}function b2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:b2;function Pa(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var f=r[a];if(!Q.call(t,f)||!en(e[f],t[f]))return!1}return!0}function Xp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zp(e,t){var r=Xp(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=t&&a>=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Xp(r)}}function Kp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=eo(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=eo(e.document)}return t}function Ku(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 v2=Pn&&"documentMode"in document&&11>=document.documentMode,Ri=null,Qu=null,Fa=null,Ju=!1;function Jp(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ju||Ri==null||Ri!==eo(a)||(a=Ri,"selectionStart"in a&&Ku(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Fa&&Pa(Fa,a)||(Fa=a,a=Qo(Qu,"onSelect"),0<a.length&&(t=new ao("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=Ri)))}function Gr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ni={animationend:Gr("Animation","AnimationEnd"),animationiteration:Gr("Animation","AnimationIteration"),animationstart:Gr("Animation","AnimationStart"),transitionrun:Gr("Transition","TransitionRun"),transitionstart:Gr("Transition","TransitionStart"),transitioncancel:Gr("Transition","TransitionCancel"),transitionend:Gr("Transition","TransitionEnd")},Wu={},Wp={};Pn&&(Wp=document.createElement("div").style,"AnimationEvent"in window||(delete Ni.animationend.animation,delete Ni.animationiteration.animation,delete Ni.animationstart.animation),"TransitionEvent"in window||delete Ni.transitionend.transition);function Xr(e){if(Wu[e])return Wu[e];if(!Ni[e])return e;var t=Ni[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Wp)return Wu[e]=t[r];return e}var $p=Xr("animationend"),eg=Xr("animationiteration"),tg=Xr("animationstart"),S2=Xr("transitionrun"),E2=Xr("transitionstart"),_2=Xr("transitioncancel"),ng=Xr("transitionend"),rg=new Map,$u="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(" ");$u.push("scrollEnd");function wn(e,t){rg.set(e,t),Fr(t,[e])}var so=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],Oi=0,ec=0;function uo(){for(var e=Oi,t=ec=Oi=0;t<e;){var r=mn[t];mn[t++]=null;var a=mn[t];mn[t++]=null;var f=mn[t];mn[t++]=null;var m=mn[t];if(mn[t++]=null,a!==null&&f!==null){var S=a.pending;S===null?f.next=f:(f.next=S.next,S.next=f),a.pending=f}m!==0&&ig(r,f,m)}}function co(e,t,r,a){mn[Oi++]=e,mn[Oi++]=t,mn[Oi++]=r,mn[Oi++]=a,ec|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function tc(e,t,r,a){return co(e,t,r,a),fo(e)}function Zr(e,t){return co(e,null,null,t),fo(e)}function ig(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var f=!1,m=e.return;m!==null;)m.childLanes|=r,a=m.alternate,a!==null&&(a.childLanes|=r),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&t!==null&&(f=31-Fe(r),e=m.hiddenUpdates,a=e[f],a===null?e[f]=[t]:a.push(t),t.lane=r|536870912),m):null}function fo(e){if(50<dl)throw dl=0,ff=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zi={};function x2(e,t,r,a){this.tag=e,this.key=r,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(e,t,r,a){return new x2(e,t,r,a)}function nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,t){var r=e.alternate;return r===null?(r=tn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function ag(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ho(e,t,r,a,f,m){var S=0;if(a=e,typeof e=="function")nc(e)&&(S=1);else if(typeof e=="string")S=AC(e,r,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=tn(31,r,t,f),e.elementType=q,e.lanes=m,e;case E:return Kr(r.children,f,m,t);case T:S=8,f|=24;break;case _:return e=tn(12,r,t,f|2),e.elementType=_,e.lanes=m,e;case B:return e=tn(13,r,t,f),e.elementType=B,e.lanes=m,e;case z:return e=tn(19,r,t,f),e.elementType=z,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:S=10;break e;case k:S=9;break e;case H:S=11;break e;case L:S=14;break e;case P:S=16,a=null;break e}S=29,r=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=tn(S,r,t,f),t.elementType=e,t.type=a,t.lanes=m,t}function Kr(e,t,r,a){return e=tn(7,e,a,t),e.lanes=r,e}function rc(e,t,r){return e=tn(6,e,null,t),e.lanes=r,e}function lg(e){var t=tn(18,null,null,0);return t.stateNode=e,t}function ic(e,t,r){return t=tn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var og=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var r=og.get(e);return r!==void 0?r:(t={value:e,source:t,stack:U(t)},og.set(e,t),t)}return{value:e,source:t,stack:U(t)}}var Mi=[],Di=0,mo=null,Va=0,gn=[],yn=0,mr=null,Mn=1,Dn="";function Vn(e,t){Mi[Di++]=Va,Mi[Di++]=mo,mo=e,Va=t}function sg(e,t,r){gn[yn++]=Mn,gn[yn++]=Dn,gn[yn++]=mr,mr=e;var a=Mn;e=Dn;var f=32-Fe(a)-1;a&=~(1<<f),r+=1;var m=32-Fe(t)+f;if(30<m){var S=f-f%5;m=(a&(1<<S)-1).toString(32),a>>=S,f-=S,Mn=1<<32-Fe(t)+f|r<<f|a,Dn=m+e}else Mn=1<<m|r<<f|a,Dn=e}function ac(e){e.return!==null&&(Vn(e,1),sg(e,1,0))}function lc(e){for(;e===mo;)mo=Mi[--Di],Mi[Di]=null,Va=Mi[--Di],Mi[Di]=null;for(;e===mr;)mr=gn[--yn],gn[yn]=null,Dn=gn[--yn],gn[yn]=null,Mn=gn[--yn],gn[yn]=null}function ug(e,t){gn[yn++]=Mn,gn[yn++]=Dn,gn[yn++]=mr,Mn=t.id,Dn=t.overflow,mr=e}var Mt=null,dt=null,Qe=!1,pr=null,bn=!1,oc=Error(o(519));function gr(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ga(pn(t,e)),oc}function cg(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[zt]=e,t[Ft]=a,r){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(r=0;r<ml.length;r++)Ge(ml[r],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),xp(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),Cp(t,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||a.suppressHydrationWarning===!0||k0(t.textContent,r)?(a.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),a.onScroll!=null&&Ge("scroll",t),a.onScrollEnd!=null&&Ge("scrollend",t),a.onClick!=null&&(t.onclick=Yn),t=!0):t=!1,t||gr(e,!0)}function fg(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:Mt=Mt.return}}function ji(e){if(e!==Mt)return!1;if(!Qe)return fg(e),Qe=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Tf(e.type,e.memoizedProps)),r=!r),r&&dt&&gr(e),fg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));dt=U0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));dt=U0(e)}else t===27?(t=dt,Nr(e.type)?(e=Of,Of=null,dt=e):dt=t):dt=Mt?Sn(e.stateNode.nextSibling):null;return!0}function Qr(){dt=Mt=null,Qe=!1}function sc(){var e=pr;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),pr=null),e}function Ga(e){pr===null?pr=[e]:pr.push(e)}var uc=A(null),Jr=null,Gn=null;function yr(e,t,r){N(uc,t._currentValue),t._currentValue=r}function Xn(e){e._currentValue=uc.current,j(uc)}function cc(e,t,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===r)break;e=e.return}}function fc(e,t,r,a){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var S=f.child;m=m.firstContext;e:for(;m!==null;){var R=m;m=f;for(var Y=0;Y<t.length;Y++)if(R.context===t[Y]){m.lanes|=r,R=m.alternate,R!==null&&(R.lanes|=r),cc(m.return,r,e),a||(S=null);break e}m=R.next}}else if(f.tag===18){if(S=f.return,S===null)throw Error(o(341));S.lanes|=r,m=S.alternate,m!==null&&(m.lanes|=r),cc(S,r,e),S=null}else S=f.child;if(S!==null)S.return=f;else for(S=f;S!==null;){if(S===e){S=null;break}if(f=S.sibling,f!==null){f.return=S.return,S=f;break}S=S.return}f=S}}function Ui(e,t,r,a){e=null;for(var f=t,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var S=f.alternate;if(S===null)throw Error(o(387));if(S=S.memoizedProps,S!==null){var R=f.type;en(f.pendingProps.value,S.value)||(e!==null?e.push(R):e=[R])}}else if(f===de.current){if(S=f.alternate,S===null)throw Error(o(387));S.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(vl):e=[vl])}f=f.return}e!==null&&fc(t,e,r,a),t.flags|=262144}function po(e){for(e=e.firstContext;e!==null;){if(!en(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wr(e){Jr=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return dg(Jr,e)}function go(e,t){return Jr===null&&Wr(e),dg(e,t)}function dg(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,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 r}var w2=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},C2=n.unstable_scheduleCallback,T2=n.unstable_NormalPriority,xt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dc(){return{controller:new w2,data:new Map,refCount:0}}function Xa(e){e.refCount--,e.refCount===0&&C2(T2,function(){e.controller.abort()})}var Za=null,hc=0,Bi=0,Li=null;function k2(e,t){if(Za===null){var r=Za=[];hc=0,Bi=yf(),Li={status:"pending",value:void 0,then:function(a){r.push(a)}}}return hc++,t.then(hg,hg),t}function hg(){if(--hc===0&&Za!==null){Li!==null&&(Li.status="fulfilled");var e=Za;Za=null,Bi=0,Li=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function A2(e,t){var r=[],a={status:"pending",value:null,reason:null,then:function(f){r.push(f)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var f=0;f<r.length;f++)(0,r[f])(t)},function(f){for(a.status="rejected",a.reason=f,f=0;f<r.length;f++)(0,r[f])(void 0)}),a}var mg=V.S;V.S=function(e,t){Jy=Ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&k2(e,t),mg!==null&&mg(e,t)};var $r=A(null);function mc(){var e=$r.current;return e!==null?e:ut.pooledCache}function yo(e,t){t===null?N($r,$r.current):N($r,t.pool)}function pg(){var e=mc();return e===null?null:{parent:xt._currentValue,pool:e}}var Ii=Error(o(460)),pc=Error(o(474)),bo=Error(o(542)),vo={then:function(){}};function gg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yg(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Yn,Yn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vg(e),e;default:if(typeof t.status=="string")t.then(Yn,Yn);else{if(e=ut,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=a}},function(a){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vg(e),e}throw ti=t,Ii}}function ei(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ti=r,Ii):r}}var ti=null;function bg(){if(ti===null)throw Error(o(459));var e=ti;return ti=null,e}function vg(e){if(e===Ii||e===bo)throw Error(o(483))}var Hi=null,Ka=0;function So(e){var t=Ka;return Ka+=1,Hi===null&&(Hi=[]),yg(Hi,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Eo(e,t){throw t.$$typeof===v?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Sg(e){function t(J,X){if(e){var ee=J.deletions;ee===null?(J.deletions=[X],J.flags|=16):ee.push(X)}}function r(J,X){if(!e)return null;for(;X!==null;)t(J,X),X=X.sibling;return null}function a(J){for(var X=new Map;J!==null;)J.key!==null?X.set(J.key,J):X.set(J.index,J),J=J.sibling;return X}function f(J,X){return J=Fn(J,X),J.index=0,J.sibling=null,J}function m(J,X,ee){return J.index=ee,e?(ee=J.alternate,ee!==null?(ee=ee.index,ee<X?(J.flags|=67108866,X):ee):(J.flags|=67108866,X)):(J.flags|=1048576,X)}function S(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function R(J,X,ee,pe){return X===null||X.tag!==6?(X=rc(ee,J.mode,pe),X.return=J,X):(X=f(X,ee),X.return=J,X)}function Y(J,X,ee,pe){var ze=ee.type;return ze===E?he(J,X,ee.props.children,pe,ee.key):X!==null&&(X.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===P&&ei(ze)===X.type)?(X=f(X,ee.props),Qa(X,ee),X.return=J,X):(X=ho(ee.type,ee.key,ee.props,null,J.mode,pe),Qa(X,ee),X.return=J,X)}function te(J,X,ee,pe){return X===null||X.tag!==4||X.stateNode.containerInfo!==ee.containerInfo||X.stateNode.implementation!==ee.implementation?(X=ic(ee,J.mode,pe),X.return=J,X):(X=f(X,ee.children||[]),X.return=J,X)}function he(J,X,ee,pe,ze){return X===null||X.tag!==7?(X=Kr(ee,J.mode,pe,ze),X.return=J,X):(X=f(X,ee),X.return=J,X)}function ye(J,X,ee){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=rc(""+X,J.mode,ee),X.return=J,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return ee=ho(X.type,X.key,X.props,null,J.mode,ee),Qa(ee,X),ee.return=J,ee;case C:return X=ic(X,J.mode,ee),X.return=J,X;case P:return X=ei(X),ye(J,X,ee)}if(G(X)||M(X))return X=Kr(X,J.mode,ee,null),X.return=J,X;if(typeof X.then=="function")return ye(J,So(X),ee);if(X.$$typeof===O)return ye(J,go(J,X),ee);Eo(J,X)}return null}function ie(J,X,ee,pe){var ze=X!==null?X.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ze!==null?null:R(J,X,""+ee,pe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ee.key===ze?Y(J,X,ee,pe):null;case C:return ee.key===ze?te(J,X,ee,pe):null;case P:return ee=ei(ee),ie(J,X,ee,pe)}if(G(ee)||M(ee))return ze!==null?null:he(J,X,ee,pe,null);if(typeof ee.then=="function")return ie(J,X,So(ee),pe);if(ee.$$typeof===O)return ie(J,X,go(J,ee),pe);Eo(J,ee)}return null}function oe(J,X,ee,pe,ze){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(ee)||null,R(X,J,""+pe,ze);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return J=J.get(pe.key===null?ee:pe.key)||null,Y(X,J,pe,ze);case C:return J=J.get(pe.key===null?ee:pe.key)||null,te(X,J,pe,ze);case P:return pe=ei(pe),oe(J,X,ee,pe,ze)}if(G(pe)||M(pe))return J=J.get(ee)||null,he(X,J,pe,ze,null);if(typeof pe.then=="function")return oe(J,X,ee,So(pe),ze);if(pe.$$typeof===O)return oe(J,X,ee,go(X,pe),ze);Eo(X,pe)}return null}function Ae(J,X,ee,pe){for(var ze=null,$e=null,Oe=X,qe=X=0,Ke=null;Oe!==null&&qe<ee.length;qe++){Oe.index>qe?(Ke=Oe,Oe=null):Ke=Oe.sibling;var et=ie(J,Oe,ee[qe],pe);if(et===null){Oe===null&&(Oe=Ke);break}e&&Oe&&et.alternate===null&&t(J,Oe),X=m(et,X,qe),$e===null?ze=et:$e.sibling=et,$e=et,Oe=Ke}if(qe===ee.length)return r(J,Oe),Qe&&Vn(J,qe),ze;if(Oe===null){for(;qe<ee.length;qe++)Oe=ye(J,ee[qe],pe),Oe!==null&&(X=m(Oe,X,qe),$e===null?ze=Oe:$e.sibling=Oe,$e=Oe);return Qe&&Vn(J,qe),ze}for(Oe=a(Oe);qe<ee.length;qe++)Ke=oe(Oe,J,qe,ee[qe],pe),Ke!==null&&(e&&Ke.alternate!==null&&Oe.delete(Ke.key===null?qe:Ke.key),X=m(Ke,X,qe),$e===null?ze=Ke:$e.sibling=Ke,$e=Ke);return e&&Oe.forEach(function(jr){return t(J,jr)}),Qe&&Vn(J,qe),ze}function je(J,X,ee,pe){if(ee==null)throw Error(o(151));for(var ze=null,$e=null,Oe=X,qe=X=0,Ke=null,et=ee.next();Oe!==null&&!et.done;qe++,et=ee.next()){Oe.index>qe?(Ke=Oe,Oe=null):Ke=Oe.sibling;var jr=ie(J,Oe,et.value,pe);if(jr===null){Oe===null&&(Oe=Ke);break}e&&Oe&&jr.alternate===null&&t(J,Oe),X=m(jr,X,qe),$e===null?ze=jr:$e.sibling=jr,$e=jr,Oe=Ke}if(et.done)return r(J,Oe),Qe&&Vn(J,qe),ze;if(Oe===null){for(;!et.done;qe++,et=ee.next())et=ye(J,et.value,pe),et!==null&&(X=m(et,X,qe),$e===null?ze=et:$e.sibling=et,$e=et);return Qe&&Vn(J,qe),ze}for(Oe=a(Oe);!et.done;qe++,et=ee.next())et=oe(Oe,J,qe,et.value,pe),et!==null&&(e&&et.alternate!==null&&Oe.delete(et.key===null?qe:et.key),X=m(et,X,qe),$e===null?ze=et:$e.sibling=et,$e=et);return e&&Oe.forEach(function(IC){return t(J,IC)}),Qe&&Vn(J,qe),ze}function st(J,X,ee,pe){if(typeof ee=="object"&&ee!==null&&ee.type===E&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:e:{for(var ze=ee.key;X!==null;){if(X.key===ze){if(ze=ee.type,ze===E){if(X.tag===7){r(J,X.sibling),pe=f(X,ee.props.children),pe.return=J,J=pe;break e}}else if(X.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===P&&ei(ze)===X.type){r(J,X.sibling),pe=f(X,ee.props),Qa(pe,ee),pe.return=J,J=pe;break e}r(J,X);break}else t(J,X);X=X.sibling}ee.type===E?(pe=Kr(ee.props.children,J.mode,pe,ee.key),pe.return=J,J=pe):(pe=ho(ee.type,ee.key,ee.props,null,J.mode,pe),Qa(pe,ee),pe.return=J,J=pe)}return S(J);case C:e:{for(ze=ee.key;X!==null;){if(X.key===ze)if(X.tag===4&&X.stateNode.containerInfo===ee.containerInfo&&X.stateNode.implementation===ee.implementation){r(J,X.sibling),pe=f(X,ee.children||[]),pe.return=J,J=pe;break e}else{r(J,X);break}else t(J,X);X=X.sibling}pe=ic(ee,J.mode,pe),pe.return=J,J=pe}return S(J);case P:return ee=ei(ee),st(J,X,ee,pe)}if(G(ee))return Ae(J,X,ee,pe);if(M(ee)){if(ze=M(ee),typeof ze!="function")throw Error(o(150));return ee=ze.call(ee),je(J,X,ee,pe)}if(typeof ee.then=="function")return st(J,X,So(ee),pe);if(ee.$$typeof===O)return st(J,X,go(J,ee),pe);Eo(J,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,X!==null&&X.tag===6?(r(J,X.sibling),pe=f(X,ee),pe.return=J,J=pe):(r(J,X),pe=rc(ee,J.mode,pe),pe.return=J,J=pe),S(J)):r(J,X)}return function(J,X,ee,pe){try{Ka=0;var ze=st(J,X,ee,pe);return Hi=null,ze}catch(Oe){if(Oe===Ii||Oe===bo)throw Oe;var $e=tn(29,Oe,null,J.mode);return $e.lanes=pe,$e.return=J,$e}finally{}}}var ni=Sg(!0),Eg=Sg(!1),br=!1;function gc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yc(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 vr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sr(e,t,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(rt&2)!==0){var f=a.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),a.pending=t,t=fo(e),ig(e,null,r),t}return co(e,a,t,r),fo(e)}function Ja(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,dp(e,r)}}function bc(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var f=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var S={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?f=m=S:m=m.next=S,r=r.next}while(r!==null);m===null?f=m=t:m=m.next=t}else f=m=t;r={baseState:a.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var vc=!1;function Wa(){if(vc){var e=Li;if(e!==null)throw e}}function $a(e,t,r,a){vc=!1;var f=e.updateQueue;br=!1;var m=f.firstBaseUpdate,S=f.lastBaseUpdate,R=f.shared.pending;if(R!==null){f.shared.pending=null;var Y=R,te=Y.next;Y.next=null,S===null?m=te:S.next=te,S=Y;var he=e.alternate;he!==null&&(he=he.updateQueue,R=he.lastBaseUpdate,R!==S&&(R===null?he.firstBaseUpdate=te:R.next=te,he.lastBaseUpdate=Y))}if(m!==null){var ye=f.baseState;S=0,he=te=Y=null,R=m;do{var ie=R.lane&-536870913,oe=ie!==R.lane;if(oe?(Ze&ie)===ie:(a&ie)===ie){ie!==0&&ie===Bi&&(vc=!0),he!==null&&(he=he.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Ae=e,je=R;ie=t;var st=r;switch(je.tag){case 1:if(Ae=je.payload,typeof Ae=="function"){ye=Ae.call(st,ye,ie);break e}ye=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=je.payload,ie=typeof Ae=="function"?Ae.call(st,ye,ie):Ae,ie==null)break e;ye=g({},ye,ie);break e;case 2:br=!0}}ie=R.callback,ie!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=f.callbacks,oe===null?f.callbacks=[ie]:oe.push(ie))}else oe={lane:ie,tag:R.tag,payload:R.payload,callback:R.callback,next:null},he===null?(te=he=oe,Y=ye):he=he.next=oe,S|=ie;if(R=R.next,R===null){if(R=f.shared.pending,R===null)break;oe=R,R=oe.next,oe.next=null,f.lastBaseUpdate=oe,f.shared.pending=null}}while(!0);he===null&&(Y=ye),f.baseState=Y,f.firstBaseUpdate=te,f.lastBaseUpdate=he,m===null&&(f.shared.lanes=0),Cr|=S,e.lanes=S,e.memoizedState=ye}}function _g(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function xg(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)_g(r[e],t)}var qi=A(null),_o=A(0);function wg(e,t){e=nr,N(_o,e),N(qi,t),nr=e|t.baseLanes}function Sc(){N(_o,nr),N(qi,qi.current)}function Ec(){nr=_o.current,j(qi),j(_o)}var nn=A(null),vn=null;function Er(e){var t=e.alternate;N(St,St.current&1),N(nn,e),vn===null&&(t===null||qi.current!==null||t.memoizedState!==null)&&(vn=e)}function _c(e){N(St,St.current),N(nn,e),vn===null&&(vn=e)}function Cg(e){e.tag===22?(N(St,St.current),N(nn,e),vn===null&&(vn=e)):_r()}function _r(){N(St,St.current),N(nn,nn.current)}function rn(e){j(nn),vn===e&&(vn=null),j(St)}var St=A(0);function xo(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Rf(r)||Nf(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zn=0,Ie=null,lt=null,wt=null,wo=!1,Yi=!1,ri=!1,Co=0,el=0,Pi=null,R2=0;function bt(){throw Error(o(321))}function xc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!en(e[r],t[r]))return!1;return!0}function wc(e,t,r,a,f,m){return Zn=m,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?sy:Ic,ri=!1,m=r(a,f),ri=!1,Yi&&(m=kg(t,r,a,f)),Tg(e),m}function Tg(e){V.H=rl;var t=lt!==null&&lt.next!==null;if(Zn=0,wt=lt=Ie=null,wo=!1,el=0,Pi=null,t)throw Error(o(300));e===null||Ct||(e=e.dependencies,e!==null&&po(e)&&(Ct=!0))}function kg(e,t,r,a){Ie=e;var f=0;do{if(Yi&&(Pi=null),el=0,Yi=!1,25<=f)throw Error(o(301));if(f+=1,wt=lt=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}V.H=uy,m=t(r,a)}while(Yi);return m}function N2(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?tl(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(Ie.flags|=1024),t}function Cc(){var e=Co!==0;return Co=0,e}function Tc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function kc(e){if(wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wo=!1}Zn=0,wt=lt=Ie=null,Yi=!1,el=Co=0,Pi=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Ie.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(lt===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=wt===null?Ie.memoizedState:wt.next;if(t!==null)wt=t,lt=e;else{if(e===null)throw Ie.alternate===null?Error(o(467)):Error(o(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},wt===null?Ie.memoizedState=wt=e:wt=wt.next=e}return wt}function To(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function tl(e){var t=el;return el+=1,Pi===null&&(Pi=[]),e=yg(Pi,e,t),t=Ie,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?sy:Ic),e}function ko(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return tl(e);if(e.$$typeof===O)return Dt(e)}throw Error(o(438,String(e)))}function Ac(e){var t=null,r=Ie.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=Ie.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=To(),Ie.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),a=0;a<e;a++)r[a]=le;return t.index++,r}function Kn(e,t){return typeof t=="function"?t(e):t}function Ao(e){var t=Et();return Rc(t,lt,e)}function Rc(e,t,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var f=e.baseQueue,m=a.pending;if(m!==null){if(f!==null){var S=f.next;f.next=m.next,m.next=S}t.baseQueue=f=m,a.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{t=f.next;var R=S=null,Y=null,te=t,he=!1;do{var ye=te.lane&-536870913;if(ye!==te.lane?(Ze&ye)===ye:(Zn&ye)===ye){var ie=te.revertLane;if(ie===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ye===Bi&&(he=!0);else if((Zn&ie)===ie){te=te.next,ie===Bi&&(he=!0);continue}else ye={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},Y===null?(R=Y=ye,S=m):Y=Y.next=ye,Ie.lanes|=ie,Cr|=ie;ye=te.action,ri&&r(m,ye),m=te.hasEagerState?te.eagerState:r(m,ye)}else ie={lane:ye,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},Y===null?(R=Y=ie,S=m):Y=Y.next=ie,Ie.lanes|=ye,Cr|=ye;te=te.next}while(te!==null&&te!==t);if(Y===null?S=m:Y.next=R,!en(m,e.memoizedState)&&(Ct=!0,he&&(r=Li,r!==null)))throw r;e.memoizedState=m,e.baseState=S,e.baseQueue=Y,a.lastRenderedState=m}return f===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Nc(e){var t=Et(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,f=r.pending,m=t.memoizedState;if(f!==null){r.pending=null;var S=f=f.next;do m=e(m,S.action),S=S.next;while(S!==f);en(m,t.memoizedState)||(Ct=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),r.lastRenderedState=m}return[m,a]}function Ag(e,t,r){var a=Ie,f=Et(),m=Qe;if(m){if(r===void 0)throw Error(o(407));r=r()}else r=t();var S=!en((lt||f).memoizedState,r);if(S&&(f.memoizedState=r,Ct=!0),f=f.queue,Mc(Og.bind(null,a,f,e),[e]),f.getSnapshot!==t||S||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,Fi(9,{destroy:void 0},Ng.bind(null,a,f,r,t),null),ut===null)throw Error(o(349));m||(Zn&127)!==0||Rg(a,t,r)}return r}function Rg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t=To(),Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Ng(e,t,r,a){t.value=r,t.getSnapshot=a,zg(t)&&Mg(e)}function Og(e,t,r){return r(function(){zg(t)&&Mg(e)})}function zg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!en(e,r)}catch{return!0}}function Mg(e){var t=Zr(e,2);t!==null&&Qt(t,e,2)}function Oc(e){var t=Ht();if(typeof e=="function"){var r=e;if(e=r(),ri){Rt(!0);try{r()}finally{Rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function Dg(e,t,r,a){return e.baseState=r,Rc(e,lt,typeof a=="function"?a:Kn)}function O2(e,t,r,a,f){if(Oo(e))throw Error(o(485));if(e=t.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};V.T!==null?r(!0):m.isTransition=!1,a(m),r=t.pending,r===null?(m.next=t.pending=m,jg(t,m)):(m.next=r.next,t.pending=r.next=m)}}function jg(e,t){var r=t.action,a=t.payload,f=e.state;if(t.isTransition){var m=V.T,S={};V.T=S;try{var R=r(f,a),Y=V.S;Y!==null&&Y(S,R),Ug(e,t,R)}catch(te){zc(e,t,te)}finally{m!==null&&S.types!==null&&(m.types=S.types),V.T=m}}else try{m=r(f,a),Ug(e,t,m)}catch(te){zc(e,t,te)}}function Ug(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){Bg(e,t,a)},function(a){return zc(e,t,a)}):Bg(e,t,r)}function Bg(e,t,r){t.status="fulfilled",t.value=r,Lg(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,jg(e,r)))}function zc(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,Lg(t),t=t.next;while(t!==a)}e.action=null}function Lg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ig(e,t){return t}function Hg(e,t){if(Qe){var r=ut.formState;if(r!==null){e:{var a=Ie;if(Qe){if(dt){t:{for(var f=dt,m=bn;f.nodeType!==8;){if(!m){f=null;break t}if(f=Sn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){dt=Sn(f.nextSibling),a=f.data==="F!";break e}}gr(a)}a=!1}a&&(t=r[0])}}return r=Ht(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ig,lastRenderedState:t},r.queue=a,r=ay.bind(null,Ie,a),a.dispatch=r,a=Oc(!1),m=Lc.bind(null,Ie,!1,a.queue),a=Ht(),f={state:t,dispatch:null,action:e,pending:null},a.queue=f,r=O2.bind(null,Ie,f,m,r),f.dispatch=r,a.memoizedState=e,[t,r,!1]}function qg(e){var t=Et();return Yg(t,lt,e)}function Yg(e,t,r){if(t=Rc(e,t,Ig)[0],e=Ao(Kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=tl(t)}catch(S){throw S===Ii?bo:S}else a=t;t=Et();var f=t.queue,m=f.dispatch;return r!==t.memoizedState&&(Ie.flags|=2048,Fi(9,{destroy:void 0},z2.bind(null,f,r),null)),[a,m,e]}function z2(e,t){e.action=t}function Pg(e){var t=Et(),r=lt;if(r!==null)return Yg(t,r,e);Et(),t=t.memoizedState,r=Et();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function Fi(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=Ie.updateQueue,t===null&&(t=To(),Ie.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,t.lastEffect=e),e}function Fg(){return Et().memoizedState}function Ro(e,t,r,a){var f=Ht();Ie.flags|=e,f.memoizedState=Fi(1|t,{destroy:void 0},r,a===void 0?null:a)}function No(e,t,r,a){var f=Et();a=a===void 0?null:a;var m=f.memoizedState.inst;lt!==null&&a!==null&&xc(a,lt.memoizedState.deps)?f.memoizedState=Fi(t,m,r,a):(Ie.flags|=e,f.memoizedState=Fi(1|t,m,r,a))}function Vg(e,t){Ro(8390656,8,e,t)}function Mc(e,t){No(2048,8,e,t)}function M2(e){Ie.flags|=4;var t=Ie.updateQueue;if(t===null)t=To(),Ie.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function Gg(e){var t=Et().memoizedState;return M2({ref:t,nextImpl:e}),function(){if((rt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Xg(e,t){return No(4,2,e,t)}function Zg(e,t){return No(4,4,e,t)}function Kg(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qg(e,t,r){r=r!=null?r.concat([e]):null,No(4,4,Kg.bind(null,t,e),r)}function Dc(){}function Jg(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;return t!==null&&xc(t,a[1])?a[0]:(r.memoizedState=[e,t],e)}function Wg(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&xc(t,a[1]))return a[0];if(a=e(),ri){Rt(!0);try{e()}finally{Rt(!1)}}return r.memoizedState=[a,t],a}function jc(e,t,r){return r===void 0||(Zn&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=$y(),Ie.lanes|=e,Cr|=e,r)}function $g(e,t,r,a){return en(r,t)?r:qi.current!==null?(e=jc(e,r,a),en(e,t)||(Ct=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(Ze&261930)===0?(Ct=!0,e.memoizedState=r):(e=$y(),Ie.lanes|=e,Cr|=e,t)}function ey(e,t,r,a,f){var m=Z.p;Z.p=m!==0&&8>m?m:8;var S=V.T,R={};V.T=R,Lc(e,!1,t,r);try{var Y=f(),te=V.S;if(te!==null&&te(R,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var he=A2(Y,a);nl(e,t,he,on(e))}else nl(e,t,a,on(e))}catch(ye){nl(e,t,{then:function(){},status:"rejected",reason:ye},on())}finally{Z.p=m,S!==null&&R.types!==null&&(S.types=R.types),V.T=S}}function D2(){}function Uc(e,t,r,a){if(e.tag!==5)throw Error(o(476));var f=ty(e).queue;ey(e,f,t,ae,r===null?D2:function(){return ny(e),r(a)})}function ty(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:ae},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ny(e){var t=ty(e);t.next===null&&(t=e.alternate.memoizedState),nl(e,t.next.queue,{},on())}function Bc(){return Dt(vl)}function ry(){return Et().memoizedState}function iy(){return Et().memoizedState}function j2(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=on();e=vr(r);var a=Sr(t,e,r);a!==null&&(Qt(a,t,r),Ja(a,t,r)),t={cache:dc()},e.payload=t;return}t=t.return}}function U2(e,t,r){var a=on();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Oo(e)?ly(t,r):(r=tc(e,t,r,a),r!==null&&(Qt(r,e,a),oy(r,t,a)))}function ay(e,t,r){var a=on();nl(e,t,r,a)}function nl(e,t,r,a){var f={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Oo(e))ly(t,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=t.lastRenderedReducer,m!==null))try{var S=t.lastRenderedState,R=m(S,r);if(f.hasEagerState=!0,f.eagerState=R,en(R,S))return co(e,t,f,0),ut===null&&uo(),!1}catch{}finally{}if(r=tc(e,t,f,a),r!==null)return Qt(r,e,a),oy(r,t,a),!0}return!1}function Lc(e,t,r,a){if(a={lane:2,revertLane:yf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Oo(e)){if(t)throw Error(o(479))}else t=tc(e,r,a,2),t!==null&&Qt(t,e,2)}function Oo(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function ly(e,t){Yi=wo=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function oy(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,dp(e,r)}}var rl={readContext:Dt,use:ko,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};rl.useEffectEvent=bt;var sy={readContext:Dt,use:ko,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Vg,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Ro(4194308,4,Kg.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ro(4194308,4,e,t)},useInsertionEffect:function(e,t){Ro(4,2,e,t)},useMemo:function(e,t){var r=Ht();t=t===void 0?null:t;var a=e();if(ri){Rt(!0);try{e()}finally{Rt(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=Ht();if(r!==void 0){var f=r(t);if(ri){Rt(!0);try{r(t)}finally{Rt(!1)}}}else f=t;return a.memoizedState=a.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},a.queue=e,e=e.dispatch=U2.bind(null,Ie,e),[a.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:function(e){e=Oc(e);var t=e.queue,r=ay.bind(null,Ie,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Dc,useDeferredValue:function(e,t){var r=Ht();return jc(r,e,t)},useTransition:function(){var e=Oc(!1);return e=ey.bind(null,Ie,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=Ie,f=Ht();if(Qe){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),ut===null)throw Error(o(349));(Ze&127)!==0||Rg(a,t,r)}f.memoizedState=r;var m={value:r,getSnapshot:t};return f.queue=m,Vg(Og.bind(null,a,m,e),[e]),a.flags|=2048,Fi(9,{destroy:void 0},Ng.bind(null,a,m,r,t),null),r},useId:function(){var e=Ht(),t=ut.identifierPrefix;if(Qe){var r=Dn,a=Mn;r=(a&~(1<<32-Fe(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Co++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=R2++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bc,useFormState:Hg,useActionState:Hg,useOptimistic:function(e){var t=Ht();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Lc.bind(null,Ie,!0,r),r.dispatch=t,[e,t]},useMemoCache:Ac,useCacheRefresh:function(){return Ht().memoizedState=j2.bind(null,Ie)},useEffectEvent:function(e){var t=Ht(),r={impl:e};return t.memoizedState=r,function(){if((rt&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Ic={readContext:Dt,use:ko,useCallback:Jg,useContext:Dt,useEffect:Mc,useImperativeHandle:Qg,useInsertionEffect:Xg,useLayoutEffect:Zg,useMemo:Wg,useReducer:Ao,useRef:Fg,useState:function(){return Ao(Kn)},useDebugValue:Dc,useDeferredValue:function(e,t){var r=Et();return $g(r,lt.memoizedState,e,t)},useTransition:function(){var e=Ao(Kn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:tl(e),t]},useSyncExternalStore:Ag,useId:ry,useHostTransitionStatus:Bc,useFormState:qg,useActionState:qg,useOptimistic:function(e,t){var r=Et();return Dg(r,lt,e,t)},useMemoCache:Ac,useCacheRefresh:iy};Ic.useEffectEvent=Gg;var uy={readContext:Dt,use:ko,useCallback:Jg,useContext:Dt,useEffect:Mc,useImperativeHandle:Qg,useInsertionEffect:Xg,useLayoutEffect:Zg,useMemo:Wg,useReducer:Nc,useRef:Fg,useState:function(){return Nc(Kn)},useDebugValue:Dc,useDeferredValue:function(e,t){var r=Et();return lt===null?jc(r,e,t):$g(r,lt.memoizedState,e,t)},useTransition:function(){var e=Nc(Kn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:tl(e),t]},useSyncExternalStore:Ag,useId:ry,useHostTransitionStatus:Bc,useFormState:Pg,useActionState:Pg,useOptimistic:function(e,t){var r=Et();return lt!==null?Dg(r,lt,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Ac,useCacheRefresh:iy};uy.useEffectEvent=Gg;function Hc(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:g({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var qc={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=on(),f=vr(a);f.payload=t,r!=null&&(f.callback=r),t=Sr(e,f,a),t!==null&&(Qt(t,e,a),Ja(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=on(),f=vr(a);f.tag=1,f.payload=t,r!=null&&(f.callback=r),t=Sr(e,f,a),t!==null&&(Qt(t,e,a),Ja(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=on(),a=vr(r);a.tag=2,t!=null&&(a.callback=t),t=Sr(e,a,r),t!==null&&(Qt(t,e,r),Ja(t,e,r))}};function cy(e,t,r,a,f,m,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,m,S):t.prototype&&t.prototype.isPureReactComponent?!Pa(r,a)||!Pa(f,m):!0}function fy(e,t,r,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==e&&qc.enqueueReplaceState(t,t.state,null)}function ii(e,t){var r=t;if("ref"in t){r={};for(var a in t)a!=="ref"&&(r[a]=t[a])}if(e=e.defaultProps){r===t&&(r=g({},r));for(var f in e)r[f]===void 0&&(r[f]=e[f])}return r}function dy(e){so(e)}function hy(e){console.error(e)}function my(e){so(e)}function zo(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function py(e,t,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Yc(e,t,r){return r=vr(r),r.tag=3,r.payload={element:null},r.callback=function(){zo(e,t)},r}function gy(e){return e=vr(e),e.tag=3,e}function yy(e,t,r,a){var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var m=a.value;e.payload=function(){return f(m)},e.callback=function(){py(t,r,a)}}var S=r.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){py(t,r,a),typeof f!="function"&&(Tr===null?Tr=new Set([this]):Tr.add(this));var R=a.stack;this.componentDidCatch(a.value,{componentStack:R!==null?R:""})})}function B2(e,t,r,a,f){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&Ui(t,r,f,!0),r=nn.current,r!==null){switch(r.tag){case 31:case 13:return vn===null?Fo():r.alternate===null&&vt===0&&(vt=3),r.flags&=-257,r.flags|=65536,r.lanes=f,a===vo?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),mf(e,a,f)),!1;case 22:return r.flags|=65536,a===vo?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([a]):r.add(a)),mf(e,a,f)),!1}throw Error(o(435,r.tag))}return mf(e,a,f),Fo(),!1}if(Qe)return t=nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,a!==oc&&(e=Error(o(422),{cause:a}),Ga(pn(e,r)))):(a!==oc&&(t=Error(o(423),{cause:a}),Ga(pn(t,r))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,a=pn(a,r),f=Yc(e.stateNode,a,f),bc(e,f),vt!==4&&(vt=2)),!1;var m=Error(o(520),{cause:a});if(m=pn(m,r),fl===null?fl=[m]:fl.push(m),vt!==4&&(vt=2),t===null)return!0;a=pn(a,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=f&-f,r.lanes|=e,e=Yc(r.stateNode,a,e),bc(r,e),!1;case 1:if(t=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Tr===null||!Tr.has(m))))return r.flags|=65536,f&=-f,r.lanes|=f,f=gy(f),yy(f,e,r,a),bc(r,f),!1}r=r.return}while(r!==null);return!1}var Pc=Error(o(461)),Ct=!1;function jt(e,t,r,a){t.child=e===null?Eg(t,null,r,a):ni(t,e.child,r,a)}function by(e,t,r,a,f){r=r.render;var m=t.ref;if("ref"in a){var S={};for(var R in a)R!=="ref"&&(S[R]=a[R])}else S=a;return Wr(t),a=wc(e,t,r,S,m,f),R=Cc(),e!==null&&!Ct?(Tc(e,t,f),Qn(e,t,f)):(Qe&&R&&ac(t),t.flags|=1,jt(e,t,a,f),t.child)}function vy(e,t,r,a,f){if(e===null){var m=r.type;return typeof m=="function"&&!nc(m)&&m.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=m,Sy(e,t,m,a,f)):(e=ho(r.type,null,a,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(m=e.child,!Jc(e,f)){var S=m.memoizedProps;if(r=r.compare,r=r!==null?r:Pa,r(S,a)&&e.ref===t.ref)return Qn(e,t,f)}return t.flags|=1,e=Fn(m,a),e.ref=t.ref,e.return=t,t.child=e}function Sy(e,t,r,a,f){if(e!==null){var m=e.memoizedProps;if(Pa(m,a)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=a=m,Jc(e,f))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,Qn(e,t,f)}return Fc(e,t,r,a,f)}function Ey(e,t,r,a){var f=a.children,m=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,e!==null){for(a=t.child=e.child,f=0;a!==null;)f=f|a.lanes|a.childLanes,a=a.sibling;a=f&~m}else a=0,t.child=null;return _y(e,t,m,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yo(t,m!==null?m.cachePool:null),m!==null?wg(t,m):Sc(),Cg(t);else return a=t.lanes=536870912,_y(e,t,m!==null?m.baseLanes|r:r,r,a)}else m!==null?(yo(t,m.cachePool),wg(t,m),_r(),t.memoizedState=null):(e!==null&&yo(t,null),Sc(),_r());return jt(e,t,f,r),t.child}function il(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _y(e,t,r,a,f){var m=mc();return m=m===null?null:{parent:xt._currentValue,pool:m},t.memoizedState={baseLanes:r,cachePool:m},e!==null&&yo(t,null),Sc(),Cg(t),e!==null&&Ui(e,t,a,!0),t.childLanes=f,null}function Mo(e,t){return t=jo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xy(e,t,r){return ni(t,e.child,null,r),e=Mo(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function L2(e,t,r){var a=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Qe){if(a.mode==="hidden")return e=Mo(t,a),t.lanes=536870912,il(null,e);if(_c(t),(e=dt)?(e=j0(e,bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mr!==null?{id:Mn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},r=lg(e),r.return=t,t.child=r,Mt=t,dt=null)):e=null,e===null)throw gr(t);return t.lanes=536870912,null}return Mo(t,a)}var m=e.memoizedState;if(m!==null){var S=m.dehydrated;if(_c(t),f)if(t.flags&256)t.flags&=-257,t=xy(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ct||Ui(e,t,r,!1),f=(r&e.childLanes)!==0,Ct||f){if(a=ut,a!==null&&(S=hp(a,r),S!==0&&S!==m.retryLane))throw m.retryLane=S,Zr(e,S),Qt(a,e,S),Pc;Fo(),t=xy(e,t,r)}else e=m.treeContext,dt=Sn(S.nextSibling),Mt=t,Qe=!0,pr=null,bn=!1,e!==null&&ug(t,e),t=Mo(t,a),t.flags|=4096;return t}return e=Fn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Do(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Fc(e,t,r,a,f){return Wr(t),r=wc(e,t,r,a,void 0,f),a=Cc(),e!==null&&!Ct?(Tc(e,t,f),Qn(e,t,f)):(Qe&&a&&ac(t),t.flags|=1,jt(e,t,r,f),t.child)}function wy(e,t,r,a,f,m){return Wr(t),t.updateQueue=null,r=kg(t,a,r,f),Tg(e),a=Cc(),e!==null&&!Ct?(Tc(e,t,m),Qn(e,t,m)):(Qe&&a&&ac(t),t.flags|=1,jt(e,t,r,m),t.child)}function Cy(e,t,r,a,f){if(Wr(t),t.stateNode===null){var m=zi,S=r.contextType;typeof S=="object"&&S!==null&&(m=Dt(S)),m=new r(a,m),t.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=qc,t.stateNode=m,m._reactInternals=t,m=t.stateNode,m.props=a,m.state=t.memoizedState,m.refs={},gc(t),S=r.contextType,m.context=typeof S=="object"&&S!==null?Dt(S):zi,m.state=t.memoizedState,S=r.getDerivedStateFromProps,typeof S=="function"&&(Hc(t,r,S,a),m.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&qc.enqueueReplaceState(m,m.state,null),$a(t,a,m,f),Wa(),m.state=t.memoizedState),typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){m=t.stateNode;var R=t.memoizedProps,Y=ii(r,R);m.props=Y;var te=m.context,he=r.contextType;S=zi,typeof he=="object"&&he!==null&&(S=Dt(he));var ye=r.getDerivedStateFromProps;he=typeof ye=="function"||typeof m.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,he||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(R||te!==S)&&fy(t,m,a,S),br=!1;var ie=t.memoizedState;m.state=ie,$a(t,a,m,f),Wa(),te=t.memoizedState,R||ie!==te||br?(typeof ye=="function"&&(Hc(t,r,ye,a),te=t.memoizedState),(Y=br||cy(t,r,Y,a,ie,te,S))?(he||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=te),m.props=a,m.state=te,m.context=S,a=Y):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{m=t.stateNode,yc(e,t),S=t.memoizedProps,he=ii(r,S),m.props=he,ye=t.pendingProps,ie=m.context,te=r.contextType,Y=zi,typeof te=="object"&&te!==null&&(Y=Dt(te)),R=r.getDerivedStateFromProps,(te=typeof R=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ye||ie!==Y)&&fy(t,m,a,Y),br=!1,ie=t.memoizedState,m.state=ie,$a(t,a,m,f),Wa();var oe=t.memoizedState;S!==ye||ie!==oe||br||e!==null&&e.dependencies!==null&&po(e.dependencies)?(typeof R=="function"&&(Hc(t,r,R,a),oe=t.memoizedState),(he=br||cy(t,r,he,a,ie,oe,Y)||e!==null&&e.dependencies!==null&&po(e.dependencies))?(te||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,oe,Y),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,oe,Y)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=oe),m.props=a,m.state=oe,m.context=Y,a=he):(typeof m.componentDidUpdate!="function"||S===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),a=!1)}return m=a,Do(e,t),a=(t.flags&128)!==0,m||a?(m=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:m.render(),t.flags|=1,e!==null&&a?(t.child=ni(t,e.child,null,f),t.child=ni(t,null,r,f)):jt(e,t,r,f),t.memoizedState=m.state,e=t.child):e=Qn(e,t,f),e}function Ty(e,t,r,a){return Qr(),t.flags|=256,jt(e,t,r,a),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:pg()}}function Xc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=ln),e}function ky(e,t,r){var a=t.pendingProps,f=!1,m=(t.flags&128)!==0,S;if((S=m)||(S=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),S&&(f=!0,t.flags&=-129),S=(t.flags&32)!==0,t.flags&=-33,e===null){if(Qe){if(f?Er(t):_r(),(e=dt)?(e=j0(e,bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mr!==null?{id:Mn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},r=lg(e),r.return=t,t.child=r,Mt=t,dt=null)):e=null,e===null)throw gr(t);return Nf(e)?t.lanes=32:t.lanes=536870912,null}var R=a.children;return a=a.fallback,f?(_r(),f=t.mode,R=jo({mode:"hidden",children:R},f),a=Kr(a,f,r,null),R.return=t,a.return=t,R.sibling=a,t.child=R,a=t.child,a.memoizedState=Gc(r),a.childLanes=Xc(e,S,r),t.memoizedState=Vc,il(null,a)):(Er(t),Zc(t,R))}var Y=e.memoizedState;if(Y!==null&&(R=Y.dehydrated,R!==null)){if(m)t.flags&256?(Er(t),t.flags&=-257,t=Kc(e,t,r)):t.memoizedState!==null?(_r(),t.child=e.child,t.flags|=128,t=null):(_r(),R=a.fallback,f=t.mode,a=jo({mode:"visible",children:a.children},f),R=Kr(R,f,r,null),R.flags|=2,a.return=t,R.return=t,a.sibling=R,t.child=a,ni(t,e.child,null,r),a=t.child,a.memoizedState=Gc(r),a.childLanes=Xc(e,S,r),t.memoizedState=Vc,t=il(null,a));else if(Er(t),Nf(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var te=S.dgst;S=te,a=Error(o(419)),a.stack="",a.digest=S,Ga({value:a,source:null,stack:null}),t=Kc(e,t,r)}else if(Ct||Ui(e,t,r,!1),S=(r&e.childLanes)!==0,Ct||S){if(S=ut,S!==null&&(a=hp(S,r),a!==0&&a!==Y.retryLane))throw Y.retryLane=a,Zr(e,a),Qt(S,e,a),Pc;Rf(R)||Fo(),t=Kc(e,t,r)}else Rf(R)?(t.flags|=192,t.child=e.child,t=null):(e=Y.treeContext,dt=Sn(R.nextSibling),Mt=t,Qe=!0,pr=null,bn=!1,e!==null&&ug(t,e),t=Zc(t,a.children),t.flags|=4096);return t}return f?(_r(),R=a.fallback,f=t.mode,Y=e.child,te=Y.sibling,a=Fn(Y,{mode:"hidden",children:a.children}),a.subtreeFlags=Y.subtreeFlags&65011712,te!==null?R=Fn(te,R):(R=Kr(R,f,r,null),R.flags|=2),R.return=t,a.return=t,a.sibling=R,t.child=a,il(null,a),a=t.child,R=e.child.memoizedState,R===null?R=Gc(r):(f=R.cachePool,f!==null?(Y=xt._currentValue,f=f.parent!==Y?{parent:Y,pool:Y}:f):f=pg(),R={baseLanes:R.baseLanes|r,cachePool:f}),a.memoizedState=R,a.childLanes=Xc(e,S,r),t.memoizedState=Vc,il(e.child,a)):(Er(t),r=e.child,e=r.sibling,r=Fn(r,{mode:"visible",children:a.children}),r.return=t,r.sibling=null,e!==null&&(S=t.deletions,S===null?(t.deletions=[e],t.flags|=16):S.push(e)),t.child=r,t.memoizedState=null,r)}function Zc(e,t){return t=jo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function jo(e,t){return e=tn(22,e,null,t),e.lanes=0,e}function Kc(e,t,r){return ni(t,e.child,null,r),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ay(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),cc(e.return,t,r)}function Qc(e,t,r,a,f,m){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:f,treeForkCount:m}:(S.isBackwards=t,S.rendering=null,S.renderingStartTime=0,S.last=a,S.tail=r,S.tailMode=f,S.treeForkCount=m)}function Ry(e,t,r){var a=t.pendingProps,f=a.revealOrder,m=a.tail;a=a.children;var S=St.current,R=(S&2)!==0;if(R?(S=S&1|2,t.flags|=128):S&=1,N(St,S),jt(e,t,a,r),a=Qe?Va:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ay(e,r,t);else if(e.tag===19)Ay(e,r,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(f){case"forwards":for(r=t.child,f=null;r!==null;)e=r.alternate,e!==null&&xo(e)===null&&(f=r),r=r.sibling;r=f,r===null?(f=t.child,t.child=null):(f=r.sibling,r.sibling=null),Qc(t,!1,f,r,m,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&xo(e)===null){t.child=f;break}e=f.sibling,f.sibling=r,r=f,f=e}Qc(t,!0,r,null,m,a);break;case"together":Qc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Qn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Cr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Ui(e,t,r,!1),(r&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,r=Fn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Fn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Jc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&po(e)))}function I2(e,t,r){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),yr(t,xt,e.memoizedState.cache),Qr();break;case 27:case 5:Me(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:yr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_c(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Er(t),t.flags|=128,null):(r&t.child.childLanes)!==0?ky(e,t,r):(Er(t),e=Qn(e,t,r),e!==null?e.sibling:null);Er(t);break;case 19:var f=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(Ui(e,t,r,!1),a=(r&t.childLanes)!==0),f){if(a)return Ry(e,t,r);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),N(St,St.current),a)break;return null;case 22:return t.lanes=0,Ey(e,t,r,t.pendingProps);case 24:yr(t,xt,e.memoizedState.cache)}return Qn(e,t,r)}function Ny(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!Jc(e,r)&&(t.flags&128)===0)return Ct=!1,I2(e,t,r);Ct=(e.flags&131072)!==0}else Ct=!1,Qe&&(t.flags&1048576)!==0&&sg(t,Va,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ei(t.elementType),t.type=e,typeof e=="function")nc(e)?(a=ii(e,a),t.tag=1,t=Cy(null,t,e,a,r)):(t.tag=0,t=Fc(null,t,e,a,r));else{if(e!=null){var f=e.$$typeof;if(f===H){t.tag=11,t=by(null,t,e,a,r);break e}else if(f===L){t.tag=14,t=vy(null,t,e,a,r);break e}}throw t=w(e)||e,Error(o(306,t,""))}}return t;case 0:return Fc(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,f=ii(a,t.pendingProps),Cy(e,t,a,f,r);case 3:e:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var m=t.memoizedState;f=m.element,yc(e,t),$a(t,a,null,r);var S=t.memoizedState;if(a=S.cache,yr(t,xt,a),a!==m.cache&&fc(t,[xt],r,!0),Wa(),a=S.element,m.isDehydrated)if(m={element:a,isDehydrated:!1,cache:S.cache},t.updateQueue.baseState=m,t.memoizedState=m,t.flags&256){t=Ty(e,t,a,r);break e}else if(a!==f){f=pn(Error(o(424)),t),Ga(f),t=Ty(e,t,a,r);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(dt=Sn(e.firstChild),Mt=t,Qe=!0,pr=null,bn=!0,r=Eg(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Qr(),a===f){t=Qn(e,t,r);break e}jt(e,t,a,r)}t=t.child}return t;case 26:return Do(e,t),e===null?(r=q0(t.type,null,t.pendingProps,null))?t.memoizedState=r:Qe||(r=t.type,e=t.pendingProps,a=Jo(ge.current).createElement(r),a[zt]=t,a[Ft]=e,Ut(a,r,e),Nt(a),t.stateNode=a):t.memoizedState=q0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&Qe&&(a=t.stateNode=L0(t.type,t.pendingProps,ge.current),Mt=t,bn=!0,f=dt,Nr(t.type)?(Of=f,dt=Sn(a.firstChild)):dt=f),jt(e,t,t.pendingProps.children,r),Do(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qe&&((f=a=dt)&&(a=pC(a,t.type,t.pendingProps,bn),a!==null?(t.stateNode=a,Mt=t,dt=Sn(a.firstChild),bn=!1,f=!0):f=!1),f||gr(t)),Me(t),f=t.type,m=t.pendingProps,S=e!==null?e.memoizedProps:null,a=m.children,Tf(f,m)?a=null:S!==null&&Tf(f,S)&&(t.flags|=32),t.memoizedState!==null&&(f=wc(e,t,N2,null,null,r),vl._currentValue=f),Do(e,t),jt(e,t,a,r),t.child;case 6:return e===null&&Qe&&((e=r=dt)&&(r=gC(r,t.pendingProps,bn),r!==null?(t.stateNode=r,Mt=t,dt=null,e=!0):e=!1),e||gr(t)),null;case 13:return ky(e,t,r);case 4:return Te(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ni(t,null,a,r):jt(e,t,a,r),t.child;case 11:return by(e,t,t.type,t.pendingProps,r);case 7:return jt(e,t,t.pendingProps,r),t.child;case 8:return jt(e,t,t.pendingProps.children,r),t.child;case 12:return jt(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,yr(t,t.type,a.value),jt(e,t,a.children,r),t.child;case 9:return f=t.type._context,a=t.pendingProps.children,Wr(t),f=Dt(f),a=a(f),t.flags|=1,jt(e,t,a,r),t.child;case 14:return vy(e,t,t.type,t.pendingProps,r);case 15:return Sy(e,t,t.type,t.pendingProps,r);case 19:return Ry(e,t,r);case 31:return L2(e,t,r);case 22:return Ey(e,t,r,t.pendingProps);case 24:return Wr(t),a=Dt(xt),e===null?(f=mc(),f===null&&(f=ut,m=dc(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=r),f=m),t.memoizedState={parent:a,cache:f},gc(t),yr(t,xt,f)):((e.lanes&r)!==0&&(yc(e,t),$a(t,null,null,r),Wa()),f=e.memoizedState,m=t.memoizedState,f.parent!==a?(f={parent:a,cache:a},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),yr(t,xt,a)):(a=m.cache,yr(t,xt,a),a!==f.cache&&fc(t,[xt],r,!0))),jt(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Jn(e){e.flags|=4}function Wc(e,t,r,a,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(r0())e.flags|=8192;else throw ti=vo,pc}else e.flags&=-16777217}function Oy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!G0(t))if(r0())e.flags|=8192;else throw ti=vo,pc}function Uo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?cp():536870912,e.lanes|=t,Zi|=t)}function al(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(t)for(var f=e.child;f!==null;)r|=f.lanes|f.childLanes,a|=f.subtreeFlags&65011712,a|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)r|=f.lanes|f.childLanes,a|=f.subtreeFlags,a|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=a,e.childLanes=r,t}function H2(e,t,r){var a=t.pendingProps;switch(lc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return r=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Xn(xt),ke(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ji(t)?Jn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sc())),ht(t),null;case 26:var f=t.type,m=t.memoizedState;return e===null?(Jn(t),m!==null?(ht(t),Oy(t,m)):(ht(t),Wc(t,f,null,a,r))):m?m!==e.memoizedState?(Jn(t),ht(t),Oy(t,m)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Jn(t),ht(t),Wc(t,f,e,a,r)),null;case 27:if(De(t),r=ge.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jn(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return ht(t),null}e=ne.current,ji(t)?cg(t):(e=L0(f,a,r),t.stateNode=e,Jn(t))}return ht(t),null;case 5:if(De(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jn(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return ht(t),null}if(m=ne.current,ji(t))cg(t);else{var S=Jo(ge.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof a.is=="string"?S.createElement("select",{is:a.is}):S.createElement("select"),a.multiple?m.multiple=!0:a.size&&(m.size=a.size);break;default:m=typeof a.is=="string"?S.createElement(f,{is:a.is}):S.createElement(f)}}m[zt]=t,m[Ft]=a;e:for(S=t.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===t)break e;for(;S.sibling===null;){if(S.return===null||S.return===t)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}t.stateNode=m;e:switch(Ut(m,f,a),f){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Jn(t)}}return ht(t),Wc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Jn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=ge.current,ji(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,f=Mt,f!==null)switch(f.tag){case 27:case 5:a=f.memoizedProps}e[zt]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||k0(e.nodeValue,r)),e||gr(t,!0)}else e=Jo(e).createTextNode(a),e[zt]=t,t.stateNode=e}return ht(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(a=ji(t),r!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[zt]=t}else Qr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else r=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ht(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ji(t),a!==null&&a.dehydrated!==null){if(e===null){if(!f)throw Error(o(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));f[zt]=t}else Qr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),f=!1}else f=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=t.child,f=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(f=a.alternate.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==f&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Uo(t,t.updateQueue),ht(t),null);case 4:return ke(),e===null&&Ef(t.stateNode.containerInfo),ht(t),null;case 10:return Xn(t.type),ht(t),null;case 19:if(j(St),a=t.memoizedState,a===null)return ht(t),null;if(f=(t.flags&128)!==0,m=a.rendering,m===null)if(f)al(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=xo(e),m!==null){for(t.flags|=128,al(a,!1),e=m.updateQueue,t.updateQueue=e,Uo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)ag(r,e),r=r.sibling;return N(St,St.current&1|2),Qe&&Vn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ce()>qo&&(t.flags|=128,f=!0,al(a,!1),t.lanes=4194304)}else{if(!f)if(e=xo(m),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,Uo(t,e),al(a,!0),a.tail===null&&a.tailMode==="hidden"&&!m.alternate&&!Qe)return ht(t),null}else 2*Ce()-a.renderingStartTime>qo&&r!==536870912&&(t.flags|=128,f=!0,al(a,!1),t.lanes=4194304);a.isBackwards?(m.sibling=t.child,t.child=m):(e=a.last,e!==null?e.sibling=m:t.child=m,a.last=m)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ce(),e.sibling=null,r=St.current,N(St,f?r&1|2:r&1),Qe&&Vn(t,a.treeForkCount),e):(ht(t),null);case 22:case 23:return rn(t),Ec(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(r&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),r=t.updateQueue,r!==null&&Uo(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&j($r),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xn(xt),ht(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function q2(e,t){switch(lc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(xt),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(o(340));Qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(St),null;case 4:return ke(),null;case 10:return Xn(t.type),null;case 22:case 23:return rn(t),Ec(),e!==null&&j($r),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xn(xt),null;case 25:return null;default:return null}}function zy(e,t){switch(lc(t),t.tag){case 3:Xn(xt),ke();break;case 26:case 27:case 5:De(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:j(St);break;case 10:Xn(t.type);break;case 22:case 23:rn(t),Ec(),e!==null&&j($r);break;case 24:Xn(xt)}}function ll(e,t){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var f=a.next;r=f;do{if((r.tag&e)===e){a=void 0;var m=r.create,S=r.inst;a=m(),S.destroy=a}r=r.next}while(r!==f)}}catch(R){at(t,t.return,R)}}function xr(e,t,r){try{var a=t.updateQueue,f=a!==null?a.lastEffect:null;if(f!==null){var m=f.next;a=m;do{if((a.tag&e)===e){var S=a.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,f=t;var Y=r,te=R;try{te()}catch(he){at(f,Y,he)}}}a=a.next}while(a!==m)}}catch(he){at(t,t.return,he)}}function My(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{xg(t,r)}catch(a){at(e,e.return,a)}}}function Dy(e,t,r){r.props=ii(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){at(e,t,a)}}function ol(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(f){at(e,t,f)}}function jn(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(f){at(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){at(e,t,f)}else r.current=null}function jy(e){var t=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(f){at(e,e.return,f)}}function $c(e,t,r){try{var a=e.stateNode;uC(a,e.type,r,t),a[Ft]=t}catch(f){at(e,e.return,f)}}function Uy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nr(e.type)||e.tag===4}function ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Uy(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&&Nr(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 tf(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Yn));else if(a!==4&&(a===27&&Nr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(tf(e,t,r),e=e.sibling;e!==null;)tf(e,t,r),e=e.sibling}function Bo(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(a!==4&&(a===27&&Nr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Bo(e,t,r),e=e.sibling;e!==null;)Bo(e,t,r),e=e.sibling}function By(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Ut(t,a,r),t[zt]=e,t[Ft]=r}catch(m){at(e,e.return,m)}}var Wn=!1,Tt=!1,nf=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function Y2(e,t){if(e=e.containerInfo,wf=is,e=Qp(e),Ku(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var f=a.anchorOffset,m=a.focusNode;a=a.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var S=0,R=-1,Y=-1,te=0,he=0,ye=e,ie=null;t:for(;;){for(var oe;ye!==r||f!==0&&ye.nodeType!==3||(R=S+f),ye!==m||a!==0&&ye.nodeType!==3||(Y=S+a),ye.nodeType===3&&(S+=ye.nodeValue.length),(oe=ye.firstChild)!==null;)ie=ye,ye=oe;for(;;){if(ye===e)break t;if(ie===r&&++te===f&&(R=S),ie===m&&++he===a&&(Y=S),(oe=ye.nextSibling)!==null)break;ye=ie,ie=ye.parentNode}ye=oe}r=R===-1||Y===-1?null:{start:R,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Cf={focusedElem:e,selectionRange:r},is=!1,Ot=t;Ot!==null;)if(t=Ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ot=e;else for(;Ot!==null;){switch(t=Ot,m=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(r=0;r<e.length;r++)f=e[r],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,r=t,f=m.memoizedProps,m=m.memoizedState,a=r.stateNode;try{var Ae=ii(r.type,f);e=a.getSnapshotBeforeUpdate(Ae,m),a.__reactInternalSnapshotBeforeUpdate=e}catch(je){at(r,r.return,je)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Af(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Af(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,Ot=e;break}Ot=t.return}}function Iy(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:er(e,r),a&4&&ll(5,r);break;case 1:if(er(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(S){at(r,r.return,S)}else{var f=ii(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){at(r,r.return,S)}}a&64&&My(r),a&512&&ol(r,r.return);break;case 3:if(er(e,r),a&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{xg(e,t)}catch(S){at(r,r.return,S)}}break;case 27:t===null&&a&4&&By(r);case 26:case 5:er(e,r),t===null&&a&4&&jy(r),a&512&&ol(r,r.return);break;case 12:er(e,r);break;case 31:er(e,r),a&4&&Yy(e,r);break;case 13:er(e,r),a&4&&Py(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=J2.bind(null,r),yC(e,r))));break;case 22:if(a=r.memoizedState!==null||Wn,!a){t=t!==null&&t.memoizedState!==null||Tt,f=Wn;var m=Tt;Wn=a,(Tt=t)&&!m?tr(e,r,(r.subtreeFlags&8772)!==0):er(e,r),Wn=f,Tt=m}break;case 30:break;default:er(e,r)}}function Hy(e){var t=e.alternate;t!==null&&(e.alternate=null,Hy(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 gt=null,Gt=!1;function $n(e,t,r){for(r=r.child;r!==null;)qy(e,t,r),r=r.sibling}function qy(e,t,r){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Pe,r)}catch{}switch(r.tag){case 26:Tt||jn(r,t),$n(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Tt||jn(r,t);var a=gt,f=Gt;Nr(r.type)&&(gt=r.stateNode,Gt=!1),$n(e,t,r),gl(r.stateNode),gt=a,Gt=f;break;case 5:Tt||jn(r,t);case 6:if(a=gt,f=Gt,gt=null,$n(e,t,r),gt=a,Gt=f,gt!==null)if(Gt)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(r.stateNode)}catch(m){at(r,t,m)}else try{gt.removeChild(r.stateNode)}catch(m){at(r,t,m)}break;case 18:gt!==null&&(Gt?(e=gt,M0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),na(e)):M0(gt,r.stateNode));break;case 4:a=gt,f=Gt,gt=r.stateNode.containerInfo,Gt=!0,$n(e,t,r),gt=a,Gt=f;break;case 0:case 11:case 14:case 15:xr(2,r,t),Tt||xr(4,r,t),$n(e,t,r);break;case 1:Tt||(jn(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&Dy(r,t,a)),$n(e,t,r);break;case 21:$n(e,t,r);break;case 22:Tt=(a=Tt)||r.memoizedState!==null,$n(e,t,r),Tt=a;break;default:$n(e,t,r)}}function Yy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{na(e)}catch(r){at(t,t.return,r)}}}function Py(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{na(e)}catch(r){at(t,t.return,r)}}function P2(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ly),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ly),t;default:throw Error(o(435,e.tag))}}function Lo(e,t){var r=P2(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var f=W2.bind(null,e,a);a.then(f,f)}})}function Xt(e,t){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var f=r[a],m=e,S=t,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(Nr(R.type)){gt=R.stateNode,Gt=!1;break e}break;case 5:gt=R.stateNode,Gt=!1;break e;case 3:case 4:gt=R.stateNode.containerInfo,Gt=!0;break e}R=R.return}if(gt===null)throw Error(o(160));qy(m,S,f),gt=null,Gt=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fy(t,e),t=t.sibling}var Cn=null;function Fy(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xt(t,e),Zt(e),a&4&&(xr(3,e,e.return),ll(3,e),xr(5,e,e.return));break;case 1:Xt(t,e),Zt(e),a&512&&(Tt||r===null||jn(r,r.return)),a&64&&Wn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var f=Cn;if(Xt(t,e),Zt(e),a&512&&(Tt||r===null||jn(r,r.return)),a&4){var m=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,f=f.ownerDocument||f;t:switch(a){case"title":m=f.getElementsByTagName("title")[0],(!m||m[Da]||m[zt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(a),f.head.insertBefore(m,f.querySelector("head > title"))),Ut(m,a,r),m[zt]=e,Nt(m),a=m;break e;case"link":var S=F0("link","href",f).get(a+(r.href||""));if(S){for(var R=0;R<S.length;R++)if(m=S[R],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){S.splice(R,1);break t}}m=f.createElement(a),Ut(m,a,r),f.head.appendChild(m);break;case"meta":if(S=F0("meta","content",f).get(a+(r.content||""))){for(R=0;R<S.length;R++)if(m=S[R],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){S.splice(R,1);break t}}m=f.createElement(a),Ut(m,a,r),f.head.appendChild(m);break;default:throw Error(o(468,a))}m[zt]=e,Nt(m),a=m}e.stateNode=a}else V0(f,e.type,e.stateNode);else e.stateNode=P0(f,a,e.memoizedProps);else m!==a?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,a===null?V0(f,e.type,e.stateNode):P0(f,a,e.memoizedProps)):a===null&&e.stateNode!==null&&$c(e,e.memoizedProps,r.memoizedProps)}break;case 27:Xt(t,e),Zt(e),a&512&&(Tt||r===null||jn(r,r.return)),r!==null&&a&4&&$c(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Xt(t,e),Zt(e),a&512&&(Tt||r===null||jn(r,r.return)),e.flags&32){f=e.stateNode;try{Ci(f,"")}catch(Ae){at(e,e.return,Ae)}}a&4&&e.stateNode!=null&&(f=e.memoizedProps,$c(e,f,r!==null?r.memoizedProps:f)),a&1024&&(nf=!0);break;case 6:if(Xt(t,e),Zt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(Ae){at(e,e.return,Ae)}}break;case 3:if(es=null,f=Cn,Cn=Wo(t.containerInfo),Xt(t,e),Cn=f,Zt(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{na(t.containerInfo)}catch(Ae){at(e,e.return,Ae)}nf&&(nf=!1,Vy(e));break;case 4:a=Cn,Cn=Wo(e.stateNode.containerInfo),Xt(t,e),Zt(e),Cn=a;break;case 12:Xt(t,e),Zt(e);break;case 31:Xt(t,e),Zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Lo(e,a)));break;case 13:Xt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Ho=Ce()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Lo(e,a)));break;case 22:f=e.memoizedState!==null;var Y=r!==null&&r.memoizedState!==null,te=Wn,he=Tt;if(Wn=te||f,Tt=he||Y,Xt(t,e),Tt=he,Wn=te,Zt(e),a&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(r===null||Y||Wn||Tt||ai(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){Y=r=t;try{if(m=Y.stateNode,f)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=Y.stateNode;var ye=Y.memoizedProps.style,ie=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;R.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(Ae){at(Y,Y.return,Ae)}}}else if(t.tag===6){if(r===null){Y=t;try{Y.stateNode.nodeValue=f?"":Y.memoizedProps}catch(Ae){at(Y,Y.return,Ae)}}}else if(t.tag===18){if(r===null){Y=t;try{var oe=Y.stateNode;f?D0(oe,!0):D0(Y.stateNode,!1)}catch(Ae){at(Y,Y.return,Ae)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,Lo(e,r))));break;case 19:Xt(t,e),Zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Lo(e,a)));break;case 30:break;case 21:break;default:Xt(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var r,a=e.return;a!==null;){if(Uy(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var f=r.stateNode,m=ef(e);Bo(e,m,f);break;case 5:var S=r.stateNode;r.flags&32&&(Ci(S,""),r.flags&=-33);var R=ef(e);Bo(e,R,S);break;case 3:case 4:var Y=r.stateNode.containerInfo,te=ef(e);tf(e,te,Y);break;default:throw Error(o(161))}}catch(he){at(e,e.return,he)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vy(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function er(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Iy(e,t.alternate,t),t=t.sibling}function ai(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xr(4,t,t.return),ai(t);break;case 1:jn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Dy(t,t.return,r),ai(t);break;case 27:gl(t.stateNode);case 26:case 5:jn(t,t.return),ai(t);break;case 22:t.memoizedState===null&&ai(t);break;case 30:ai(t);break;default:ai(t)}e=e.sibling}}function tr(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,f=e,m=t,S=m.flags;switch(m.tag){case 0:case 11:case 15:tr(f,m,r),ll(4,m);break;case 1:if(tr(f,m,r),a=m,f=a.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(te){at(a,a.return,te)}if(a=m,f=a.updateQueue,f!==null){var R=a.stateNode;try{var Y=f.shared.hiddenCallbacks;if(Y!==null)for(f.shared.hiddenCallbacks=null,f=0;f<Y.length;f++)_g(Y[f],R)}catch(te){at(a,a.return,te)}}r&&S&64&&My(m),ol(m,m.return);break;case 27:By(m);case 26:case 5:tr(f,m,r),r&&a===null&&S&4&&jy(m),ol(m,m.return);break;case 12:tr(f,m,r);break;case 31:tr(f,m,r),r&&S&4&&Yy(f,m);break;case 13:tr(f,m,r),r&&S&4&&Py(f,m);break;case 22:m.memoizedState===null&&tr(f,m,r),ol(m,m.return);break;case 30:break;default:tr(f,m,r)}t=t.sibling}}function rf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Xa(r))}function af(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xa(e))}function Tn(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gy(e,t,r,a),t=t.sibling}function Gy(e,t,r,a){var f=t.flags;switch(t.tag){case 0:case 11:case 15:Tn(e,t,r,a),f&2048&&ll(9,t);break;case 1:Tn(e,t,r,a);break;case 3:Tn(e,t,r,a),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xa(e)));break;case 12:if(f&2048){Tn(e,t,r,a),e=t.stateNode;try{var m=t.memoizedProps,S=m.id,R=m.onPostCommit;typeof R=="function"&&R(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){at(t,t.return,Y)}}else Tn(e,t,r,a);break;case 31:Tn(e,t,r,a);break;case 13:Tn(e,t,r,a);break;case 23:break;case 22:m=t.stateNode,S=t.alternate,t.memoizedState!==null?m._visibility&2?Tn(e,t,r,a):sl(e,t):m._visibility&2?Tn(e,t,r,a):(m._visibility|=2,Vi(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),f&2048&&rf(S,t);break;case 24:Tn(e,t,r,a),f&2048&&af(t.alternate,t);break;default:Tn(e,t,r,a)}}function Vi(e,t,r,a,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var m=e,S=t,R=r,Y=a,te=S.flags;switch(S.tag){case 0:case 11:case 15:Vi(m,S,R,Y,f),ll(8,S);break;case 23:break;case 22:var he=S.stateNode;S.memoizedState!==null?he._visibility&2?Vi(m,S,R,Y,f):sl(m,S):(he._visibility|=2,Vi(m,S,R,Y,f)),f&&te&2048&&rf(S.alternate,S);break;case 24:Vi(m,S,R,Y,f),f&&te&2048&&af(S.alternate,S);break;default:Vi(m,S,R,Y,f)}t=t.sibling}}function sl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,a=t,f=a.flags;switch(a.tag){case 22:sl(r,a),f&2048&&rf(a.alternate,a);break;case 24:sl(r,a),f&2048&&af(a.alternate,a);break;default:sl(r,a)}t=t.sibling}}var ul=8192;function Gi(e,t,r){if(e.subtreeFlags&ul)for(e=e.child;e!==null;)Xy(e,t,r),e=e.sibling}function Xy(e,t,r){switch(e.tag){case 26:Gi(e,t,r),e.flags&ul&&e.memoizedState!==null&&RC(r,Cn,e.memoizedState,e.memoizedProps);break;case 5:Gi(e,t,r);break;case 3:case 4:var a=Cn;Cn=Wo(e.stateNode.containerInfo),Gi(e,t,r),Cn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=ul,ul=16777216,Gi(e,t,r),ul=a):Gi(e,t,r));break;default:Gi(e,t,r)}}function Zy(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 cl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Ot=a,Qy(a,e)}Zy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ky(e),e=e.sibling}function Ky(e){switch(e.tag){case 0:case 11:case 15:cl(e),e.flags&2048&&xr(9,e,e.return);break;case 3:cl(e);break;case 12:cl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Io(e)):cl(e);break;default:cl(e)}}function Io(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Ot=a,Qy(a,e)}Zy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xr(8,t,t.return),Io(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Io(t));break;default:Io(t)}e=e.sibling}}function Qy(e,t){for(;Ot!==null;){var r=Ot;switch(r.tag){case 0:case 11:case 15:xr(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Xa(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,Ot=a;else e:for(r=e;Ot!==null;){a=Ot;var f=a.sibling,m=a.return;if(Hy(a),a===r){Ot=null;break e}if(f!==null){f.return=m,Ot=f;break e}Ot=m}}}var F2={getCacheForType:function(e){var t=Dt(xt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Dt(xt).controller.signal}},V2=typeof WeakMap=="function"?WeakMap:Map,rt=0,ut=null,Ve=null,Ze=0,it=0,an=null,wr=!1,Xi=!1,lf=!1,nr=0,vt=0,Cr=0,li=0,of=0,ln=0,Zi=0,fl=null,Kt=null,sf=!1,Ho=0,Jy=0,qo=1/0,Yo=null,Tr=null,At=0,kr=null,Ki=null,rr=0,uf=0,cf=null,Wy=null,dl=0,ff=null;function on(){return(rt&2)!==0&&Ze!==0?Ze&-Ze:V.T!==null?yf():mp()}function $y(){if(ln===0)if((Ze&536870912)===0||Qe){var e=Pr;Pr<<=1,(Pr&3932160)===0&&(Pr=262144),ln=e}else ln=536870912;return e=nn.current,e!==null&&(e.flags|=32),ln}function Qt(e,t,r){(e===ut&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Qi(e,0),Ar(e,Ze,ln,!1)),Ma(e,r),((rt&2)===0||e!==ut)&&(e===ut&&((rt&2)===0&&(li|=r),vt===4&&Ar(e,Ze,ln,!1)),Un(e))}function e0(e,t,r){if((rt&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||za(e,t),f=a?Z2(e,t):hf(e,t,!0),m=a;do{if(f===0){Xi&&!a&&Ar(e,t,0,!1);break}else{if(r=e.current.alternate,m&&!G2(r)){f=hf(e,t,!1),m=!1;continue}if(f===2){if(m=t,e.errorRecoveryDisabledLanes&m)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){t=S;e:{var R=e;f=fl;var Y=R.current.memoizedState.isDehydrated;if(Y&&(Qi(R,S).flags|=256),S=hf(R,S,!1),S!==2){if(lf&&!Y){R.errorRecoveryDisabledLanes|=m,li|=m,f=4;break e}m=Kt,Kt=f,m!==null&&(Kt===null?Kt=m:Kt.push.apply(Kt,m))}f=S}if(m=!1,f!==2)continue}}if(f===1){Qi(e,0),Ar(e,t,0,!0);break}e:{switch(a=e,m=f,m){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ar(a,t,ln,!wr);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(f=Ho+300-Ce(),10<f)){if(Ar(a,t,ln,!wr),Jl(a,0,!0)!==0)break e;rr=t,a.timeoutHandle=O0(t0.bind(null,a,r,Kt,Yo,sf,t,ln,li,Zi,wr,m,"Throttled",-0,0),f);break e}t0(a,r,Kt,Yo,sf,t,ln,li,Zi,wr,m,null,-0,0)}}break}while(!0);Un(e)}function t0(e,t,r,a,f,m,S,R,Y,te,he,ye,ie,oe){if(e.timeoutHandle=-1,ye=t.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Xy(t,m,ye);var Ae=(m&62914560)===m?Ho-Ce():(m&4194048)===m?Jy-Ce():0;if(Ae=NC(ye,Ae),Ae!==null){rr=m,e.cancelPendingCommit=Ae(u0.bind(null,e,t,m,r,a,f,S,R,Y,he,ye,null,ie,oe)),Ar(e,m,S,!te);return}}u0(e,t,m,r,a,f,S,R,Y)}function G2(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var f=r[a],m=f.getSnapshot;f=f.value;try{if(!en(m(),f))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Ar(e,t,r,a){t&=~of,t&=~li,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var f=t;0<f;){var m=31-Fe(f),S=1<<m;a[m]=-1,f&=~S}r!==0&&fp(e,r,t)}function Po(){return(rt&6)===0?(hl(0),!1):!0}function df(){if(Ve!==null){if(it===0)var e=Ve.return;else e=Ve,Gn=Jr=null,kc(e),Hi=null,Ka=0,e=Ve;for(;e!==null;)zy(e.alternate,e),e=e.return;Ve=null}}function Qi(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,dC(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),rr=0,df(),ut=e,Ve=r=Fn(e.current,null),Ze=t,it=0,an=null,wr=!1,Xi=za(e,t),lf=!1,Zi=ln=of=li=Cr=vt=0,Kt=fl=null,sf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var f=31-Fe(a),m=1<<f;t|=e[f],a&=~m}return nr=t,uo(),r}function n0(e,t){Ie=null,V.H=rl,t===Ii||t===bo?(t=bg(),it=3):t===pc?(t=bg(),it=4):it=t===Pc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,Ve===null&&(vt=1,zo(e,pn(t,e.current)))}function r0(){var e=nn.current;return e===null?!0:(Ze&4194048)===Ze?vn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===vn:!1}function i0(){var e=V.H;return V.H=rl,e===null?rl:e}function a0(){var e=V.A;return V.A=F2,e}function Fo(){vt=4,wr||(Ze&4194048)!==Ze&&nn.current!==null||(Xi=!0),(Cr&134217727)===0&&(li&134217727)===0||ut===null||Ar(ut,Ze,ln,!1)}function hf(e,t,r){var a=rt;rt|=2;var f=i0(),m=a0();(ut!==e||Ze!==t)&&(Yo=null,Qi(e,t)),t=!1;var S=vt;e:do try{if(it!==0&&Ve!==null){var R=Ve,Y=an;switch(it){case 8:df(),S=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(t=!0);var te=it;if(it=0,an=null,Ji(e,R,Y,te),r&&Xi){S=0;break e}break;default:te=it,it=0,an=null,Ji(e,R,Y,te)}}X2(),S=vt;break}catch(he){n0(e,he)}while(!0);return t&&e.shellSuspendCounter++,Gn=Jr=null,rt=a,V.H=f,V.A=m,Ve===null&&(ut=null,Ze=0,uo()),S}function X2(){for(;Ve!==null;)l0(Ve)}function Z2(e,t){var r=rt;rt|=2;var a=i0(),f=a0();ut!==e||Ze!==t?(Yo=null,qo=Ce()+500,Qi(e,t)):Xi=za(e,t);e:do try{if(it!==0&&Ve!==null){t=Ve;var m=an;t:switch(it){case 1:it=0,an=null,Ji(e,t,m,1);break;case 2:case 9:if(gg(m)){it=0,an=null,o0(t);break}t=function(){it!==2&&it!==9||ut!==e||(it=7),Un(e)},m.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:gg(m)?(it=0,an=null,o0(t)):(it=0,an=null,Ji(e,t,m,7));break;case 5:var S=null;switch(Ve.tag){case 26:S=Ve.memoizedState;case 5:case 27:var R=Ve;if(S?G0(S):R.stateNode.complete){it=0,an=null;var Y=R.sibling;if(Y!==null)Ve=Y;else{var te=R.return;te!==null?(Ve=te,Vo(te)):Ve=null}break t}}it=0,an=null,Ji(e,t,m,5);break;case 6:it=0,an=null,Ji(e,t,m,6);break;case 8:df(),vt=6;break e;default:throw Error(o(462))}}K2();break}catch(he){n0(e,he)}while(!0);return Gn=Jr=null,V.H=a,V.A=f,rt=r,Ve!==null?0:(ut=null,Ze=0,uo(),vt)}function K2(){for(;Ve!==null&&!re();)l0(Ve)}function l0(e){var t=Ny(e.alternate,e,nr);e.memoizedProps=e.pendingProps,t===null?Vo(e):Ve=t}function o0(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=wy(r,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=wy(r,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:kc(t);default:zy(r,t),t=Ve=ag(t,nr),t=Ny(r,t,nr)}e.memoizedProps=e.pendingProps,t===null?Vo(e):Ve=t}function Ji(e,t,r,a){Gn=Jr=null,kc(t),Hi=null,Ka=0;var f=t.return;try{if(B2(e,f,t,r,Ze)){vt=1,zo(e,pn(r,e.current)),Ve=null;return}}catch(m){if(f!==null)throw Ve=f,m;vt=1,zo(e,pn(r,e.current)),Ve=null;return}t.flags&32768?(Qe||a===1?e=!0:Xi||(Ze&536870912)!==0?e=!1:(wr=e=!0,(a===2||a===9||a===3||a===6)&&(a=nn.current,a!==null&&a.tag===13&&(a.flags|=16384))),s0(t,e)):Vo(t)}function Vo(e){var t=e;do{if((t.flags&32768)!==0){s0(t,wr);return}e=t.return;var r=H2(t.alternate,t,nr);if(r!==null){Ve=r;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);vt===0&&(vt=5)}function s0(e,t){do{var r=q2(e.alternate,e);if(r!==null){r.flags&=32767,Ve=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=r}while(e!==null);vt=6,Ve=null}function u0(e,t,r,a,f,m,S,R,Y){e.cancelPendingCommit=null;do Go();while(At!==0);if((rt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(m=t.lanes|t.childLanes,m|=ec,Aw(e,r,m,S,R,Y),e===ut&&(Ve=ut=null,Ze=0),Ki=t,kr=e,rr=r,uf=m,cf=f,Wy=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$2(we,function(){return m0(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=V.T,V.T=null,f=Z.p,Z.p=2,S=rt,rt|=4;try{Y2(e,t,r)}finally{rt=S,Z.p=f,V.T=a}}At=1,c0(),f0(),d0()}}function c0(){if(At===1){At=0;var e=kr,t=Ki,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=V.T,V.T=null;var a=Z.p;Z.p=2;var f=rt;rt|=4;try{Fy(t,e);var m=Cf,S=Qp(e.containerInfo),R=m.focusedElem,Y=m.selectionRange;if(S!==R&&R&&R.ownerDocument&&Kp(R.ownerDocument.documentElement,R)){if(Y!==null&&Ku(R)){var te=Y.start,he=Y.end;if(he===void 0&&(he=te),"selectionStart"in R)R.selectionStart=te,R.selectionEnd=Math.min(he,R.value.length);else{var ye=R.ownerDocument||document,ie=ye&&ye.defaultView||window;if(ie.getSelection){var oe=ie.getSelection(),Ae=R.textContent.length,je=Math.min(Y.start,Ae),st=Y.end===void 0?je:Math.min(Y.end,Ae);!oe.extend&&je>st&&(S=st,st=je,je=S);var J=Zp(R,je),X=Zp(R,st);if(J&&X&&(oe.rangeCount!==1||oe.anchorNode!==J.node||oe.anchorOffset!==J.offset||oe.focusNode!==X.node||oe.focusOffset!==X.offset)){var ee=ye.createRange();ee.setStart(J.node,J.offset),oe.removeAllRanges(),je>st?(oe.addRange(ee),oe.extend(X.node,X.offset)):(ee.setEnd(X.node,X.offset),oe.addRange(ee))}}}}for(ye=[],oe=R;oe=oe.parentNode;)oe.nodeType===1&&ye.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ye.length;R++){var pe=ye[R];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}is=!!wf,Cf=wf=null}finally{rt=f,Z.p=a,V.T=r}}e.current=t,At=2}}function f0(){if(At===2){At=0;var e=kr,t=Ki,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=V.T,V.T=null;var a=Z.p;Z.p=2;var f=rt;rt|=4;try{Iy(e,t.alternate,t)}finally{rt=f,Z.p=a,V.T=r}}At=3}}function d0(){if(At===4||At===3){At=0,_e();var e=kr,t=Ki,r=rr,a=Wy;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,Ki=kr=null,h0(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Tr=null),Nu(r),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=V.T,f=Z.p,Z.p=2,V.T=null;try{for(var m=e.onRecoverableError,S=0;S<a.length;S++){var R=a[S];m(R.value,{componentStack:R.stack})}}finally{V.T=t,Z.p=f}}(rr&3)!==0&&Go(),Un(e),f=e.pendingLanes,(r&261930)!==0&&(f&42)!==0?e===ff?dl++:(dl=0,ff=e):dl=0,hl(0)}}function h0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xa(t)))}function Go(){return c0(),f0(),d0(),m0()}function m0(){if(At!==5)return!1;var e=kr,t=uf;uf=0;var r=Nu(rr),a=V.T,f=Z.p;try{Z.p=32>r?32:r,V.T=null,r=cf,cf=null;var m=kr,S=rr;if(At=0,Ki=kr=null,rr=0,(rt&6)!==0)throw Error(o(331));var R=rt;if(rt|=4,Ky(m.current),Gy(m,m.current,S,r),rt=R,hl(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Pe,m)}catch{}return!0}finally{Z.p=f,V.T=a,h0(e,t)}}function p0(e,t,r){t=pn(r,t),t=Yc(e.stateNode,t,2),e=Sr(e,t,2),e!==null&&(Ma(e,2),Un(e))}function at(e,t,r){if(e.tag===3)p0(e,e,r);else for(;t!==null;){if(t.tag===3){p0(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Tr===null||!Tr.has(a))){e=pn(r,e),r=gy(2),a=Sr(t,r,2),a!==null&&(yy(r,a,t,e),Ma(a,2),Un(a));break}}t=t.return}}function mf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new V2;var f=new Set;a.set(t,f)}else f=a.get(t),f===void 0&&(f=new Set,a.set(t,f));f.has(r)||(lf=!0,f.add(r),e=Q2.bind(null,e,t,r),t.then(e,e))}function Q2(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ut===e&&(Ze&r)===r&&(vt===4||vt===3&&(Ze&62914560)===Ze&&300>Ce()-Ho?(rt&2)===0&&Qi(e,0):of|=r,Zi===Ze&&(Zi=0)),Un(e)}function g0(e,t){t===0&&(t=cp()),e=Zr(e,t),e!==null&&(Ma(e,t),Un(e))}function J2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),g0(e,r)}function W2(e,t){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,f=e.memoizedState;f!==null&&(r=f.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),g0(e,r)}function $2(e,t){return be(e,t)}var Xo=null,Wi=null,pf=!1,Zo=!1,gf=!1,Rr=0;function Un(e){e!==Wi&&e.next===null&&(Wi===null?Xo=Wi=e:Wi=Wi.next=e),Zo=!0,pf||(pf=!0,tC())}function hl(e,t){if(!gf&&Zo){gf=!0;do for(var r=!1,a=Xo;a!==null;){if(e!==0){var f=a.pendingLanes;if(f===0)var m=0;else{var S=a.suspendedLanes,R=a.pingedLanes;m=(1<<31-Fe(42|e)+1)-1,m&=f&~(S&~R),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,S0(a,m))}else m=Ze,m=Jl(a,a===ut?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(m&3)===0||za(a,m)||(r=!0,S0(a,m));a=a.next}while(r);gf=!1}}function eC(){y0()}function y0(){Zo=pf=!1;var e=0;Rr!==0&&fC()&&(e=Rr);for(var t=Ce(),r=null,a=Xo;a!==null;){var f=a.next,m=b0(a,t);m===0?(a.next=null,r===null?Xo=f:r.next=f,f===null&&(Wi=r)):(r=a,(e!==0||(m&3)!==0)&&(Zo=!0)),a=f}At!==0&&At!==5||hl(e),Rr!==0&&(Rr=0)}function b0(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var S=31-Fe(m),R=1<<S,Y=f[S];Y===-1?((R&r)===0||(R&a)!==0)&&(f[S]=kw(R,t)):Y<=t&&(e.expiredLanes|=R),m&=~R}if(t=ut,r=Ze,r=Jl(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Se(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||za(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&Se(a),Nu(r)){case 2:case 8:r=ve;break;case 32:r=we;break;case 268435456:r=Xe;break;default:r=we}return a=v0.bind(null,e),r=be(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&Se(a),e.callbackPriority=2,e.callbackNode=null,2}function v0(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Go()&&e.callbackNode!==r)return null;var a=Ze;return a=Jl(e,e===ut?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(e0(e,a,t),b0(e,Ce()),e.callbackNode!=null&&e.callbackNode===r?v0.bind(null,e):null)}function S0(e,t){if(Go())return null;e0(e,t,!0)}function tC(){hC(function(){(rt&6)!==0?be(W,eC):y0()})}function yf(){if(Rr===0){var e=Bi;e===0&&(e=bi,bi<<=1,(bi&261888)===0&&(bi=256)),Rr=e}return Rr}function E0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:to(""+e)}function _0(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function nC(e,t,r,a,f){if(t==="submit"&&r&&r.stateNode===f){var m=E0((f[Ft]||null).action),S=a.submitter;S&&(t=(t=S[Ft]||null)?E0(t.formAction):S.getAttribute("formAction"),t!==null&&(m=t,S=null));var R=new ao("action","action",null,a,f);e.push({event:R,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Rr!==0){var Y=S?_0(f,S):new FormData(f);Uc(r,{pending:!0,data:Y,method:f.method,action:m},null,Y)}}else typeof m=="function"&&(R.preventDefault(),Y=S?_0(f,S):new FormData(f),Uc(r,{pending:!0,data:Y,method:f.method,action:m},m,Y))},currentTarget:f}]})}}for(var bf=0;bf<$u.length;bf++){var vf=$u[bf],rC=vf.toLowerCase(),iC=vf[0].toUpperCase()+vf.slice(1);wn(rC,"on"+iC)}wn($p,"onAnimationEnd"),wn(eg,"onAnimationIteration"),wn(tg,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(S2,"onTransitionRun"),wn(E2,"onTransitionStart"),wn(_2,"onTransitionCancel"),wn(ng,"onTransitionEnd"),xi("onMouseEnter",["mouseout","mouseover"]),xi("onMouseLeave",["mouseout","mouseover"]),xi("onPointerEnter",["pointerout","pointerover"]),xi("onPointerLeave",["pointerout","pointerover"]),Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="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(" "),aC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function x0(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],f=a.event;a=a.listeners;e:{var m=void 0;if(t)for(var S=a.length-1;0<=S;S--){var R=a[S],Y=R.instance,te=R.currentTarget;if(R=R.listener,Y!==m&&f.isPropagationStopped())break e;m=R,f.currentTarget=te;try{m(f)}catch(he){so(he)}f.currentTarget=null,m=Y}else for(S=0;S<a.length;S++){if(R=a[S],Y=R.instance,te=R.currentTarget,R=R.listener,Y!==m&&f.isPropagationStopped())break e;m=R,f.currentTarget=te;try{m(f)}catch(he){so(he)}f.currentTarget=null,m=Y}}}}function Ge(e,t){var r=t[Ou];r===void 0&&(r=t[Ou]=new Set);var a=e+"__bubble";r.has(a)||(w0(t,e,2,!1),r.add(a))}function Sf(e,t,r){var a=0;t&&(a|=4),w0(r,e,a,t)}var Ko="_reactListening"+Math.random().toString(36).slice(2);function Ef(e){if(!e[Ko]){e[Ko]=!0,yp.forEach(function(r){r!=="selectionchange"&&(aC.has(r)||Sf(r,!1,e),Sf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ko]||(t[Ko]=!0,Sf("selectionchange",!1,t))}}function w0(e,t,r,a){switch($0(t)){case 2:var f=MC;break;case 8:f=DC;break;default:f=Uf}r=f.bind(null,t,r,e),f=void 0,!Hu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),a?f!==void 0?e.addEventListener(t,r,{capture:!0,passive:f}):e.addEventListener(t,r,!0):f!==void 0?e.addEventListener(t,r,{passive:f}):e.addEventListener(t,r,!1)}function _f(e,t,r,a,f){var m=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var S=a.tag;if(S===3||S===4){var R=a.stateNode.containerInfo;if(R===f)break;if(S===4)for(S=a.return;S!==null;){var Y=S.tag;if((Y===3||Y===4)&&S.stateNode.containerInfo===f)return;S=S.return}for(;R!==null;){if(S=Si(R),S===null)return;if(Y=S.tag,Y===5||Y===6||Y===26||Y===27){a=m=S;continue e}R=R.parentNode}}a=a.return}Rp(function(){var te=m,he=Lu(r),ye=[];e:{var ie=rg.get(e);if(ie!==void 0){var oe=ao,Ae=e;switch(e){case"keypress":if(ro(r)===0)break e;case"keydown":case"keyup":oe=Ww;break;case"focusin":Ae="focus",oe=Fu;break;case"focusout":Ae="blur",oe=Fu;break;case"beforeblur":case"afterblur":oe=Fu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=zp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=Hw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=t2;break;case $p:case eg:case tg:oe=Pw;break;case ng:oe=r2;break;case"scroll":case"scrollend":oe=Lw;break;case"wheel":oe=a2;break;case"copy":case"cut":case"paste":oe=Vw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Dp;break;case"toggle":case"beforetoggle":oe=o2}var je=(t&4)!==0,st=!je&&(e==="scroll"||e==="scrollend"),J=je?ie!==null?ie+"Capture":null:ie;je=[];for(var X=te,ee;X!==null;){var pe=X;if(ee=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ee===null||J===null||(pe=Ua(X,J),pe!=null&&je.push(pl(X,pe,ee))),st)break;X=X.return}0<je.length&&(ie=new oe(ie,Ae,null,r,he),ye.push({event:ie,listeners:je}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",ie&&r!==Bu&&(Ae=r.relatedTarget||r.fromElement)&&(Si(Ae)||Ae[vi]))break e;if((oe||ie)&&(ie=he.window===he?he:(ie=he.ownerDocument)?ie.defaultView||ie.parentWindow:window,oe?(Ae=r.relatedTarget||r.toElement,oe=te,Ae=Ae?Si(Ae):null,Ae!==null&&(st=u(Ae),je=Ae.tag,Ae!==st||je!==5&&je!==27&&je!==6)&&(Ae=null)):(oe=null,Ae=te),oe!==Ae)){if(je=zp,pe="onMouseLeave",J="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(je=Dp,pe="onPointerLeave",J="onPointerEnter",X="pointer"),st=oe==null?ie:ja(oe),ee=Ae==null?ie:ja(Ae),ie=new je(pe,X+"leave",oe,r,he),ie.target=st,ie.relatedTarget=ee,pe=null,Si(he)===te&&(je=new je(J,X+"enter",Ae,r,he),je.target=ee,je.relatedTarget=st,pe=je),st=pe,oe&&Ae)t:{for(je=lC,J=oe,X=Ae,ee=0,pe=J;pe;pe=je(pe))ee++;pe=0;for(var ze=X;ze;ze=je(ze))pe++;for(;0<ee-pe;)J=je(J),ee--;for(;0<pe-ee;)X=je(X),pe--;for(;ee--;){if(J===X||X!==null&&J===X.alternate){je=J;break t}J=je(J),X=je(X)}je=null}else je=null;oe!==null&&C0(ye,ie,oe,je,!1),Ae!==null&&st!==null&&C0(ye,st,Ae,je,!0)}}e:{if(ie=te?ja(te):window,oe=ie.nodeName&&ie.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ie.type==="file")var $e=Yp;else if(Hp(ie))if(Pp)$e=y2;else{$e=p2;var Oe=m2}else oe=ie.nodeName,!oe||oe.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&Uu(te.elementType)&&($e=Yp):$e=g2;if($e&&($e=$e(e,te))){qp(ye,$e,r,he);break e}Oe&&Oe(e,ie,te),e==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&ju(ie,"number",ie.value)}switch(Oe=te?ja(te):window,e){case"focusin":(Hp(Oe)||Oe.contentEditable==="true")&&(Ri=Oe,Qu=te,Fa=null);break;case"focusout":Fa=Qu=Ri=null;break;case"mousedown":Ju=!0;break;case"contextmenu":case"mouseup":case"dragend":Ju=!1,Jp(ye,r,he);break;case"selectionchange":if(v2)break;case"keydown":case"keyup":Jp(ye,r,he)}var qe;if(Gu)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ai?Lp(e,r)&&(Ke="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ke="onCompositionStart");Ke&&(jp&&r.locale!=="ko"&&(Ai||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ai&&(qe=Np()):(hr=he,qu="value"in hr?hr.value:hr.textContent,Ai=!0)),Oe=Qo(te,Ke),0<Oe.length&&(Ke=new Mp(Ke,e,null,r,he),ye.push({event:Ke,listeners:Oe}),qe?Ke.data=qe:(qe=Ip(r),qe!==null&&(Ke.data=qe)))),(qe=u2?c2(e,r):f2(e,r))&&(Ke=Qo(te,"onBeforeInput"),0<Ke.length&&(Oe=new Mp("onBeforeInput","beforeinput",null,r,he),ye.push({event:Oe,listeners:Ke}),Oe.data=qe)),nC(ye,e,te,r,he)}x0(ye,t)})}function pl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Qo(e,t){for(var r=t+"Capture",a=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Ua(e,r),f!=null&&a.unshift(pl(e,f,m)),f=Ua(e,t),f!=null&&a.push(pl(e,f,m))),e.tag===3)return a;e=e.return}return[]}function lC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function C0(e,t,r,a,f){for(var m=t._reactName,S=[];r!==null&&r!==a;){var R=r,Y=R.alternate,te=R.stateNode;if(R=R.tag,Y!==null&&Y===a)break;R!==5&&R!==26&&R!==27||te===null||(Y=te,f?(te=Ua(r,m),te!=null&&S.unshift(pl(r,te,Y))):f||(te=Ua(r,m),te!=null&&S.push(pl(r,te,Y)))),r=r.return}S.length!==0&&e.push({event:t,listeners:S})}var oC=/\r\n?/g,sC=/\u0000|\uFFFD/g;function T0(e){return(typeof e=="string"?e:""+e).replace(oC,`
9
- `).replace(sC,"")}function k0(e,t){return t=T0(t),T0(e)===t}function ot(e,t,r,a,f,m){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ci(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ci(e,""+a);break;case"className":$l(e,"class",a);break;case"tabIndex":$l(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":$l(e,r,a);break;case"style":kp(e,a,m);break;case"data":if(t!=="object"){$l(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=to(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(r,"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 m=="function"&&(r==="formAction"?(t!=="input"&&ot(e,t,"name",f.name,f,null),ot(e,t,"formEncType",f.formEncType,f,null),ot(e,t,"formMethod",f.formMethod,f,null),ot(e,t,"formTarget",f.formTarget,f,null)):(ot(e,t,"encType",f.encType,f,null),ot(e,t,"method",f.method,f,null),ot(e,t,"target",f.target,f,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=to(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=Yn);break;case"onScroll":a!=null&&Ge("scroll",e);break;case"onScrollEnd":a!=null&&Ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=to(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):e.removeAttribute(r);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),Wl(e,"popover",a);break;case"xlinkActuate":qn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":qn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":qn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":qn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":qn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":qn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":qn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":qn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":qn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Wl(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Uw.get(r)||r,Wl(e,r,a))}}function xf(e,t,r,a,f,m){switch(r){case"style":kp(e,a,m);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(f.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ci(e,a):(typeof a=="number"||typeof a=="bigint")&&Ci(e,""+a);break;case"onScroll":a!=null&&Ge("scroll",e);break;case"onScrollEnd":a!=null&&Ge("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bp.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(f=r.endsWith("Capture"),t=r.slice(2,f?r.length-7:void 0),m=e[Ft]||null,m=m!=null?m[r]:null,typeof m=="function"&&e.removeEventListener(t,m,f),typeof a=="function")){typeof m!="function"&&m!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,a,f);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):Wl(e,r,a)}}}function Ut(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var a=!1,f=!1,m;for(m in r)if(r.hasOwnProperty(m)){var S=r[m];if(S!=null)switch(m){case"src":a=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ot(e,t,m,S,r,null)}}f&&ot(e,t,"srcSet",r.srcSet,r,null),a&&ot(e,t,"src",r.src,r,null);return;case"input":Ge("invalid",e);var R=m=S=f=null,Y=null,te=null;for(a in r)if(r.hasOwnProperty(a)){var he=r[a];if(he!=null)switch(a){case"name":f=he;break;case"type":S=he;break;case"checked":Y=he;break;case"defaultChecked":te=he;break;case"value":m=he;break;case"defaultValue":R=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(o(137,t));break;default:ot(e,t,a,he,r,null)}}xp(e,m,R,Y,te,S,f,!1);return;case"select":Ge("invalid",e),a=S=m=null;for(f in r)if(r.hasOwnProperty(f)&&(R=r[f],R!=null))switch(f){case"value":m=R;break;case"defaultValue":S=R;break;case"multiple":a=R;default:ot(e,t,f,R,r,null)}t=m,r=S,e.multiple=!!a,t!=null?wi(e,!!a,t,!1):r!=null&&wi(e,!!a,r,!0);return;case"textarea":Ge("invalid",e),m=f=a=null;for(S in r)if(r.hasOwnProperty(S)&&(R=r[S],R!=null))switch(S){case"value":a=R;break;case"defaultValue":f=R;break;case"children":m=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(o(91));break;default:ot(e,t,S,R,r,null)}Cp(e,a,f,m);return;case"option":for(Y in r)if(r.hasOwnProperty(Y)&&(a=r[Y],a!=null))switch(Y){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ot(e,t,Y,a,r,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(a=0;a<ml.length;a++)Ge(ml[a],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("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(te in r)if(r.hasOwnProperty(te)&&(a=r[te],a!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ot(e,t,te,a,r,null)}return;default:if(Uu(t)){for(he in r)r.hasOwnProperty(he)&&(a=r[he],a!==void 0&&xf(e,t,he,a,r,void 0));return}}for(R in r)r.hasOwnProperty(R)&&(a=r[R],a!=null&&ot(e,t,R,a,r,null))}function uC(e,t,r,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,S=null,R=null,Y=null,te=null,he=null;for(oe in r){var ye=r[oe];if(r.hasOwnProperty(oe)&&ye!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":Y=ye;default:a.hasOwnProperty(oe)||ot(e,t,oe,null,a,ye)}}for(var ie in a){var oe=a[ie];if(ye=r[ie],a.hasOwnProperty(ie)&&(oe!=null||ye!=null))switch(ie){case"type":m=oe;break;case"name":f=oe;break;case"checked":te=oe;break;case"defaultChecked":he=oe;break;case"value":S=oe;break;case"defaultValue":R=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,t));break;default:oe!==ye&&ot(e,t,ie,oe,a,ye)}}Du(e,S,R,Y,te,he,m,f);return;case"select":oe=S=R=ie=null;for(m in r)if(Y=r[m],r.hasOwnProperty(m)&&Y!=null)switch(m){case"value":break;case"multiple":oe=Y;default:a.hasOwnProperty(m)||ot(e,t,m,null,a,Y)}for(f in a)if(m=a[f],Y=r[f],a.hasOwnProperty(f)&&(m!=null||Y!=null))switch(f){case"value":ie=m;break;case"defaultValue":R=m;break;case"multiple":S=m;default:m!==Y&&ot(e,t,f,m,a,Y)}t=R,r=S,a=oe,ie!=null?wi(e,!!r,ie,!1):!!a!=!!r&&(t!=null?wi(e,!!r,t,!0):wi(e,!!r,r?[]:"",!1));return;case"textarea":oe=ie=null;for(R in r)if(f=r[R],r.hasOwnProperty(R)&&f!=null&&!a.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:ot(e,t,R,null,a,f)}for(S in a)if(f=a[S],m=r[S],a.hasOwnProperty(S)&&(f!=null||m!=null))switch(S){case"value":ie=f;break;case"defaultValue":oe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(o(91));break;default:f!==m&&ot(e,t,S,f,a,m)}wp(e,ie,oe);return;case"option":for(var Ae in r)if(ie=r[Ae],r.hasOwnProperty(Ae)&&ie!=null&&!a.hasOwnProperty(Ae))switch(Ae){case"selected":e.selected=!1;break;default:ot(e,t,Ae,null,a,ie)}for(Y in a)if(ie=a[Y],oe=r[Y],a.hasOwnProperty(Y)&&ie!==oe&&(ie!=null||oe!=null))switch(Y){case"selected":e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:ot(e,t,Y,ie,a,oe)}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 je in r)ie=r[je],r.hasOwnProperty(je)&&ie!=null&&!a.hasOwnProperty(je)&&ot(e,t,je,null,a,ie);for(te in a)if(ie=a[te],oe=r[te],a.hasOwnProperty(te)&&ie!==oe&&(ie!=null||oe!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:ot(e,t,te,ie,a,oe)}return;default:if(Uu(t)){for(var st in r)ie=r[st],r.hasOwnProperty(st)&&ie!==void 0&&!a.hasOwnProperty(st)&&xf(e,t,st,void 0,a,ie);for(he in a)ie=a[he],oe=r[he],!a.hasOwnProperty(he)||ie===oe||ie===void 0&&oe===void 0||xf(e,t,he,ie,a,oe);return}}for(var J in r)ie=r[J],r.hasOwnProperty(J)&&ie!=null&&!a.hasOwnProperty(J)&&ot(e,t,J,null,a,ie);for(ye in a)ie=a[ye],oe=r[ye],!a.hasOwnProperty(ye)||ie===oe||ie==null&&oe==null||ot(e,t,ye,ie,a,oe)}function A0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var f=r[a],m=f.transferSize,S=f.initiatorType,R=f.duration;if(m&&R&&A0(S)){for(S=0,R=f.responseEnd,a+=1;a<r.length;a++){var Y=r[a],te=Y.startTime;if(te>R)break;var he=Y.transferSize,ye=Y.initiatorType;he&&A0(ye)&&(Y=Y.responseEnd,S+=he*(Y<R?1:(R-te)/(Y-te)))}if(--a,t+=8*(m+S)/(f.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,Cf=null;function Jo(e){return e.nodeType===9?e:e.ownerDocument}function R0(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 N0(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 Tf(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 kf=null;function fC(){var e=window.event;return e&&e.type==="popstate"?e===kf?!1:(kf=e,!0):(kf=null,!1)}var O0=typeof setTimeout=="function"?setTimeout:void 0,dC=typeof clearTimeout=="function"?clearTimeout:void 0,z0=typeof Promise=="function"?Promise:void 0,hC=typeof queueMicrotask=="function"?queueMicrotask:typeof z0<"u"?function(e){return z0.resolve(null).then(e).catch(mC)}:O0;function mC(e){setTimeout(function(){throw e})}function Nr(e){return e==="head"}function M0(e,t){var r=t,a=0;do{var f=r.nextSibling;if(e.removeChild(r),f&&f.nodeType===8)if(r=f.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(f),na(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")gl(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,gl(r);for(var m=r.firstChild;m;){var S=m.nextSibling,R=m.nodeName;m[Da]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=S}}else r==="body"&&gl(e.ownerDocument.body);r=f}while(r);na(t)}function D0(e,t){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function Af(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Af(r),zu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function pC(e,t,r,a){for(;e.nodeType===1;){var f=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Da])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=Sn(e.nextSibling),e===null)break}return null}function gC(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Sn(e.nextSibling),e===null))return null;return e}function j0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sn(e.nextSibling),e===null))return null;return e}function Rf(e){return e.data==="$?"||e.data==="$~"}function Nf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function yC(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var a=function(){t(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Sn(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 Of=null;function U0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Sn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function B0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function L0(e,t,r){switch(t=Jo(r),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 gl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);zu(e)}var En=new Map,I0=new Set;function Wo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ir=Z.d;Z.d={f:bC,r:vC,D:SC,C:EC,L:_C,m:xC,X:CC,S:wC,M:TC};function bC(){var e=ir.f(),t=Po();return e||t}function vC(e){var t=Ei(e);t!==null&&t.tag===5&&t.type==="form"?ny(t):ir.r(e)}var $i=typeof document>"u"?null:document;function H0(e,t,r){var a=$i;if(a&&typeof t=="string"&&t){var f=hn(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),I0.has(f)||(I0.add(f),e={rel:e,crossOrigin:r,href:t},a.querySelector(f)===null&&(t=a.createElement("link"),Ut(t,"link",e),Nt(t),a.head.appendChild(t)))}}function SC(e){ir.D(e),H0("dns-prefetch",e,null)}function EC(e,t){ir.C(e,t),H0("preconnect",e,t)}function _C(e,t,r){ir.L(e,t,r);var a=$i;if(a&&e&&t){var f='link[rel="preload"][as="'+hn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+hn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+hn(r.imageSizes)+'"]')):f+='[href="'+hn(e)+'"]';var m=f;switch(t){case"style":m=ea(e);break;case"script":m=ta(e)}En.has(m)||(e=g({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),En.set(m,e),a.querySelector(f)!==null||t==="style"&&a.querySelector(yl(m))||t==="script"&&a.querySelector(bl(m))||(t=a.createElement("link"),Ut(t,"link",e),Nt(t),a.head.appendChild(t)))}}function xC(e,t){ir.m(e,t);var r=$i;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+hn(a)+'"][href="'+hn(e)+'"]',m=f;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ta(e)}if(!En.has(m)&&(e=g({rel:"modulepreload",href:e},t),En.set(m,e),r.querySelector(f)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(bl(m)))return}a=r.createElement("link"),Ut(a,"link",e),Nt(a),r.head.appendChild(a)}}}function wC(e,t,r){ir.S(e,t,r);var a=$i;if(a&&e){var f=_i(a).hoistableStyles,m=ea(e);t=t||"default";var S=f.get(m);if(!S){var R={loading:0,preload:null};if(S=a.querySelector(yl(m)))R.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},r),(r=En.get(m))&&zf(e,r);var Y=S=a.createElement("link");Nt(Y),Ut(Y,"link",e),Y._p=new Promise(function(te,he){Y.onload=te,Y.onerror=he}),Y.addEventListener("load",function(){R.loading|=1}),Y.addEventListener("error",function(){R.loading|=2}),R.loading|=4,$o(S,t,a)}S={type:"stylesheet",instance:S,count:1,state:R},f.set(m,S)}}}function CC(e,t){ir.X(e,t);var r=$i;if(r&&e){var a=_i(r).hoistableScripts,f=ta(e),m=a.get(f);m||(m=r.querySelector(bl(f)),m||(e=g({src:e,async:!0},t),(t=En.get(f))&&Mf(e,t),m=r.createElement("script"),Nt(m),Ut(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(f,m))}}function TC(e,t){ir.M(e,t);var r=$i;if(r&&e){var a=_i(r).hoistableScripts,f=ta(e),m=a.get(f);m||(m=r.querySelector(bl(f)),m||(e=g({src:e,async:!0,type:"module"},t),(t=En.get(f))&&Mf(e,t),m=r.createElement("script"),Nt(m),Ut(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(f,m))}}function q0(e,t,r,a){var f=(f=ge.current)?Wo(f):null;if(!f)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=ea(r.href),r=_i(f).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=ea(r.href);var m=_i(f).hoistableStyles,S=m.get(e);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,S),(m=f.querySelector(yl(e)))&&!m._p&&(S.instance=m,S.state.loading=5),En.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},En.set(e,r),m||kC(f,e,r,S.state))),t&&a===null)throw Error(o(528,""));return S}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ta(r),r=_i(f).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ea(e){return'href="'+hn(e)+'"'}function yl(e){return'link[rel="stylesheet"]['+e+"]"}function Y0(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function kC(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ut(t,"link",r),Nt(t),e.head.appendChild(t))}function ta(e){return'[src="'+hn(e)+'"]'}function bl(e){return"script[async]"+e}function P0(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+hn(r.href)+'"]');if(a)return t.instance=a,Nt(a),a;var f=g({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Nt(a),Ut(a,"style",f),$o(a,r.precedence,e),t.instance=a;case"stylesheet":f=ea(r.href);var m=e.querySelector(yl(f));if(m)return t.state.loading|=4,t.instance=m,Nt(m),m;a=Y0(r),(f=En.get(f))&&zf(a,f),m=(e.ownerDocument||e).createElement("link"),Nt(m);var S=m;return S._p=new Promise(function(R,Y){S.onload=R,S.onerror=Y}),Ut(m,"link",a),t.state.loading|=4,$o(m,r.precedence,e),t.instance=m;case"script":return m=ta(r.src),(f=e.querySelector(bl(m)))?(t.instance=f,Nt(f),f):(a=r,(f=En.get(m))&&(a=g({},r),Mf(a,f)),e=e.ownerDocument||e,f=e.createElement("script"),Nt(f),Ut(f,"link",a),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,$o(a,r.precedence,e));return t.instance}function $o(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=a.length?a[a.length-1]:null,m=f,S=0;S<a.length;S++){var R=a[S];if(R.dataset.precedence===t)m=R;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(t=r.nodeType===9?r.head:r,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 Mf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var es=null;function F0(e,t,r){if(es===null){var a=new Map,f=es=new Map;f.set(r,a)}else f=es,a=f.get(r),a||(a=new Map,f.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),f=0;f<r.length;f++){var m=r[f];if(!(m[Da]||m[zt]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(t)||"";S=e+S;var R=a.get(S);R?R.push(m):a.set(S,[m])}}return a}function V0(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function AC(e,t,r){if(r===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 G0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function RC(e,t,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var f=ea(a.href),m=t.querySelector(yl(f));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ts.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=m,Nt(m);return}m=t.ownerDocument||t,a=Y0(a),(f=En.get(f))&&zf(a,f),m=m.createElement("link"),Nt(m);var S=m;S._p=new Promise(function(R,Y){S.onload=R,S.onerror=Y}),Ut(m,"link",a),r.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=ts.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Df=0;function NC(e,t){return e.stylesheets&&e.count===0&&rs(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&rs(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+t);0<e.imgBytes&&Df===0&&(Df=62500*cC());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&rs(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>Df?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(f)}}:null}function ts(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)rs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ns=null;function rs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ns=new Map,t.forEach(OC,e),ns=null,ts.call(e))}function OC(e,t){if(!(t.state.loading&4)){var r=ns.get(e);if(r)var a=r.get(null);else{r=new Map,ns.set(e,r);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var S=f[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(r.set(S.dataset.precedence,S),a=S)}a&&r.set(null,a)}f=t.instance,S=f.getAttribute("data-precedence"),m=r.get(S)||a,m===a&&r.set(null,f),r.set(S,f),this.count++,a=ts.bind(this),f.addEventListener("load",a),f.addEventListener("error",a),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var vl={$$typeof:O,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function zC(e,t,r,a,f,m,S,R,Y){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=Au(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Au(0),this.hiddenUpdates=Au(null),this.identifierPrefix=a,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function X0(e,t,r,a,f,m,S,R,Y,te,he,ye){return e=new zC(e,t,r,S,Y,te,he,ye,R),t=1,m===!0&&(t|=24),m=tn(3,null,null,t),e.current=m,m.stateNode=e,t=dc(),t.refCount++,e.pooledCache=t,t.refCount++,m.memoizedState={element:a,isDehydrated:r,cache:t},gc(m),e}function Z0(e){return e?(e=zi,e):zi}function K0(e,t,r,a,f,m){f=Z0(f),a.context===null?a.context=f:a.pendingContext=f,a=vr(t),a.payload={element:r},m=m===void 0?null:m,m!==null&&(a.callback=m),r=Sr(e,a,t),r!==null&&(Qt(r,e,t),Ja(r,e,t))}function Q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function jf(e,t){Q0(e,t),(e=e.alternate)&&Q0(e,t)}function J0(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&Qt(t,e,67108864),jf(e,67108864)}}function W0(e){if(e.tag===13||e.tag===31){var t=on();t=Ru(t);var r=Zr(e,t);r!==null&&Qt(r,e,t),jf(e,t)}}var is=!0;function MC(e,t,r,a){var f=V.T;V.T=null;var m=Z.p;try{Z.p=2,Uf(e,t,r,a)}finally{Z.p=m,V.T=f}}function DC(e,t,r,a){var f=V.T;V.T=null;var m=Z.p;try{Z.p=8,Uf(e,t,r,a)}finally{Z.p=m,V.T=f}}function Uf(e,t,r,a){if(is){var f=Bf(a);if(f===null)_f(e,t,a,as,r),eb(e,a);else if(UC(f,e,t,r,a))a.stopPropagation();else if(eb(e,a),t&4&&-1<jC.indexOf(e)){for(;f!==null;){var m=Ei(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=fn(m.pendingLanes);if(S!==0){var R=m;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var Y=1<<31-Fe(S);R.entanglements[1]|=Y,S&=~Y}Un(m),(rt&6)===0&&(qo=Ce()+500,hl(0))}}break;case 31:case 13:R=Zr(m,2),R!==null&&Qt(R,m,2),Po(),jf(m,2)}if(m=Bf(a),m===null&&_f(e,t,a,as,r),m===f)break;f=m}f!==null&&a.stopPropagation()}else _f(e,t,a,null,r)}}function Bf(e){return e=Lu(e),Lf(e)}var as=null;function Lf(e){if(as=null,e=Si(e),e!==null){var t=u(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=c(t),e!==null)return e;e=null}else if(r===31){if(e=d(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return as=e,null}function $0(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(xe()){case W:return 2;case ve:return 8;case we:case Ue:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var If=!1,Or=null,zr=null,Mr=null,Sl=new Map,El=new Map,Dr=[],jC="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 eb(e,t){switch(e){case"focusin":case"focusout":Or=null;break;case"dragenter":case"dragleave":zr=null;break;case"mouseover":case"mouseout":Mr=null;break;case"pointerover":case"pointerout":Sl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":El.delete(t.pointerId)}}function _l(e,t,r,a,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:m,targetContainers:[f]},t!==null&&(t=Ei(t),t!==null&&J0(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function UC(e,t,r,a,f){switch(t){case"focusin":return Or=_l(Or,e,t,r,a,f),!0;case"dragenter":return zr=_l(zr,e,t,r,a,f),!0;case"mouseover":return Mr=_l(Mr,e,t,r,a,f),!0;case"pointerover":var m=f.pointerId;return Sl.set(m,_l(Sl.get(m)||null,e,t,r,a,f)),!0;case"gotpointercapture":return m=f.pointerId,El.set(m,_l(El.get(m)||null,e,t,r,a,f)),!0}return!1}function tb(e){var t=Si(e.target);if(t!==null){var r=u(t);if(r!==null){if(t=r.tag,t===13){if(t=c(r),t!==null){e.blockedOn=t,pp(e.priority,function(){W0(r)});return}}else if(t===31){if(t=d(r),t!==null){e.blockedOn=t,pp(e.priority,function(){W0(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ls(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Bf(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);Bu=a,r.target.dispatchEvent(a),Bu=null}else return t=Ei(r),t!==null&&J0(t),e.blockedOn=r,!1;t.shift()}return!0}function nb(e,t,r){ls(e)&&r.delete(t)}function BC(){If=!1,Or!==null&&ls(Or)&&(Or=null),zr!==null&&ls(zr)&&(zr=null),Mr!==null&&ls(Mr)&&(Mr=null),Sl.forEach(nb),El.forEach(nb)}function os(e,t){e.blockedOn===t&&(e.blockedOn=null,If||(If=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,BC)))}var ss=null;function rb(e){ss!==e&&(ss=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ss===e&&(ss=null);for(var t=0;t<e.length;t+=3){var r=e[t],a=e[t+1],f=e[t+2];if(typeof a!="function"){if(Lf(a||r)===null)continue;break}var m=Ei(r);m!==null&&(e.splice(t,3),t-=3,Uc(m,{pending:!0,data:f,method:r.method,action:a},a,f))}}))}function na(e){function t(Y){return os(Y,e)}Or!==null&&os(Or,e),zr!==null&&os(zr,e),Mr!==null&&os(Mr,e),Sl.forEach(t),El.forEach(t);for(var r=0;r<Dr.length;r++){var a=Dr[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Dr.length&&(r=Dr[0],r.blockedOn===null);)tb(r),r.blockedOn===null&&Dr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var f=r[a],m=r[a+1],S=f[Ft]||null;if(typeof m=="function")S||rb(r);else if(S){var R=null;if(m&&m.hasAttribute("formAction")){if(f=m,S=m[Ft]||null)R=S.formAction;else if(Lf(f)!==null)continue}else R=S.action;typeof R=="function"?r[a+1]=R:(r.splice(a,3),a-=3),rb(r)}}}function ib(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return f=S})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Hf(e){this._internalRoot=e}us.prototype.render=Hf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=on();K0(r,a,e,t,null,null)},us.prototype.unmount=Hf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;K0(e.current,2,null,e,null,null),Po(),t[vi]=null}};function us(e){this._internalRoot=e}us.prototype.unstable_scheduleHydration=function(e){if(e){var t=mp();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Dr.length&&t!==0&&t<Dr[r].priority;r++);Dr.splice(r,0,e),r===0&&tb(e)}};var ab=l.version;if(ab!=="19.2.0")throw Error(o(527,ab,"19.2.0"));Z.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=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var LC={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cs.isDisabled&&cs.supportsFiber)try{Pe=cs.inject(LC),pt=cs}catch{}}return aa.createRoot=function(e,t){if(!s(e))throw Error(o(299));var r=!1,a="",f=dy,m=hy,S=my;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(m=t.onCaughtError),t.onRecoverableError!==void 0&&(S=t.onRecoverableError)),t=X0(e,1,!1,null,null,r,a,null,f,m,S,ib),e[vi]=t.current,Ef(e),new Hf(t)},aa.hydrateRoot=function(e,t,r){if(!s(e))throw Error(o(299));var a=!1,f="",m=dy,S=hy,R=my,Y=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(S=r.onCaughtError),r.onRecoverableError!==void 0&&(R=r.onRecoverableError),r.formState!==void 0&&(Y=r.formState)),t=X0(e,1,!0,t,r??null,a,f,Y,m,S,R,ib),t.context=Z0(null),r=t.current,a=on(),a=Ru(a),f=vr(a),f.callback=null,Sr(r,f,a),r=a,t.current.lanes=r,Ma(t,r),Un(t),e[vi]=t.current,Ef(e),new us(t)},aa.version="19.2.0",aa}var Wf;function mb(){if(Wf)return ps.exports;Wf=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(l){console.error(l)}}return n(),ps.exports=hb(),ps.exports}var pb=mb();Qf();function $f(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function vs(...n){return l=>{let i=!1;const o=n.map(s=>{const u=$f(s,l);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let s=0;s<o.length;s++){const u=o[s];typeof u=="function"?u():$f(n[s],null)}}}}function Bn(...n){return K.useCallback(vs(...n),n)}function gb(n){const l=yb(n),i=K.forwardRef((o,s)=>{const{children:u,...c}=o,d=K.Children.toArray(u),h=d.find(vb);if(h){const p=h.props.children,y=d.map(g=>g===h?K.Children.count(p)>1?K.Children.only(null):K.isValidElement(p)?p.props.children:null:g);return F.jsx(l,{...c,ref:s,children:K.isValidElement(p)?K.cloneElement(p,void 0,y):null})}return F.jsx(l,{...c,ref:s,children:u})});return i.displayName=`${n}.Slot`,i}function yb(n){const l=K.forwardRef((i,o)=>{const{children:s,...u}=i;if(K.isValidElement(s)){const c=Eb(s),d=Sb(u,s.props);return s.type!==K.Fragment&&(d.ref=o?vs(o,c):c),K.cloneElement(s,d)}return K.Children.count(s)>1?K.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var bb=Symbol("radix.slottable");function vb(n){return K.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===bb}function Sb(n,l){const i={...l};for(const o in l){const s=n[o],u=l[o];/^on[A-Z]/.test(o)?s&&u?i[o]=(...d)=>{const h=u(...d);return s(...d),h}:s&&(i[o]=s):o==="style"?i[o]={...s,...u}:o==="className"&&(i[o]=[s,u].filter(Boolean).join(" "))}return{...n,...i}}function Eb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var _b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ar=_b.reduce((n,l)=>{const i=gb(`Primitive.${l}`),o=K.forwardRef((s,u)=>{const{asChild:c,...d}=s,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),F.jsx(h,{...d,ref:u})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),lr=globalThis?.document?K.useLayoutEffect:()=>{};function xb(n,l){return K.useReducer((i,o)=>l[i][o]??i,n)}var oi=n=>{const{present:l,children:i}=n,o=wb(l),s=typeof i=="function"?i({present:o.isPresent}):K.Children.only(i),u=Bn(o.ref,Cb(s));return typeof i=="function"||o.isPresent?K.cloneElement(s,{ref:u}):null};oi.displayName="Presence";function wb(n){const[l,i]=K.useState(),o=K.useRef(null),s=K.useRef(n),u=K.useRef("none"),c=n?"mounted":"unmounted",[d,h]=xb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return K.useEffect(()=>{const p=Cl(o.current);u.current=d==="mounted"?p:"none"},[d]),lr(()=>{const p=o.current,y=s.current;if(y!==n){const v=u.current,b=Cl(p);n?h("MOUNT"):b==="none"||p?.display==="none"?h("UNMOUNT"):h(y&&v!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,h]),lr(()=>{if(l){let p;const y=l.ownerDocument.defaultView??window,g=b=>{const E=Cl(o.current).includes(CSS.escape(b.animationName));if(b.target===l&&E&&(h("ANIMATION_END"),!s.current)){const T=l.style.animationFillMode;l.style.animationFillMode="forwards",p=y.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=T)})}},v=b=>{b.target===l&&(u.current=Cl(o.current))};return l.addEventListener("animationstart",v),l.addEventListener("animationcancel",g),l.addEventListener("animationend",g),()=>{y.clearTimeout(p),l.removeEventListener("animationstart",v),l.removeEventListener("animationcancel",g),l.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:K.useCallback(p=>{o.current=p?getComputedStyle(p):null,i(p)},[])}}function Cl(n){return n?.animationName||"none"}function Cb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}function ed(n,l=[]){let i=[];function o(u,c){const d=K.createContext(c),h=i.length;i=[...i,c];const p=g=>{const{scope:v,children:b,...C}=g,E=v?.[n]?.[h]||d,T=K.useMemo(()=>C,Object.values(C));return F.jsx(E.Provider,{value:T,children:b})};p.displayName=u+"Provider";function y(g,v){const b=v?.[n]?.[h]||d,C=K.useContext(b);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${u}\``)}return[p,y]}const s=()=>{const u=i.map(c=>K.createContext(c));return function(d){const h=d?.[n]||u;return K.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])}};return s.scopeName=n,[o,Tb(s,...l)]}function Tb(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=o.reduce((d,{useScope:h,scopeName:p})=>{const g=h(u)[`__scope${p}`];return{...d,...g}},{});return K.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}function or(n){const l=K.useRef(n);return K.useEffect(()=>{l.current=n}),K.useMemo(()=>(...i)=>l.current?.(...i),[])}var kb=K.createContext(void 0);function Ab(n){const l=K.useContext(kb);return n||l||"ltr"}function Rb(n,[l,i]){return Math.min(i,Math.max(l,n))}function Ln(n,l,{checkForDefaultPrevented:i=!0}={}){return function(s){if(n?.(s),i===!1||!s.defaultPrevented)return l?.(s)}}function Nb(n,l){return K.useReducer((i,o)=>l[i][o]??i,n)}var Ss="ScrollArea",[td]=ed(Ss),[Ob,sn]=td(Ss),nd=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:s,scrollHideDelay:u=600,...c}=n,[d,h]=K.useState(null),[p,y]=K.useState(null),[g,v]=K.useState(null),[b,C]=K.useState(null),[E,T]=K.useState(null),[_,k]=K.useState(0),[O,H]=K.useState(0),[B,z]=K.useState(!1),[L,P]=K.useState(!1),q=Bn(l,ce=>h(ce)),le=Ab(s);return F.jsx(Ob,{scope:i,type:o,dir:le,scrollHideDelay:u,scrollArea:d,viewport:p,onViewportChange:y,content:g,onContentChange:v,scrollbarX:b,onScrollbarXChange:C,scrollbarXEnabled:B,onScrollbarXEnabledChange:z,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:L,onScrollbarYEnabledChange:P,onCornerWidthChange:k,onCornerHeightChange:H,children:F.jsx(ar.div,{dir:le,...c,ref:q,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":O+"px",...n.style}})})});nd.displayName=Ss;var rd="ScrollAreaViewport",id=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:s,...u}=n,c=sn(rd,i),d=K.useRef(null),h=Bn(l,d,c.onViewportChange);return F.jsxs(F.Fragment,{children:[F.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}),F.jsx(ar.div,{"data-radix-scroll-area-viewport":"",...u,ref:h,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...n.style},children:F.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});id.displayName=rd;var kn="ScrollAreaScrollbar",Es=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,s=sn(kn,n.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:c}=s,d=n.orientation==="horizontal";return K.useEffect(()=>(d?u(!0):c(!0),()=>{d?u(!1):c(!1)}),[d,u,c]),s.type==="hover"?F.jsx(zb,{...o,ref:l,forceMount:i}):s.type==="scroll"?F.jsx(Mb,{...o,ref:l,forceMount:i}):s.type==="auto"?F.jsx(ad,{...o,ref:l,forceMount:i}):s.type==="always"?F.jsx(_s,{...o,ref:l}):null});Es.displayName=kn;var zb=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,s=sn(kn,n.__scopeScrollArea),[u,c]=K.useState(!1);return K.useEffect(()=>{const d=s.scrollArea;let h=0;if(d){const p=()=>{window.clearTimeout(h),c(!0)},y=()=>{h=window.setTimeout(()=>c(!1),s.scrollHideDelay)};return d.addEventListener("pointerenter",p),d.addEventListener("pointerleave",y),()=>{window.clearTimeout(h),d.removeEventListener("pointerenter",p),d.removeEventListener("pointerleave",y)}}},[s.scrollArea,s.scrollHideDelay]),F.jsx(oi,{present:i||u,children:F.jsx(ad,{"data-state":u?"visible":"hidden",...o,ref:l})})}),Mb=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,s=sn(kn,n.__scopeScrollArea),u=n.orientation==="horizontal",c=Rl(()=>h("SCROLL_END"),100),[d,h]=Nb("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 K.useEffect(()=>{if(d==="idle"){const p=window.setTimeout(()=>h("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,s.scrollHideDelay,h]),K.useEffect(()=>{const p=s.viewport,y=u?"scrollLeft":"scrollTop";if(p){let g=p[y];const v=()=>{const b=p[y];g!==b&&(h("SCROLL"),c()),g=b};return p.addEventListener("scroll",v),()=>p.removeEventListener("scroll",v)}},[s.viewport,u,h,c]),F.jsx(oi,{present:i||d!=="hidden",children:F.jsx(_s,{"data-state":d==="hidden"?"hidden":"visible",...o,ref:l,onPointerEnter:Ln(n.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Ln(n.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),ad=K.forwardRef((n,l)=>{const i=sn(kn,n.__scopeScrollArea),{forceMount:o,...s}=n,[u,c]=K.useState(!1),d=n.orientation==="horizontal",h=Rl(()=>{if(i.viewport){const p=i.viewport.offsetWidth<i.viewport.scrollWidth,y=i.viewport.offsetHeight<i.viewport.scrollHeight;c(d?p:y)}},10);return si(i.viewport,h),si(i.content,h),F.jsx(oi,{present:o||u,children:F.jsx(_s,{"data-state":u?"visible":"hidden",...s,ref:l})})}),_s=K.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,s=sn(kn,n.__scopeScrollArea),u=K.useRef(null),c=K.useRef(0),[d,h]=K.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=cd(d.viewport,d.content),y={...o,sizes:d,onSizesChange:h,hasThumb:p>0&&p<1,onThumbChange:v=>u.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function g(v,b){return Ib(v,c.current,d,b)}return i==="horizontal"?F.jsx(Db,{...y,ref:l,onThumbPositionChange:()=>{if(s.viewport&&u.current){const v=s.viewport.scrollLeft,b=fd(v,d,s.dir);u.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:v=>{s.viewport&&(s.viewport.scrollLeft=v)},onDragScroll:v=>{s.viewport&&(s.viewport.scrollLeft=g(v,s.dir))}}):i==="vertical"?F.jsx(jb,{...y,ref:l,onThumbPositionChange:()=>{if(s.viewport&&u.current){const v=s.viewport.scrollTop,b=fd(v,d);u.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:v=>{s.viewport&&(s.viewport.scrollTop=v)},onDragScroll:v=>{s.viewport&&(s.viewport.scrollTop=g(v))}}):null}),Db=K.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...s}=n,u=sn(kn,n.__scopeScrollArea),[c,d]=K.useState(),h=K.useRef(null),p=Bn(l,h,u.onScrollbarXChange);return K.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),F.jsx(od,{"data-orientation":"horizontal",...s,ref:p,sizes:i,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Al(i)+"px",...n.style},onThumbPointerDown:y=>n.onThumbPointerDown(y.x),onDragScroll:y=>n.onDragScroll(y.x),onWheelScroll:(y,g)=>{if(u.viewport){const v=u.viewport.scrollLeft+y.deltaX;n.onWheelScroll(v),hd(v,g)&&y.preventDefault()}},onResize:()=>{h.current&&u.viewport&&c&&o({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:kl(c.paddingLeft),paddingEnd:kl(c.paddingRight)}})}})}),jb=K.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...s}=n,u=sn(kn,n.__scopeScrollArea),[c,d]=K.useState(),h=K.useRef(null),p=Bn(l,h,u.onScrollbarYChange);return K.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),F.jsx(od,{"data-orientation":"vertical",...s,ref:p,sizes:i,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Al(i)+"px",...n.style},onThumbPointerDown:y=>n.onThumbPointerDown(y.y),onDragScroll:y=>n.onDragScroll(y.y),onWheelScroll:(y,g)=>{if(u.viewport){const v=u.viewport.scrollTop+y.deltaY;n.onWheelScroll(v),hd(v,g)&&y.preventDefault()}},onResize:()=>{h.current&&u.viewport&&c&&o({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:kl(c.paddingTop),paddingEnd:kl(c.paddingBottom)}})}})}),[Ub,ld]=td(kn),od=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:s,onThumbChange:u,onThumbPointerUp:c,onThumbPointerDown:d,onThumbPositionChange:h,onDragScroll:p,onWheelScroll:y,onResize:g,...v}=n,b=sn(kn,i),[C,E]=K.useState(null),T=Bn(l,q=>E(q)),_=K.useRef(null),k=K.useRef(""),O=b.viewport,H=o.content-o.viewport,B=or(y),z=or(h),L=Rl(g,10);function P(q){if(_.current){const le=q.clientX-_.current.left,ce=q.clientY-_.current.top;p({x:le,y:ce})}}return K.useEffect(()=>{const q=le=>{const ce=le.target;C?.contains(ce)&&B(le,H)};return document.addEventListener("wheel",q,{passive:!1}),()=>document.removeEventListener("wheel",q,{passive:!1})},[O,C,H,B]),K.useEffect(z,[o,z]),si(C,L),si(b.content,L),F.jsx(Ub,{scope:i,scrollbar:C,hasThumb:s,onThumbChange:or(u),onThumbPointerUp:or(c),onThumbPositionChange:z,onThumbPointerDown:or(d),children:F.jsx(ar.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:Ln(n.onPointerDown,q=>{q.button===0&&(q.target.setPointerCapture(q.pointerId),_.current=C.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),P(q))}),onPointerMove:Ln(n.onPointerMove,P),onPointerUp:Ln(n.onPointerUp,q=>{const le=q.target;le.hasPointerCapture(q.pointerId)&&le.releasePointerCapture(q.pointerId),document.body.style.webkitUserSelect=k.current,b.viewport&&(b.viewport.style.scrollBehavior=""),_.current=null})})})}),Tl="ScrollAreaThumb",sd=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,s=ld(Tl,n.__scopeScrollArea);return F.jsx(oi,{present:i||s.hasThumb,children:F.jsx(Bb,{ref:l,...o})})}),Bb=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...s}=n,u=sn(Tl,i),c=ld(Tl,i),{onThumbPositionChange:d}=c,h=Bn(l,g=>c.onThumbChange(g)),p=K.useRef(void 0),y=Rl(()=>{p.current&&(p.current(),p.current=void 0)},100);return K.useEffect(()=>{const g=u.viewport;if(g){const v=()=>{if(y(),!p.current){const b=Hb(g,d);p.current=b,d()}};return d(),g.addEventListener("scroll",v),()=>g.removeEventListener("scroll",v)}},[u.viewport,y,d]),F.jsx(ar.div,{"data-state":c.hasThumb?"visible":"hidden",...s,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Ln(n.onPointerDownCapture,g=>{const b=g.target.getBoundingClientRect(),C=g.clientX-b.left,E=g.clientY-b.top;c.onThumbPointerDown({x:C,y:E})}),onPointerUp:Ln(n.onPointerUp,c.onThumbPointerUp)})});sd.displayName=Tl;var xs="ScrollAreaCorner",ud=K.forwardRef((n,l)=>{const i=sn(xs,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?F.jsx(Lb,{...n,ref:l}):null});ud.displayName=xs;var Lb=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,s=sn(xs,i),[u,c]=K.useState(0),[d,h]=K.useState(0),p=!!(u&&d);return si(s.scrollbarX,()=>{const y=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(y),h(y)}),si(s.scrollbarY,()=>{const y=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(y),c(y)}),p?F.jsx(ar.div,{...o,ref:l,style:{width:u,height:d,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function kl(n){return n?parseInt(n,10):0}function cd(n,l){const i=n/l;return isNaN(i)?0:i}function Al(n){const l=cd(n.viewport,n.content),i=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-i)*l;return Math.max(o,18)}function Ib(n,l,i,o="ltr"){const s=Al(i),u=s/2,c=l||u,d=s-c,h=i.scrollbar.paddingStart+c,p=i.scrollbar.size-i.scrollbar.paddingEnd-d,y=i.content-i.viewport,g=o==="ltr"?[0,y]:[y*-1,0];return dd([h,p],g)(n)}function fd(n,l,i="ltr"){const o=Al(l),s=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,u=l.scrollbar.size-s,c=l.content-l.viewport,d=u-o,h=i==="ltr"?[0,c]:[c*-1,0],p=Rb(n,h);return dd([0,c],[0,d])(p)}function dd(n,l){return i=>{if(n[0]===n[1]||l[0]===l[1])return l[0];const o=(l[1]-l[0])/(n[1]-n[0]);return l[0]+o*(i-n[0])}}function hd(n,l){return n>0&&n<l}var Hb=(n,l=()=>{})=>{let i={left:n.scrollLeft,top:n.scrollTop},o=0;return(function s(){const u={left:n.scrollLeft,top:n.scrollTop},c=i.left!==u.left,d=i.top!==u.top;(c||d)&&l(),i=u,o=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(o)};function Rl(n,l){const i=or(n),o=K.useRef(0);return K.useEffect(()=>()=>window.clearTimeout(o.current),[]),K.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(i,l)},[i,l])}function si(n,l){const i=or(l);lr(()=>{let o=0;if(n){const s=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return s.observe(n),()=>{window.cancelAnimationFrame(o),s.unobserve(n)}}},[n,i])}var md=nd,qb=id,Yb=ud;function pd(n){var l,i,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(l=0;l<s;l++)n[l]&&(i=pd(n[l]))&&(o&&(o+=" "),o+=i)}else for(i in n)n[i]&&(o&&(o+=" "),o+=i);return o}function gd(){for(var n,l,i=0,o="",s=arguments.length;i<s;i++)(n=arguments[i])&&(l=pd(n))&&(o&&(o+=" "),o+=l);return o}const Pb=(n,l)=>{const i=new Array(n.length+l.length);for(let o=0;o<n.length;o++)i[o]=n[o];for(let o=0;o<l.length;o++)i[n.length+o]=l[o];return i},Fb=(n,l)=>({classGroupId:n,validator:l}),yd=(n=new Map,l=null,i)=>({nextPart:n,validators:l,classGroupId:i}),Nl="-",bd=[],Vb="arbitrary..",Gb=n=>{const l=Zb(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Xb(c);const d=c.split(Nl),h=d[0]===""&&d.length>1?1:0;return vd(d,h,l)},getConflictingClassGroupIds:(c,d)=>{if(d){const h=o[c],p=i[c];return h?p?Pb(p,h):h:p||bd}return i[c]||bd}}},vd=(n,l,i)=>{if(n.length-l===0)return i.classGroupId;const s=n[l],u=i.nextPart.get(s);if(u){const p=vd(n,l+1,u);if(p)return p}const c=i.validators;if(c===null)return;const d=l===0?n.join(Nl):n.slice(l).join(Nl),h=c.length;for(let p=0;p<h;p++){const y=c[p];if(y.validator(d))return y.classGroupId}},Xb=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),i=l.indexOf(":"),o=l.slice(0,i);return o?Vb+o:void 0})(),Zb=n=>{const{theme:l,classGroups:i}=n;return Kb(i,l)},Kb=(n,l)=>{const i=yd();for(const o in n){const s=n[o];ws(s,i,o,l)}return i},ws=(n,l,i,o)=>{const s=n.length;for(let u=0;u<s;u++){const c=n[u];Qb(c,l,i,o)}},Qb=(n,l,i,o)=>{if(typeof n=="string"){Jb(n,l,i);return}if(typeof n=="function"){Wb(n,l,i,o);return}$b(n,l,i,o)},Jb=(n,l,i)=>{const o=n===""?l:Sd(l,n);o.classGroupId=i},Wb=(n,l,i,o)=>{if(ev(n)){ws(n(o),l,i,o);return}l.validators===null&&(l.validators=[]),l.validators.push(Fb(i,n))},$b=(n,l,i,o)=>{const s=Object.entries(n),u=s.length;for(let c=0;c<u;c++){const[d,h]=s[c];ws(h,Sd(l,d),i,o)}},Sd=(n,l)=>{let i=n;const o=l.split(Nl),s=o.length;for(let u=0;u<s;u++){const c=o[u];let d=i.nextPart.get(c);d||(d=yd(),i.nextPart.set(c,d)),i=d}return i},ev=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,tv=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,i=Object.create(null),o=Object.create(null);const s=(u,c)=>{i[u]=c,l++,l>n&&(l=0,o=i,i=Object.create(null))};return{get(u){let c=i[u];if(c!==void 0)return c;if((c=o[u])!==void 0)return s(u,c),c},set(u,c){u in i?i[u]=c:s(u,c)}}},Cs="!",Ed=":",nv=[],_d=(n,l,i,o,s)=>({modifiers:n,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:o,isExternal:s}),rv=n=>{const{prefix:l,experimentalParseClassName:i}=n;let o=s=>{const u=[];let c=0,d=0,h=0,p;const y=s.length;for(let E=0;E<y;E++){const T=s[E];if(c===0&&d===0){if(T===Ed){u.push(s.slice(h,E)),h=E+1;continue}if(T==="/"){p=E;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const g=u.length===0?s:s.slice(h);let v=g,b=!1;g.endsWith(Cs)?(v=g.slice(0,-1),b=!0):g.startsWith(Cs)&&(v=g.slice(1),b=!0);const C=p&&p>h?p-h:void 0;return _d(u,b,v,C)};if(l){const s=l+Ed,u=o;o=c=>c.startsWith(s)?u(c.slice(s.length)):_d(nv,!1,c,void 0,!0)}if(i){const s=o;o=u=>i({className:u,parseClassName:s})}return o},iv=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((i,o)=>{l.set(i,1e6+o)}),i=>{const o=[];let s=[];for(let u=0;u<i.length;u++){const c=i[u],d=c[0]==="[",h=l.has(c);d||h?(s.length>0&&(s.sort(),o.push(...s),s=[]),o.push(c)):s.push(c)}return s.length>0&&(s.sort(),o.push(...s)),o}},av=n=>({cache:tv(n.cacheSize),parseClassName:rv(n),sortModifiers:iv(n),...Gb(n)}),lv=/\s+/,ov=(n,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:s,sortModifiers:u}=l,c=[],d=n.trim().split(lv);let h="";for(let p=d.length-1;p>=0;p-=1){const y=d[p],{isExternal:g,modifiers:v,hasImportantModifier:b,baseClassName:C,maybePostfixModifierPosition:E}=i(y);if(g){h=y+(h.length>0?" "+h:h);continue}let T=!!E,_=o(T?C.substring(0,E):C);if(!_){if(!T){h=y+(h.length>0?" "+h:h);continue}if(_=o(C),!_){h=y+(h.length>0?" "+h:h);continue}T=!1}const k=v.length===0?"":v.length===1?v[0]:u(v).join(":"),O=b?k+Cs:k,H=O+_;if(c.indexOf(H)>-1)continue;c.push(H);const B=s(_,T);for(let z=0;z<B.length;++z){const L=B[z];c.push(O+L)}h=y+(h.length>0?" "+h:h)}return h},sv=(...n)=>{let l=0,i,o,s="";for(;l<n.length;)(i=n[l++])&&(o=xd(i))&&(s&&(s+=" "),s+=o);return s},xd=n=>{if(typeof n=="string")return n;let l,i="";for(let o=0;o<n.length;o++)n[o]&&(l=xd(n[o]))&&(i&&(i+=" "),i+=l);return i},uv=(n,...l)=>{let i,o,s,u;const c=h=>{const p=l.reduce((y,g)=>g(y),n());return i=av(p),o=i.cache.get,s=i.cache.set,u=d,d(h)},d=h=>{const p=o(h);if(p)return p;const y=ov(h,i);return s(h,y),y};return u=c,(...h)=>u(sv(...h))},cv=[],kt=n=>{const l=i=>i[n]||cv;return l.isThemeGetter=!0,l},wd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fv=/^\d+\/\d+$/,dv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hv=/\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$/,mv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ui=n=>fv.test(n),Ye=n=>!!n&&!Number.isNaN(Number(n)),sr=n=>!!n&&Number.isInteger(Number(n)),Ts=n=>n.endsWith("%")&&Ye(n.slice(0,-1)),In=n=>dv.test(n),yv=()=>!0,bv=n=>hv.test(n)&&!mv.test(n),Td=()=>!1,vv=n=>pv.test(n),Sv=n=>gv.test(n),Ev=n=>!Re(n)&&!Ne(n),_v=n=>ci(n,Od,Td),Re=n=>wd.test(n),Ur=n=>ci(n,zd,bv),ks=n=>ci(n,kv,Ye),kd=n=>ci(n,Rd,Td),xv=n=>ci(n,Nd,Sv),Ol=n=>ci(n,Md,vv),Ne=n=>Cd.test(n),la=n=>fi(n,zd),wv=n=>fi(n,Av),Ad=n=>fi(n,Rd),Cv=n=>fi(n,Od),Tv=n=>fi(n,Nd),zl=n=>fi(n,Md,!0),ci=(n,l,i)=>{const o=wd.exec(n);return o?o[1]?l(o[1]):i(o[2]):!1},fi=(n,l,i=!1)=>{const o=Cd.exec(n);return o?o[1]?l(o[1]):i:!1},Rd=n=>n==="position"||n==="percentage",Nd=n=>n==="image"||n==="url",Od=n=>n==="length"||n==="size"||n==="bg-size",zd=n=>n==="length",kv=n=>n==="number",Av=n=>n==="family-name",Md=n=>n==="shadow",Rv=uv(()=>{const n=kt("color"),l=kt("font"),i=kt("text"),o=kt("font-weight"),s=kt("tracking"),u=kt("leading"),c=kt("breakpoint"),d=kt("container"),h=kt("spacing"),p=kt("radius"),y=kt("shadow"),g=kt("inset-shadow"),v=kt("text-shadow"),b=kt("drop-shadow"),C=kt("blur"),E=kt("perspective"),T=kt("aspect"),_=kt("ease"),k=kt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...H(),Ne,Re],z=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],P=()=>[Ne,Re,h],q=()=>[ui,"full","auto",...P()],le=()=>[sr,"none","subgrid",Ne,Re],ce=()=>["auto",{span:["full",sr,Ne,Re]},sr,Ne,Re],M=()=>[sr,"auto",Ne,Re],$=()=>["auto","min","max","fr",Ne,Re],w=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...P()],Z=()=>[ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],ae=()=>[n,Ne,Re],se=()=>[...H(),Ad,kd,{position:[Ne,Re]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",Cv,_v,{size:[Ne,Re]}],j=()=>[Ts,la,Ur],N=()=>["","none","full",p,Ne,Re],ne=()=>["",Ye,la,Ur],fe=()=>["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"],de=()=>[Ye,Ts,Ad,kd],Te=()=>["","none",C,Ne,Re],ke=()=>["none",Ye,Ne,Re],Me=()=>["none",Ye,Ne,Re],De=()=>[Ye,Ne,Re],nt=()=>[ui,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[In],breakpoint:[In],color:[yv],container:[In],"drop-shadow":[In],ease:["in","out","in-out"],font:[Ev],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[In],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[In],shadow:[In],spacing:["px",Ye],text:[In],"text-shadow":[In],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ui,Re,Ne,T]}],container:["container"],columns:[{columns:[Ye,Re,Ne,d]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:B()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{start:q()}],end:[{end:q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[sr,"auto",Ne,Re]}],basis:[{basis:[ui,"full","auto",d,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,ui,"auto","initial","none",Re]}],grow:[{grow:["",Ye,Ne,Re]}],shrink:[{shrink:["",Ye,Ne,Re]}],order:[{order:[sr,"first","last","none",Ne,Re]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...w(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...w()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":w()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[d,"screen",...Z()]}],"min-w":[{"min-w":[d,"screen","none",...Z()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[c]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",i,la,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Ne,ks]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ts,Re]}],"font-family":[{font:[wv,Re,l]}],"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,Ne,Re]}],"line-clamp":[{"line-clamp":[Ye,"none",Ne,ks]}],leading:[{leading:[u,...P()]}],"list-image":[{"list-image":["none",Ne,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ae()}],"text-color":[{text:ae()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",Ne,Ur]}],"text-decoration-color":[{decoration:ae()}],"underline-offset":[{"underline-offset":[Ye,"auto",Ne,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne,Re]}],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",Ne,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,Ne,Re],radial:["",Ne,Re],conic:[sr,Ne,Re]},Tv,xv]}],"bg-color":[{bg:ae()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:ae()}],"gradient-via":[{via:ae()}],"gradient-to":[{to:ae()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"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:ae()}],"border-color-x":[{"border-x":ae()}],"border-color-y":[{"border-y":ae()}],"border-color-s":[{"border-s":ae()}],"border-color-e":[{"border-e":ae()}],"border-color-t":[{"border-t":ae()}],"border-color-r":[{"border-r":ae()}],"border-color-b":[{"border-b":ae()}],"border-color-l":[{"border-l":ae()}],"divide-color":[{divide:ae()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,Ne,Re]}],"outline-w":[{outline:["",Ye,la,Ur]}],"outline-color":[{outline:ae()}],shadow:[{shadow:["","none",y,zl,Ol]}],"shadow-color":[{shadow:ae()}],"inset-shadow":[{"inset-shadow":["none",g,zl,Ol]}],"inset-shadow-color":[{"inset-shadow":ae()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ae()}],"ring-offset-w":[{"ring-offset":[Ye,Ur]}],"ring-offset-color":[{"ring-offset":ae()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":ae()}],"text-shadow":[{"text-shadow":["none",v,zl,Ol]}],"text-shadow-color":[{"text-shadow":ae()}],opacity:[{opacity:[Ye,Ne,Re]}],"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":[Ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":ae()}],"mask-image-linear-to-color":[{"mask-linear-to":ae()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":ae()}],"mask-image-t-to-color":[{"mask-t-to":ae()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":ae()}],"mask-image-r-to-color":[{"mask-r-to":ae()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":ae()}],"mask-image-b-to-color":[{"mask-b-to":ae()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":ae()}],"mask-image-l-to-color":[{"mask-l-to":ae()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":ae()}],"mask-image-x-to-color":[{"mask-x-to":ae()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":ae()}],"mask-image-y-to-color":[{"mask-y-to":ae()}],"mask-image-radial":[{"mask-radial":[Ne,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":ae()}],"mask-image-radial-to-color":[{"mask-radial-to":ae()}],"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":H()}],"mask-image-conic-pos":[{"mask-conic":[Ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":ae()}],"mask-image-conic-to-color":[{"mask-conic-to":ae()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Re]}],filter:[{filter:["","none",Ne,Re]}],blur:[{blur:Te()}],brightness:[{brightness:[Ye,Ne,Re]}],contrast:[{contrast:[Ye,Ne,Re]}],"drop-shadow":[{"drop-shadow":["","none",b,zl,Ol]}],"drop-shadow-color":[{"drop-shadow":ae()}],grayscale:[{grayscale:["",Ye,Ne,Re]}],"hue-rotate":[{"hue-rotate":[Ye,Ne,Re]}],invert:[{invert:["",Ye,Ne,Re]}],saturate:[{saturate:[Ye,Ne,Re]}],sepia:[{sepia:["",Ye,Ne,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Re]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,Ne,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,Ne,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,Ne,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,Ne,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ye,Ne,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,Ne,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,Ne,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,Ne,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ne,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ye,"initial",Ne,Re]}],ease:[{ease:["linear","initial",_,Ne,Re]}],delay:[{delay:[Ye,Ne,Re]}],animate:[{animate:["none",k,Ne,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ne,Re]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:ke()}],"rotate-x":[{"rotate-x":ke()}],"rotate-y":[{"rotate-y":ke()}],"rotate-z":[{"rotate-z":ke()}],scale:[{scale:Me()}],"scale-x":[{"scale-x":Me()}],"scale-y":[{"scale-y":Me()}],"scale-z":[{"scale-z":Me()}],"scale-3d":["scale-3d"],skew:[{skew:De()}],"skew-x":[{"skew-x":De()}],"skew-y":[{"skew-y":De()}],transform:[{transform:[Ne,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nt()}],"translate-x":[{"translate-x":nt()}],"translate-y":[{"translate-y":nt()}],"translate-z":[{"translate-z":nt()}],"translate-none":["translate-none"],accent:[{accent:ae()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ae()}],"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",Ne,Re]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Ne,Re]}],fill:[{fill:["none",...ae()]}],"stroke-w":[{stroke:[Ye,la,Ur,ks]}],stroke:[{stroke:["none",...ae()]}],"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 Je(...n){return Rv(gd(n))}function As(n){if(!n&&n!==0)return"";const l=n instanceof Date?n:new Date(typeof n=="number"?n:Number(n)||n);return Number.isNaN(l.getTime())?"":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Dd=K.forwardRef(({className:n,children:l,...i},o)=>F.jsxs(md,{ref:o,className:Je("relative overflow-hidden",n),...i,children:[F.jsx(qb,{className:"h-full w-full rounded-[inherit]",children:l}),F.jsx(jd,{}),F.jsx(Yb,{})]}));Dd.displayName=md.displayName;const jd=K.forwardRef(({className:n,orientation:l="vertical",...i},o)=>F.jsx(Es,{ref:o,orientation:l,className:Je("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...i,children:F.jsx(sd,{className:"relative flex-1 rounded-full bg-border"})}));jd.displayName=Es.displayName;const Ml=K.forwardRef(({className:n,...l},i)=>F.jsx("div",{ref:i,className:Je("rounded-xl border bg-card text-card-foreground shadow",n),...l}));Ml.displayName="Card";const Nv=K.forwardRef(({className:n,...l},i)=>F.jsx("div",{ref:i,className:Je("flex flex-col space-y-1.5 p-6",n),...l}));Nv.displayName="CardHeader";const Ov=K.forwardRef(({className:n,...l},i)=>F.jsx("div",{ref:i,className:Je("font-semibold leading-none tracking-tight",n),...l}));Ov.displayName="CardTitle";const zv=K.forwardRef(({className:n,...l},i)=>F.jsx("div",{ref:i,className:Je("text-sm text-muted-foreground",n),...l}));zv.displayName="CardDescription";const Mv=K.forwardRef(({className:n,...l},i)=>F.jsx("div",{ref:i,className:Je("p-6 pt-0",n),...l}));Mv.displayName="CardContent";const Dv=K.forwardRef(({className:n,...l},i)=>F.jsx("div",{ref:i,className:Je("flex items-center p-6 pt-0",n),...l}));Dv.displayName="CardFooter";const jv=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uv=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,o)=>o?o.toUpperCase():i.toLowerCase()),Ud=n=>{const l=Uv(n);return l.charAt(0).toUpperCase()+l.slice(1)},Bd=(...n)=>n.filter((l,i,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===i).join(" ").trim(),Bv=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var Lv={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 Iv=K.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:u,iconNode:c,...d},h)=>K.createElement("svg",{ref:h,...Lv,width:l,height:l,stroke:n,strokeWidth:o?Number(i)*24/Number(l):i,className:Bd("lucide",s),...!u&&!Bv(d)&&{"aria-hidden":"true"},...d},[...c.map(([p,y])=>K.createElement(p,y)),...Array.isArray(u)?u:[u]]));const un=(n,l)=>{const i=K.forwardRef(({className:o,...s},u)=>K.createElement(Iv,{ref:u,iconNode:l,className:Bd(`lucide-${jv(Ud(n))}`,`lucide-${n}`,o),...s}));return i.displayName=Ud(n),i};const Hv=un("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const Ld=un("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 qv=un("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 Yv=un("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Pv=un("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 Fv=un("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 Vv=un("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 Gv=un("phone-call",[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);const Xv=un("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Zv=un("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 Kv=un("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Qv=un("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var Jv=Symbol.for("react.lazy"),Dl=Vf[" use ".trim().toString()];function Wv(n){return typeof n=="object"&&n!==null&&"then"in n}function Id(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Jv&&"_payload"in n&&Wv(n._payload)}function Hd(n){const l=eS(n),i=K.forwardRef((o,s)=>{let{children:u,...c}=o;Id(u)&&typeof Dl=="function"&&(u=Dl(u._payload));const d=K.Children.toArray(u),h=d.find(nS);if(h){const p=h.props.children,y=d.map(g=>g===h?K.Children.count(p)>1?K.Children.only(null):K.isValidElement(p)?p.props.children:null:g);return F.jsx(l,{...c,ref:s,children:K.isValidElement(p)?K.cloneElement(p,void 0,y):null})}return F.jsx(l,{...c,ref:s,children:u})});return i.displayName=`${n}.Slot`,i}var $v=Hd("Slot");function eS(n){const l=K.forwardRef((i,o)=>{let{children:s,...u}=i;if(Id(s)&&typeof Dl=="function"&&(s=Dl(s._payload)),K.isValidElement(s)){const c=iS(s),d=rS(u,s.props);return s.type!==K.Fragment&&(d.ref=o?vs(o,c):c),K.cloneElement(s,d)}return K.Children.count(s)>1?K.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var tS=Symbol("radix.slottable");function nS(n){return K.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===tS}function rS(n,l){const i={...l};for(const o in l){const s=n[o],u=l[o];/^on[A-Z]/.test(o)?s&&u?i[o]=(...d)=>{const h=u(...d);return s(...d),h}:s&&(i[o]=s):o==="style"?i[o]={...s,...u}:o==="className"&&(i[o]=[s,u].filter(Boolean).join(" "))}return{...n,...i}}function iS(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}const qd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Yd=gd,aS=((n,l)=>i=>{var o;if(l?.variants==null)return Yd(n,i?.class,i?.className);const{variants:s,defaultVariants:u}=l,c=Object.keys(s).map(p=>{const y=i?.[p],g=u?.[p];if(y===null)return null;const v=qd(y)||qd(g);return s[p][v]}),d=i&&Object.entries(i).reduce((p,y)=>{let[g,v]=y;return v===void 0||(p[g]=v),p},{}),h=l==null||(o=l.compoundVariants)===null||o===void 0?void 0:o.reduce((p,y)=>{let{class:g,className:v,...b}=y;return Object.entries(b).every(C=>{let[E,T]=C;return Array.isArray(T)?T.includes({...u,...d}[E]):{...u,...d}[E]===T})?[...p,g,v]:p},[]);return Yd(n,c,h,i?.class,i?.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"}}),Hn=K.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...s},u)=>{const c=o?$v:"button";return F.jsx(c,{className:Je(aS({variant:l,size:i,className:n})),ref:u,...s})});Hn.displayName="Button";function lS(n,l=[]){let i=[];function o(u,c){const d=K.createContext(c);d.displayName=u+"Context";const h=i.length;i=[...i,c];const p=g=>{const{scope:v,children:b,...C}=g,E=v?.[n]?.[h]||d,T=K.useMemo(()=>C,Object.values(C));return F.jsx(E.Provider,{value:T,children:b})};p.displayName=u+"Provider";function y(g,v){const b=v?.[n]?.[h]||d,C=K.useContext(b);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${u}\``)}return[p,y]}const s=()=>{const u=i.map(c=>K.createContext(c));return function(d){const h=d?.[n]||u;return K.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])}};return s.scopeName=n,[o,oS(s,...l)]}function oS(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const c=o.reduce((d,{useScope:h,scopeName:p})=>{const g=h(u)[`__scope${p}`];return{...d,...g}},{});return K.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}var sS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rs=sS.reduce((n,l)=>{const i=Hd(`Primitive.${l}`),o=K.forwardRef((s,u)=>{const{asChild:c,...d}=s,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),F.jsx(h,{...d,ref:u})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),Ns={exports:{}},Os={};var Pd;function uS(){if(Pd)return Os;Pd=1;var n=wl();function l(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var i=typeof Object.is=="function"?Object.is:l,o=n.useState,s=n.useEffect,u=n.useLayoutEffect,c=n.useDebugValue;function d(g,v){var b=v(),C=o({inst:{value:b,getSnapshot:v}}),E=C[0].inst,T=C[1];return u(function(){E.value=b,E.getSnapshot=v,h(E)&&T({inst:E})},[g,b,v]),s(function(){return h(E)&&T({inst:E}),g(function(){h(E)&&T({inst:E})})},[g]),c(b),b}function h(g){var v=g.getSnapshot;g=g.value;try{var b=v();return!i(g,b)}catch{return!0}}function p(g,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return Os.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,Os}var Fd;function cS(){return Fd||(Fd=1,Ns.exports=uS()),Ns.exports}var fS=cS();function dS(){return fS.useSyncExternalStore(hS,()=>!0,()=>!1)}function hS(){return()=>{}}var zs="Avatar",[mS]=lS(zs),[pS,Vd]=mS(zs),Gd=K.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[s,u]=K.useState("idle");return F.jsx(pS,{scope:i,imageLoadingStatus:s,onImageLoadingStatusChange:u,children:F.jsx(Rs.span,{...o,ref:l})})});Gd.displayName=zs;var Xd="AvatarImage",Zd=K.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:s=()=>{},...u}=n,c=Vd(Xd,i),d=gS(o,u),h=or(p=>{s(p),c.onImageLoadingStatusChange(p)});return lr(()=>{d!=="idle"&&h(d)},[d,h]),d==="loaded"?F.jsx(Rs.img,{...u,ref:l,src:o}):null});Zd.displayName=Xd;var Kd="AvatarFallback",Qd=K.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...s}=n,u=Vd(Kd,i),[c,d]=K.useState(o===void 0);return K.useEffect(()=>{if(o!==void 0){const h=window.setTimeout(()=>d(!0),o);return()=>window.clearTimeout(h)}},[o]),c&&u.imageLoadingStatus!=="loaded"?F.jsx(Rs.span,{...s,ref:l}):null});Qd.displayName=Kd;function Jd(n,l){return n?l?(n.src!==l&&(n.src=l),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function gS(n,{referrerPolicy:l,crossOrigin:i}){const o=dS(),s=K.useRef(null),u=o?(s.current||(s.current=new window.Image),s.current):null,[c,d]=K.useState(()=>Jd(u,n));return lr(()=>{d(Jd(u,n))},[u,n]),lr(()=>{const h=g=>()=>{d(g)};if(!u)return;const p=h("loaded"),y=h("error");return u.addEventListener("load",p),u.addEventListener("error",y),l&&(u.referrerPolicy=l),typeof i=="string"&&(u.crossOrigin=i),()=>{u.removeEventListener("load",p),u.removeEventListener("error",y)}},[u,i,l]),c}var Wd=Gd,$d=Zd,eh=Qd;const jl=K.forwardRef(({className:n,...l},i)=>F.jsx(Wd,{ref:i,className:Je("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...l}));jl.displayName=Wd.displayName;const yS=K.forwardRef(({className:n,...l},i)=>F.jsx($d,{ref:i,className:Je("aspect-square h-full w-full",n),...l}));yS.displayName=$d.displayName;const Ul=K.forwardRef(({className:n,...l},i)=>F.jsx(eh,{ref:i,className:Je("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...l}));Ul.displayName=eh.displayName;var Br={},oa={},Ms={},sa={},ua={},ca={},th;function bS(){if(th)return ca;th=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.EventEmitter=void 0;let n=class{eventListeners=new Map;on(i,o){const s=this.eventListeners.get(i)||new Set;s.add(o),this.eventListeners.set(i,s)}off(i,o){const s=this.eventListeners.get(i);s&&(s.delete(o),s.size===0&&this.eventListeners.delete(i))}emit(i,...o){const s=this.eventListeners.get(i);s&&s.forEach(u=>u(...o))}};return ca.EventEmitter=n,ca}var Lr={},nh;function Bl(){return nh||(nh=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DisconnectionReason=Lr.ConnectionStatus=void 0,Lr.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},Lr.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"}),Lr}var rh;function ih(){if(rh)return ua;rh=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.BaseConnection=void 0;const n=bS(),l=Bl();let i=class{status=l.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 u=[...this.queue];this.queue.length=0,queueMicrotask(()=>{u.forEach(c=>{this.onMessageCallback?.(c)})})}}onDisconnect(s){this.onDisconnectCallback=s;const u=this.disconnectionDetails;u&&queueMicrotask(()=>{this.onDisconnectCallback?.(u)})}onError(s){this.onErrorCallback=s}on(s,u){this.eventEmitter.on(s,u)}off(s,u){this.eventEmitter.off(s,u)}emit(s,...u){this.eventEmitter.emit(s,...u)}onStatusChange(s){this.onStatusChangeCallback=s,queueMicrotask(()=>{s(this.status)})}disconnect(s){this.disconnectionDetails||(this.disconnectionDetails=s,this.updateStatus(l.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 ua.BaseConnection=i,ua}var Ds={},ah;function An(){return ah||(ah=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=H,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 l extends Error{code;timestamp;cause;context;hint;constructor(z,L=n.SynapseErrorCode.UNKNOWN,P={}){super(z),this.name="SynapseError",this.code=L,this.timestamp=new Date,this.cause=P.cause,this.context=P.context,this.hint=P.hint,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=l;class i extends l{status;error;headers;constructor(z,L,P,q){const le=i.makeMessage(L,P,z);super(le,n.SynapseErrorCode.API,{cause:P,context:{status:L,hasBody:!!P},hint:L&&L>=500?"Retry the request or contact support if the issue persists.":void 0}),this.name="APIError",this.status=L,this.error=P,this.headers=q}static makeMessage(z,L,P){const q=L instanceof Error?L.message:P;return z&&q?`HTTP ${z}: ${q}`:z?`${z} status code (no body)`:q||"(no status code or body)"}static generate(z,L,P,q){if(!z)return new o({message:P});const le=L?.error,ce=le&&typeof le=="object"&&!Array.isArray(le)?le:void 0;switch(z){case 400:return new u(P||"Bad Request",z,ce,q);case 401:return new c(P||"Unauthorized",z,ce,q);case 403:return new d(P||"Permission Denied",z,ce,q);case 404:return new h(P||"Not Found",z,ce,q);case 405:return new p(P||"Method Not Allowed",z,ce,q);case 429:return new y(P||"Rate Limit Exceeded",z,ce,q);case 500:return new g(P||"Internal Server Error",z,ce,q);default:return new i(P||"API Error",z,ce,q)}}}n.APIError=i;class o extends i{constructor({message:z}={}){super(z||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class s extends i{constructor({message:z}={}){super(z||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=s;class u extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="BadRequestError"}}n.BadRequestError=u;class c extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class d extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="PermissionDeniedError"}}n.PermissionDeniedError=d;class h extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="NotFoundError"}}n.NotFoundError=h;class p extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=p;class y extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="RateLimitError"}}n.RateLimitError=y;class g extends i{constructor(z,L,P,q){super(z,L,P,q),this.name="InternalServerError"}}n.InternalServerError=g;class v extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.CONNECTION,L),this.name="ConnectionError"}}n.ConnectionError=v;class b extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.RECORDING,L),this.name="RecordingError"}}n.RecordingError=b;class C extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.FILE,L),this.name="FileError"}}n.FileError=C;class E extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.SESSION,L),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.MESSAGE,L),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.STORE,L),this.name="StoreError"}}n.StoreError=_;class k extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.CONFIGURATION,L),this.name="ConfigurationError"}}n.ConfigurationError=k;class O extends l{constructor(z,L={}){super(z,n.SynapseErrorCode.VALIDATION,L),this.name="ValidationError"}}n.ValidationError=O;function H(B,z,L,P={}){if(B instanceof z)return B;const q={...P,context:{...B instanceof l?B.context:void 0,...P.context},hint:P.hint??(B instanceof l?B.hint:void 0),cause:P.cause??B};if(B instanceof l)return new z(B.message,q);const le=B instanceof Error&&B.message?B.message:L;return new z(le,q)}})(Ds)),Ds}var lh;function oh(){if(lh)return sa;lh=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.WebSocketConnection=void 0;const n=ih(),l=Bl(),i=An();class o extends n.BaseConnection{conversationId;socket=null;config;reconnectCount=0;constructor(u){super(),this.config={...u,reconnect:u.reconnect||!0,reconnectAttempts:u.reconnectAttempts||3,reconnectDelay:u.reconnectDelay||1e3},this.conversationId=u.auth.sessionId,this.connect()}connect(){try{this.updateStatus(l.ConnectionStatus.CONNECTING);const u=this.buildConnectionUrl();this.socket=new WebSocket(u),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(u){const c=(0,i.normalizeError)(u,i.ConnectionError,"Failed to establish WebSocket connection",{context:{stage:"connect"}});this.onErrorCallback?.(c),this.disconnect({reason:l.DisconnectionReason.CONNECTION_ERROR,message:c.message,timestamp:new Date})}}buildConnectionUrl(){const u=new URL(this.config.serverUrl);return u.pathname=`/ws/med-assist/session/${this.config.auth.sessionId}/`,u.toString()}handleOpen(){this.onOpenCallback?.()}handleSocketMessage(u){try{const c=JSON.parse(u.data);this.handleMessage(c)}catch(c){const d=(0,i.normalizeError)(c,i.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(d)}}handleError(u){const c=new i.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:u});this.onErrorCallback?.(c)}handleClose(u){const c=u.wasClean,d=u.code,h=u.reason;let p,y;d===1e3?(p=l.DisconnectionReason.CLIENT_CLOSED,y="Connection closed normally"):d===1001||d===1006?(p=l.DisconnectionReason.NETWORK_ERROR,y="Network connection lost"):d===4001?(p=l.DisconnectionReason.AUTHENTICATION_ERROR,y="Authentication failed"):c?(p=l.DisconnectionReason.SERVER_CLOSED,y=h||"Server closed connection"):(p=l.DisconnectionReason.CONNECTION_ERROR,y=h||"Connection closed unexpectedly"),this.config.reconnect&&p!==l.DisconnectionReason.AUTHENTICATION_ERROR&&p!==l.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:p,message:y,code:d,timestamp:new Date})}sendMessage(u){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new i.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(u))}catch(c){const d=(0,i.normalizeError)(c,i.ConnectionError,"Failed to send WebSocket message",{context:{stage:"sendMessage"}});throw this.onErrorCallback?.(d),d}}close(){this.socket&&(this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.socket.close(1e3,"Client closed connection"),this.socket=null)}isConnected(){return this.socket?.readyState===WebSocket.OPEN}handleConnected(){this.updateStatus(l.ConnectionStatus.CONNECTED),this.reconnectCount=0}}return sa.WebSocketConnection=o,sa}var sh;function uh(){return sh||(sh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const l=oh(),i=An();n.ConnectionType={SOCKET:"socket"};class o{static async createConnection(u,c){switch(u){case n.ConnectionType.SOCKET:return new l.WebSocketConnection(c);default:throw new i.ConnectionError(`Unsupported connection type: ${u}`,{context:{type:u}})}}}n.ConnectionFactory=o})(Ms)),Ms}var fa={},ch;function vS(){if(ch)return fa;ch=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care",BASE_API_URL:"https://matrix.eka.care"},l={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},i={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},o=(s="production")=>s==="development"?l:s==="production"?n:s==="staging"?i:n;return fa.getConfig=o,fa}var da={},ha={},fh;function dh(){if(fh)return ha;fh=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.HttpClient=void 0;const n=An();let l=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,u){const c=u?.retries??this.maxRetries;let d;for(let h=0;h<=c;h++)try{const p=this.buildUrl(s,u?.params),y=await fetch(p,{method:o,headers:{...this.headers,...u?.headers},body:u?.body?JSON.stringify(u.body):void 0,signal:AbortSignal.timeout(this.timeout)});return y.ok||await this.handleError(y),y.json()}catch(p){if(d=p,h===c||!(p instanceof TypeError&&p.message==="Failed to fetch"||p instanceof DOMException&&p.name==="AbortError"||p instanceof SyntaxError))break;const g=Math.pow(2,h)*100;await new Promise(v=>setTimeout(v,g))}throw d?d instanceof TypeError&&d.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:d.message}):d instanceof DOMException&&d.name==="AbortError"?new n.APIConnectionTimeoutError({message:`Request timed out after ${this.timeout}ms`}):d instanceof SyntaxError?new n.APIError("Invalid response format from server",502,{type:"PARSE_ERROR",originalError:d.message}):d instanceof n.APIError?d:new n.APIError(`Request failed: ${d.message||"Unknown error"}`,500,{type:"UNKNOWN_ERROR",originalError:d}):new n.APIError("Unknown error occurred",500,{type:"UNKNOWN_ERROR"})}async get(o,s,u){return this.request("GET",o,{params:s,...u})}async post(o,s,u){return this.request("POST",o,{body:s,...u})}async put(o,s,u){return this.request("PUT",o,{body:s,...u})}async delete(o,s){return this.request("DELETE",o,{...s})}async patch(o,s,u){return this.request("PATCH",o,{body:s,...u})}buildUrl(o,s){let u=`${this.baseUrl}${o}`;if(s){const c=new URLSearchParams(s).toString();u+=`?${c}`}return u}async handleError(o){let s,u;try{u=await o.json(),s=u.message||u?.msg||o.statusText}catch{s=o.statusText}throw n.APIError.generate(o.status,u,s,o.headers)}};return ha.HttpClient=l,ha}var ma={},pa={},hh;function SS(){if(hh)return pa;hh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.BaseResource=void 0;let n=class{client;constructor(i){this.client=i}async get(i,o,s){return this.client.get(i,o,s)}async post(i,o,s){return this.client.post(i,o,s)}async put(i,o,s){return this.client.put(i,o,s)}async delete(i,o){return this.client.delete(i,o)}async patch(i,o,s){return this.client.patch(i,o,s)}buildPath(i,o){let s=i;for(const[u,c]of Object.entries(o))s=s.replace(`:${u}`,encodeURIComponent(c));return s}};return pa.BaseResource=n,pa}var mh;function ph(){if(mh)return ma;mh=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.Session=void 0;const n=SS();let l=class extends n.BaseResource{basePath="/med-assist/session";async create(o){return this.post(this.basePath,{user_id: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,u,c){return this.patch(`${this.basePath}/${o}/${s}`,{feedback:u,feedback_reason:c})}};return ma.Session=l,ma}var gh;function yh(){if(gh)return da;gh=1,Object.defineProperty(da,"__esModule",{value:!0}),da.ResourceManager=void 0;const n=dh(),l=ph(),i=An();class o{resourceConfig;httpClient;session;constructor(u){this.resourceConfig=u,this.httpClient=new n.HttpClient({baseUrl:this.resourceConfig.serverUrl,headers:{"X-agent-id":this.resourceConfig.agentId}}),this.session=new l.Session(this.httpClient)}async createSession(u){try{const c=await this.session.create(u);if(!c?.session_id||!c?.session_token)throw new i.APIError("Failed to start session.",500,void 0,void 0);return c}catch(c){throw c instanceof i.APIError?c:new i.APIError("Failed to start session.",500,void 0,void 0)}}async validateSession(u){try{const c=await this.session.retrieve(u);return c.msg&&c.msg==="Session Active"?{expired:!1,active:!0}:{expired:!0,active:!1}}catch(c){if(c instanceof i.APIError)switch(c.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 i.APIError("Failed to validate session.",500,void 0,void 0)}}async refreshSession(u,c){return await this.session.refresh(u,c)}async sendFeedback(u,c,d,h){return await this.session.feedback(u,c,d,h)}}return da.ResourceManager=o,da}var ga={},js={},bh;function Us(){return bh||(bh=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=l,n.SOCKET_CONTENT_TYPES={TEXT:"text",AUDIO:"audio",FILE:"file",PILL:"pill",MULTI:"multi",DOCTOR_CARD:"doctor_card",TIPS:"tips",INLINE_TEXT:"inline_text",MOBILE_VERIFICATION:"mobile_verification"},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 l(i){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(i.ev)}})(js)),js}var Ir={};function Ll(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Bs={exports:{}};var vh;function ES(){return vh||(vh=1,(function(n,l){(function(i){n.exports=i()})(function(){return(function i(o,s,u){function c(p,y){if(!s[p]){if(!o[p]){var g=typeof Ll=="function"&&Ll;if(!y&&g)return g(p,!0);if(d)return d(p,!0);var v=new Error("Cannot find module '"+p+"'");throw v.code="MODULE_NOT_FOUND",v}var b=s[p]={exports:{}};o[p][0].call(b.exports,function(C){var E=o[p][1][C];return c(E||C)},b,b.exports,i,o,s,u)}return s[p].exports}for(var d=typeof Ll=="function"&&Ll,h=0;h<u.length;h++)c(u[h]);return c})({1:[function(i,o,s){var u=i("./utils"),c=i("./support"),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(h){for(var p,y,g,v,b,C,E,T=[],_=0,k=h.length,O=k,H=u.getTypeOf(h)!=="string";_<h.length;)O=k-_,g=H?(p=h[_++],y=_<k?h[_++]:0,_<k?h[_++]:0):(p=h.charCodeAt(_++),y=_<k?h.charCodeAt(_++):0,_<k?h.charCodeAt(_++):0),v=p>>2,b=(3&p)<<4|y>>4,C=1<O?(15&y)<<2|g>>6:64,E=2<O?63&g:64,T.push(d.charAt(v)+d.charAt(b)+d.charAt(C)+d.charAt(E));return T.join("")},s.decode=function(h){var p,y,g,v,b,C,E=0,T=0,_="data:";if(h.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var k,O=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===d.charAt(64)&&O--,h.charAt(h.length-2)===d.charAt(64)&&O--,O%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=c.uint8array?new Uint8Array(0|O):new Array(0|O);E<h.length;)p=d.indexOf(h.charAt(E++))<<2|(v=d.indexOf(h.charAt(E++)))>>4,y=(15&v)<<4|(b=d.indexOf(h.charAt(E++)))>>2,g=(3&b)<<6|(C=d.indexOf(h.charAt(E++))),k[T++]=p,b!==64&&(k[T++]=y),C!==64&&(k[T++]=g);return k}},{"./support":30,"./utils":32}],2:[function(i,o,s){var u=i("./external"),c=i("./stream/DataWorker"),d=i("./stream/Crc32Probe"),h=i("./stream/DataLengthProbe");function p(y,g,v,b,C){this.compressedSize=y,this.uncompressedSize=g,this.crc32=v,this.compression=b,this.compressedContent=C}p.prototype={getContentWorker:function(){var y=new c(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),g=this;return y.on("end",function(){if(this.streamInfo.data_length!==g.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new c(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},p.createWorkerFrom=function(y,g,v){return y.pipe(new d).pipe(new h("uncompressedSize")).pipe(g.compressWorker(v)).pipe(new h("compressedSize")).withStreamInfo("compression",g)},o.exports=p},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(i,o,s){var u=i("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},s.DEFLATE=i("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(i,o,s){var u=i("./utils"),c=(function(){for(var d,h=[],p=0;p<256;p++){d=p;for(var y=0;y<8;y++)d=1&d?3988292384^d>>>1:d>>>1;h[p]=d}return h})();o.exports=function(d,h){return d!==void 0&&d.length?u.getTypeOf(d)!=="string"?(function(p,y,g,v){var b=c,C=v+g;p^=-1;for(var E=v;E<C;E++)p=p>>>8^b[255&(p^y[E])];return-1^p})(0|h,d,d.length,0):(function(p,y,g,v){var b=c,C=v+g;p^=-1;for(var E=v;E<C;E++)p=p>>>8^b[255&(p^y.charCodeAt(E))];return-1^p})(0|h,d,d.length,0):0}},{"./utils":32}],5:[function(i,o,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(i,o,s){var u=null;u=typeof Promise<"u"?Promise:i("lie"),o.exports={Promise:u}},{lie:37}],7:[function(i,o,s){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",c=i("pako"),d=i("./utils"),h=i("./stream/GenericWorker"),p=u?"uint8array":"array";function y(g,v){h.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=v,this.meta={}}s.magic="\b\0",d.inherits(y,h),y.prototype.processChunk=function(g){this.meta=g.meta,this._pako===null&&this._createPako(),this._pako.push(d.transformTo(p,g.data),!1)},y.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new c[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var g=this;this._pako.onData=function(v){g.push({data:v,meta:g.meta})}},s.compressWorker=function(g){return new y("Deflate",g)},s.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,s){function u(b,C){var E,T="";for(E=0;E<C;E++)T+=String.fromCharCode(255&b),b>>>=8;return T}function c(b,C,E,T,_,k){var O,H,B=b.file,z=b.compression,L=k!==p.utf8encode,P=d.transformTo("string",k(B.name)),q=d.transformTo("string",p.utf8encode(B.name)),le=B.comment,ce=d.transformTo("string",k(le)),M=d.transformTo("string",p.utf8encode(le)),$=q.length!==B.name.length,w=M.length!==le.length,G="",V="",Z="",ae=B.dir,se=B.date,D={crc32:0,compressedSize:0,uncompressedSize:0};C&&!E||(D.crc32=b.crc32,D.compressedSize=b.compressedSize,D.uncompressedSize=b.uncompressedSize);var A=0;C&&(A|=8),L||!$&&!w||(A|=2048);var j=0,N=0;ae&&(j|=16),_==="UNIX"?(N=798,j|=(function(fe,ge){var de=fe;return fe||(de=ge?16893:33204),(65535&de)<<16})(B.unixPermissions,ae)):(N=20,j|=(function(fe){return 63&(fe||0)})(B.dosPermissions)),O=se.getUTCHours(),O<<=6,O|=se.getUTCMinutes(),O<<=5,O|=se.getUTCSeconds()/2,H=se.getUTCFullYear()-1980,H<<=4,H|=se.getUTCMonth()+1,H<<=5,H|=se.getUTCDate(),$&&(V=u(1,1)+u(y(P),4)+q,G+="up"+u(V.length,2)+V),w&&(Z=u(1,1)+u(y(ce),4)+M,G+="uc"+u(Z.length,2)+Z);var ne="";return ne+=`
10
- \0`,ne+=u(A,2),ne+=z.magic,ne+=u(O,2),ne+=u(H,2),ne+=u(D.crc32,4),ne+=u(D.compressedSize,4),ne+=u(D.uncompressedSize,4),ne+=u(P.length,2),ne+=u(G.length,2),{fileRecord:g.LOCAL_FILE_HEADER+ne+P+G,dirRecord:g.CENTRAL_FILE_HEADER+u(N,2)+ne+u(ce.length,2)+"\0\0\0\0"+u(j,4)+u(T,4)+P+G+ce}}var d=i("../utils"),h=i("../stream/GenericWorker"),p=i("../utf8"),y=i("../crc32"),g=i("../signature");function v(b,C,E,T){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=C,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}d.inherits(v,h),v.prototype.push=function(b){var C=b.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,h.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:E?(C+100*(E-T-1))/E:100}}))},v.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var C=this.streamFiles&&!b.file.dir;if(C){var E=c(b,C,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(b){this.accumulate=!1;var C=this.streamFiles&&!b.file.dir,E=c(b,C,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),C)this.push({data:(function(T){return g.DATA_DESCRIPTOR+u(T.crc32,4)+u(T.compressedSize,4)+u(T.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var b=this.bytesWritten,C=0;C<this.dirRecords.length;C++)this.push({data:this.dirRecords[C],meta:{percent:100}});var E=this.bytesWritten-b,T=(function(_,k,O,H,B){var z=d.transformTo("string",B(H));return g.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(_,2)+u(_,2)+u(k,4)+u(O,4)+u(z.length,2)+z})(this.dirRecords.length,E,b,this.zipComment,this.encodeFileName);this.push({data:T,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(b){this._sources.push(b);var C=this;return b.on("data",function(E){C.processChunk(E)}),b.on("end",function(){C.closedSource(C.previous.streamInfo),C._sources.length?C.prepareNextSource():C.end()}),b.on("error",function(E){C.error(E)}),this},v.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(b){var C=this._sources;if(!h.prototype.error.call(this,b))return!1;for(var E=0;E<C.length;E++)try{C[E].error(b)}catch{}return!0},v.prototype.lock=function(){h.prototype.lock.call(this);for(var b=this._sources,C=0;C<b.length;C++)b[C].lock()},o.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(i,o,s){var u=i("../compressions"),c=i("./ZipFileWorker");s.generateWorker=function(d,h,p){var y=new c(h.streamFiles,p,h.platform,h.encodeFileName),g=0;try{d.forEach(function(v,b){g++;var C=(function(k,O){var H=k||O,B=u[H];if(!B)throw new Error(H+" is not a valid compression method !");return B})(b.options.compression,h.compression),E=b.options.compressionOptions||h.compressionOptions||{},T=b.dir,_=b.date;b._compressWorker(C,E).withStreamInfo("file",{name:v,dir:T,date:_,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(y)}),y.entriesCount=g}catch(v){y.error(v)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(i,o,s){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new u;for(var d in this)typeof this[d]!="function"&&(c[d]=this[d]);return c}}(u.prototype=i("./object")).loadAsync=i("./load"),u.support=i("./support"),u.defaults=i("./defaults"),u.version="3.10.1",u.loadAsync=function(c,d){return new u().loadAsync(c,d)},u.external=i("./external"),o.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(i,o,s){var u=i("./utils"),c=i("./external"),d=i("./utf8"),h=i("./zipEntries"),p=i("./stream/Crc32Probe"),y=i("./nodejsUtils");function g(v){return new c.Promise(function(b,C){var E=v.decompressed.getContentWorker().pipe(new p);E.on("error",function(T){C(T)}).on("end",function(){E.streamInfo.crc32!==v.decompressed.crc32?C(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(v,b){var C=this;return b=u.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:d.utf8decode}),y.isNode&&y.isStream(v)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",v,!0,b.optimizedBinaryString,b.base64).then(function(E){var T=new h(b);return T.load(E),T}).then(function(E){var T=[c.Promise.resolve(E)],_=E.files;if(b.checkCRC32)for(var k=0;k<_.length;k++)T.push(g(_[k]));return c.Promise.all(T)}).then(function(E){for(var T=E.shift(),_=T.files,k=0;k<_.length;k++){var O=_[k],H=O.fileNameStr,B=u.resolve(O.fileNameStr);C.file(B,O.decompressed,{binary:!0,optimizedBinaryString:!0,date:O.date,dir:O.dir,comment:O.fileCommentStr.length?O.fileCommentStr:null,unixPermissions:O.unixPermissions,dosPermissions:O.dosPermissions,createFolders:b.createFolders}),O.dir||(C.file(B).unsafeOriginalName=H)}return T.zipComment.length&&(C.comment=T.zipComment),C})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(i,o,s){var u=i("../utils"),c=i("../stream/GenericWorker");function d(h,p){c.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(p)}u.inherits(d,c),d.prototype._bindStream=function(h){var p=this;(this._stream=h).pause(),h.on("data",function(y){p.push({data:y,meta:{percent:0}})}).on("error",function(y){p.isPaused?this.generatedError=y:p.error(y)}).on("end",function(){p.isPaused?p._upstreamEnded=!0:p.end()})},d.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},d.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=d},{"../stream/GenericWorker":28,"../utils":32}],13:[function(i,o,s){var u=i("readable-stream").Readable;function c(d,h,p){u.call(this,h),this._helper=d;var y=this;d.on("data",function(g,v){y.push(g)||y._helper.pause(),p&&p(v)}).on("error",function(g){y.emit("error",g)}).on("end",function(){y.push(null)})}i("../utils").inherits(c,u),c.prototype._read=function(){this._helper.resume()},o.exports=c},{"../utils":32,"readable-stream":16}],14:[function(i,o,s){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,c);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,c)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var c=new Buffer(u);return c.fill(0),c},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(i,o,s){function u(B,z,L){var P,q=d.getTypeOf(z),le=d.extend(L||{},y);le.date=le.date||new Date,le.compression!==null&&(le.compression=le.compression.toUpperCase()),typeof le.unixPermissions=="string"&&(le.unixPermissions=parseInt(le.unixPermissions,8)),le.unixPermissions&&16384&le.unixPermissions&&(le.dir=!0),le.dosPermissions&&16&le.dosPermissions&&(le.dir=!0),le.dir&&(B=_(B)),le.createFolders&&(P=T(B))&&k.call(this,P,!0);var ce=q==="string"&&le.binary===!1&&le.base64===!1;L&&L.binary!==void 0||(le.binary=!ce),(z instanceof g&&z.uncompressedSize===0||le.dir||!z||z.length===0)&&(le.base64=!1,le.binary=!0,z="",le.compression="STORE",q="string");var M=null;M=z instanceof g||z instanceof h?z:C.isNode&&C.isStream(z)?new E(B,z):d.prepareContent(B,z,le.binary,le.optimizedBinaryString,le.base64);var $=new v(B,M,le);this.files[B]=$}var c=i("./utf8"),d=i("./utils"),h=i("./stream/GenericWorker"),p=i("./stream/StreamHelper"),y=i("./defaults"),g=i("./compressedObject"),v=i("./zipObject"),b=i("./generate"),C=i("./nodejsUtils"),E=i("./nodejs/NodejsStreamInputAdapter"),T=function(B){B.slice(-1)==="/"&&(B=B.substring(0,B.length-1));var z=B.lastIndexOf("/");return 0<z?B.substring(0,z):""},_=function(B){return B.slice(-1)!=="/"&&(B+="/"),B},k=function(B,z){return z=z!==void 0?z:y.createFolders,B=_(B),this.files[B]||u.call(this,B,null,{dir:!0,createFolders:z}),this.files[B]};function O(B){return Object.prototype.toString.call(B)==="[object RegExp]"}var H={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(B){var z,L,P;for(z in this.files)P=this.files[z],(L=z.slice(this.root.length,z.length))&&z.slice(0,this.root.length)===this.root&&B(L,P)},filter:function(B){var z=[];return this.forEach(function(L,P){B(L,P)&&z.push(P)}),z},file:function(B,z,L){if(arguments.length!==1)return B=this.root+B,u.call(this,B,z,L),this;if(O(B)){var P=B;return this.filter(function(le,ce){return!ce.dir&&P.test(le)})}var q=this.files[this.root+B];return q&&!q.dir?q:null},folder:function(B){if(!B)return this;if(O(B))return this.filter(function(q,le){return le.dir&&B.test(q)});var z=this.root+B,L=k.call(this,z),P=this.clone();return P.root=L.name,P},remove:function(B){B=this.root+B;var z=this.files[B];if(z||(B.slice(-1)!=="/"&&(B+="/"),z=this.files[B]),z&&!z.dir)delete this.files[B];else for(var L=this.filter(function(q,le){return le.name.slice(0,B.length)===B}),P=0;P<L.length;P++)delete this.files[L[P].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(B){var z,L={};try{if((L=d.extend(B||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=L.type.toLowerCase(),L.compression=L.compression.toUpperCase(),L.type==="binarystring"&&(L.type="string"),!L.type)throw new Error("No output type specified.");d.checkSupport(L.type),L.platform!=="darwin"&&L.platform!=="freebsd"&&L.platform!=="linux"&&L.platform!=="sunos"||(L.platform="UNIX"),L.platform==="win32"&&(L.platform="DOS");var P=L.comment||this.comment||"";z=b.generateWorker(this,L,P)}catch(q){(z=new h("error")).error(q)}return new p(z,L.type||"string",L.mimeType)},generateAsync:function(B,z){return this.generateInternalStream(B).accumulate(z)},generateNodeStream:function(B,z){return(B=B||{}).type||(B.type="nodebuffer"),this.generateInternalStream(B).toNodejsStream(z)}};o.exports=H},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(i,o,s){o.exports=i("stream")},{stream:void 0}],17:[function(i,o,s){var u=i("./DataReader");function c(d){u.call(this,d);for(var h=0;h<this.data.length;h++)d[h]=255&d[h]}i("../utils").inherits(c,u),c.prototype.byteAt=function(d){return this.data[this.zero+d]},c.prototype.lastIndexOfSignature=function(d){for(var h=d.charCodeAt(0),p=d.charCodeAt(1),y=d.charCodeAt(2),g=d.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===h&&this.data[v+1]===p&&this.data[v+2]===y&&this.data[v+3]===g)return v-this.zero;return-1},c.prototype.readAndCheckSignature=function(d){var h=d.charCodeAt(0),p=d.charCodeAt(1),y=d.charCodeAt(2),g=d.charCodeAt(3),v=this.readData(4);return h===v[0]&&p===v[1]&&y===v[2]&&g===v[3]},c.prototype.readData=function(d){if(this.checkOffset(d),d===0)return[];var h=this.data.slice(this.zero+this.index,this.zero+this.index+d);return this.index+=d,h},o.exports=c},{"../utils":32,"./DataReader":18}],18:[function(i,o,s){var u=i("../utils");function c(d){this.data=d,this.length=d.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(d){this.checkIndex(this.index+d)},checkIndex:function(d){if(this.length<this.zero+d||d<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+d+"). Corrupted zip ?")},setIndex:function(d){this.checkIndex(d),this.index=d},skip:function(d){this.setIndex(this.index+d)},byteAt:function(){},readInt:function(d){var h,p=0;for(this.checkOffset(d),h=this.index+d-1;h>=this.index;h--)p=(p<<8)+this.byteAt(h);return this.index+=d,p},readString:function(d){return u.transformTo("string",this.readData(d))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var d=this.readInt(4);return new Date(Date.UTC(1980+(d>>25&127),(d>>21&15)-1,d>>16&31,d>>11&31,d>>5&63,(31&d)<<1))}},o.exports=c},{"../utils":32}],19:[function(i,o,s){var u=i("./Uint8ArrayReader");function c(d){u.call(this,d)}i("../utils").inherits(c,u),c.prototype.readData=function(d){this.checkOffset(d);var h=this.data.slice(this.zero+this.index,this.zero+this.index+d);return this.index+=d,h},o.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(i,o,s){var u=i("./DataReader");function c(d){u.call(this,d)}i("../utils").inherits(c,u),c.prototype.byteAt=function(d){return this.data.charCodeAt(this.zero+d)},c.prototype.lastIndexOfSignature=function(d){return this.data.lastIndexOf(d)-this.zero},c.prototype.readAndCheckSignature=function(d){return d===this.readData(4)},c.prototype.readData=function(d){this.checkOffset(d);var h=this.data.slice(this.zero+this.index,this.zero+this.index+d);return this.index+=d,h},o.exports=c},{"../utils":32,"./DataReader":18}],21:[function(i,o,s){var u=i("./ArrayReader");function c(d){u.call(this,d)}i("../utils").inherits(c,u),c.prototype.readData=function(d){if(this.checkOffset(d),d===0)return new Uint8Array(0);var h=this.data.subarray(this.zero+this.index,this.zero+this.index+d);return this.index+=d,h},o.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(i,o,s){var u=i("../utils"),c=i("../support"),d=i("./ArrayReader"),h=i("./StringReader"),p=i("./NodeBufferReader"),y=i("./Uint8ArrayReader");o.exports=function(g){var v=u.getTypeOf(g);return u.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new p(g):c.uint8array?new y(u.transformTo("uint8array",g)):new d(u.transformTo("array",g)):new h(g)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(i,o,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(i,o,s){var u=i("./GenericWorker"),c=i("../utils");function d(h){u.call(this,"ConvertWorker to "+h),this.destType=h}c.inherits(d,u),d.prototype.processChunk=function(h){this.push({data:c.transformTo(this.destType,h.data),meta:h.meta})},o.exports=d},{"../utils":32,"./GenericWorker":28}],25:[function(i,o,s){var u=i("./GenericWorker"),c=i("../crc32");function d(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i("../utils").inherits(d,u),d.prototype.processChunk=function(h){this.streamInfo.crc32=c(h.data,this.streamInfo.crc32||0),this.push(h)},o.exports=d},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(i,o,s){var u=i("../utils"),c=i("./GenericWorker");function d(h){c.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}u.inherits(d,c),d.prototype.processChunk=function(h){if(h){var p=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=p+h.data.length}c.prototype.processChunk.call(this,h)},o.exports=d},{"../utils":32,"./GenericWorker":28}],27:[function(i,o,s){var u=i("../utils"),c=i("./GenericWorker");function d(h){c.call(this,"DataWorker");var p=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(y){p.dataIsReady=!0,p.data=y,p.max=y&&y.length||0,p.type=u.getTypeOf(y),p.isPaused||p._tickAndRepeat()},function(y){p.error(y)})}u.inherits(d,c),d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},d.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},d.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var h=null,p=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,p);break;case"uint8array":h=this.data.subarray(this.index,p);break;case"array":case"nodebuffer":h=this.data.slice(this.index,p)}return this.index=p,this.push({data:h,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=d},{"../utils":32,"./GenericWorker":28}],28:[function(i,o,s){function u(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}u.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,d){return this._listeners[c].push(d),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,d){if(this._listeners[c])for(var h=0;h<this._listeners[c].length;h++)this._listeners[c][h].call(this,d)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var d=this;return c.on("data",function(h){d.processChunk(h)}),c.on("end",function(){d.end()}),c.on("error",function(h){d.error(h)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,d){return this.extraStreamInfo[c]=d,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},o.exports=u},{}],29:[function(i,o,s){var u=i("../utils"),c=i("./ConvertWorker"),d=i("./GenericWorker"),h=i("../base64"),p=i("../support"),y=i("../external"),g=null;if(p.nodestream)try{g=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(C,E){return new y.Promise(function(T,_){var k=[],O=C._internalType,H=C._outputType,B=C._mimeType;C.on("data",function(z,L){k.push(z),E&&E(L)}).on("error",function(z){k=[],_(z)}).on("end",function(){try{var z=(function(L,P,q){switch(L){case"blob":return u.newBlob(u.transformTo("arraybuffer",P),q);case"base64":return h.encode(P);default:return u.transformTo(L,P)}})(H,(function(L,P){var q,le=0,ce=null,M=0;for(q=0;q<P.length;q++)M+=P[q].length;switch(L){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(ce=new Uint8Array(M),q=0;q<P.length;q++)ce.set(P[q],le),le+=P[q].length;return ce;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+L+"'")}})(O,k),B);T(z)}catch(L){_(L)}k=[]}).resume()})}function b(C,E,T){var _=E;switch(E){case"blob":case"arraybuffer":_="uint8array";break;case"base64":_="string"}try{this._internalType=_,this._outputType=E,this._mimeType=T,u.checkSupport(_),this._worker=C.pipe(new c(_)),C.lock()}catch(k){this._worker=new d("error"),this._worker.error(k)}}b.prototype={accumulate:function(C){return v(this,C)},on:function(C,E){var T=this;return C==="data"?this._worker.on(C,function(_){E.call(T,_.data,_.meta)}):this._worker.on(C,function(){u.delay(E,arguments,T)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(C){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new g(this,{objectMode:this._outputType!=="nodebuffer"},C)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(i,o,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var u=new ArrayBuffer(0);try{s.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(u),s.blob=c.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!i("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(i,o,s){for(var u=i("./utils"),c=i("./support"),d=i("./nodejsUtils"),h=i("./stream/GenericWorker"),p=new Array(256),y=0;y<256;y++)p[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;p[254]=p[254]=1;function g(){h.call(this,"utf-8 decode"),this.leftOver=null}function v(){h.call(this,"utf-8 encode")}s.utf8encode=function(b){return c.nodebuffer?d.newBufferFrom(b,"utf-8"):(function(C){var E,T,_,k,O,H=C.length,B=0;for(k=0;k<H;k++)(64512&(T=C.charCodeAt(k)))==55296&&k+1<H&&(64512&(_=C.charCodeAt(k+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),k++),B+=T<128?1:T<2048?2:T<65536?3:4;for(E=c.uint8array?new Uint8Array(B):new Array(B),k=O=0;O<B;k++)(64512&(T=C.charCodeAt(k)))==55296&&k+1<H&&(64512&(_=C.charCodeAt(k+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),k++),T<128?E[O++]=T:(T<2048?E[O++]=192|T>>>6:(T<65536?E[O++]=224|T>>>12:(E[O++]=240|T>>>18,E[O++]=128|T>>>12&63),E[O++]=128|T>>>6&63),E[O++]=128|63&T);return E})(b)},s.utf8decode=function(b){return c.nodebuffer?u.transformTo("nodebuffer",b).toString("utf-8"):(function(C){var E,T,_,k,O=C.length,H=new Array(2*O);for(E=T=0;E<O;)if((_=C[E++])<128)H[T++]=_;else if(4<(k=p[_]))H[T++]=65533,E+=k-1;else{for(_&=k===2?31:k===3?15:7;1<k&&E<O;)_=_<<6|63&C[E++],k--;1<k?H[T++]=65533:_<65536?H[T++]=_:(_-=65536,H[T++]=55296|_>>10&1023,H[T++]=56320|1023&_)}return H.length!==T&&(H.subarray?H=H.subarray(0,T):H.length=T),u.applyFromCharCode(H)})(b=u.transformTo(c.uint8array?"uint8array":"array",b))},u.inherits(g,h),g.prototype.processChunk=function(b){var C=u.transformTo(c.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var E=C;(C=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),C.set(E,this.leftOver.length)}else C=this.leftOver.concat(C);this.leftOver=null}var T=(function(k,O){var H;for((O=O||k.length)>k.length&&(O=k.length),H=O-1;0<=H&&(192&k[H])==128;)H--;return H<0||H===0?O:H+p[k[H]]>O?H:O})(C),_=C;T!==C.length&&(c.uint8array?(_=C.subarray(0,T),this.leftOver=C.subarray(T,C.length)):(_=C.slice(0,T),this.leftOver=C.slice(T,C.length))),this.push({data:s.utf8decode(_),meta:b.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=g,u.inherits(v,h),v.prototype.processChunk=function(b){this.push({data:s.utf8encode(b.data),meta:b.meta})},s.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(i,o,s){var u=i("./support"),c=i("./base64"),d=i("./nodejsUtils"),h=i("./external");function p(E){return E}function y(E,T){for(var _=0;_<E.length;++_)T[_]=255&E.charCodeAt(_);return T}i("setimmediate"),s.newBlob=function(E,T){s.checkSupport("blob");try{return new Blob([E],{type:T})}catch{try{var _=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return _.append(E),_.getBlob(T)}catch{throw new Error("Bug : can't construct the Blob.")}}};var g={stringifyByChunk:function(E,T,_){var k=[],O=0,H=E.length;if(H<=_)return String.fromCharCode.apply(null,E);for(;O<H;)T==="array"||T==="nodebuffer"?k.push(String.fromCharCode.apply(null,E.slice(O,Math.min(O+_,H)))):k.push(String.fromCharCode.apply(null,E.subarray(O,Math.min(O+_,H)))),O+=_;return k.join("")},stringifyByChar:function(E){for(var T="",_=0;_<E.length;_++)T+=String.fromCharCode(E[_]);return T},applyCanBeUsed:{uint8array:(function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,d.allocBuffer(1)).length===1}catch{return!1}})()}};function v(E){var T=65536,_=s.getTypeOf(E),k=!0;if(_==="uint8array"?k=g.applyCanBeUsed.uint8array:_==="nodebuffer"&&(k=g.applyCanBeUsed.nodebuffer),k)for(;1<T;)try{return g.stringifyByChunk(E,_,T)}catch{T=Math.floor(T/2)}return g.stringifyByChar(E)}function b(E,T){for(var _=0;_<E.length;_++)T[_]=E[_];return T}s.applyFromCharCode=v;var C={};C.string={string:p,array:function(E){return y(E,new Array(E.length))},arraybuffer:function(E){return C.string.uint8array(E).buffer},uint8array:function(E){return y(E,new Uint8Array(E.length))},nodebuffer:function(E){return y(E,d.allocBuffer(E.length))}},C.array={string:v,array:p,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return d.newBufferFrom(E)}},C.arraybuffer={string:function(E){return v(new Uint8Array(E))},array:function(E){return b(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:p,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return d.newBufferFrom(new Uint8Array(E))}},C.uint8array={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:p,nodebuffer:function(E){return d.newBufferFrom(E)}},C.nodebuffer={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return C.nodebuffer.uint8array(E).buffer},uint8array:function(E){return b(E,new Uint8Array(E.length))},nodebuffer:p},s.transformTo=function(E,T){if(T=T||"",!E)return T;s.checkSupport(E);var _=s.getTypeOf(T);return C[_][E](T)},s.resolve=function(E){for(var T=E.split("/"),_=[],k=0;k<T.length;k++){var O=T[k];O==="."||O===""&&k!==0&&k!==T.length-1||(O===".."?_.pop():_.push(O))}return _.join("/")},s.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&d.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(E){var T,_,k="";for(_=0;_<(E||"").length;_++)k+="\\x"+((T=E.charCodeAt(_))<16?"0":"")+T.toString(16).toUpperCase();return k},s.delay=function(E,T,_){setImmediate(function(){E.apply(_||null,T||[])})},s.inherits=function(E,T){function _(){}_.prototype=T.prototype,E.prototype=new _},s.extend=function(){var E,T,_={};for(E=0;E<arguments.length;E++)for(T in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],T)&&_[T]===void 0&&(_[T]=arguments[E][T]);return _},s.prepareContent=function(E,T,_,k,O){return h.Promise.resolve(T).then(function(H){return u.blob&&(H instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(H))!==-1)&&typeof FileReader<"u"?new h.Promise(function(B,z){var L=new FileReader;L.onload=function(P){B(P.target.result)},L.onerror=function(P){z(P.target.error)},L.readAsArrayBuffer(H)}):H}).then(function(H){var B=s.getTypeOf(H);return B?(B==="arraybuffer"?H=s.transformTo("uint8array",H):B==="string"&&(O?H=c.decode(H):_&&k!==!0&&(H=(function(z){return y(z,u.uint8array?new Uint8Array(z.length):new Array(z.length))})(H))),H):h.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(i,o,s){var u=i("./reader/readerFor"),c=i("./utils"),d=i("./signature"),h=i("./zipEntry"),p=i("./support");function y(g){this.files=[],this.loadOptions=g}y.prototype={checkSignature:function(g){if(!this.reader.readAndCheckSignature(g)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(v)+", expected "+c.pretty(g)+")")}},isSignature:function(g,v){var b=this.reader.index;this.reader.setIndex(g);var C=this.reader.readString(4)===v;return this.reader.setIndex(b),C},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var g=this.reader.readData(this.zipCommentLength),v=p.uint8array?"uint8array":"array",b=c.transformTo(v,g);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var g,v,b,C=this.zip64EndOfCentralSize-44;0<C;)g=this.reader.readInt(2),v=this.reader.readInt(4),b=this.reader.readData(v),this.zip64ExtensibleData[g]={id:g,length:v,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var g,v;for(g=0;g<this.files.length;g++)v=this.files[g],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(d.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var g;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(d.CENTRAL_FILE_HEADER);)(g=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(g);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var g=this.reader.lastIndexOfSignature(d.CENTRAL_DIRECTORY_END);if(g<0)throw this.isSignature(0,d.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(g);var v=g;if(this.checkSignature(d.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(g=this.reader.lastIndexOfSignature(d.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(g),this.checkSignature(d.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,d.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(d.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(d.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var C=v-b;if(0<C)this.isSignature(v,d.CENTRAL_FILE_HEADER)||(this.reader.zero=C);else if(C<0)throw new Error("Corrupted zip: missing "+Math.abs(C)+" bytes.")},prepareReader:function(g){this.reader=u(g)},load:function(g){this.prepareReader(g),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=y},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(i,o,s){var u=i("./reader/readerFor"),c=i("./utils"),d=i("./compressedObject"),h=i("./crc32"),p=i("./utf8"),y=i("./compressions"),g=i("./support");function v(b,C){this.options=b,this.loadOptions=C}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var C,E;if(b.skip(22),this.fileNameLength=b.readInt(2),E=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((C=(function(T){for(var _ in y)if(Object.prototype.hasOwnProperty.call(y,_)&&y[_].magic===T)return y[_];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new d(this.compressedSize,this.uncompressedSize,this.crc32,C,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var C=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(C),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=u(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var C,E,T,_=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<_;)C=b.readInt(2),E=b.readInt(2),T=b.readData(E),this.extraFields[C]={id:C,length:E,value:T};b.setIndex(_)},handleUTF8:function(){var b=g.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=p.utf8decode(this.fileName),this.fileCommentStr=p.utf8decode(this.fileComment);else{var C=this.findExtraFieldUnicodePath();if(C!==null)this.fileNameStr=C;else{var E=c.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var T=this.findExtraFieldUnicodeComment();if(T!==null)this.fileCommentStr=T;else{var _=c.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var C=u(b.value);return C.readInt(1)!==1||h(this.fileName)!==C.readInt(4)?null:p.utf8decode(C.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var C=u(b.value);return C.readInt(1)!==1||h(this.fileComment)!==C.readInt(4)?null:p.utf8decode(C.readData(b.length-5))}return null}},o.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(i,o,s){function u(C,E,T){this.name=C,this.dir=T.dir,this.date=T.date,this.comment=T.comment,this.unixPermissions=T.unixPermissions,this.dosPermissions=T.dosPermissions,this._data=E,this._dataBinary=T.binary,this.options={compression:T.compression,compressionOptions:T.compressionOptions}}var c=i("./stream/StreamHelper"),d=i("./stream/DataWorker"),h=i("./utf8"),p=i("./compressedObject"),y=i("./stream/GenericWorker");u.prototype={internalStream:function(C){var E=null,T="string";try{if(!C)throw new Error("No output type specified.");var _=(T=C.toLowerCase())==="string"||T==="text";T!=="binarystring"&&T!=="text"||(T="string"),E=this._decompressWorker();var k=!this._dataBinary;k&&!_&&(E=E.pipe(new h.Utf8EncodeWorker)),!k&&_&&(E=E.pipe(new h.Utf8DecodeWorker))}catch(O){(E=new y("error")).error(O)}return new c(E,T,"")},async:function(C,E){return this.internalStream(C).accumulate(E)},nodeStream:function(C,E){return this.internalStream(C||"nodebuffer").toNodejsStream(E)},_compressWorker:function(C,E){if(this._data instanceof p&&this._data.compression.magic===C.magic)return this._data.getCompressedWorker();var T=this._decompressWorker();return this._dataBinary||(T=T.pipe(new h.Utf8EncodeWorker)),p.createWorkerFrom(T,C,E)},_decompressWorker:function(){return this._data instanceof p?this._data.getContentWorker():this._data instanceof y?this._data:new d(this._data)}};for(var g=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<g.length;b++)u.prototype[g[b]]=v;o.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(i,o,s){(function(u){var c,d,h=u.MutationObserver||u.WebKitMutationObserver;if(h){var p=0,y=new h(C),g=u.document.createTextNode("");y.observe(g,{characterData:!0}),c=function(){g.data=p=++p%2}}else if(u.setImmediate||u.MessageChannel===void 0)c="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){C(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(C,0)};else{var v=new u.MessageChannel;v.port1.onmessage=C,c=function(){v.port2.postMessage(0)}}var b=[];function C(){var E,T;d=!0;for(var _=b.length;_;){for(T=b,b=[],E=-1;++E<_;)T[E]();_=b.length}d=!1}o.exports=function(E){b.push(E)!==1||d||c()}}).call(this,typeof xl<"u"?xl:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(i,o,s){var u=i("immediate");function c(){}var d={},h=["REJECTED"],p=["FULFILLED"],y=["PENDING"];function g(_){if(typeof _!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,_!==c&&E(this,_)}function v(_,k,O){this.promise=_,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof O=="function"&&(this.onRejected=O,this.callRejected=this.otherCallRejected)}function b(_,k,O){u(function(){var H;try{H=k(O)}catch(B){return d.reject(_,B)}H===_?d.reject(_,new TypeError("Cannot resolve promise with itself")):d.resolve(_,H)})}function C(_){var k=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof k=="function")return function(){k.apply(_,arguments)}}function E(_,k){var O=!1;function H(L){O||(O=!0,d.reject(_,L))}function B(L){O||(O=!0,d.resolve(_,L))}var z=T(function(){k(B,H)});z.status==="error"&&H(z.value)}function T(_,k){var O={};try{O.value=_(k),O.status="success"}catch(H){O.status="error",O.value=H}return O}(o.exports=g).prototype.finally=function(_){if(typeof _!="function")return this;var k=this.constructor;return this.then(function(O){return k.resolve(_()).then(function(){return O})},function(O){return k.resolve(_()).then(function(){throw O})})},g.prototype.catch=function(_){return this.then(null,_)},g.prototype.then=function(_,k){if(typeof _!="function"&&this.state===p||typeof k!="function"&&this.state===h)return this;var O=new this.constructor(c);return this.state!==y?b(O,this.state===p?_:k,this.outcome):this.queue.push(new v(O,_,k)),O},v.prototype.callFulfilled=function(_){d.resolve(this.promise,_)},v.prototype.otherCallFulfilled=function(_){b(this.promise,this.onFulfilled,_)},v.prototype.callRejected=function(_){d.reject(this.promise,_)},v.prototype.otherCallRejected=function(_){b(this.promise,this.onRejected,_)},d.resolve=function(_,k){var O=T(C,k);if(O.status==="error")return d.reject(_,O.value);var H=O.value;if(H)E(_,H);else{_.state=p,_.outcome=k;for(var B=-1,z=_.queue.length;++B<z;)_.queue[B].callFulfilled(k)}return _},d.reject=function(_,k){_.state=h,_.outcome=k;for(var O=-1,H=_.queue.length;++O<H;)_.queue[O].callRejected(k);return _},g.resolve=function(_){return _ instanceof this?_:d.resolve(new this(c),_)},g.reject=function(_){var k=new this(c);return d.reject(k,_)},g.all=function(_){var k=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=_.length,H=!1;if(!O)return this.resolve([]);for(var B=new Array(O),z=0,L=-1,P=new this(c);++L<O;)q(_[L],L);return P;function q(le,ce){k.resolve(le).then(function(M){B[ce]=M,++z!==O||H||(H=!0,d.resolve(P,B))},function(M){H||(H=!0,d.reject(P,M))})}},g.race=function(_){var k=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=_.length,H=!1;if(!O)return this.resolve([]);for(var B=-1,z=new this(c);++B<O;)L=_[B],k.resolve(L).then(function(P){H||(H=!0,d.resolve(z,P))},function(P){H||(H=!0,d.reject(z,P))});var L;return z}},{immediate:36}],38:[function(i,o,s){var u={};(0,i("./lib/utils/common").assign)(u,i("./lib/deflate"),i("./lib/inflate"),i("./lib/zlib/constants")),o.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(i,o,s){var u=i("./zlib/deflate"),c=i("./utils/common"),d=i("./utils/strings"),h=i("./zlib/messages"),p=i("./zlib/zstream"),y=Object.prototype.toString,g=0,v=-1,b=0,C=8;function E(_){if(!(this instanceof E))return new E(_);this.options=c.assign({level:v,method:C,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},_||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new p,this.strm.avail_out=0;var O=u.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(O!==g)throw new Error(h[O]);if(k.header&&u.deflateSetHeader(this.strm,k.header),k.dictionary){var H;if(H=typeof k.dictionary=="string"?d.string2buf(k.dictionary):y.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(O=u.deflateSetDictionary(this.strm,H))!==g)throw new Error(h[O]);this._dict_set=!0}}function T(_,k){var O=new E(k);if(O.push(_,!0),O.err)throw O.msg||h[O.err];return O.result}E.prototype.push=function(_,k){var O,H,B=this.strm,z=this.options.chunkSize;if(this.ended)return!1;H=k===~~k?k:k===!0?4:0,typeof _=="string"?B.input=d.string2buf(_):y.call(_)==="[object ArrayBuffer]"?B.input=new Uint8Array(_):B.input=_,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new c.Buf8(z),B.next_out=0,B.avail_out=z),(O=u.deflate(B,H))!==1&&O!==g)return this.onEnd(O),!(this.ended=!0);B.avail_out!==0&&(B.avail_in!==0||H!==4&&H!==2)||(this.options.to==="string"?this.onData(d.buf2binstring(c.shrinkBuf(B.output,B.next_out))):this.onData(c.shrinkBuf(B.output,B.next_out)))}while((0<B.avail_in||B.avail_out===0)&&O!==1);return H===4?(O=u.deflateEnd(this.strm),this.onEnd(O),this.ended=!0,O===g):H!==2||(this.onEnd(g),!(B.avail_out=0))},E.prototype.onData=function(_){this.chunks.push(_)},E.prototype.onEnd=function(_){_===g&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},s.Deflate=E,s.deflate=T,s.deflateRaw=function(_,k){return(k=k||{}).raw=!0,T(_,k)},s.gzip=function(_,k){return(k=k||{}).gzip=!0,T(_,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(i,o,s){var u=i("./zlib/inflate"),c=i("./utils/common"),d=i("./utils/strings"),h=i("./zlib/constants"),p=i("./zlib/messages"),y=i("./zlib/zstream"),g=i("./zlib/gzheader"),v=Object.prototype.toString;function b(E){if(!(this instanceof b))return new b(E);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},E||{});var T=this.options;T.raw&&0<=T.windowBits&&T.windowBits<16&&(T.windowBits=-T.windowBits,T.windowBits===0&&(T.windowBits=-15)),!(0<=T.windowBits&&T.windowBits<16)||E&&E.windowBits||(T.windowBits+=32),15<T.windowBits&&T.windowBits<48&&(15&T.windowBits)==0&&(T.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new y,this.strm.avail_out=0;var _=u.inflateInit2(this.strm,T.windowBits);if(_!==h.Z_OK)throw new Error(p[_]);this.header=new g,u.inflateGetHeader(this.strm,this.header)}function C(E,T){var _=new b(T);if(_.push(E,!0),_.err)throw _.msg||p[_.err];return _.result}b.prototype.push=function(E,T){var _,k,O,H,B,z,L=this.strm,P=this.options.chunkSize,q=this.options.dictionary,le=!1;if(this.ended)return!1;k=T===~~T?T:T===!0?h.Z_FINISH:h.Z_NO_FLUSH,typeof E=="string"?L.input=d.binstring2buf(E):v.call(E)==="[object ArrayBuffer]"?L.input=new Uint8Array(E):L.input=E,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new c.Buf8(P),L.next_out=0,L.avail_out=P),(_=u.inflate(L,h.Z_NO_FLUSH))===h.Z_NEED_DICT&&q&&(z=typeof q=="string"?d.string2buf(q):v.call(q)==="[object ArrayBuffer]"?new Uint8Array(q):q,_=u.inflateSetDictionary(this.strm,z)),_===h.Z_BUF_ERROR&&le===!0&&(_=h.Z_OK,le=!1),_!==h.Z_STREAM_END&&_!==h.Z_OK)return this.onEnd(_),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&_!==h.Z_STREAM_END&&(L.avail_in!==0||k!==h.Z_FINISH&&k!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(O=d.utf8border(L.output,L.next_out),H=L.next_out-O,B=d.buf2string(L.output,O),L.next_out=H,L.avail_out=P-H,H&&c.arraySet(L.output,L.output,O,H,0),this.onData(B)):this.onData(c.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(le=!0)}while((0<L.avail_in||L.avail_out===0)&&_!==h.Z_STREAM_END);return _===h.Z_STREAM_END&&(k=h.Z_FINISH),k===h.Z_FINISH?(_=u.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===h.Z_OK):k!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(L.avail_out=0))},b.prototype.onData=function(E){this.chunks.push(E)},b.prototype.onEnd=function(E){E===h.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},s.Inflate=b,s.inflate=C,s.inflateRaw=function(E,T){return(T=T||{}).raw=!0,C(E,T)},s.ungzip=C},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(i,o,s){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(h){for(var p=Array.prototype.slice.call(arguments,1);p.length;){var y=p.shift();if(y){if(typeof y!="object")throw new TypeError(y+"must be non-object");for(var g in y)y.hasOwnProperty(g)&&(h[g]=y[g])}}return h},s.shrinkBuf=function(h,p){return h.length===p?h:h.subarray?h.subarray(0,p):(h.length=p,h)};var c={arraySet:function(h,p,y,g,v){if(p.subarray&&h.subarray)h.set(p.subarray(y,y+g),v);else for(var b=0;b<g;b++)h[v+b]=p[y+b]},flattenChunks:function(h){var p,y,g,v,b,C;for(p=g=0,y=h.length;p<y;p++)g+=h[p].length;for(C=new Uint8Array(g),p=v=0,y=h.length;p<y;p++)b=h[p],C.set(b,v),v+=b.length;return C}},d={arraySet:function(h,p,y,g,v){for(var b=0;b<g;b++)h[v+b]=p[y+b]},flattenChunks:function(h){return[].concat.apply([],h)}};s.setTyped=function(h){h?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,c)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,d))},s.setTyped(u)},{}],42:[function(i,o,s){var u=i("./common"),c=!0,d=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{d=!1}for(var h=new u.Buf8(256),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;function y(g,v){if(v<65537&&(g.subarray&&d||!g.subarray&&c))return String.fromCharCode.apply(null,u.shrinkBuf(g,v));for(var b="",C=0;C<v;C++)b+=String.fromCharCode(g[C]);return b}h[254]=h[254]=1,s.string2buf=function(g){var v,b,C,E,T,_=g.length,k=0;for(E=0;E<_;E++)(64512&(b=g.charCodeAt(E)))==55296&&E+1<_&&(64512&(C=g.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(C-56320),E++),k+=b<128?1:b<2048?2:b<65536?3:4;for(v=new u.Buf8(k),E=T=0;T<k;E++)(64512&(b=g.charCodeAt(E)))==55296&&E+1<_&&(64512&(C=g.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(C-56320),E++),b<128?v[T++]=b:(b<2048?v[T++]=192|b>>>6:(b<65536?v[T++]=224|b>>>12:(v[T++]=240|b>>>18,v[T++]=128|b>>>12&63),v[T++]=128|b>>>6&63),v[T++]=128|63&b);return v},s.buf2binstring=function(g){return y(g,g.length)},s.binstring2buf=function(g){for(var v=new u.Buf8(g.length),b=0,C=v.length;b<C;b++)v[b]=g.charCodeAt(b);return v},s.buf2string=function(g,v){var b,C,E,T,_=v||g.length,k=new Array(2*_);for(b=C=0;b<_;)if((E=g[b++])<128)k[C++]=E;else if(4<(T=h[E]))k[C++]=65533,b+=T-1;else{for(E&=T===2?31:T===3?15:7;1<T&&b<_;)E=E<<6|63&g[b++],T--;1<T?k[C++]=65533:E<65536?k[C++]=E:(E-=65536,k[C++]=55296|E>>10&1023,k[C++]=56320|1023&E)}return y(k,C)},s.utf8border=function(g,v){var b;for((v=v||g.length)>g.length&&(v=g.length),b=v-1;0<=b&&(192&g[b])==128;)b--;return b<0||b===0?v:b+h[g[b]]>v?b:v}},{"./common":41}],43:[function(i,o,s){o.exports=function(u,c,d,h){for(var p=65535&u|0,y=u>>>16&65535|0,g=0;d!==0;){for(d-=g=2e3<d?2e3:d;y=y+(p=p+c[h++]|0)|0,--g;);p%=65521,y%=65521}return p|y<<16|0}},{}],44:[function(i,o,s){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(i,o,s){var u=(function(){for(var c,d=[],h=0;h<256;h++){c=h;for(var p=0;p<8;p++)c=1&c?3988292384^c>>>1:c>>>1;d[h]=c}return d})();o.exports=function(c,d,h,p){var y=u,g=p+h;c^=-1;for(var v=p;v<g;v++)c=c>>>8^y[255&(c^d[v])];return-1^c}},{}],46:[function(i,o,s){var u,c=i("../utils/common"),d=i("./trees"),h=i("./adler32"),p=i("./crc32"),y=i("./messages"),g=0,v=4,b=0,C=-2,E=-1,T=4,_=2,k=8,O=9,H=286,B=30,z=19,L=2*H+1,P=15,q=3,le=258,ce=le+q+1,M=42,$=113,w=1,G=2,V=3,Z=4;function ae(x,me){return x.msg=y[me],me}function se(x){return(x<<1)-(4<x?9:0)}function D(x){for(var me=x.length;0<=--me;)x[me]=0}function A(x){var me=x.state,ue=me.pending;ue>x.avail_out&&(ue=x.avail_out),ue!==0&&(c.arraySet(x.output,me.pending_buf,me.pending_out,ue,x.next_out),x.next_out+=ue,me.pending_out+=ue,x.total_out+=ue,x.avail_out-=ue,me.pending-=ue,me.pending===0&&(me.pending_out=0))}function j(x,me){d._tr_flush_block(x,0<=x.block_start?x.block_start:-1,x.strstart-x.block_start,me),x.block_start=x.strstart,A(x.strm)}function N(x,me){x.pending_buf[x.pending++]=me}function ne(x,me){x.pending_buf[x.pending++]=me>>>8&255,x.pending_buf[x.pending++]=255&me}function fe(x,me){var ue,I,U=x.max_chain_length,Q=x.strstart,be=x.prev_length,Se=x.nice_match,re=x.strstart>x.w_size-ce?x.strstart-(x.w_size-ce):0,_e=x.window,Ce=x.w_mask,xe=x.prev,W=x.strstart+le,ve=_e[Q+be-1],we=_e[Q+be];x.prev_length>=x.good_match&&(U>>=2),Se>x.lookahead&&(Se=x.lookahead);do if(_e[(ue=me)+be]===we&&_e[ue+be-1]===ve&&_e[ue]===_e[Q]&&_e[++ue]===_e[Q+1]){Q+=2,ue++;do;while(_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&_e[++Q]===_e[++ue]&&Q<W);if(I=le-(W-Q),Q=W-le,be<I){if(x.match_start=me,Se<=(be=I))break;ve=_e[Q+be-1],we=_e[Q+be]}}while((me=xe[me&Ce])>re&&--U!=0);return be<=x.lookahead?be:x.lookahead}function ge(x){var me,ue,I,U,Q,be,Se,re,_e,Ce,xe=x.w_size;do{if(U=x.window_size-x.lookahead-x.strstart,x.strstart>=xe+(xe-ce)){for(c.arraySet(x.window,x.window,xe,xe,0),x.match_start-=xe,x.strstart-=xe,x.block_start-=xe,me=ue=x.hash_size;I=x.head[--me],x.head[me]=xe<=I?I-xe:0,--ue;);for(me=ue=xe;I=x.prev[--me],x.prev[me]=xe<=I?I-xe:0,--ue;);U+=xe}if(x.strm.avail_in===0)break;if(be=x.strm,Se=x.window,re=x.strstart+x.lookahead,_e=U,Ce=void 0,Ce=be.avail_in,_e<Ce&&(Ce=_e),ue=Ce===0?0:(be.avail_in-=Ce,c.arraySet(Se,be.input,be.next_in,Ce,re),be.state.wrap===1?be.adler=h(be.adler,Se,Ce,re):be.state.wrap===2&&(be.adler=p(be.adler,Se,Ce,re)),be.next_in+=Ce,be.total_in+=Ce,Ce),x.lookahead+=ue,x.lookahead+x.insert>=q)for(Q=x.strstart-x.insert,x.ins_h=x.window[Q],x.ins_h=(x.ins_h<<x.hash_shift^x.window[Q+1])&x.hash_mask;x.insert&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[Q+q-1])&x.hash_mask,x.prev[Q&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=Q,Q++,x.insert--,!(x.lookahead+x.insert<q)););}while(x.lookahead<ce&&x.strm.avail_in!==0)}function de(x,me){for(var ue,I;;){if(x.lookahead<ce){if(ge(x),x.lookahead<ce&&me===g)return w;if(x.lookahead===0)break}if(ue=0,x.lookahead>=q&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+q-1])&x.hash_mask,ue=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),ue!==0&&x.strstart-ue<=x.w_size-ce&&(x.match_length=fe(x,ue)),x.match_length>=q)if(I=d._tr_tally(x,x.strstart-x.match_start,x.match_length-q),x.lookahead-=x.match_length,x.match_length<=x.max_lazy_match&&x.lookahead>=q){for(x.match_length--;x.strstart++,x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+q-1])&x.hash_mask,ue=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart,--x.match_length!=0;);x.strstart++}else x.strstart+=x.match_length,x.match_length=0,x.ins_h=x.window[x.strstart],x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+1])&x.hash_mask;else I=d._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++;if(I&&(j(x,!1),x.strm.avail_out===0))return w}return x.insert=x.strstart<q-1?x.strstart:q-1,me===v?(j(x,!0),x.strm.avail_out===0?V:Z):x.last_lit&&(j(x,!1),x.strm.avail_out===0)?w:G}function Te(x,me){for(var ue,I,U;;){if(x.lookahead<ce){if(ge(x),x.lookahead<ce&&me===g)return w;if(x.lookahead===0)break}if(ue=0,x.lookahead>=q&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+q-1])&x.hash_mask,ue=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),x.prev_length=x.match_length,x.prev_match=x.match_start,x.match_length=q-1,ue!==0&&x.prev_length<x.max_lazy_match&&x.strstart-ue<=x.w_size-ce&&(x.match_length=fe(x,ue),x.match_length<=5&&(x.strategy===1||x.match_length===q&&4096<x.strstart-x.match_start)&&(x.match_length=q-1)),x.prev_length>=q&&x.match_length<=x.prev_length){for(U=x.strstart+x.lookahead-q,I=d._tr_tally(x,x.strstart-1-x.prev_match,x.prev_length-q),x.lookahead-=x.prev_length-1,x.prev_length-=2;++x.strstart<=U&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+q-1])&x.hash_mask,ue=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),--x.prev_length!=0;);if(x.match_available=0,x.match_length=q-1,x.strstart++,I&&(j(x,!1),x.strm.avail_out===0))return w}else if(x.match_available){if((I=d._tr_tally(x,0,x.window[x.strstart-1]))&&j(x,!1),x.strstart++,x.lookahead--,x.strm.avail_out===0)return w}else x.match_available=1,x.strstart++,x.lookahead--}return x.match_available&&(I=d._tr_tally(x,0,x.window[x.strstart-1]),x.match_available=0),x.insert=x.strstart<q-1?x.strstart:q-1,me===v?(j(x,!0),x.strm.avail_out===0?V:Z):x.last_lit&&(j(x,!1),x.strm.avail_out===0)?w:G}function ke(x,me,ue,I,U){this.good_length=x,this.max_lazy=me,this.nice_length=ue,this.max_chain=I,this.func=U}function Me(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*L),this.dyn_dtree=new c.Buf16(2*(2*B+1)),this.bl_tree=new c.Buf16(2*(2*z+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(P+1),this.heap=new c.Buf16(2*H+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*H+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function De(x){var me;return x&&x.state?(x.total_in=x.total_out=0,x.data_type=_,(me=x.state).pending=0,me.pending_out=0,me.wrap<0&&(me.wrap=-me.wrap),me.status=me.wrap?M:$,x.adler=me.wrap===2?0:1,me.last_flush=g,d._tr_init(me),b):ae(x,C)}function nt(x){var me=De(x);return me===b&&(function(ue){ue.window_size=2*ue.w_size,D(ue.head),ue.max_lazy_match=u[ue.level].max_lazy,ue.good_match=u[ue.level].good_length,ue.nice_match=u[ue.level].nice_length,ue.max_chain_length=u[ue.level].max_chain,ue.strstart=0,ue.block_start=0,ue.lookahead=0,ue.insert=0,ue.match_length=ue.prev_length=q-1,ue.match_available=0,ue.ins_h=0})(x.state),me}function yt(x,me,ue,I,U,Q){if(!x)return C;var be=1;if(me===E&&(me=6),I<0?(be=0,I=-I):15<I&&(be=2,I-=16),U<1||O<U||ue!==k||I<8||15<I||me<0||9<me||Q<0||T<Q)return ae(x,C);I===8&&(I=9);var Se=new Me;return(x.state=Se).strm=x,Se.wrap=be,Se.gzhead=null,Se.w_bits=I,Se.w_size=1<<Se.w_bits,Se.w_mask=Se.w_size-1,Se.hash_bits=U+7,Se.hash_size=1<<Se.hash_bits,Se.hash_mask=Se.hash_size-1,Se.hash_shift=~~((Se.hash_bits+q-1)/q),Se.window=new c.Buf8(2*Se.w_size),Se.head=new c.Buf16(Se.hash_size),Se.prev=new c.Buf16(Se.w_size),Se.lit_bufsize=1<<U+6,Se.pending_buf_size=4*Se.lit_bufsize,Se.pending_buf=new c.Buf8(Se.pending_buf_size),Se.d_buf=1*Se.lit_bufsize,Se.l_buf=3*Se.lit_bufsize,Se.level=me,Se.strategy=Q,Se.method=ue,nt(x)}u=[new ke(0,0,0,0,function(x,me){var ue=65535;for(ue>x.pending_buf_size-5&&(ue=x.pending_buf_size-5);;){if(x.lookahead<=1){if(ge(x),x.lookahead===0&&me===g)return w;if(x.lookahead===0)break}x.strstart+=x.lookahead,x.lookahead=0;var I=x.block_start+ue;if((x.strstart===0||x.strstart>=I)&&(x.lookahead=x.strstart-I,x.strstart=I,j(x,!1),x.strm.avail_out===0)||x.strstart-x.block_start>=x.w_size-ce&&(j(x,!1),x.strm.avail_out===0))return w}return x.insert=0,me===v?(j(x,!0),x.strm.avail_out===0?V:Z):(x.strstart>x.block_start&&(j(x,!1),x.strm.avail_out),w)}),new ke(4,4,8,4,de),new ke(4,5,16,8,de),new ke(4,6,32,32,de),new ke(4,4,16,16,Te),new ke(8,16,32,32,Te),new ke(8,16,128,128,Te),new ke(8,32,128,256,Te),new ke(32,128,258,1024,Te),new ke(32,258,258,4096,Te)],s.deflateInit=function(x,me){return yt(x,me,k,15,8,0)},s.deflateInit2=yt,s.deflateReset=nt,s.deflateResetKeep=De,s.deflateSetHeader=function(x,me){return x&&x.state?x.state.wrap!==2?C:(x.state.gzhead=me,b):C},s.deflate=function(x,me){var ue,I,U,Q;if(!x||!x.state||5<me||me<0)return x?ae(x,C):C;if(I=x.state,!x.output||!x.input&&x.avail_in!==0||I.status===666&&me!==v)return ae(x,x.avail_out===0?-5:C);if(I.strm=x,ue=I.last_flush,I.last_flush=me,I.status===M)if(I.wrap===2)x.adler=0,N(I,31),N(I,139),N(I,8),I.gzhead?(N(I,(I.gzhead.text?1:0)+(I.gzhead.hcrc?2:0)+(I.gzhead.extra?4:0)+(I.gzhead.name?8:0)+(I.gzhead.comment?16:0)),N(I,255&I.gzhead.time),N(I,I.gzhead.time>>8&255),N(I,I.gzhead.time>>16&255),N(I,I.gzhead.time>>24&255),N(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),N(I,255&I.gzhead.os),I.gzhead.extra&&I.gzhead.extra.length&&(N(I,255&I.gzhead.extra.length),N(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(x.adler=p(x.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=69):(N(I,0),N(I,0),N(I,0),N(I,0),N(I,0),N(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),N(I,3),I.status=$);else{var be=k+(I.w_bits-8<<4)<<8;be|=(2<=I.strategy||I.level<2?0:I.level<6?1:I.level===6?2:3)<<6,I.strstart!==0&&(be|=32),be+=31-be%31,I.status=$,ne(I,be),I.strstart!==0&&(ne(I,x.adler>>>16),ne(I,65535&x.adler)),x.adler=1}if(I.status===69)if(I.gzhead.extra){for(U=I.pending;I.gzindex<(65535&I.gzhead.extra.length)&&(I.pending!==I.pending_buf_size||(I.gzhead.hcrc&&I.pending>U&&(x.adler=p(x.adler,I.pending_buf,I.pending-U,U)),A(x),U=I.pending,I.pending!==I.pending_buf_size));)N(I,255&I.gzhead.extra[I.gzindex]),I.gzindex++;I.gzhead.hcrc&&I.pending>U&&(x.adler=p(x.adler,I.pending_buf,I.pending-U,U)),I.gzindex===I.gzhead.extra.length&&(I.gzindex=0,I.status=73)}else I.status=73;if(I.status===73)if(I.gzhead.name){U=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>U&&(x.adler=p(x.adler,I.pending_buf,I.pending-U,U)),A(x),U=I.pending,I.pending===I.pending_buf_size)){Q=1;break}Q=I.gzindex<I.gzhead.name.length?255&I.gzhead.name.charCodeAt(I.gzindex++):0,N(I,Q)}while(Q!==0);I.gzhead.hcrc&&I.pending>U&&(x.adler=p(x.adler,I.pending_buf,I.pending-U,U)),Q===0&&(I.gzindex=0,I.status=91)}else I.status=91;if(I.status===91)if(I.gzhead.comment){U=I.pending;do{if(I.pending===I.pending_buf_size&&(I.gzhead.hcrc&&I.pending>U&&(x.adler=p(x.adler,I.pending_buf,I.pending-U,U)),A(x),U=I.pending,I.pending===I.pending_buf_size)){Q=1;break}Q=I.gzindex<I.gzhead.comment.length?255&I.gzhead.comment.charCodeAt(I.gzindex++):0,N(I,Q)}while(Q!==0);I.gzhead.hcrc&&I.pending>U&&(x.adler=p(x.adler,I.pending_buf,I.pending-U,U)),Q===0&&(I.status=103)}else I.status=103;if(I.status===103&&(I.gzhead.hcrc?(I.pending+2>I.pending_buf_size&&A(x),I.pending+2<=I.pending_buf_size&&(N(I,255&x.adler),N(I,x.adler>>8&255),x.adler=0,I.status=$)):I.status=$),I.pending!==0){if(A(x),x.avail_out===0)return I.last_flush=-1,b}else if(x.avail_in===0&&se(me)<=se(ue)&&me!==v)return ae(x,-5);if(I.status===666&&x.avail_in!==0)return ae(x,-5);if(x.avail_in!==0||I.lookahead!==0||me!==g&&I.status!==666){var Se=I.strategy===2?(function(re,_e){for(var Ce;;){if(re.lookahead===0&&(ge(re),re.lookahead===0)){if(_e===g)return w;break}if(re.match_length=0,Ce=d._tr_tally(re,0,re.window[re.strstart]),re.lookahead--,re.strstart++,Ce&&(j(re,!1),re.strm.avail_out===0))return w}return re.insert=0,_e===v?(j(re,!0),re.strm.avail_out===0?V:Z):re.last_lit&&(j(re,!1),re.strm.avail_out===0)?w:G})(I,me):I.strategy===3?(function(re,_e){for(var Ce,xe,W,ve,we=re.window;;){if(re.lookahead<=le){if(ge(re),re.lookahead<=le&&_e===g)return w;if(re.lookahead===0)break}if(re.match_length=0,re.lookahead>=q&&0<re.strstart&&(xe=we[W=re.strstart-1])===we[++W]&&xe===we[++W]&&xe===we[++W]){ve=re.strstart+le;do;while(xe===we[++W]&&xe===we[++W]&&xe===we[++W]&&xe===we[++W]&&xe===we[++W]&&xe===we[++W]&&xe===we[++W]&&xe===we[++W]&&W<ve);re.match_length=le-(ve-W),re.match_length>re.lookahead&&(re.match_length=re.lookahead)}if(re.match_length>=q?(Ce=d._tr_tally(re,1,re.match_length-q),re.lookahead-=re.match_length,re.strstart+=re.match_length,re.match_length=0):(Ce=d._tr_tally(re,0,re.window[re.strstart]),re.lookahead--,re.strstart++),Ce&&(j(re,!1),re.strm.avail_out===0))return w}return re.insert=0,_e===v?(j(re,!0),re.strm.avail_out===0?V:Z):re.last_lit&&(j(re,!1),re.strm.avail_out===0)?w:G})(I,me):u[I.level].func(I,me);if(Se!==V&&Se!==Z||(I.status=666),Se===w||Se===V)return x.avail_out===0&&(I.last_flush=-1),b;if(Se===G&&(me===1?d._tr_align(I):me!==5&&(d._tr_stored_block(I,0,0,!1),me===3&&(D(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),A(x),x.avail_out===0))return I.last_flush=-1,b}return me!==v?b:I.wrap<=0?1:(I.wrap===2?(N(I,255&x.adler),N(I,x.adler>>8&255),N(I,x.adler>>16&255),N(I,x.adler>>24&255),N(I,255&x.total_in),N(I,x.total_in>>8&255),N(I,x.total_in>>16&255),N(I,x.total_in>>24&255)):(ne(I,x.adler>>>16),ne(I,65535&x.adler)),A(x),0<I.wrap&&(I.wrap=-I.wrap),I.pending!==0?b:1)},s.deflateEnd=function(x){var me;return x&&x.state?(me=x.state.status)!==M&&me!==69&&me!==73&&me!==91&&me!==103&&me!==$&&me!==666?ae(x,C):(x.state=null,me===$?ae(x,-3):b):C},s.deflateSetDictionary=function(x,me){var ue,I,U,Q,be,Se,re,_e,Ce=me.length;if(!x||!x.state||(Q=(ue=x.state).wrap)===2||Q===1&&ue.status!==M||ue.lookahead)return C;for(Q===1&&(x.adler=h(x.adler,me,Ce,0)),ue.wrap=0,Ce>=ue.w_size&&(Q===0&&(D(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),_e=new c.Buf8(ue.w_size),c.arraySet(_e,me,Ce-ue.w_size,ue.w_size,0),me=_e,Ce=ue.w_size),be=x.avail_in,Se=x.next_in,re=x.input,x.avail_in=Ce,x.next_in=0,x.input=me,ge(ue);ue.lookahead>=q;){for(I=ue.strstart,U=ue.lookahead-(q-1);ue.ins_h=(ue.ins_h<<ue.hash_shift^ue.window[I+q-1])&ue.hash_mask,ue.prev[I&ue.w_mask]=ue.head[ue.ins_h],ue.head[ue.ins_h]=I,I++,--U;);ue.strstart=I,ue.lookahead=q-1,ge(ue)}return ue.strstart+=ue.lookahead,ue.block_start=ue.strstart,ue.insert=ue.lookahead,ue.lookahead=0,ue.match_length=ue.prev_length=q-1,ue.match_available=0,x.next_in=Se,x.input=re,x.avail_in=be,ue.wrap=Q,b},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(i,o,s){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(i,o,s){o.exports=function(u,c){var d,h,p,y,g,v,b,C,E,T,_,k,O,H,B,z,L,P,q,le,ce,M,$,w,G;d=u.state,h=u.next_in,w=u.input,p=h+(u.avail_in-5),y=u.next_out,G=u.output,g=y-(c-u.avail_out),v=y+(u.avail_out-257),b=d.dmax,C=d.wsize,E=d.whave,T=d.wnext,_=d.window,k=d.hold,O=d.bits,H=d.lencode,B=d.distcode,z=(1<<d.lenbits)-1,L=(1<<d.distbits)-1;e:do{O<15&&(k+=w[h++]<<O,O+=8,k+=w[h++]<<O,O+=8),P=H[k&z];t:for(;;){if(k>>>=q=P>>>24,O-=q,(q=P>>>16&255)===0)G[y++]=65535&P;else{if(!(16&q)){if((64&q)==0){P=H[(65535&P)+(k&(1<<q)-1)];continue t}if(32&q){d.mode=12;break e}u.msg="invalid literal/length code",d.mode=30;break e}le=65535&P,(q&=15)&&(O<q&&(k+=w[h++]<<O,O+=8),le+=k&(1<<q)-1,k>>>=q,O-=q),O<15&&(k+=w[h++]<<O,O+=8,k+=w[h++]<<O,O+=8),P=B[k&L];n:for(;;){if(k>>>=q=P>>>24,O-=q,!(16&(q=P>>>16&255))){if((64&q)==0){P=B[(65535&P)+(k&(1<<q)-1)];continue n}u.msg="invalid distance code",d.mode=30;break e}if(ce=65535&P,O<(q&=15)&&(k+=w[h++]<<O,(O+=8)<q&&(k+=w[h++]<<O,O+=8)),b<(ce+=k&(1<<q)-1)){u.msg="invalid distance too far back",d.mode=30;break e}if(k>>>=q,O-=q,(q=y-g)<ce){if(E<(q=ce-q)&&d.sane){u.msg="invalid distance too far back",d.mode=30;break e}if($=_,(M=0)===T){if(M+=C-q,q<le){for(le-=q;G[y++]=_[M++],--q;);M=y-ce,$=G}}else if(T<q){if(M+=C+T-q,(q-=T)<le){for(le-=q;G[y++]=_[M++],--q;);if(M=0,T<le){for(le-=q=T;G[y++]=_[M++],--q;);M=y-ce,$=G}}}else if(M+=T-q,q<le){for(le-=q;G[y++]=_[M++],--q;);M=y-ce,$=G}for(;2<le;)G[y++]=$[M++],G[y++]=$[M++],G[y++]=$[M++],le-=3;le&&(G[y++]=$[M++],1<le&&(G[y++]=$[M++]))}else{for(M=y-ce;G[y++]=G[M++],G[y++]=G[M++],G[y++]=G[M++],2<(le-=3););le&&(G[y++]=G[M++],1<le&&(G[y++]=G[M++]))}break}}break}}while(h<p&&y<v);h-=le=O>>3,k&=(1<<(O-=le<<3))-1,u.next_in=h,u.next_out=y,u.avail_in=h<p?p-h+5:5-(h-p),u.avail_out=y<v?v-y+257:257-(y-v),d.hold=k,d.bits=O}},{}],49:[function(i,o,s){var u=i("../utils/common"),c=i("./adler32"),d=i("./crc32"),h=i("./inffast"),p=i("./inftrees"),y=1,g=2,v=0,b=-2,C=1,E=852,T=592;function _(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function O(M){var $;return M&&M.state?($=M.state,M.total_in=M.total_out=$.total=0,M.msg="",$.wrap&&(M.adler=1&$.wrap),$.mode=C,$.last=0,$.havedict=0,$.dmax=32768,$.head=null,$.hold=0,$.bits=0,$.lencode=$.lendyn=new u.Buf32(E),$.distcode=$.distdyn=new u.Buf32(T),$.sane=1,$.back=-1,v):b}function H(M){var $;return M&&M.state?(($=M.state).wsize=0,$.whave=0,$.wnext=0,O(M)):b}function B(M,$){var w,G;return M&&M.state?(G=M.state,$<0?(w=0,$=-$):(w=1+($>>4),$<48&&($&=15)),$&&($<8||15<$)?b:(G.window!==null&&G.wbits!==$&&(G.window=null),G.wrap=w,G.wbits=$,H(M))):b}function z(M,$){var w,G;return M?(G=new k,(M.state=G).window=null,(w=B(M,$))!==v&&(M.state=null),w):b}var L,P,q=!0;function le(M){if(q){var $;for(L=new u.Buf32(512),P=new u.Buf32(32),$=0;$<144;)M.lens[$++]=8;for(;$<256;)M.lens[$++]=9;for(;$<280;)M.lens[$++]=7;for(;$<288;)M.lens[$++]=8;for(p(y,M.lens,0,288,L,0,M.work,{bits:9}),$=0;$<32;)M.lens[$++]=5;p(g,M.lens,0,32,P,0,M.work,{bits:5}),q=!1}M.lencode=L,M.lenbits=9,M.distcode=P,M.distbits=5}function ce(M,$,w,G){var V,Z=M.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new u.Buf8(Z.wsize)),G>=Z.wsize?(u.arraySet(Z.window,$,w-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):(G<(V=Z.wsize-Z.wnext)&&(V=G),u.arraySet(Z.window,$,w-G,V,Z.wnext),(G-=V)?(u.arraySet(Z.window,$,w-G,G,0),Z.wnext=G,Z.whave=Z.wsize):(Z.wnext+=V,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=V))),0}s.inflateReset=H,s.inflateReset2=B,s.inflateResetKeep=O,s.inflateInit=function(M){return z(M,15)},s.inflateInit2=z,s.inflate=function(M,$){var w,G,V,Z,ae,se,D,A,j,N,ne,fe,ge,de,Te,ke,Me,De,nt,yt,x,me,ue,I,U=0,Q=new u.Buf8(4),be=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return b;(w=M.state).mode===12&&(w.mode=13),ae=M.next_out,V=M.output,D=M.avail_out,Z=M.next_in,G=M.input,se=M.avail_in,A=w.hold,j=w.bits,N=se,ne=D,me=v;e:for(;;)switch(w.mode){case C:if(w.wrap===0){w.mode=13;break}for(;j<16;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(2&w.wrap&&A===35615){Q[w.check=0]=255&A,Q[1]=A>>>8&255,w.check=d(w.check,Q,2,0),j=A=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&A)<<8)+(A>>8))%31){M.msg="incorrect header check",w.mode=30;break}if((15&A)!=8){M.msg="unknown compression method",w.mode=30;break}if(j-=4,x=8+(15&(A>>>=4)),w.wbits===0)w.wbits=x;else if(x>w.wbits){M.msg="invalid window size",w.mode=30;break}w.dmax=1<<x,M.adler=w.check=1,w.mode=512&A?10:12,j=A=0;break;case 2:for(;j<16;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(w.flags=A,(255&w.flags)!=8){M.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){M.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=A>>8&1),512&w.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,w.check=d(w.check,Q,2,0)),j=A=0,w.mode=3;case 3:for(;j<32;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}w.head&&(w.head.time=A),512&w.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,w.check=d(w.check,Q,4,0)),j=A=0,w.mode=4;case 4:for(;j<16;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}w.head&&(w.head.xflags=255&A,w.head.os=A>>8),512&w.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,w.check=d(w.check,Q,2,0)),j=A=0,w.mode=5;case 5:if(1024&w.flags){for(;j<16;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}w.length=A,w.head&&(w.head.extra_len=A),512&w.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,w.check=d(w.check,Q,2,0)),j=A=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(se<(fe=w.length)&&(fe=se),fe&&(w.head&&(x=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),u.arraySet(w.head.extra,G,Z,fe,x)),512&w.flags&&(w.check=d(w.check,G,fe,Z)),se-=fe,Z+=fe,w.length-=fe),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(se===0)break e;for(fe=0;x=G[Z+fe++],w.head&&x&&w.length<65536&&(w.head.name+=String.fromCharCode(x)),x&&fe<se;);if(512&w.flags&&(w.check=d(w.check,G,fe,Z)),se-=fe,Z+=fe,x)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(se===0)break e;for(fe=0;x=G[Z+fe++],w.head&&x&&w.length<65536&&(w.head.comment+=String.fromCharCode(x)),x&&fe<se;);if(512&w.flags&&(w.check=d(w.check,G,fe,Z)),se-=fe,Z+=fe,x)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;j<16;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(A!==(65535&w.check)){M.msg="header crc mismatch",w.mode=30;break}j=A=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),M.adler=w.check=0,w.mode=12;break;case 10:for(;j<32;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}M.adler=w.check=_(A),j=A=0,w.mode=11;case 11:if(w.havedict===0)return M.next_out=ae,M.avail_out=D,M.next_in=Z,M.avail_in=se,w.hold=A,w.bits=j,2;M.adler=w.check=1,w.mode=12;case 12:if($===5||$===6)break e;case 13:if(w.last){A>>>=7&j,j-=7&j,w.mode=27;break}for(;j<3;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}switch(w.last=1&A,j-=1,3&(A>>>=1)){case 0:w.mode=14;break;case 1:if(le(w),w.mode=20,$!==6)break;A>>>=2,j-=2;break e;case 2:w.mode=17;break;case 3:M.msg="invalid block type",w.mode=30}A>>>=2,j-=2;break;case 14:for(A>>>=7&j,j-=7&j;j<32;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if((65535&A)!=(A>>>16^65535)){M.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&A,j=A=0,w.mode=15,$===6)break e;case 15:w.mode=16;case 16:if(fe=w.length){if(se<fe&&(fe=se),D<fe&&(fe=D),fe===0)break e;u.arraySet(V,G,Z,fe,ae),se-=fe,Z+=fe,D-=fe,ae+=fe,w.length-=fe;break}w.mode=12;break;case 17:for(;j<14;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(w.nlen=257+(31&A),A>>>=5,j-=5,w.ndist=1+(31&A),A>>>=5,j-=5,w.ncode=4+(15&A),A>>>=4,j-=4,286<w.nlen||30<w.ndist){M.msg="too many length or distance symbols",w.mode=30;break}w.have=0,w.mode=18;case 18:for(;w.have<w.ncode;){for(;j<3;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}w.lens[be[w.have++]]=7&A,A>>>=3,j-=3}for(;w.have<19;)w.lens[be[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,ue={bits:w.lenbits},me=p(0,w.lens,0,19,w.lencode,0,w.work,ue),w.lenbits=ue.bits,me){M.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have<w.nlen+w.ndist;){for(;ke=(U=w.lencode[A&(1<<w.lenbits)-1])>>>16&255,Me=65535&U,!((Te=U>>>24)<=j);){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(Me<16)A>>>=Te,j-=Te,w.lens[w.have++]=Me;else{if(Me===16){for(I=Te+2;j<I;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(A>>>=Te,j-=Te,w.have===0){M.msg="invalid bit length repeat",w.mode=30;break}x=w.lens[w.have-1],fe=3+(3&A),A>>>=2,j-=2}else if(Me===17){for(I=Te+3;j<I;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}j-=Te,x=0,fe=3+(7&(A>>>=Te)),A>>>=3,j-=3}else{for(I=Te+7;j<I;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}j-=Te,x=0,fe=11+(127&(A>>>=Te)),A>>>=7,j-=7}if(w.have+fe>w.nlen+w.ndist){M.msg="invalid bit length repeat",w.mode=30;break}for(;fe--;)w.lens[w.have++]=x}}if(w.mode===30)break;if(w.lens[256]===0){M.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,ue={bits:w.lenbits},me=p(y,w.lens,0,w.nlen,w.lencode,0,w.work,ue),w.lenbits=ue.bits,me){M.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,ue={bits:w.distbits},me=p(g,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,ue),w.distbits=ue.bits,me){M.msg="invalid distances set",w.mode=30;break}if(w.mode=20,$===6)break e;case 20:w.mode=21;case 21:if(6<=se&&258<=D){M.next_out=ae,M.avail_out=D,M.next_in=Z,M.avail_in=se,w.hold=A,w.bits=j,h(M,ne),ae=M.next_out,V=M.output,D=M.avail_out,Z=M.next_in,G=M.input,se=M.avail_in,A=w.hold,j=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;ke=(U=w.lencode[A&(1<<w.lenbits)-1])>>>16&255,Me=65535&U,!((Te=U>>>24)<=j);){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(ke&&(240&ke)==0){for(De=Te,nt=ke,yt=Me;ke=(U=w.lencode[yt+((A&(1<<De+nt)-1)>>De)])>>>16&255,Me=65535&U,!(De+(Te=U>>>24)<=j);){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}A>>>=De,j-=De,w.back+=De}if(A>>>=Te,j-=Te,w.back+=Te,w.length=Me,ke===0){w.mode=26;break}if(32&ke){w.back=-1,w.mode=12;break}if(64&ke){M.msg="invalid literal/length code",w.mode=30;break}w.extra=15&ke,w.mode=22;case 22:if(w.extra){for(I=w.extra;j<I;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}w.length+=A&(1<<w.extra)-1,A>>>=w.extra,j-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;ke=(U=w.distcode[A&(1<<w.distbits)-1])>>>16&255,Me=65535&U,!((Te=U>>>24)<=j);){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if((240&ke)==0){for(De=Te,nt=ke,yt=Me;ke=(U=w.distcode[yt+((A&(1<<De+nt)-1)>>De)])>>>16&255,Me=65535&U,!(De+(Te=U>>>24)<=j);){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}A>>>=De,j-=De,w.back+=De}if(A>>>=Te,j-=Te,w.back+=Te,64&ke){M.msg="invalid distance code",w.mode=30;break}w.offset=Me,w.extra=15&ke,w.mode=24;case 24:if(w.extra){for(I=w.extra;j<I;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}w.offset+=A&(1<<w.extra)-1,A>>>=w.extra,j-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){M.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(D===0)break e;if(fe=ne-D,w.offset>fe){if((fe=w.offset-fe)>w.whave&&w.sane){M.msg="invalid distance too far back",w.mode=30;break}ge=fe>w.wnext?(fe-=w.wnext,w.wsize-fe):w.wnext-fe,fe>w.length&&(fe=w.length),de=w.window}else de=V,ge=ae-w.offset,fe=w.length;for(D<fe&&(fe=D),D-=fe,w.length-=fe;V[ae++]=de[ge++],--fe;);w.length===0&&(w.mode=21);break;case 26:if(D===0)break e;V[ae++]=w.length,D--,w.mode=21;break;case 27:if(w.wrap){for(;j<32;){if(se===0)break e;se--,A|=G[Z++]<<j,j+=8}if(ne-=D,M.total_out+=ne,w.total+=ne,ne&&(M.adler=w.check=w.flags?d(w.check,V,ne,ae-ne):c(w.check,V,ne,ae-ne)),ne=D,(w.flags?A:_(A))!==w.check){M.msg="incorrect data check",w.mode=30;break}j=A=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;j<32;){if(se===0)break e;se--,A+=G[Z++]<<j,j+=8}if(A!==(4294967295&w.total)){M.msg="incorrect length check",w.mode=30;break}j=A=0}w.mode=29;case 29:me=1;break e;case 30:me=-3;break e;case 31:return-4;case 32:default:return b}return M.next_out=ae,M.avail_out=D,M.next_in=Z,M.avail_in=se,w.hold=A,w.bits=j,(w.wsize||ne!==M.avail_out&&w.mode<30&&(w.mode<27||$!==4))&&ce(M,M.output,M.next_out,ne-M.avail_out)?(w.mode=31,-4):(N-=M.avail_in,ne-=M.avail_out,M.total_in+=N,M.total_out+=ne,w.total+=ne,w.wrap&&ne&&(M.adler=w.check=w.flags?d(w.check,V,ne,M.next_out-ne):c(w.check,V,ne,M.next_out-ne)),M.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(N==0&&ne===0||$===4)&&me===v&&(me=-5),me)},s.inflateEnd=function(M){if(!M||!M.state)return b;var $=M.state;return $.window&&($.window=null),M.state=null,v},s.inflateGetHeader=function(M,$){var w;return M&&M.state?(2&(w=M.state).wrap)==0?b:((w.head=$).done=!1,v):b},s.inflateSetDictionary=function(M,$){var w,G=$.length;return M&&M.state?(w=M.state).wrap!==0&&w.mode!==11?b:w.mode===11&&c(1,$,G,0)!==w.check?-3:ce(M,$,G,G)?(w.mode=31,-4):(w.havedict=1,v):b},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(i,o,s){var u=i("../utils/common"),c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(y,g,v,b,C,E,T,_){var k,O,H,B,z,L,P,q,le,ce=_.bits,M=0,$=0,w=0,G=0,V=0,Z=0,ae=0,se=0,D=0,A=0,j=null,N=0,ne=new u.Buf16(16),fe=new u.Buf16(16),ge=null,de=0;for(M=0;M<=15;M++)ne[M]=0;for($=0;$<b;$++)ne[g[v+$]]++;for(V=ce,G=15;1<=G&&ne[G]===0;G--);if(G<V&&(V=G),G===0)return C[E++]=20971520,C[E++]=20971520,_.bits=1,0;for(w=1;w<G&&ne[w]===0;w++);for(V<w&&(V=w),M=se=1;M<=15;M++)if(se<<=1,(se-=ne[M])<0)return-1;if(0<se&&(y===0||G!==1))return-1;for(fe[1]=0,M=1;M<15;M++)fe[M+1]=fe[M]+ne[M];for($=0;$<b;$++)g[v+$]!==0&&(T[fe[g[v+$]]++]=$);if(L=y===0?(j=ge=T,19):y===1?(j=c,N-=257,ge=d,de-=257,256):(j=h,ge=p,-1),M=w,z=E,ae=$=A=0,H=-1,B=(D=1<<(Z=V))-1,y===1&&852<D||y===2&&592<D)return 1;for(;;){for(P=M-ae,le=T[$]<L?(q=0,T[$]):T[$]>L?(q=ge[de+T[$]],j[N+T[$]]):(q=96,0),k=1<<M-ae,w=O=1<<Z;C[z+(A>>ae)+(O-=k)]=P<<24|q<<16|le|0,O!==0;);for(k=1<<M-1;A&k;)k>>=1;if(k!==0?(A&=k-1,A+=k):A=0,$++,--ne[M]==0){if(M===G)break;M=g[v+T[$]]}if(V<M&&(A&B)!==H){for(ae===0&&(ae=V),z+=w,se=1<<(Z=M-ae);Z+ae<G&&!((se-=ne[Z+ae])<=0);)Z++,se<<=1;if(D+=1<<Z,y===1&&852<D||y===2&&592<D)return 1;C[H=A&B]=V<<24|Z<<16|z-E|0}}return A!==0&&(C[z+A]=M-ae<<24|4194304|0),_.bits=V,0}},{"../utils/common":41}],51:[function(i,o,s){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(i,o,s){var u=i("../utils/common"),c=0,d=1;function h(U){for(var Q=U.length;0<=--Q;)U[Q]=0}var p=0,y=29,g=256,v=g+1+y,b=30,C=19,E=2*v+1,T=15,_=16,k=7,O=256,H=16,B=17,z=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ce=new Array(2*(v+2));h(ce);var M=new Array(2*b);h(M);var $=new Array(512);h($);var w=new Array(256);h(w);var G=new Array(y);h(G);var V,Z,ae,se=new Array(b);function D(U,Q,be,Se,re){this.static_tree=U,this.extra_bits=Q,this.extra_base=be,this.elems=Se,this.max_length=re,this.has_stree=U&&U.length}function A(U,Q){this.dyn_tree=U,this.max_code=0,this.stat_desc=Q}function j(U){return U<256?$[U]:$[256+(U>>>7)]}function N(U,Q){U.pending_buf[U.pending++]=255&Q,U.pending_buf[U.pending++]=Q>>>8&255}function ne(U,Q,be){U.bi_valid>_-be?(U.bi_buf|=Q<<U.bi_valid&65535,N(U,U.bi_buf),U.bi_buf=Q>>_-U.bi_valid,U.bi_valid+=be-_):(U.bi_buf|=Q<<U.bi_valid&65535,U.bi_valid+=be)}function fe(U,Q,be){ne(U,be[2*Q],be[2*Q+1])}function ge(U,Q){for(var be=0;be|=1&U,U>>>=1,be<<=1,0<--Q;);return be>>>1}function de(U,Q,be){var Se,re,_e=new Array(T+1),Ce=0;for(Se=1;Se<=T;Se++)_e[Se]=Ce=Ce+be[Se-1]<<1;for(re=0;re<=Q;re++){var xe=U[2*re+1];xe!==0&&(U[2*re]=ge(_e[xe]++,xe))}}function Te(U){var Q;for(Q=0;Q<v;Q++)U.dyn_ltree[2*Q]=0;for(Q=0;Q<b;Q++)U.dyn_dtree[2*Q]=0;for(Q=0;Q<C;Q++)U.bl_tree[2*Q]=0;U.dyn_ltree[2*O]=1,U.opt_len=U.static_len=0,U.last_lit=U.matches=0}function ke(U){8<U.bi_valid?N(U,U.bi_buf):0<U.bi_valid&&(U.pending_buf[U.pending++]=U.bi_buf),U.bi_buf=0,U.bi_valid=0}function Me(U,Q,be,Se){var re=2*Q,_e=2*be;return U[re]<U[_e]||U[re]===U[_e]&&Se[Q]<=Se[be]}function De(U,Q,be){for(var Se=U.heap[be],re=be<<1;re<=U.heap_len&&(re<U.heap_len&&Me(Q,U.heap[re+1],U.heap[re],U.depth)&&re++,!Me(Q,Se,U.heap[re],U.depth));)U.heap[be]=U.heap[re],be=re,re<<=1;U.heap[be]=Se}function nt(U,Q,be){var Se,re,_e,Ce,xe=0;if(U.last_lit!==0)for(;Se=U.pending_buf[U.d_buf+2*xe]<<8|U.pending_buf[U.d_buf+2*xe+1],re=U.pending_buf[U.l_buf+xe],xe++,Se===0?fe(U,re,Q):(fe(U,(_e=w[re])+g+1,Q),(Ce=L[_e])!==0&&ne(U,re-=G[_e],Ce),fe(U,_e=j(--Se),be),(Ce=P[_e])!==0&&ne(U,Se-=se[_e],Ce)),xe<U.last_lit;);fe(U,O,Q)}function yt(U,Q){var be,Se,re,_e=Q.dyn_tree,Ce=Q.stat_desc.static_tree,xe=Q.stat_desc.has_stree,W=Q.stat_desc.elems,ve=-1;for(U.heap_len=0,U.heap_max=E,be=0;be<W;be++)_e[2*be]!==0?(U.heap[++U.heap_len]=ve=be,U.depth[be]=0):_e[2*be+1]=0;for(;U.heap_len<2;)_e[2*(re=U.heap[++U.heap_len]=ve<2?++ve:0)]=1,U.depth[re]=0,U.opt_len--,xe&&(U.static_len-=Ce[2*re+1]);for(Q.max_code=ve,be=U.heap_len>>1;1<=be;be--)De(U,_e,be);for(re=W;be=U.heap[1],U.heap[1]=U.heap[U.heap_len--],De(U,_e,1),Se=U.heap[1],U.heap[--U.heap_max]=be,U.heap[--U.heap_max]=Se,_e[2*re]=_e[2*be]+_e[2*Se],U.depth[re]=(U.depth[be]>=U.depth[Se]?U.depth[be]:U.depth[Se])+1,_e[2*be+1]=_e[2*Se+1]=re,U.heap[1]=re++,De(U,_e,1),2<=U.heap_len;);U.heap[--U.heap_max]=U.heap[1],(function(we,Ue){var Xe,mt,It,Pe,pt,Rt,Fe=Ue.dyn_tree,xn=Ue.max_code,$t=Ue.stat_desc.static_tree,ku=Ue.stat_desc.has_stree,bi=Ue.stat_desc.extra_bits,Pr=Ue.stat_desc.extra_base,zn=Ue.stat_desc.max_length,fn=0;for(Pe=0;Pe<=T;Pe++)we.bl_count[Pe]=0;for(Fe[2*we.heap[we.heap_max]+1]=0,Xe=we.heap_max+1;Xe<E;Xe++)zn<(Pe=Fe[2*Fe[2*(mt=we.heap[Xe])+1]+1]+1)&&(Pe=zn,fn++),Fe[2*mt+1]=Pe,xn<mt||(we.bl_count[Pe]++,pt=0,Pr<=mt&&(pt=bi[mt-Pr]),Rt=Fe[2*mt],we.opt_len+=Rt*(Pe+pt),ku&&(we.static_len+=Rt*($t[2*mt+1]+pt)));if(fn!==0){do{for(Pe=zn-1;we.bl_count[Pe]===0;)Pe--;we.bl_count[Pe]--,we.bl_count[Pe+1]+=2,we.bl_count[zn]--,fn-=2}while(0<fn);for(Pe=zn;Pe!==0;Pe--)for(mt=we.bl_count[Pe];mt!==0;)xn<(It=we.heap[--Xe])||(Fe[2*It+1]!==Pe&&(we.opt_len+=(Pe-Fe[2*It+1])*Fe[2*It],Fe[2*It+1]=Pe),mt--)}})(U,Q),de(_e,ve,U.bl_count)}function x(U,Q,be){var Se,re,_e=-1,Ce=Q[1],xe=0,W=7,ve=4;for(Ce===0&&(W=138,ve=3),Q[2*(be+1)+1]=65535,Se=0;Se<=be;Se++)re=Ce,Ce=Q[2*(Se+1)+1],++xe<W&&re===Ce||(xe<ve?U.bl_tree[2*re]+=xe:re!==0?(re!==_e&&U.bl_tree[2*re]++,U.bl_tree[2*H]++):xe<=10?U.bl_tree[2*B]++:U.bl_tree[2*z]++,_e=re,ve=(xe=0)===Ce?(W=138,3):re===Ce?(W=6,3):(W=7,4))}function me(U,Q,be){var Se,re,_e=-1,Ce=Q[1],xe=0,W=7,ve=4;for(Ce===0&&(W=138,ve=3),Se=0;Se<=be;Se++)if(re=Ce,Ce=Q[2*(Se+1)+1],!(++xe<W&&re===Ce)){if(xe<ve)for(;fe(U,re,U.bl_tree),--xe!=0;);else re!==0?(re!==_e&&(fe(U,re,U.bl_tree),xe--),fe(U,H,U.bl_tree),ne(U,xe-3,2)):xe<=10?(fe(U,B,U.bl_tree),ne(U,xe-3,3)):(fe(U,z,U.bl_tree),ne(U,xe-11,7));_e=re,ve=(xe=0)===Ce?(W=138,3):re===Ce?(W=6,3):(W=7,4)}}h(se);var ue=!1;function I(U,Q,be,Se){ne(U,(p<<1)+(Se?1:0),3),(function(re,_e,Ce,xe){ke(re),N(re,Ce),N(re,~Ce),u.arraySet(re.pending_buf,re.window,_e,Ce,re.pending),re.pending+=Ce})(U,Q,be)}s._tr_init=function(U){ue||((function(){var Q,be,Se,re,_e,Ce=new Array(T+1);for(re=Se=0;re<y-1;re++)for(G[re]=Se,Q=0;Q<1<<L[re];Q++)w[Se++]=re;for(w[Se-1]=re,re=_e=0;re<16;re++)for(se[re]=_e,Q=0;Q<1<<P[re];Q++)$[_e++]=re;for(_e>>=7;re<b;re++)for(se[re]=_e<<7,Q=0;Q<1<<P[re]-7;Q++)$[256+_e++]=re;for(be=0;be<=T;be++)Ce[be]=0;for(Q=0;Q<=143;)ce[2*Q+1]=8,Q++,Ce[8]++;for(;Q<=255;)ce[2*Q+1]=9,Q++,Ce[9]++;for(;Q<=279;)ce[2*Q+1]=7,Q++,Ce[7]++;for(;Q<=287;)ce[2*Q+1]=8,Q++,Ce[8]++;for(de(ce,v+1,Ce),Q=0;Q<b;Q++)M[2*Q+1]=5,M[2*Q]=ge(Q,5);V=new D(ce,L,g+1,v,T),Z=new D(M,P,0,b,T),ae=new D(new Array(0),q,0,C,k)})(),ue=!0),U.l_desc=new A(U.dyn_ltree,V),U.d_desc=new A(U.dyn_dtree,Z),U.bl_desc=new A(U.bl_tree,ae),U.bi_buf=0,U.bi_valid=0,Te(U)},s._tr_stored_block=I,s._tr_flush_block=function(U,Q,be,Se){var re,_e,Ce=0;0<U.level?(U.strm.data_type===2&&(U.strm.data_type=(function(xe){var W,ve=4093624447;for(W=0;W<=31;W++,ve>>>=1)if(1&ve&&xe.dyn_ltree[2*W]!==0)return c;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return d;for(W=32;W<g;W++)if(xe.dyn_ltree[2*W]!==0)return d;return c})(U)),yt(U,U.l_desc),yt(U,U.d_desc),Ce=(function(xe){var W;for(x(xe,xe.dyn_ltree,xe.l_desc.max_code),x(xe,xe.dyn_dtree,xe.d_desc.max_code),yt(xe,xe.bl_desc),W=C-1;3<=W&&xe.bl_tree[2*le[W]+1]===0;W--);return xe.opt_len+=3*(W+1)+5+5+4,W})(U),re=U.opt_len+3+7>>>3,(_e=U.static_len+3+7>>>3)<=re&&(re=_e)):re=_e=be+5,be+4<=re&&Q!==-1?I(U,Q,be,Se):U.strategy===4||_e===re?(ne(U,2+(Se?1:0),3),nt(U,ce,M)):(ne(U,4+(Se?1:0),3),(function(xe,W,ve,we){var Ue;for(ne(xe,W-257,5),ne(xe,ve-1,5),ne(xe,we-4,4),Ue=0;Ue<we;Ue++)ne(xe,xe.bl_tree[2*le[Ue]+1],3);me(xe,xe.dyn_ltree,W-1),me(xe,xe.dyn_dtree,ve-1)})(U,U.l_desc.max_code+1,U.d_desc.max_code+1,Ce+1),nt(U,U.dyn_ltree,U.dyn_dtree)),Te(U),Se&&ke(U)},s._tr_tally=function(U,Q,be){return U.pending_buf[U.d_buf+2*U.last_lit]=Q>>>8&255,U.pending_buf[U.d_buf+2*U.last_lit+1]=255&Q,U.pending_buf[U.l_buf+U.last_lit]=255&be,U.last_lit++,Q===0?U.dyn_ltree[2*be]++:(U.matches++,Q--,U.dyn_ltree[2*(w[be]+g+1)]++,U.dyn_dtree[2*j(Q)]++),U.last_lit===U.lit_bufsize-1},s._tr_align=function(U){ne(U,2,3),fe(U,O,ce),(function(Q){Q.bi_valid===16?(N(Q,Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0):8<=Q.bi_valid&&(Q.pending_buf[Q.pending++]=255&Q.bi_buf,Q.bi_buf>>=8,Q.bi_valid-=8)})(U)}},{"../utils/common":41}],53:[function(i,o,s){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(i,o,s){(function(u){(function(c,d){if(!c.setImmediate){var h,p,y,g,v=1,b={},C=!1,E=c.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(c);T=T&&T.setTimeout?T:c,h={}.toString.call(c.process)==="[object process]"?function(H){process.nextTick(function(){k(H)})}:(function(){if(c.postMessage&&!c.importScripts){var H=!0,B=c.onmessage;return c.onmessage=function(){H=!1},c.postMessage("","*"),c.onmessage=B,H}})()?(g="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",O,!1):c.attachEvent("onmessage",O),function(H){c.postMessage(g+H,"*")}):c.MessageChannel?((y=new MessageChannel).port1.onmessage=function(H){k(H.data)},function(H){y.port2.postMessage(H)}):E&&"onreadystatechange"in E.createElement("script")?(p=E.documentElement,function(H){var B=E.createElement("script");B.onreadystatechange=function(){k(H),B.onreadystatechange=null,p.removeChild(B),B=null},p.appendChild(B)}):function(H){setTimeout(k,0,H)},T.setImmediate=function(H){typeof H!="function"&&(H=new Function(""+H));for(var B=new Array(arguments.length-1),z=0;z<B.length;z++)B[z]=arguments[z+1];var L={callback:H,args:B};return b[v]=L,h(v),v++},T.clearImmediate=_}function _(H){delete b[H]}function k(H){if(C)setTimeout(k,0,H);else{var B=b[H];if(B){C=!0;try{(function(z){var L=z.callback,P=z.args;switch(P.length){case 0:L();break;case 1:L(P[0]);break;case 2:L(P[0],P[1]);break;case 3:L(P[0],P[1],P[2]);break;default:L.apply(d,P)}})(B)}finally{_(H),C=!1}}}}function O(H){H.source===c&&typeof H.data=="string"&&H.data.indexOf(g)===0&&k(+H.data.slice(g.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof xl<"u"?xl:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Bs)),Bs.exports}var Sh;function _S(){if(Sh)return Ir;Sh=1;var n=Ir&&Ir.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.Filemanager=void 0;const l=n(ES()),i=An();class o{pendingFiles=[];pendingMessage="";pendingFormat="";messageId="";setFilesForUpload(u,c,d){this.pendingFiles.length>0&&this.clearPendingFilesState(),this.pendingFiles=u,this.messageId=c||Date.now().toString(),d&&d.trim()&&(this.pendingMessage=d),this.pendingFormat=u.length>1?"zip":u?.[0]?.type?.split("/")?.[1]||"unknown"}getPendingFileState(){return{files:this.pendingFiles,messageId:this.messageId||"",message:this.pendingMessage||"",format:this.pendingFormat||""}}async uploadFilesToPresignedUrl(u){let c=0;const d=u.filter(h=>h&&h.trim());try{if(d.length===0)throw new i.FileError("No valid presigned URLs provided",{context:{stage:"uploadFilesToPresignedUrl"}});let h,p;if(this.shouldZipFiles()){const y=await this.zipFiles(),g=this.getUploadFileName();h=this.blobToFile(y,g),p="application/zip"}else h=this.pendingFiles?.[0],p=h.type;for(let y=0;y<d.length;y++){const g=d[y],v=await fetch(g,{method:"PUT",body:h,headers:{"Content-Type":p,"x-ms-blob-type":"BlockBlob"}});if(!v.ok)throw new i.FileError(`Failed to upload ${h.name} to URL ${y+1}: ${v.status} ${v.statusText}`,{context:{stage:"uploadFilesToPresignedUrl",status:v.status,url:g}});c++}return d[0]}catch(h){if(c>0)return d[0];throw(0,i.normalizeError)(h,i.FileError,"Failed to upload files to presigned URL",{context:{stage:"uploadFilesToPresignedUrl"}})}}async zipFiles(){const u=new l.default;return this.pendingFiles.forEach(d=>{u.file(d.name,d)}),await u.generateAsync({type:"blob"})}blobToFile(u,c){return new File([u],c,{type:u.type})}shouldZipFiles(){return this.pendingFiles.length>1}getUploadFileName(){return this.shouldZipFiles()?`uploaded_files_${Date.now()}.zip`:this.pendingFiles[0]?.name||"file"}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormat="",this.messageId=""}}return Ir.Filemanager=o,Ir}var _n={},Eh;function Il(){if(Eh)return _n;Eh=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.SYNAPSE_REALTIME_RESERVED_EVENTS=_n.SYNAPSE_REALTIME_ERROR_CODES=_n.SYNAPSE_REALTIME_EVENTS=_n.SYNAPSE_MESSAGE_TYPES=void 0;const n=Us();return _n.SYNAPSE_MESSAGE_TYPES=n.SOCKET_CONTENT_TYPES,_n.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_ESCALATION:"tool_escalation",INLINE_TEXT:"inline_text"},_n.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"},_n.SYNAPSE_REALTIME_RESERVED_EVENTS={SESSION_EXPIRED:"session_expired"},_n}var ya={},ba={},_h;function Ls(){return _h||(_h=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.AudioRecordingStatus=void 0,ba.AudioRecordingStatus={IDLE:"idle",LISTENING:"listening",ERROR:"error",PROCESSING:"processing",TRANSCRIBING:"transcribing"}),ba}var xh;function xS(){if(xh)return ya;xh=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.AudioManager=void 0;const n=Ls(),l=An();class i{mediaRecorder=null;mediaStream=null;recordingStartTime=0;autoPauseTimer=null;config;onAudioData=null;onAudioError=null;onRecordingStatusChange=null;suppressCallbacks=!1;constructor(s={}){this.config={mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:128e3,maxRecordingDuration:9e5,autoPauseEnabled:!0,...s}}async checkCurrentPermissionState(){const s=await navigator.permissions.query({name:"microphone"});if(s.state==="denied")throw new l.RecordingError("Microphone permission denied",{context:{permissionState:s.state},hint:"Ensure the browser has microphone access enabled for this site."});return s.state}async start(s,u,c){try{if(!navigator.mediaDevices)throw new l.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."});if(!window.MediaRecorder)throw new l.RecordingError("MediaRecorder is not supported in this browser",{context:{feature:"MediaRecorder"},hint:"Use a browser that supports the MediaRecorder API."});const d=["audio/mp3","audio/ogg;codecs=opus","audio/mp4","audio/ogg","audio/wav"].filter(h=>MediaRecorder.isTypeSupported(h));if(d.length===0)throw new l.RecordingError("No supported audio formats found in this browser",{context:{requestedTypes:d},hint:"Verify codec support or adjust the requested MIME types."});if(this.config.mimeType=d[0],await this.checkCurrentPermissionState(),this.onAudioData=s,this.onAudioError=c??null,this.onRecordingStatusChange=u??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 l.RecordingError("MediaRecorder is in an invalid state for start()",{context:{recorderState:this.mediaRecorder.state}});this.setupMediaRecorderEvents(),this.mediaRecorder.start(),this.recordingStartTime=Date.now(),this.onRecordingStatusChange?.(n.AudioRecordingStatus.LISTENING),this.config.autoPauseEnabled&&this.setupAutoPauseTimer()}catch(d){throw this.toRecordingError(d,"Failed to start audio recording",{stage:"start"})}}async processAudioChunk(s){try{this.onRecordingStatusChange?.(n.AudioRecordingStatus.PROCESSING);const u=await this.blobToBase64(s),c=Date.now();if(!this.onAudioData)return;const d={audio:u,format:this.config.mimeType,duration:this.recordingStartTime>0?c-this.recordingStartTime:0,timestamp:this.recordingStartTime>0?this.recordingStartTime:c};this.onAudioData(d),this.onRecordingStatusChange?.(n.AudioRecordingStatus.TRANSCRIBING)}catch(u){this.handleError(u,{stage:"process_audio_chunk"})}}toRecordingError(s,u,c){if(s instanceof l.RecordingError)return s;if(s instanceof l.SynapseError)return new l.RecordingError(s.message,{cause:s,context:{...s.context,...c},hint:s.hint});const d=s instanceof Error&&s.message?s.message:u;return new l.RecordingError(d,{cause:s,context:c})}handleError(s,u){const c=this.toRecordingError(s,"Unexpected recording error",u);if(this.onRecordingStatusChange?.(n.AudioRecordingStatus.ERROR),this.onAudioError)try{this.onAudioError(c)}catch(d){console.error("Audio error callback failed:",d)}else console.error("AudioManager error:",c)}setupAutoPauseTimer(){this.autoPauseTimer&&clearTimeout(this.autoPauseTimer),this.autoPauseTimer=setTimeout(()=>{console.log("Auto-pause timer triggered after 15 minutes"),this.stop()},this.config.maxRecordingDuration)}setupMediaRecorderEvents(){this.mediaRecorder&&(this.mediaRecorder.ondataavailable=s=>{this.suppressCallbacks||s.data.size<=0||this.processAudioChunk(s.data).catch(u=>this.handleError(u,{stage:"media_recorder_ondataavailable",hasData:s.data.size>0}))},this.mediaRecorder.onstop=async()=>{this.recordingStartTime=0},this.mediaRecorder.onerror=s=>{this.handleError(s.error instanceof Error?s.error:new Error("MediaRecorder encountered an unknown error"),{stage:"media_recorder_onerror"})},this.mediaRecorder.onstart=()=>{console.log("MediaRecorder started recording"),this.mediaRecorder&&(console.log("MediaRecorder state:",this.mediaRecorder.state),console.log("MediaRecorder MIME type:",this.mediaRecorder.mimeType))})}blobToBase64(s){return new Promise((u,c)=>{const d=new FileReader;d.onload=()=>{if(typeof d.result=="string"){const h=d.result.split(",")[1];u(h)}else c(new l.RecordingError("Failed to convert blob to base64",{context:{stage:"blob_to_base64"}}))},d.onerror=()=>c(new l.RecordingError("FileReader error while converting audio chunk to base64",{cause:d.error??void 0,context:{stage:"blob_to_base64"}})),d.readAsDataURL(s)})}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(s=>s.stop()),this.mediaStream=null),this.onRecordingStatusChange?.(n.AudioRecordingStatus.IDLE),console.log("Audio recording stopped manually")}catch(s){throw this.toRecordingError(s,"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(s=>s.stop()),this.mediaStream=null),this.onRecordingStatusChange?.(n.AudioRecordingStatus.IDLE)}catch(s){throw this.toRecordingError(s,"Failed to cancel audio recording",{stage:"cancel"})}}destroy(){try{this.cancel(),this.mediaRecorder&&(this.mediaRecorder=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(s=>s.stop()),this.mediaStream=null)}catch(s){throw this.toRecordingError(s,"Failed to destroy audio resources",{stage:"destroy"})}}}return ya.AudioManager=i,ya}var wh;function Ch(){if(wh)return ga;wh=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.MessageManager=void 0;const n=Us(),l=_S(),i=Il(),o=xS(),s=Ls(),u=An();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,messageId:p,message:y,url:g}){this.fileManager||(this.fileManager=new l.Filemanager);let v;if(h&&h.length>0)this.fileManager.setFilesForUpload(h,p,y),v={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:p||Date.now().toString(),ts:Date.now(),data:{extension:this.fileManager.getPendingFileState().format}};else if(g){const b=this.fileManager.getPendingFileState().message;v={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:this.fileManager.getPendingFileState().messageId,ts:Date.now(),data:{url:g,...b&&{text:b}}},this.fileManager?.clearPendingFilesState()}return v}sendSocketChatMessage({message:h,messageId:p,type:y,files:g,url:v,tool_use_id:b,tool_use_params:C,hidden:E}){const T=this.assertConnection("sendSocketChatMessage");let _;switch(y){case n.SOCKET_CONTENT_TYPES.FILE:_=this.handleFileUploadProcess({files:g,messageId:p,message:h,url:v});break;case n.SOCKET_CONTENT_TYPES.TEXT:_={ev:n.SOCKET_EVENTS.CHAT,ct:y,_id:p||Date.now().toString(),ts:Date.now(),data:{text:h,...b&&{tool_use_id:b},...C&&{tool_use_params:C},...E&&{hidden:E}}};break;default:const k=new u.MessageError("Unsupported content type",{context:{stage:"sendSocketChatMessage",type:y},hint:"Use SOCKET_CONTENT_TYPES.FILE or SOCKET_CONTENT_TYPES.TEXT."});throw this.emitError(k),k}if(!_){const k=new u.MessageError("No message to send",{context:{stage:"sendSocketChatMessage",type:y}});throw this.emitError(k),k}T.sendMessage(_)}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(()=>{this.sendSocketChatMessage({type:n.SOCKET_CONTENT_TYPES.FILE,url:h.data.urls?.[0]})}).catch(g=>{const v=this.toFileError(g,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:h.data?.urls?.length});this.emitError(v)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(h.data.text&&h.data.text.trim()===""&&h._id){const g={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,g)}break;case n.SOCKET_CONTENT_TYPES.PILL:case n.SOCKET_CONTENT_TYPES.MULTI:if(h?.data?.tool_use_id&&h._id){const g={data:{...h.data,type:h.ct},messageId:h._id,timestamp:h.ts};p.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_ESCALATION,g)}break;case n.SOCKET_CONTENT_TYPES.INLINE_TEXT:if(h?.data?.text){const g={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(i.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,g),this.callbacks?.onRecordingStatusChange?.(s.AudioRecordingStatus.IDLE)}break;default:const y=new u.MessageError("Unsupported content type",{context:{stage:"handleIncomingSocketChatMessage",contentType:h.ct}});throw this.emitError(y),y}}handleIncomingSocketStreamMessage(h){const p=this.assertConnection("handleIncomingSocketStreamMessage");switch(h.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(h?.data?.progress_msg){const g={data:{text:h.data.progress_msg},messageId:h._id,timestamp:h.ts};p.emit(i.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,g);return}if(h?.data?.text){const g={data:{text:h.data.text},messageId:h._id,timestamp:h.ts};p.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,g)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(h?.data?.tips){const g={data:{tips:h.data.tips},messageId:h._id,timestamp:h.ts};p.emit(i.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,g);return}break;default:const y=new u.MessageError("Unsupported content type",{context:{stage:"handleIncomingSocketStreamMessage",contentType:h.ct}});throw this.emitError(y),y}}handleDisconnect(h){this.connection?.emit?.(i.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,h)}handleIncomingSocketEndOfStreamMessage(h){this.assertConnection("handleIncomingSocketEndOfStreamMessage").emit(i.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM)}handleIncomingSocketErrorMessage(h){const p=this.assertConnection("handleIncomingSocketErrorMessage");switch(h.code){case i.SYNAPSE_REALTIME_ERROR_CODES.SESSION_EXPIRED:p.emit(i.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED);break;default:const y=new u.MessageError(h.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:h.code}});p.emit(i.SYNAPSE_REALTIME_EVENTS.ERROR,y),this.emitError(y)}}sendSocketAuthMessage(h){const p=this.assertConnection("sendSocketAuthMessage"),y={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:h}};p.sendMessage(y)}sendSocketPingMessage(){const h=this.assertConnection("sendSocketPingMessage"),p={ev:n.SOCKET_EVENTS.PING,_id:Date.now().toString(),ts:Date.now()};h.sendMessage(p)}sendSocketStreamMessage({data:h,type:p,messageId:y,timestamp:g}){const v=this.assertConnection("sendSocketStreamMessage");switch(p){case n.SOCKET_CONTENT_TYPES.AUDIO:const b={ev:n.SOCKET_EVENTS.STREAM,ct:p,_id:y||this.generateId(),ts:g||Date.now(),data:{audio:h.audio,format:h.format}};v.sendMessage(b);break;default:const C=new u.MessageError("Unsupported content type",{context:{stage:"sendSocketStreamMessage",contentType:p}});throw this.emitError(C),C}}startRecordingWithSocket(){this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager),this.audioManager.start(h=>{this.sendSocketStreamMessage({data:h,type:n.SOCKET_CONTENT_TYPES.AUDIO})},this.callbacks?.onRecordingStatusChange??void 0,h=>{const p=this.toRecordingError(h,"Audio recording error",{stage:"startRecording"});this.emitError(p)}).catch(h=>{const p=this.toRecordingError(h,"Failed to start audio recording",{stage:"startRecording"});this.emitError(p)})}endRecordingWithSocket(){if(!this.audioManager){const h=new u.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(i.SYNAPSE_REALTIME_EVENTS.CONNECTED)}cleanupMessageServerState(){this.fileManager&&(this.fileManager.clearPendingFilesState(),this.fileManager=null),this.audioManager&&(this.audioManager.destroy(),this.audioManager=null)}generateId(){return`msg_${Date.now()}_${Math.random().toString(36).substring(2,15)}`}emitError(h){this.callbacks?.onError?.(h)}toFileError(h,p,y,g){return(0,u.normalizeError)(h,u.FileError,p,{context:y,hint:g})}toRecordingError(h,p,y,g){return(0,u.normalizeError)(h,u.RecordingError,p,{context:y,hint:g})}assertConnection(h){if(!this.connection){const p=new u.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 ga.MessageManager=c,ga}var va={},Th;function kh(){if(Th)return va;Th=1,Object.defineProperty(va,"__esModule",{value:!0}),va.ErrorUtils=void 0;const n=An();class l{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 l.isNetworkError(o)?"Unable to connect to the server. Please check your internet connection.":l.isTimeoutError(o)?"Request timed out. Please try again.":l.isAuthError(o)?"Authentication failed. Please log in again.":l.isServerError(o)?"Server error occurred. Please try again later.":l.isAPIError(o)||o instanceof Error?o.message:"An unexpected error occurred."}static getErrorDetails(o){return l.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 va.ErrorUtils=l,va}var Ah;function wS(){if(Ah)return oa;Ah=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.SynapseSDK=void 0;const n=uh(),l=Bl(),i=vS(),o=yh(),s=Ch(),u=Il(),c=kh(),d=An(),h=Us();class p{connection=null;messageManager;resourceManager;sessionToken=null;sessionId=null;config;connectionType;constructor(g){this.config={...g,environment:g.environment||"production"},this.connectionType=g.connectionType||n.ConnectionType.SOCKET;const v=(0,i.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new o.ResourceManager({agentId:this.config.agentId,serverUrl:v})}async startSession(g){try{const v=await this.manageSession(g);return await this.initializeConnection(v),this.setupEventHandlers(),v}catch(v){const b=c.ErrorUtils.getUserFriendlyMessage(v),C=c.ErrorUtils.getErrorDetails(v),E=this.toSessionError(v,b||"Failed to start session",{stage:"startSession",details:C},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(E),E}}async sendMessage({message:g,messageId:v,files:b,tool_use_id:C,tool_use_params:E,hidden:T}){if(!this.connection){const _=new d.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(_),_}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketChatMessage({message:g,files:b,messageId:v,type:h.SOCKET_CONTENT_TYPES.TEXT,tool_use_id:C,tool_use_params:E,hidden:T});break;default:const _=new d.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(_),_}}on(g,v){this.connection?.on(g,v)}off(g,v){this.connection?.off(g,v)}getSessionConfig(){if(!this.sessionId||!this.sessionToken)throw new d.SessionError("Session ID or token not found",{context:{stage:"getSessionConfig"},hint:"Ensure the session API returns both identifiers."});return{session_id:this.sessionId,session_token:this.sessionToken}}startRecording(){if(!this.connection){const g=new d.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendAudio"},hint:"Call startSession() before attempting to send audio."});throw this.emitError(g),g}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.startRecordingWithSocket();break;default:const g=new d.ConnectionError("Unsupported connection type",{context:{stage:"sendAudio",connectionType:this.connectionType}});throw this.emitError(g),g}}endRecording(){if(!this.connection){const g=new d.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 d.ConnectionError("Unsupported connection type",{context:{stage:"endRecording",connectionType:this.connectionType}});throw this.emitError(g),g}}endSession(){this.connection&&(this.connection.close(),this.connection=null),this.messageManager&&this.messageManager.cleanupMessageServerState()}emitError(g){this.config.callbacks?.onError?.(g)}toSessionError(g,v,b,C){return(0,d.normalizeError)(g,d.SessionError,v,{context:b,hint:C})}async initializeConnection(g){if(this.connection&&(this.connection.close(),this.connection=null),!g.session_id||!g.session_token)throw new d.SessionError("Session ID or token not found",{context:{stage:"initializeConnection"},hint:"Ensure the session API returns both identifiers."});this.sessionId=g.session_id,this.sessionToken=g.session_token;const v=(0,i.getConfig)(this.config?.environment).WEBSOCKET_URL,b=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(b,{serverUrl:v,auth:{sessionId:g.session_id,sessionToken:g.session_token},agentId:this.config.agentId,userId:this.config.userId,overrides:this.config.overrides}),this.messageManager=new s.MessageManager(this.connection,this.config?.callbacks)}async manageSession(g){if(!g?.session_id)return this.createNewSession();this.config.callbacks?.onConnectionStatusChange?.(l.ConnectionStatus.CONNECTING);try{const v=await this.resourceManager.validateSession(g.session_id);return v.active?g:v.expired?this.refreshSession(g.session_id,g.session_token):this.createNewSession()}catch(v){if(this.config.callbacks?.onConnectionStatusChange?.(l.ConnectionStatus.NOT_CONNECTED),v instanceof d.APIError){const b=v.status;if(b===404||b===500)return this.createNewSession()}throw this.toSessionError(v,"Failed to resolve session",{stage:"resolveSession"})}}async refreshSession(g,v){try{return await this.resourceManager.refreshSession(g,v)}catch(b){if(b instanceof d.APIError){const C=b.status;if(C===404||C===500)return this.createNewSession()}throw this.toSessionError(b,"Failed to refresh session",{stage:"refreshSession",sessionId:g})}}async createNewSession(){return await this.resourceManager.createSession(this.config.userId||Date.now().toString())}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.onStatusChange(g=>{this.config.callbacks?.onConnectionStatusChange?.(g)}),this.connection.on(u.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED,()=>{this.handleSessionExpiry()});break;default:throw new d.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){const v=this.toConnectionError(g,"WebSocket connection error",{stage:"onSocketConnectionError"},"Verify network connectivity or attempt to reconnect.");this.emitError(v)}onSocketConnectionOpen(){if(!this.sessionToken){const g=new d.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.sessionToken)}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 v=new d.MessageError("Unsupported message type",{context:{stage:"onIncomingSocketMessage",event:g.ev??"unknown"},hint:"Ensure the server is sending supported socket events."});this.emitError(v);return}}async handleSessionExpiry(){try{if(this.endSession(),this.config.callbacks?.onConnectionStatusChange?.(l.ConnectionStatus.CONNECTING),!this.sessionId||!this.sessionToken){const v=new d.SessionError("Session ID or token not found",{context:{stage:"handleSessionExpiry"}});throw this.emitError(v),v}const g=await this.refreshSession(this.sessionId,this.sessionToken);if(!g.session_id||!g.session_token)throw new d.SessionError("Session refresh failed",{context:{stage:"handleSessionExpiry"}});this.sessionId=g.session_id,this.sessionToken=g.session_token,await this.initializeConnection(g),this.setupEventHandlers(),this.config.callbacks?.onSessionRefreshed?.(g)}catch(g){this.config.callbacks?.onConnectionStatusChange?.(l.ConnectionStatus.NOT_CONNECTED);const v=this.toSessionError(g,"Session expired",{stage:"handleSessionExpiry"});this.emitError(v)}}toConnectionError(g,v,b,C){return(0,d.normalizeError)(g,d.ConnectionError,v,{context:b,hint:C})}}return oa.SynapseSDK=p,oa}var Is={},Rh;function CS(){return Rh||(Rh=1,Object.defineProperty(Is,"__esModule",{value:!0})),Is}var Sa={},Nh;function TS(){return Nh||(Nh=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.USER_FEEDBACK=void 0,Sa.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Sa}var Ea={},Oh;function kS(){return Oh||(Oh=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.ErrorType=void 0,Ea.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"}),Ea}var zh;function AS(){return zh||(zh=1,(function(n){var l=Br&&Br.__createBinding||(Object.create?(function(T,_,k,O){O===void 0&&(O=k);var H=Object.getOwnPropertyDescriptor(_,k);(!H||("get"in H?!_.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return _[k]}}),Object.defineProperty(T,O,H)}):(function(T,_,k,O){O===void 0&&(O=k),T[O]=_[k]})),i=Br&&Br.__exportStar||function(T,_){for(var k in T)k!=="default"&&!Object.prototype.hasOwnProperty.call(_,k)&&l(_,T,k)};Object.defineProperty(n,"__esModule",{value:!0}),n.SYNAPSE_MESSAGE_TYPES=n.ErrorUtils=n.ErrorType=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.SYNAPSE_REALTIME_EVENTS=n.MessageManager=n.Session=n.ResourceManager=n.ConnectionType=n.ConnectionFactory=n.WebSocketConnection=n.BaseConnection=n.SynapseSDK=void 0;var o=wS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var s=ih();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return s.BaseConnection}});var u=oh();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return u.WebSocketConnection}});var c=uh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return c.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return c.ConnectionType}}),i(Bl(),n);var d=yh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return d.ResourceManager}}),i(CS(),n);var h=ph();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return h.Session}}),i(TS(),n);var p=Ch();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return p.MessageManager}});var y=Il();Object.defineProperty(n,"SYNAPSE_REALTIME_EVENTS",{enumerable:!0,get:function(){return y.SYNAPSE_REALTIME_EVENTS}});var g=dh();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return g.HttpClient}});var v=An();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return v.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return v.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return v.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return v.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return v.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return v.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return v.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return v.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return v.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return v.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return v.InternalServerError}});var b=kS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var C=kh();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return C.ErrorUtils}}),i(Ls(),n);var E=Il();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return E.SYNAPSE_MESSAGE_TYPES}})})(Br)),Br}var We=AS();const Mh=n=>{let l;const i=new Set,o=(p,y)=>{const g=typeof p=="function"?p(l):p;if(!Object.is(g,l)){const v=l;l=y??(typeof g!="object"||g===null)?g:Object.assign({},l,g),i.forEach(b=>b(l,v))}},s=()=>l,d={setState:o,getState:s,getInitialState:()=>h,subscribe:p=>(i.add(p),()=>i.delete(p))},h=l=n(o,s,d);return d},RS=(n=>n?Mh(n):Mh),NS=n=>n;function OS(n,l=NS){const i=ia.useSyncExternalStore(n.subscribe,ia.useCallback(()=>l(n.getState()),[n,l]),ia.useCallback(()=>l(n.getInitialState()),[n,l]));return ia.useDebugValue(i),i}const zS=n=>{const l=RS(n),i=o=>OS(l,o);return Object.assign(i,l),i},MS=(n=>zS);function Dh(n,l){let i;try{i=n()}catch{return}return{getItem:s=>{var u;const c=h=>h===null?null:JSON.parse(h,void 0),d=(u=i.getItem(s))!=null?u:null;return d instanceof Promise?d.then(c):c(d)},setItem:(s,u)=>i.setItem(s,JSON.stringify(u,void 0)),removeItem:s=>i.removeItem(s)}}const Hs=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(o){return Hs(o)(i)},catch(o){return this}}}catch(i){return{then(o){return this},catch(o){return Hs(o)(i)}}}},DS=(n,l)=>(i,o,s)=>{let u={storage:Dh(()=>localStorage),partialize:E=>E,version:0,merge:(E,T)=>({...T,...E}),...l},c=!1;const d=new Set,h=new Set;let p=u.storage;if(!p)return n((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${u.name}', the given storage is currently unavailable.`),i(...E)},o,s);const y=()=>{const E=u.partialize({...o()});return p.setItem(u.name,{state:E,version:u.version})},g=s.setState;s.setState=(E,T)=>(g(E,T),y());const v=n((...E)=>(i(...E),y()),o,s);s.getInitialState=()=>v;let b;const C=()=>{var E,T;if(!p)return;c=!1,d.forEach(k=>{var O;return k((O=o())!=null?O:v)});const _=((T=u.onRehydrateStorage)==null?void 0:T.call(u,(E=o())!=null?E:v))||void 0;return Hs(p.getItem.bind(p))(u.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==u.version){if(u.migrate){const O=u.migrate(k.state,k.version);return O instanceof Promise?O.then(H=>[!0,H]):[!0,O]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,k.state];return[!1,void 0]}).then(k=>{var O;const[H,B]=k;if(b=u.merge(B,(O=o())!=null?O:v),i(b,!0),H)return y()}).then(()=>{_?.(b,void 0),b=o(),c=!0,h.forEach(k=>k(b))}).catch(k=>{_?.(void 0,k)})};return s.persist={setOptions:E=>{u={...u,...E},E.storage&&(p=E.storage)},clearStorage:()=>{p?.removeItem(u.name)},getOptions:()=>u,rehydrate:()=>C(),hasHydrated:()=>c,onHydrate:E=>(d.add(E),()=>{d.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},u.skipHydration||C(),b||v},jS={sessionId:"",sessionToken:"",isStreaming:!1,error:null,isTimeoutError:!1,startNewConnection:!1,showRetryButton:!1,chats:{},inlineText:null,isRefreshingSession:!1,ConnectionStatus:We.ConnectionStatus.CONNECTING,streamingTimeoutId:null,responseTimeoutId:null,lastStreamingActivity:null},Hl=MS()(DS((n,l)=>({sessionId:"",setSessionId:i=>n({sessionId:i}),sessionToken:"",setSessionToken:i=>n({sessionToken:i}),agentId:"",setAgentId:i=>n({agentId:i}),connectionStatus:We.ConnectionStatus.CONNECTING,setConnectionStatus:i=>n({connectionStatus:i}),isStreaming:!1,setIsStreaming:i=>n({isStreaming:i}),isWaitingForResponse:!1,setIsWaitingForResponse:i=>n({isWaitingForResponse:i}),recordingStatus:We.AudioRecordingStatus.IDLE,setRecordingStatus:i=>n({recordingStatus:i}),startNewConnection:!1,setStartNewConnection:i=>n({startNewConnection:i}),inlineText:null,setInlineText:i=>n({inlineText:i}),isBotIconAnimating:!1,setIsBotIconAnimating:i=>n({isBotIconAnimating:i}),chats:{},addMessageToSession:(i,o)=>{console.log("adding message to session",i,o),n(s=>({chats:{...s.chats,[i]:[...s.chats[i]||[],o]}}))},updateMessageInSession:(i,o,s)=>n(u=>({chats:{...u.chats,[i]:(u.chats[i]||[]).map(c=>c.id===o?{...c,...s}:c)}})),getMessagesForSession:i=>l().chats[i]||[],clearMessagesForSession:i=>n(o=>({chats:{...o.chats,[i]:[]}})),clearAllChats:()=>n({chats:{}}),error:null,setError:i=>n({error:i}),clearError:()=>n({error:null,isTimeoutError:!1,showRetryButton:!1,startNewConnection:!1}),showRetryButton:!1,setShowRetryButton:i=>n({showRetryButton:i}),isTimeoutError:!1,setTimeoutError:i=>n({isTimeoutError:i}),clearSession:async()=>{n(jS),console.log("Clearing session"),await localStorage.removeItem("med-assist-store")},streamingTimeoutId:null,setStreamingTimeoutId:i=>n({streamingTimeoutId:i}),clearStreamingTimeout:()=>{const i=l();i.streamingTimeoutId&&(clearTimeout(i.streamingTimeoutId),n({streamingTimeoutId:null}))},responseTimeoutId:null,setResponseTimeoutId:i=>n({responseTimeoutId:i}),clearResponseTimeout:()=>{const i=l();i.responseTimeoutId&&(clearTimeout(i.responseTimeoutId),n({responseTimeoutId:null}))},lastStreamingActivity:null,setLastStreamingActivity:i=>n({lastStreamingActivity:i})}),{name:"med-assist-store",storage:Dh(()=>localStorage),partialize:n=>({agentId:n.agentId,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,connectionStatus:n.connectionStatus})}));function US({onClose:n,title:l,iconUrl:i,startNewConversation:o}){const s=Hl(d=>d.connectionStatus),c=(()=>{switch(s){case We.ConnectionStatus.CONNECTED:return{dotColor:"bg-green-500",text:"Connected",textColor:"text-green-600"};case We.ConnectionStatus.CONNECTING:return{dotColor:"bg-amber-500",text:"Connecting",textColor:"text-amber-600"};case We.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 F.jsx("div",{className:"bg-white/80 backdrop-blur-md border-b border-white/30 px-6 py-4",children:F.jsxs("div",{className:"flex items-center justify-between",children:[F.jsxs("div",{className:"flex items-center gap-3",children:[F.jsx(jl,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:F.jsx(Ul,{className:"text-white font-bold text-lg bg-transparent",children:i?F.jsx("img",{src:i,alt:"User Icon",className:"w-12 h-12"}):F.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),F.jsxs("div",{className:"flex flex-col",children:[F.jsx("p",{className:"text-md font-semibold text-slate-900",children:l||"Health Assist"}),F.jsxs("div",{className:"flex items-center gap-1.5",children:[F.jsx("div",{className:Je("w-1.5 h-1.5 rounded-full",c.dotColor,s===We.ConnectionStatus.CONNECTING&&"animate-pulse")}),F.jsx("span",{className:Je("text-xs font-medium",c.textColor),children:c.text})]})]})]}),F.jsxs("div",{className:"flex items-center gap-1",children:[F.jsx(Hn,{type:"button",variant:"ghost",size:"icon",title:"Start New Chat",onClick:o,className:"h-9 w-9 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg",children:F.jsx(Pv,{className:"w-5 h-5"})}),F.jsx(Hn,{onClick:n,type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg",children:F.jsx(Qv,{className:"w-5 h-5"})})]})]})})}function BS({isOpen:n,onClose:l,iconUrl:i,onStartNewSession:o,children:s,title:u}){const[c,d]=K.useState(!1);K.useEffect(()=>{const y=()=>{const g=window?.innerWidth??0,v=navigator?.userAgent?.toLowerCase()??"",b=g<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(v);d(b)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]),K.useEffect(()=>{if(n){const y=document.body.style.overflow,g=document.body.style.paddingRight,v=document.documentElement.style.overflow,b=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",b>0&&!c&&(document.body.style.paddingRight=`${b}px`),()=>{document.body.style.overflow=y,document.body.style.paddingRight=g,document.documentElement.style.overflow=v}}},[n,c]);const h=Je("synapse-chat-widget-container","fixed m-0 p-0","box-border","isolate","transition-all duration-300",c?"inset-0 w-screen h-[100dvh]":"bottom-4 right-4 w-96 h-[600px]","z-[2147483647]",n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none scale-95"),p=Je("w-full h-full","bg-white/90 backdrop-blur-2xl shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",c?"rounded-none":"rounded-3xl");return F.jsxs("div",{className:h,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto"},children:[F.jsx("style",{children:`
8
+ `+a.stack}}var X=Object.prototype.hasOwnProperty,he=n.unstable_scheduleCallback,pe=n.unstable_cancelCallback,le=n.unstable_shouldYield,Ee=n.unstable_requestPaint,_e=n.unstable_now,Se=n.unstable_getCurrentPriorityLevel,te=n.unstable_ImmediatePriority,be=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,Ie=n.unstable_LowPriority,Je=n.unstable_IdlePriority,pt=n.log,qt=n.unstable_setDisableYieldValue,Xe=null,gt=null;function Ot(e){if(typeof pt=="function"&&qt(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Xe,e)}catch{}}var Ze=Math.clz32?Math.clz32:zu,Cn=Math.log,nn=Math.LN2;function zu(e){return e>>>=0,e===0?32:31-(Cn(e)/nn|0)|0}var xi=256,Xr=262144,jn=4194304;function hn(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 $l(e,t,r){var a=e.pendingLanes;if(a===0)return 0;var d=0,p=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var R=a&134217727;return R!==0?(a=R&~p,a!==0?d=hn(a):(x&=R,x!==0?d=hn(x):r||(r=R&~e,r!==0&&(d=hn(r))))):(R=a&~p,R!==0?d=hn(R):x!==0?d=hn(x):r||(r=a&~e,r!==0&&(d=hn(r)))),d===0?0:t!==0&&t!==d&&(t&p)===0&&(p=d&-d,r=t&-t,p>=r||p===32&&(r&4194048)!==0)?t:d}function Ua(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ww(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 Op(){var e=jn;return jn<<=1,(jn&62914560)===0&&(jn=4194304),e}function Mu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ha(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $w(e,t,r,a,d,p){var x=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var R=e.entanglements,G=e.expirationTimes,oe=e.hiddenUpdates;for(r=x&~r;0<r;){var me=31-Ze(r),ye=1<<me;R[me]=0,G[me]=-1;var ue=oe[me];if(ue!==null)for(oe[me]=null,me=0;me<ue.length;me++){var fe=ue[me];fe!==null&&(fe.lane&=-536870913)}r&=~ye}a!==0&&zp(e,a,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(x&~t))}function zp(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ze(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|r&261930}function Mp(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var a=31-Ze(r),d=1<<a;d&t|e[a]&t&&(e[a]|=t),r&=~d}}function Dp(e,t){var r=t&-t;return r=(r&42)!==0?1:Du(r),(r&(e.suspendedLanes|t))!==0?0:r}function Du(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 ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jp(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Sb(e.type))}function Lp(e,t){var r=Q.p;try{return Q.p=e,t()}finally{Q.p=r}}var pr=Math.random().toString(36).slice(2),Dt="__reactFiber$"+pr,Xt="__reactProps$"+pr,_i="__reactContainer$"+pr,Lu="__reactEvents$"+pr,e2="__reactListeners$"+pr,t2="__reactHandles$"+pr,Ip="__reactResources$"+pr,qa="__reactMarker$"+pr;function Iu(e){delete e[Dt],delete e[Xt],delete e[Lu],delete e[e2],delete e[t2]}function wi(e){var t=e[Dt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[_i]||r[Dt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ib(e);e!==null;){if(r=e[Dt])return r;e=ib(e)}return t}e=r,r=e.parentNode}return null}function Ci(e){if(e=e[Dt]||e[_i]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ti(e){var t=e[Ip];return t||(t=e[Ip]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function zt(e){e[qa]=!0}var Bp=new Set,Up={};function Zr(e,t){Ai(e,t),Ai(e+"Capture",t)}function Ai(e,t){for(Up[e]=t,e=0;e<t.length;e++)Bp.add(t[e])}var n2=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]*$"),Hp={},qp={};function r2(e){return X.call(qp,e)?!0:X.call(Hp,e)?!1:n2.test(e)?qp[e]=!0:(Hp[e]=!0,!1)}function eo(e,t,r){if(r2(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function to(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function Yn(e,t,r,a){if(a===null)e.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+a)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function i2(e,t,r){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var d=a.get,p=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(x){r=""+x,p.call(this,x)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return r},setValue:function(x){r=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bu(e){if(!e._valueTracker){var t=Pp(e)?"checked":"value";e._valueTracker=i2(e,t,""+e[t])}}function Fp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Pp(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function no(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 a2=/[\n"\\]/g;function pn(e){return e.replace(a2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,r,a,d,p,x,R){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Hu(e,x,mn(t)):r!=null?Hu(e,x,mn(r)):a!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+mn(R):e.removeAttribute("name")}function Yp(e,t,r,a,d,p,x,R){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),t!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||t!=null)){Bu(e);return}r=r!=null?""+mn(r):"",t=t!=null?""+mn(t):r,R||t===e.value||(e.value=t),e.defaultValue=t}a=a??d,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=R?e.checked:!!a,e.defaultChecked=!!a,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Bu(e)}function Hu(e,t,r){t==="number"&&no(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function ki(e,t,r,a){if(e=e.options,t){t={};for(var d=0;d<r.length;d++)t["$"+r[d]]=!0;for(r=0;r<e.length;r++)d=t.hasOwnProperty("$"+e[r].value),e[r].selected!==d&&(e[r].selected=d),d&&a&&(e[r].defaultSelected=!0)}else{for(r=""+mn(r),t=null,d=0;d<e.length;d++){if(e[d].value===r){e[d].selected=!0,a&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function Vp(e,t,r){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+mn(r):""}function Gp(e,t,r,a){if(t==null){if(a!=null){if(r!=null)throw Error(o(92));if(V(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),t=r}r=mn(t),e.defaultValue=r,a=e.textContent,a===r&&a!==""&&a!==null&&(e.value=a),Bu(e)}function Ni(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var l2=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 Xp(e,t,r){var a=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,r):typeof r!="number"||r===0||l2.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Zp(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var a in r)!r.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var d in t)a=t[d],t.hasOwnProperty(d)&&r[d]!==a&&Xp(e,d,a)}else for(var p in t)t.hasOwnProperty(p)&&Xp(e,p,t[p])}function qu(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 o2=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"]]),s2=/^[\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 ro(e){return s2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Pu=null;function Fu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ri=null,Oi=null;function Kp(e){var t=Ci(e);if(t&&(e=t.stateNode)){var r=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var a=r[t];if(a!==e&&a.form===e.form){var d=a[Xt]||null;if(!d)throw Error(o(90));Uu(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<r.length;t++)a=r[t],a.form===e.form&&Fp(a)}break e;case"textarea":Vp(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&ki(e,!!r.multiple,t,!1)}}}var Yu=!1;function Qp(e,t,r){if(Yu)return e(t,r);Yu=!0;try{var a=e(t);return a}finally{if(Yu=!1,(Ri!==null||Oi!==null)&&(Vo(),Ri&&(t=Ri,e=Oi,Oi=Ri=null,Kp(t),e)))for(t=0;t<e.length;t++)Kp(e[t])}}function Fa(e,t){var r=e.stateNode;if(r===null)return null;var a=r[Xt]||null;if(a===null)return null;r=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=!1;if(Gn)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){Vu=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{Vu=!1}var gr=null,Gu=null,io=null;function Jp(){if(io)return io;var e,t=Gu,r=t.length,a,d="value"in gr?gr.value:gr.textContent,p=d.length;for(e=0;e<r&&t[e]===d[e];e++);var x=r-e;for(a=1;a<=x&&t[r-a]===d[p-a];a++);return io=d.slice(e,1<a?1-a:void 0)}function ao(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 Wp(){return!1}function Zt(e){function t(r,a,d,p,x){this._reactName=r,this._targetInst=d,this.type=a,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(r=e[R],this[R]=r?r(p):p[R]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?lo:Wp,this.isPropagationStopped=Wp,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=lo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),t}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Zt(Kr),Va=y({},Kr,{view:0,detail:0}),u2=Zt(Va),Xu,Zu,Ga,so=y({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,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!==Ga&&(Ga&&e.type==="mousemove"?(Xu=e.screenX-Ga.screenX,Zu=e.screenY-Ga.screenY):Zu=Xu=0,Ga=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),$p=Zt(so),c2=y({},so,{dataTransfer:0}),f2=Zt(c2),d2=y({},Va,{relatedTarget:0}),Ku=Zt(d2),h2=y({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Zt(h2),p2=y({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Zt(p2),y2=y({},Kr,{data:0}),eg=Zt(y2),b2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v2={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"},S2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S2[e])?!!t[e]:!1}function Qu(){return E2}var x2=y({},Va,{key:function(e){if(e.key){var t=b2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_2=Zt(x2),w2=y({},so,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=Zt(w2),C2=y({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),T2=Zt(C2),A2=y({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),k2=Zt(A2),N2=y({},so,{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}),R2=Zt(N2),O2=y({},Kr,{newState:0,oldState:0}),z2=Zt(O2),M2=[9,13,27,32],Ju=Gn&&"CompositionEvent"in window,Xa=null;Gn&&"documentMode"in document&&(Xa=document.documentMode);var D2=Gn&&"TextEvent"in window&&!Xa,ng=Gn&&(!Ju||Xa&&8<Xa&&11>=Xa),rg=" ",ig=!1;function ag(e,t){switch(e){case"keyup":return M2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zi=!1;function j2(e,t){switch(e){case"compositionend":return lg(t);case"keypress":return t.which!==32?null:(ig=!0,rg);case"textInput":return e=t.data,e===rg&&ig?null:e;default:return null}}function L2(e,t){if(zi)return e==="compositionend"||!Ju&&ag(e,t)?(e=Jp(),io=Gu=gr=null,zi=!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 ng&&t.locale!=="ko"?null:t.data;default:return null}}var I2={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 og(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I2[e.type]:t==="textarea"}function sg(e,t,r,a){Ri?Oi?Oi.push(a):Oi=[a]:Ri=a,t=Wo(t,"onChange"),0<t.length&&(r=new oo("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var Za=null,Ka=null;function B2(e){Y0(e,0)}function uo(e){var t=Pa(e);if(Fp(t))return e}function ug(e,t){if(e==="change")return t}var cg=!1;if(Gn){var Wu;if(Gn){var $u="oninput"in document;if(!$u){var fg=document.createElement("div");fg.setAttribute("oninput","return;"),$u=typeof fg.oninput=="function"}Wu=$u}else Wu=!1;cg=Wu&&(!document.documentMode||9<document.documentMode)}function dg(){Za&&(Za.detachEvent("onpropertychange",hg),Ka=Za=null)}function hg(e){if(e.propertyName==="value"&&uo(Ka)){var t=[];sg(t,Ka,e,Fu(e)),Qp(B2,t)}}function U2(e,t,r){e==="focusin"?(dg(),Za=t,Ka=r,Za.attachEvent("onpropertychange",hg)):e==="focusout"&&dg()}function H2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Ka)}function q2(e,t){if(e==="click")return uo(t)}function P2(e,t){if(e==="input"||e==="change")return uo(t)}function F2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rn=typeof Object.is=="function"?Object.is:F2;function Qa(e,t){if(rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(a=0;a<r.length;a++){var d=r[a];if(!X.call(t,d)||!rn(e[d],t[d]))return!1}return!0}function mg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pg(e,t){var r=mg(e);e=0;for(var a;r;){if(r.nodeType===3){if(a=e+r.textContent.length,e<=t&&a>=t)return{node:r,offset:t-e};e=a}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=mg(r)}}function gg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=no(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=no(e.document)}return t}function ec(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 Y2=Gn&&"documentMode"in document&&11>=document.documentMode,Mi=null,tc=null,Ja=null,nc=!1;function bg(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;nc||Mi==null||Mi!==no(a)||(a=Mi,"selectionStart"in a&&ec(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ja&&Qa(Ja,a)||(Ja=a,a=Wo(tc,"onSelect"),0<a.length&&(t=new oo("onSelect","select",null,t,r),e.push({event:t,listeners:a}),t.target=Mi)))}function Qr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Di={animationend:Qr("Animation","AnimationEnd"),animationiteration:Qr("Animation","AnimationIteration"),animationstart:Qr("Animation","AnimationStart"),transitionrun:Qr("Transition","TransitionRun"),transitionstart:Qr("Transition","TransitionStart"),transitioncancel:Qr("Transition","TransitionCancel"),transitionend:Qr("Transition","TransitionEnd")},rc={},vg={};Gn&&(vg=document.createElement("div").style,"AnimationEvent"in window||(delete Di.animationend.animation,delete Di.animationiteration.animation,delete Di.animationstart.animation),"TransitionEvent"in window||delete Di.transitionend.transition);function Jr(e){if(rc[e])return rc[e];if(!Di[e])return e;var t=Di[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in vg)return rc[e]=t[r];return e}var Sg=Jr("animationend"),Eg=Jr("animationiteration"),xg=Jr("animationstart"),V2=Jr("transitionrun"),G2=Jr("transitionstart"),X2=Jr("transitioncancel"),_g=Jr("transitionend"),wg=new Map,ic="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ic.push("scrollEnd");function Tn(e,t){wg.set(e,t),Zr(t,[e])}var co=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}},gn=[],ji=0,ac=0;function fo(){for(var e=ji,t=ac=ji=0;t<e;){var r=gn[t];gn[t++]=null;var a=gn[t];gn[t++]=null;var d=gn[t];gn[t++]=null;var p=gn[t];if(gn[t++]=null,a!==null&&d!==null){var x=a.pending;x===null?d.next=d:(d.next=x.next,x.next=d),a.pending=d}p!==0&&Cg(r,d,p)}}function ho(e,t,r,a){gn[ji++]=e,gn[ji++]=t,gn[ji++]=r,gn[ji++]=a,ac|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function lc(e,t,r,a){return ho(e,t,r,a),mo(e)}function Wr(e,t){return ho(e,null,null,t),mo(e)}function Cg(e,t,r){e.lanes|=r;var a=e.alternate;a!==null&&(a.lanes|=r);for(var d=!1,p=e.return;p!==null;)p.childLanes|=r,a=p.alternate,a!==null&&(a.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&t!==null&&(d=31-Ze(r),e=p.hiddenUpdates,a=e[d],a===null?e[d]=[t]:a.push(t),t.lane=r|536870912),p):null}function mo(e){if(50<vl)throw vl=0,gf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Li={};function Z2(e,t,r,a){this.tag=e,this.key=r,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,r,a){return new Z2(e,t,r,a)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xn(e,t){var r=e.alternate;return r===null?(r=an(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Tg(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,r,a,d,p){var x=0;if(a=e,typeof e=="function")oc(e)&&(x=1);else if(typeof e=="string")x=$C(e,r,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=an(31,r,t,d),e.elementType=F,e.lanes=p,e;case E:return $r(r.children,d,p,t);case T:x=8,d|=24;break;case _:return e=an(12,r,t,d|2),e.elementType=_,e.lanes=p,e;case H:return e=an(13,r,t,d),e.elementType=H,e.lanes=p,e;case M:return e=an(19,r,t,d),e.elementType=M,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:x=10;break e;case A:x=9;break e;case q:x=11;break e;case I:x=14;break e;case Y:x=16,a=null;break e}x=29,r=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=an(x,r,t,d),t.elementType=e,t.type=a,t.lanes=p,t}function $r(e,t,r,a){return e=an(7,e,a,t),e.lanes=r,e}function sc(e,t,r){return e=an(6,e,null,t),e.lanes=r,e}function Ag(e){var t=an(18,null,null,0);return t.stateNode=e,t}function uc(e,t,r){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kg=new WeakMap;function yn(e,t){if(typeof e=="object"&&e!==null){var r=kg.get(e);return r!==void 0?r:(t={value:e,source:t,stack:j(t)},kg.set(e,t),t)}return{value:e,source:t,stack:j(t)}}var Ii=[],Bi=0,go=null,Wa=0,bn=[],vn=0,yr=null,Ln=1,In="";function Zn(e,t){Ii[Bi++]=Wa,Ii[Bi++]=go,go=e,Wa=t}function Ng(e,t,r){bn[vn++]=Ln,bn[vn++]=In,bn[vn++]=yr,yr=e;var a=Ln;e=In;var d=32-Ze(a)-1;a&=~(1<<d),r+=1;var p=32-Ze(t)+d;if(30<p){var x=d-d%5;p=(a&(1<<x)-1).toString(32),a>>=x,d-=x,Ln=1<<32-Ze(t)+d|r<<d|a,In=p+e}else Ln=1<<p|r<<d|a,In=e}function cc(e){e.return!==null&&(Zn(e,1),Ng(e,1,0))}function fc(e){for(;e===go;)go=Ii[--Bi],Ii[Bi]=null,Wa=Ii[--Bi],Ii[Bi]=null;for(;e===yr;)yr=bn[--vn],bn[vn]=null,In=bn[--vn],bn[vn]=null,Ln=bn[--vn],bn[vn]=null}function Rg(e,t){bn[vn++]=Ln,bn[vn++]=In,bn[vn++]=yr,Ln=t.id,In=t.overflow,yr=e}var jt=null,ht=null,et=!1,br=null,Sn=!1,dc=Error(o(519));function vr(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $a(yn(t,e)),dc}function Og(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[Dt]=e,t[Xt]=a,r){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(r=0;r<El.length;r++)Qe(El[r],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),Yp(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),Gp(t,a.value,a.defaultValue,a.children)}r=a.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||a.suppressHydrationWarning===!0||Z0(t.textContent,r)?(a.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),a.onScroll!=null&&Qe("scroll",t),a.onScrollEnd!=null&&Qe("scrollend",t),a.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||vr(e,!0)}function zg(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:Sn=!1;return;case 27:case 3:Sn=!0;return;default:jt=jt.return}}function Ui(e){if(e!==jt)return!1;if(!et)return zg(e),et=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Of(e.type,e.memoizedProps)),r=!r),r&&ht&&vr(e),zg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=rb(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=rb(e)}else t===27?(t=ht,Mr(e.type)?(e=Lf,Lf=null,ht=e):ht=t):ht=jt?xn(e.stateNode.nextSibling):null;return!0}function ei(){ht=jt=null,et=!1}function hc(){var e=br;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),br=null),e}function $a(e){br===null?br=[e]:br.push(e)}var mc=N(null),ti=null,Kn=null;function Sr(e,t,r){z(mc,t._currentValue),t._currentValue=r}function Qn(e){e._currentValue=mc.current,B(mc)}function pc(e,t,r){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===r)break;e=e.return}}function gc(e,t,r,a){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var x=d.child;p=p.firstContext;e:for(;p!==null;){var R=p;p=d;for(var G=0;G<t.length;G++)if(R.context===t[G]){p.lanes|=r,R=p.alternate,R!==null&&(R.lanes|=r),pc(p.return,r,e),a||(x=null);break e}p=R.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(o(341));x.lanes|=r,p=x.alternate,p!==null&&(p.lanes|=r),pc(x,r,e),x=null}else x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===e){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}}function Hi(e,t,r,a){e=null;for(var d=t,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var x=d.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var R=d.type;rn(d.pendingProps.value,x.value)||(e!==null?e.push(R):e=[R])}}else if(d===Te.current){if(x=d.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(Tl):e=[Tl])}d=d.return}e!==null&&gc(t,e,r,a),t.flags|=262144}function yo(e){for(e=e.firstContext;e!==null;){if(!rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ni(e){ti=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Mg(ti,e)}function bo(e,t){return ti===null&&ni(e),Mg(e,t)}function Mg(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Kn===null){if(e===null)throw Error(o(308));Kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kn=Kn.next=t;return r}var K2=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Q2=n.unstable_scheduleCallback,J2=n.unstable_NormalPriority,_t={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new K2,data:new Map,refCount:0}}function el(e){e.refCount--,e.refCount===0&&Q2(J2,function(){e.controller.abort()})}var tl=null,bc=0,qi=0,Pi=null;function W2(e,t){if(tl===null){var r=tl=[];bc=0,qi=xf(),Pi={status:"pending",value:void 0,then:function(a){r.push(a)}}}return bc++,t.then(Dg,Dg),t}function Dg(){if(--bc===0&&tl!==null){Pi!==null&&(Pi.status="fulfilled");var e=tl;tl=null,qi=0,Pi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $2(e,t){var r=[],a={status:"pending",value:null,reason:null,then:function(d){r.push(d)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var d=0;d<r.length;d++)(0,r[d])(t)},function(d){for(a.status="rejected",a.reason=d,d=0;d<r.length;d++)(0,r[d])(void 0)}),a}var jg=Z.S;Z.S=function(e,t){b0=_e(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&W2(e,t),jg!==null&&jg(e,t)};var ri=N(null);function vc(){var e=ri.current;return e!==null?e:ct.pooledCache}function vo(e,t){t===null?z(ri,ri.current):z(ri,t.pool)}function Lg(){var e=vc();return e===null?null:{parent:_t._currentValue,pool:e}}var Fi=Error(o(460)),Sc=Error(o(474)),So=Error(o(542)),Eo={then:function(){}};function Ig(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Bg(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Vn,Vn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hg(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=a}},function(a){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Hg(e),e}throw ai=t,Fi}}function ii(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ai=r,Fi):r}}var ai=null;function Ug(){if(ai===null)throw Error(o(459));var e=ai;return ai=null,e}function Hg(e){if(e===Fi||e===So)throw Error(o(483))}var Yi=null,nl=0;function xo(e){var t=nl;return nl+=1,Yi===null&&(Yi=[]),Bg(Yi,e,t)}function rl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===v?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qg(e){function t(ee,J){if(e){var ae=ee.deletions;ae===null?(ee.deletions=[J],ee.flags|=16):ae.push(J)}}function r(ee,J){if(!e)return null;for(;J!==null;)t(ee,J),J=J.sibling;return null}function a(ee){for(var J=new Map;ee!==null;)ee.key!==null?J.set(ee.key,ee):J.set(ee.index,ee),ee=ee.sibling;return J}function d(ee,J){return ee=Xn(ee,J),ee.index=0,ee.sibling=null,ee}function p(ee,J,ae){return ee.index=ae,e?(ae=ee.alternate,ae!==null?(ae=ae.index,ae<J?(ee.flags|=67108866,J):ae):(ee.flags|=67108866,J)):(ee.flags|=1048576,J)}function x(ee){return e&&ee.alternate===null&&(ee.flags|=67108866),ee}function R(ee,J,ae,ge){return J===null||J.tag!==6?(J=sc(ae,ee.mode,ge),J.return=ee,J):(J=d(J,ae),J.return=ee,J)}function G(ee,J,ae,ge){var De=ae.type;return De===E?me(ee,J,ae.props.children,ge,ae.key):J!==null&&(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ii(De)===J.type)?(J=d(J,ae.props),rl(J,ae),J.return=ee,J):(J=po(ae.type,ae.key,ae.props,null,ee.mode,ge),rl(J,ae),J.return=ee,J)}function oe(ee,J,ae,ge){return J===null||J.tag!==4||J.stateNode.containerInfo!==ae.containerInfo||J.stateNode.implementation!==ae.implementation?(J=uc(ae,ee.mode,ge),J.return=ee,J):(J=d(J,ae.children||[]),J.return=ee,J)}function me(ee,J,ae,ge,De){return J===null||J.tag!==7?(J=$r(ae,ee.mode,ge,De),J.return=ee,J):(J=d(J,ae),J.return=ee,J)}function ye(ee,J,ae){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=sc(""+J,ee.mode,ae),J.return=ee,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return ae=po(J.type,J.key,J.props,null,ee.mode,ae),rl(ae,J),ae.return=ee,ae;case w:return J=uc(J,ee.mode,ae),J.return=ee,J;case Y:return J=ii(J),ye(ee,J,ae)}if(V(J)||D(J))return J=$r(J,ee.mode,ae,null),J.return=ee,J;if(typeof J.then=="function")return ye(ee,xo(J),ae);if(J.$$typeof===k)return ye(ee,bo(ee,J),ae);_o(ee,J)}return null}function ue(ee,J,ae,ge){var De=J!==null?J.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return De!==null?null:R(ee,J,""+ae,ge);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return ae.key===De?G(ee,J,ae,ge):null;case w:return ae.key===De?oe(ee,J,ae,ge):null;case Y:return ae=ii(ae),ue(ee,J,ae,ge)}if(V(ae)||D(ae))return De!==null?null:me(ee,J,ae,ge,null);if(typeof ae.then=="function")return ue(ee,J,xo(ae),ge);if(ae.$$typeof===k)return ue(ee,J,bo(ee,ae),ge);_o(ee,ae)}return null}function fe(ee,J,ae,ge,De){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ee=ee.get(ae)||null,R(J,ee,""+ge,De);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case b:return ee=ee.get(ge.key===null?ae:ge.key)||null,G(J,ee,ge,De);case w:return ee=ee.get(ge.key===null?ae:ge.key)||null,oe(J,ee,ge,De);case Y:return ge=ii(ge),fe(ee,J,ae,ge,De)}if(V(ge)||D(ge))return ee=ee.get(ae)||null,me(J,ee,ge,De,null);if(typeof ge.then=="function")return fe(ee,J,ae,xo(ge),De);if(ge.$$typeof===k)return fe(ee,J,ae,bo(J,ge),De);_o(J,ge)}return null}function Ne(ee,J,ae,ge){for(var De=null,tt=null,Me=J,Fe=J=0,$e=null;Me!==null&&Fe<ae.length;Fe++){Me.index>Fe?($e=Me,Me=null):$e=Me.sibling;var nt=ue(ee,Me,ae[Fe],ge);if(nt===null){Me===null&&(Me=$e);break}e&&Me&&nt.alternate===null&&t(ee,Me),J=p(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt,Me=$e}if(Fe===ae.length)return r(ee,Me),et&&Zn(ee,Fe),De;if(Me===null){for(;Fe<ae.length;Fe++)Me=ye(ee,ae[Fe],ge),Me!==null&&(J=p(Me,J,Fe),tt===null?De=Me:tt.sibling=Me,tt=Me);return et&&Zn(ee,Fe),De}for(Me=a(Me);Fe<ae.length;Fe++)$e=fe(Me,ee,Fe,ae[Fe],ge),$e!==null&&(e&&$e.alternate!==null&&Me.delete($e.key===null?Fe:$e.key),J=p($e,J,Fe),tt===null?De=$e:tt.sibling=$e,tt=$e);return e&&Me.forEach(function(Br){return t(ee,Br)}),et&&Zn(ee,Fe),De}function Le(ee,J,ae,ge){if(ae==null)throw Error(o(151));for(var De=null,tt=null,Me=J,Fe=J=0,$e=null,nt=ae.next();Me!==null&&!nt.done;Fe++,nt=ae.next()){Me.index>Fe?($e=Me,Me=null):$e=Me.sibling;var Br=ue(ee,Me,nt.value,ge);if(Br===null){Me===null&&(Me=$e);break}e&&Me&&Br.alternate===null&&t(ee,Me),J=p(Br,J,Fe),tt===null?De=Br:tt.sibling=Br,tt=Br,Me=$e}if(nt.done)return r(ee,Me),et&&Zn(ee,Fe),De;if(Me===null){for(;!nt.done;Fe++,nt=ae.next())nt=ye(ee,nt.value,ge),nt!==null&&(J=p(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt);return et&&Zn(ee,Fe),De}for(Me=a(Me);!nt.done;Fe++,nt=ae.next())nt=fe(Me,ee,Fe,nt.value,ge),nt!==null&&(e&&nt.alternate!==null&&Me.delete(nt.key===null?Fe:nt.key),J=p(nt,J,Fe),tt===null?De=nt:tt.sibling=nt,tt=nt);return e&&Me.forEach(function(cT){return t(ee,cT)}),et&&Zn(ee,Fe),De}function ut(ee,J,ae,ge){if(typeof ae=="object"&&ae!==null&&ae.type===E&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:e:{for(var De=ae.key;J!==null;){if(J.key===De){if(De=ae.type,De===E){if(J.tag===7){r(ee,J.sibling),ge=d(J,ae.props.children),ge.return=ee,ee=ge;break e}}else if(J.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Y&&ii(De)===J.type){r(ee,J.sibling),ge=d(J,ae.props),rl(ge,ae),ge.return=ee,ee=ge;break e}r(ee,J);break}else t(ee,J);J=J.sibling}ae.type===E?(ge=$r(ae.props.children,ee.mode,ge,ae.key),ge.return=ee,ee=ge):(ge=po(ae.type,ae.key,ae.props,null,ee.mode,ge),rl(ge,ae),ge.return=ee,ee=ge)}return x(ee);case w:e:{for(De=ae.key;J!==null;){if(J.key===De)if(J.tag===4&&J.stateNode.containerInfo===ae.containerInfo&&J.stateNode.implementation===ae.implementation){r(ee,J.sibling),ge=d(J,ae.children||[]),ge.return=ee,ee=ge;break e}else{r(ee,J);break}else t(ee,J);J=J.sibling}ge=uc(ae,ee.mode,ge),ge.return=ee,ee=ge}return x(ee);case Y:return ae=ii(ae),ut(ee,J,ae,ge)}if(V(ae))return Ne(ee,J,ae,ge);if(D(ae)){if(De=D(ae),typeof De!="function")throw Error(o(150));return ae=De.call(ae),Le(ee,J,ae,ge)}if(typeof ae.then=="function")return ut(ee,J,xo(ae),ge);if(ae.$$typeof===k)return ut(ee,J,bo(ee,ae),ge);_o(ee,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,J!==null&&J.tag===6?(r(ee,J.sibling),ge=d(J,ae),ge.return=ee,ee=ge):(r(ee,J),ge=sc(ae,ee.mode,ge),ge.return=ee,ee=ge),x(ee)):r(ee,J)}return function(ee,J,ae,ge){try{nl=0;var De=ut(ee,J,ae,ge);return Yi=null,De}catch(Me){if(Me===Fi||Me===So)throw Me;var tt=an(29,Me,null,ee.mode);return tt.lanes=ge,tt.return=ee,tt}finally{}}}var li=qg(!0),Pg=qg(!1),Er=!1;function Ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xc(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 xr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _r(e,t,r){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(it&2)!==0){var d=a.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),a.pending=t,t=mo(e),Cg(e,null,r),t}return ho(e,a,t,r),mo(e)}function il(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Mp(e,r)}}function _c(e,t){var r=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,r===a)){var d=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var x={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?d=p=x:p=p.next=x,r=r.next}while(r!==null);p===null?d=p=t:p=p.next=t}else d=p=t;r={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:a.shared,callbacks:a.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var wc=!1;function al(){if(wc){var e=Pi;if(e!==null)throw e}}function ll(e,t,r,a){wc=!1;var d=e.updateQueue;Er=!1;var p=d.firstBaseUpdate,x=d.lastBaseUpdate,R=d.shared.pending;if(R!==null){d.shared.pending=null;var G=R,oe=G.next;G.next=null,x===null?p=oe:x.next=oe,x=G;var me=e.alternate;me!==null&&(me=me.updateQueue,R=me.lastBaseUpdate,R!==x&&(R===null?me.firstBaseUpdate=oe:R.next=oe,me.lastBaseUpdate=G))}if(p!==null){var ye=d.baseState;x=0,me=oe=G=null,R=p;do{var ue=R.lane&-536870913,fe=ue!==R.lane;if(fe?(We&ue)===ue:(a&ue)===ue){ue!==0&&ue===qi&&(wc=!0),me!==null&&(me=me.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Ne=e,Le=R;ue=t;var ut=r;switch(Le.tag){case 1:if(Ne=Le.payload,typeof Ne=="function"){ye=Ne.call(ut,ye,ue);break e}ye=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Le.payload,ue=typeof Ne=="function"?Ne.call(ut,ye,ue):Ne,ue==null)break e;ye=y({},ye,ue);break e;case 2:Er=!0}}ue=R.callback,ue!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=d.callbacks,fe===null?d.callbacks=[ue]:fe.push(ue))}else fe={lane:ue,tag:R.tag,payload:R.payload,callback:R.callback,next:null},me===null?(oe=me=fe,G=ye):me=me.next=fe,x|=ue;if(R=R.next,R===null){if(R=d.shared.pending,R===null)break;fe=R,R=fe.next,fe.next=null,d.lastBaseUpdate=fe,d.shared.pending=null}}while(!0);me===null&&(G=ye),d.baseState=G,d.firstBaseUpdate=oe,d.lastBaseUpdate=me,p===null&&(d.shared.lanes=0),kr|=x,e.lanes=x,e.memoizedState=ye}}function Fg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Yg(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Fg(r[e],t)}var Vi=N(null),wo=N(0);function Vg(e,t){e=ar,z(wo,e),z(Vi,t),ar=e|t.baseLanes}function Cc(){z(wo,ar),z(Vi,Vi.current)}function Tc(){ar=wo.current,B(Vi),B(wo)}var ln=N(null),En=null;function wr(e){var t=e.alternate;z(St,St.current&1),z(ln,e),En===null&&(t===null||Vi.current!==null||t.memoizedState!==null)&&(En=e)}function Ac(e){z(St,St.current),z(ln,e),En===null&&(En=e)}function Gg(e){e.tag===22?(z(St,St.current),z(ln,e),En===null&&(En=e)):Cr()}function Cr(){z(St,St.current),z(ln,ln.current)}function on(e){B(ln),En===e&&(En=null),B(St)}var St=N(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Df(r)||jf(r)))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 Jn=0,qe=null,ot=null,wt=null,To=!1,Gi=!1,oi=!1,Ao=0,ol=0,Xi=null,eC=0;function bt(){throw Error(o(321))}function kc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!rn(e[r],t[r]))return!1;return!0}function Nc(e,t,r,a,d,p){return Jn=p,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?Ny:Yc,oi=!1,p=r(a,d),oi=!1,Gi&&(p=Zg(t,r,a,d)),Xg(e),p}function Xg(e){Z.H=cl;var t=ot!==null&&ot.next!==null;if(Jn=0,wt=ot=qe=null,To=!1,ol=0,Xi=null,t)throw Error(o(300));e===null||Ct||(e=e.dependencies,e!==null&&yo(e)&&(Ct=!0))}function Zg(e,t,r,a){qe=e;var d=0;do{if(Gi&&(Xi=null),ol=0,Gi=!1,25<=d)throw Error(o(301));if(d+=1,wt=ot=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}Z.H=Ry,p=t(r,a)}while(Gi);return p}function tC(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?sl(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(qe.flags|=1024),t}function Rc(){var e=Ao!==0;return Ao=0,e}function Oc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function zc(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}Jn=0,wt=ot=qe=null,Gi=!1,ol=Ao=0,Xi=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?qe.memoizedState=wt=e:wt=wt.next=e,wt}function Et(){if(ot===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=wt===null?qe.memoizedState:wt.next;if(t!==null)wt=t,ot=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},wt===null?qe.memoizedState=wt=e:wt=wt.next=e}return wt}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(e){var t=ol;return ol+=1,Xi===null&&(Xi=[]),e=Bg(Xi,e,t),t=qe,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?Ny:Yc),e}function No(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return sl(e);if(e.$$typeof===k)return Lt(e)}throw Error(o(438,String(e)))}function Mc(e){var t=null,r=qe.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=ko(),qe.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),a=0;a<e;a++)r[a]=$;return t.index++,r}function Wn(e,t){return typeof t=="function"?t(e):t}function Ro(e){var t=Et();return Dc(t,ot,e)}function Dc(e,t,r){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=e.baseQueue,p=a.pending;if(p!==null){if(d!==null){var x=d.next;d.next=p.next,p.next=x}t.baseQueue=d=p,a.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{t=d.next;var R=x=null,G=null,oe=t,me=!1;do{var ye=oe.lane&-536870913;if(ye!==oe.lane?(We&ye)===ye:(Jn&ye)===ye){var ue=oe.revertLane;if(ue===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),ye===qi&&(me=!0);else if((Jn&ue)===ue){oe=oe.next,ue===qi&&(me=!0);continue}else ye={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},G===null?(R=G=ye,x=p):G=G.next=ye,qe.lanes|=ue,kr|=ue;ye=oe.action,oi&&r(p,ye),p=oe.hasEagerState?oe.eagerState:r(p,ye)}else ue={lane:ye,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},G===null?(R=G=ue,x=p):G=G.next=ue,qe.lanes|=ye,kr|=ye;oe=oe.next}while(oe!==null&&oe!==t);if(G===null?x=p:G.next=R,!rn(p,e.memoizedState)&&(Ct=!0,me&&(r=Pi,r!==null)))throw r;e.memoizedState=p,e.baseState=x,e.baseQueue=G,a.lastRenderedState=p}return d===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function jc(e){var t=Et(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var a=r.dispatch,d=r.pending,p=t.memoizedState;if(d!==null){r.pending=null;var x=d=d.next;do p=e(p,x.action),x=x.next;while(x!==d);rn(p,t.memoizedState)||(Ct=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),r.lastRenderedState=p}return[p,a]}function Kg(e,t,r){var a=qe,d=Et(),p=et;if(p){if(r===void 0)throw Error(o(407));r=r()}else r=t();var x=!rn((ot||d).memoizedState,r);if(x&&(d.memoizedState=r,Ct=!0),d=d.queue,Bc(Wg.bind(null,a,d,e),[e]),d.getSnapshot!==t||x||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,Zi(9,{destroy:void 0},Jg.bind(null,a,d,r,t),null),ct===null)throw Error(o(349));p||(Jn&127)!==0||Qg(a,t,r)}return r}function Qg(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=qe.updateQueue,t===null?(t=ko(),qe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Jg(e,t,r,a){t.value=r,t.getSnapshot=a,$g(t)&&ey(e)}function Wg(e,t,r){return r(function(){$g(t)&&ey(e)})}function $g(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!rn(e,r)}catch{return!0}}function ey(e){var t=Wr(e,2);t!==null&&$t(t,e,2)}function Lc(e){var t=Pt();if(typeof e=="function"){var r=e;if(e=r(),oi){Ot(!0);try{r()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function ty(e,t,r,a){return e.baseState=r,Dc(e,ot,typeof a=="function"?a:Wn)}function nC(e,t,r,a,d){if(Mo(e))throw Error(o(485));if(e=t.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){p.listeners.push(x)}};Z.T!==null?r(!0):p.isTransition=!1,a(p),r=t.pending,r===null?(p.next=t.pending=p,ny(t,p)):(p.next=r.next,t.pending=r.next=p)}}function ny(e,t){var r=t.action,a=t.payload,d=e.state;if(t.isTransition){var p=Z.T,x={};Z.T=x;try{var R=r(d,a),G=Z.S;G!==null&&G(x,R),ry(e,t,R)}catch(oe){Ic(e,t,oe)}finally{p!==null&&x.types!==null&&(p.types=x.types),Z.T=p}}else try{p=r(d,a),ry(e,t,p)}catch(oe){Ic(e,t,oe)}}function ry(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){iy(e,t,a)},function(a){return Ic(e,t,a)}):iy(e,t,r)}function iy(e,t,r){t.status="fulfilled",t.value=r,ay(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,ny(e,r)))}function Ic(e,t,r){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=r,ay(t),t=t.next;while(t!==a)}e.action=null}function ay(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ly(e,t){return t}function oy(e,t){if(et){var r=ct.formState;if(r!==null){e:{var a=qe;if(et){if(ht){t:{for(var d=ht,p=Sn;d.nodeType!==8;){if(!p){d=null;break t}if(d=xn(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){ht=xn(d.nextSibling),a=d.data==="F!";break e}}vr(a)}a=!1}a&&(t=r[0])}}return r=Pt(),r.memoizedState=r.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ly,lastRenderedState:t},r.queue=a,r=Ty.bind(null,qe,a),a.dispatch=r,a=Lc(!1),p=Fc.bind(null,qe,!1,a.queue),a=Pt(),d={state:t,dispatch:null,action:e,pending:null},a.queue=d,r=nC.bind(null,qe,d,p,r),d.dispatch=r,a.memoizedState=e,[t,r,!1]}function sy(e){var t=Et();return uy(t,ot,e)}function uy(e,t,r){if(t=Dc(e,t,ly)[0],e=Ro(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=sl(t)}catch(x){throw x===Fi?So:x}else a=t;t=Et();var d=t.queue,p=d.dispatch;return r!==t.memoizedState&&(qe.flags|=2048,Zi(9,{destroy:void 0},rC.bind(null,d,r),null)),[a,p,e]}function rC(e,t){e.action=t}function cy(e){var t=Et(),r=ot;if(r!==null)return uy(t,r,e);Et(),t=t.memoizedState,r=Et();var a=r.queue.dispatch;return r.memoizedState=e,[t,a,!1]}function Zi(e,t,r,a){return e={tag:e,create:r,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=ko(),qe.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(a=r.next,r.next=e,e.next=a,t.lastEffect=e),e}function fy(){return Et().memoizedState}function Oo(e,t,r,a){var d=Pt();qe.flags|=e,d.memoizedState=Zi(1|t,{destroy:void 0},r,a===void 0?null:a)}function zo(e,t,r,a){var d=Et();a=a===void 0?null:a;var p=d.memoizedState.inst;ot!==null&&a!==null&&kc(a,ot.memoizedState.deps)?d.memoizedState=Zi(t,p,r,a):(qe.flags|=e,d.memoizedState=Zi(1|t,p,r,a))}function dy(e,t){Oo(8390656,8,e,t)}function Bc(e,t){zo(2048,8,e,t)}function iC(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=ko(),qe.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function hy(e){var t=Et().memoizedState;return iC({ref:t,nextImpl:e}),function(){if((it&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function my(e,t){return zo(4,2,e,t)}function py(e,t){return zo(4,4,e,t)}function gy(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yy(e,t,r){r=r!=null?r.concat([e]):null,zo(4,4,gy.bind(null,t,e),r)}function Uc(){}function by(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;return t!==null&&kc(t,a[1])?a[0]:(r.memoizedState=[e,t],e)}function vy(e,t){var r=Et();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&kc(t,a[1]))return a[0];if(a=e(),oi){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a}function Hc(e,t,r){return r===void 0||(Jn&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=S0(),qe.lanes|=e,kr|=e,r)}function Sy(e,t,r,a){return rn(r,t)?r:Vi.current!==null?(e=Hc(e,r,a),rn(e,t)||(Ct=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(We&261930)===0?(Ct=!0,e.memoizedState=r):(e=S0(),qe.lanes|=e,kr|=e,t)}function Ey(e,t,r,a,d){var p=Q.p;Q.p=p!==0&&8>p?p:8;var x=Z.T,R={};Z.T=R,Fc(e,!1,t,r);try{var G=d(),oe=Z.S;if(oe!==null&&oe(R,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var me=$2(G,a);ul(e,t,me,cn(e))}else ul(e,t,a,cn(e))}catch(ye){ul(e,t,{then:function(){},status:"rejected",reason:ye},cn())}finally{Q.p=p,x!==null&&R.types!==null&&(x.types=R.types),Z.T=x}}function aC(){}function qc(e,t,r,a){if(e.tag!==5)throw Error(o(476));var d=xy(e).queue;Ey(e,d,t,se,r===null?aC:function(){return _y(e),r(a)})}function xy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:se},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _y(e){var t=xy(e);t.next===null&&(t=e.alternate.memoizedState),ul(e,t.next.queue,{},cn())}function Pc(){return Lt(Tl)}function wy(){return Et().memoizedState}function Cy(){return Et().memoizedState}function lC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=cn();e=xr(r);var a=_r(t,e,r);a!==null&&($t(a,t,r),il(a,t,r)),t={cache:yc()},e.payload=t;return}t=t.return}}function oC(e,t,r){var a=cn();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Mo(e)?Ay(t,r):(r=lc(e,t,r,a),r!==null&&($t(r,e,a),ky(r,t,a)))}function Ty(e,t,r){var a=cn();ul(e,t,r,a)}function ul(e,t,r,a){var d={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))Ay(t,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var x=t.lastRenderedState,R=p(x,r);if(d.hasEagerState=!0,d.eagerState=R,rn(R,x))return ho(e,t,d,0),ct===null&&fo(),!1}catch{}finally{}if(r=lc(e,t,d,a),r!==null)return $t(r,e,a),ky(r,t,a),!0}return!1}function Fc(e,t,r,a){if(a={lane:2,revertLane:xf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(e)){if(t)throw Error(o(479))}else t=lc(e,r,a,2),t!==null&&$t(t,e,2)}function Mo(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Ay(e,t){Gi=To=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ky(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,Mp(e,r)}}var cl={readContext:Lt,use:No,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};cl.useEffectEvent=bt;var Ny={readContext:Lt,use:No,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:dy,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Oo(4194308,4,gy.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Oo(4194308,4,e,t)},useInsertionEffect:function(e,t){Oo(4,2,e,t)},useMemo:function(e,t){var r=Pt();t=t===void 0?null:t;var a=e();if(oi){Ot(!0);try{e()}finally{Ot(!1)}}return r.memoizedState=[a,t],a},useReducer:function(e,t,r){var a=Pt();if(r!==void 0){var d=r(t);if(oi){Ot(!0);try{r(t)}finally{Ot(!1)}}}else d=t;return a.memoizedState=a.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},a.queue=e,e=e.dispatch=oC.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:function(e){e=Lc(e);var t=e.queue,r=Ty.bind(null,qe,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Pt();return Hc(r,e,t)},useTransition:function(){var e=Lc(!1);return e=Ey.bind(null,qe,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var a=qe,d=Pt();if(et){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),ct===null)throw Error(o(349));(We&127)!==0||Qg(a,t,r)}d.memoizedState=r;var p={value:r,getSnapshot:t};return d.queue=p,dy(Wg.bind(null,a,p,e),[e]),a.flags|=2048,Zi(9,{destroy:void 0},Jg.bind(null,a,p,r,t),null),r},useId:function(){var e=Pt(),t=ct.identifierPrefix;if(et){var r=In,a=Ln;r=(a&~(1<<32-Ze(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Ao++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=eC++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:oy,useActionState:oy,useOptimistic:function(e){var t=Pt();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Fc.bind(null,qe,!0,r),r.dispatch=t,[e,t]},useMemoCache:Mc,useCacheRefresh:function(){return Pt().memoizedState=lC.bind(null,qe)},useEffectEvent:function(e){var t=Pt(),r={impl:e};return t.memoizedState=r,function(){if((it&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Yc={readContext:Lt,use:No,useCallback:by,useContext:Lt,useEffect:Bc,useImperativeHandle:yy,useInsertionEffect:my,useLayoutEffect:py,useMemo:vy,useReducer:Ro,useRef:fy,useState:function(){return Ro(Wn)},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Et();return Sy(r,ot.memoizedState,e,t)},useTransition:function(){var e=Ro(Wn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:Kg,useId:wy,useHostTransitionStatus:Pc,useFormState:sy,useActionState:sy,useOptimistic:function(e,t){var r=Et();return ty(r,ot,e,t)},useMemoCache:Mc,useCacheRefresh:Cy};Yc.useEffectEvent=hy;var Ry={readContext:Lt,use:No,useCallback:by,useContext:Lt,useEffect:Bc,useImperativeHandle:yy,useInsertionEffect:my,useLayoutEffect:py,useMemo:vy,useReducer:jc,useRef:fy,useState:function(){return jc(Wn)},useDebugValue:Uc,useDeferredValue:function(e,t){var r=Et();return ot===null?Hc(r,e,t):Sy(r,ot.memoizedState,e,t)},useTransition:function(){var e=jc(Wn)[0],t=Et().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:Kg,useId:wy,useHostTransitionStatus:Pc,useFormState:cy,useActionState:cy,useOptimistic:function(e,t){var r=Et();return ot!==null?ty(r,ot,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Mc,useCacheRefresh:Cy};Ry.useEffectEvent=hy;function Vc(e,t,r,a){t=e.memoizedState,r=r(a,t),r=r==null?t:y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gc={enqueueSetState:function(e,t,r){e=e._reactInternals;var a=cn(),d=xr(a);d.payload=t,r!=null&&(d.callback=r),t=_r(e,d,a),t!==null&&($t(t,e,a),il(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var a=cn(),d=xr(a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=_r(e,d,a),t!==null&&($t(t,e,a),il(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=cn(),a=xr(r);a.tag=2,t!=null&&(a.callback=t),t=_r(e,a,r),t!==null&&($t(t,e,r),il(t,e,r))}};function Oy(e,t,r,a,d,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,p,x):t.prototype&&t.prototype.isPureReactComponent?!Qa(r,a)||!Qa(d,p):!0}function zy(e,t,r,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,a),t.state!==e&&Gc.enqueueReplaceState(t,t.state,null)}function si(e,t){var r=t;if("ref"in t){r={};for(var a in t)a!=="ref"&&(r[a]=t[a])}if(e=e.defaultProps){r===t&&(r=y({},r));for(var d in e)r[d]===void 0&&(r[d]=e[d])}return r}function My(e){co(e)}function Dy(e){}function jy(e){co(e)}function Do(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Ly(e,t,r){try{var a=e.onCaughtError;a(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Xc(e,t,r){return r=xr(r),r.tag=3,r.payload={element:null},r.callback=function(){Do(e,t)},r}function Iy(e){return e=xr(e),e.tag=3,e}function By(e,t,r,a){var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var p=a.value;e.payload=function(){return d(p)},e.callback=function(){Ly(t,r,a)}}var x=r.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Ly(t,r,a),typeof d!="function"&&(Nr===null?Nr=new Set([this]):Nr.add(this));var R=a.stack;this.componentDidCatch(a.value,{componentStack:R!==null?R:""})})}function sC(e,t,r,a,d){if(r.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=r.alternate,t!==null&&Hi(t,r,d,!0),r=ln.current,r!==null){switch(r.tag){case 31:case 13:return En===null?Go():r.alternate===null&&vt===0&&(vt=3),r.flags&=-257,r.flags|=65536,r.lanes=d,a===Eo?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([a]):t.add(a),vf(e,a,d)),!1;case 22:return r.flags|=65536,a===Eo?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([a]):r.add(a)),vf(e,a,d)),!1}throw Error(o(435,r.tag))}return vf(e,a,d),Go(),!1}if(et)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,a!==dc&&(e=Error(o(422),{cause:a}),$a(yn(e,r)))):(a!==dc&&(t=Error(o(423),{cause:a}),$a(yn(t,r))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,a=yn(a,r),d=Xc(e.stateNode,a,d),_c(e,d),vt!==4&&(vt=2)),!1;var p=Error(o(520),{cause:a});if(p=yn(p,r),bl===null?bl=[p]:bl.push(p),vt!==4&&(vt=2),t===null)return!0;a=yn(a,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=d&-d,r.lanes|=e,e=Xc(r.stateNode,a,e),_c(r,e),!1;case 1:if(t=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Nr===null||!Nr.has(p))))return r.flags|=65536,d&=-d,r.lanes|=d,d=Iy(d),By(d,e,r,a),_c(r,d),!1}r=r.return}while(r!==null);return!1}var Zc=Error(o(461)),Ct=!1;function It(e,t,r,a){t.child=e===null?Pg(t,null,r,a):li(t,e.child,r,a)}function Uy(e,t,r,a,d){r=r.render;var p=t.ref;if("ref"in a){var x={};for(var R in a)R!=="ref"&&(x[R]=a[R])}else x=a;return ni(t),a=Nc(e,t,r,x,p,d),R=Rc(),e!==null&&!Ct?(Oc(e,t,d),$n(e,t,d)):(et&&R&&cc(t),t.flags|=1,It(e,t,a,d),t.child)}function Hy(e,t,r,a,d){if(e===null){var p=r.type;return typeof p=="function"&&!oc(p)&&p.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=p,qy(e,t,p,a,d)):(e=po(r.type,null,a,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,!nf(e,d)){var x=p.memoizedProps;if(r=r.compare,r=r!==null?r:Qa,r(x,a)&&e.ref===t.ref)return $n(e,t,d)}return t.flags|=1,e=Xn(p,a),e.ref=t.ref,e.return=t,t.child=e}function qy(e,t,r,a,d){if(e!==null){var p=e.memoizedProps;if(Qa(p,a)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=a=p,nf(e,d))(e.flags&131072)!==0&&(Ct=!0);else return t.lanes=e.lanes,$n(e,t,d)}return Kc(e,t,r,a,d)}function Py(e,t,r,a){var d=a.children,p=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(a=t.child=e.child,d=0;a!==null;)d=d|a.lanes|a.childLanes,a=a.sibling;a=d&~p}else a=0,t.child=null;return Fy(e,t,p,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,p!==null?p.cachePool:null),p!==null?Vg(t,p):Cc(),Gg(t);else return a=t.lanes=536870912,Fy(e,t,p!==null?p.baseLanes|r:r,r,a)}else p!==null?(vo(t,p.cachePool),Vg(t,p),Cr(),t.memoizedState=null):(e!==null&&vo(t,null),Cc(),Cr());return It(e,t,d,r),t.child}function fl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fy(e,t,r,a,d){var p=vc();return p=p===null?null:{parent:_t._currentValue,pool:p},t.memoizedState={baseLanes:r,cachePool:p},e!==null&&vo(t,null),Cc(),Gg(t),e!==null&&Hi(e,t,a,!0),t.childLanes=d,null}function jo(e,t){return t=Io({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yy(e,t,r){return li(t,e.child,null,r),e=jo(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function uC(e,t,r){var a=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(et){if(a.mode==="hidden")return e=jo(t,a),t.lanes=536870912,fl(null,e);if(Ac(t),(e=ht)?(e=nb(e,Sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yr!==null?{id:Ln,overflow:In}:null,retryLane:536870912,hydrationErrors:null},r=Ag(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw vr(t);return t.lanes=536870912,null}return jo(t,a)}var p=e.memoizedState;if(p!==null){var x=p.dehydrated;if(Ac(t),d)if(t.flags&256)t.flags&=-257,t=Yy(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ct||Hi(e,t,r,!1),d=(r&e.childLanes)!==0,Ct||d){if(a=ct,a!==null&&(x=Dp(a,r),x!==0&&x!==p.retryLane))throw p.retryLane=x,Wr(e,x),$t(a,e,x),Zc;Go(),t=Yy(e,t,r)}else e=p.treeContext,ht=xn(x.nextSibling),jt=t,et=!0,br=null,Sn=!1,e!==null&&Rg(t,e),t=jo(t,a),t.flags|=4096;return t}return e=Xn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lo(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Kc(e,t,r,a,d){return ni(t),r=Nc(e,t,r,a,void 0,d),a=Rc(),e!==null&&!Ct?(Oc(e,t,d),$n(e,t,d)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,d),t.child)}function Vy(e,t,r,a,d,p){return ni(t),t.updateQueue=null,r=Zg(t,a,r,d),Xg(e),a=Rc(),e!==null&&!Ct?(Oc(e,t,p),$n(e,t,p)):(et&&a&&cc(t),t.flags|=1,It(e,t,r,p),t.child)}function Gy(e,t,r,a,d){if(ni(t),t.stateNode===null){var p=Li,x=r.contextType;typeof x=="object"&&x!==null&&(p=Lt(x)),p=new r(a,p),t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Gc,t.stateNode=p,p._reactInternals=t,p=t.stateNode,p.props=a,p.state=t.memoizedState,p.refs={},Ec(t),x=r.contextType,p.context=typeof x=="object"&&x!==null?Lt(x):Li,p.state=t.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(Vc(t,r,x,a),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(x=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),x!==p.state&&Gc.enqueueReplaceState(p,p.state,null),ll(t,a,p,d),al(),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){p=t.stateNode;var R=t.memoizedProps,G=si(r,R);p.props=G;var oe=p.context,me=r.contextType;x=Li,typeof me=="object"&&me!==null&&(x=Lt(me));var ye=r.getDerivedStateFromProps;me=typeof ye=="function"||typeof p.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,me||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(R||oe!==x)&&zy(t,p,a,x),Er=!1;var ue=t.memoizedState;p.state=ue,ll(t,a,p,d),al(),oe=t.memoizedState,R||ue!==oe||Er?(typeof ye=="function"&&(Vc(t,r,ye,a),oe=t.memoizedState),(G=Er||Oy(t,r,G,a,ue,oe,x))?(me||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=oe),p.props=a,p.state=oe,p.context=x,a=G):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{p=t.stateNode,xc(e,t),x=t.memoizedProps,me=si(r,x),p.props=me,ye=t.pendingProps,ue=p.context,oe=r.contextType,G=Li,typeof oe=="object"&&oe!==null&&(G=Lt(oe)),R=r.getDerivedStateFromProps,(oe=typeof R=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(x!==ye||ue!==G)&&zy(t,p,a,G),Er=!1,ue=t.memoizedState,p.state=ue,ll(t,a,p,d),al();var fe=t.memoizedState;x!==ye||ue!==fe||Er||e!==null&&e.dependencies!==null&&yo(e.dependencies)?(typeof R=="function"&&(Vc(t,r,R,a),fe=t.memoizedState),(me=Er||Oy(t,r,me,a,ue,fe,G)||e!==null&&e.dependencies!==null&&yo(e.dependencies))?(oe||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(a,fe,G),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(a,fe,G)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=fe),p.props=a,p.state=fe,p.context=G,a=me):(typeof p.componentDidUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ue===e.memoizedState||(t.flags|=1024),a=!1)}return p=a,Lo(e,t),a=(t.flags&128)!==0,p||a?(p=t.stateNode,r=a&&typeof r.getDerivedStateFromError!="function"?null:p.render(),t.flags|=1,e!==null&&a?(t.child=li(t,e.child,null,d),t.child=li(t,null,r,d)):It(e,t,r,d),t.memoizedState=p.state,e=t.child):e=$n(e,t,d),e}function Xy(e,t,r,a){return ei(),t.flags|=256,It(e,t,r,a),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Lg()}}function Wc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=un),e}function Zy(e,t,r){var a=t.pendingProps,d=!1,p=(t.flags&128)!==0,x;if((x=p)||(x=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),x&&(d=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(et){if(d?wr(t):Cr(),(e=ht)?(e=nb(e,Sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yr!==null?{id:Ln,overflow:In}:null,retryLane:536870912,hydrationErrors:null},r=Ag(e),r.return=t,t.child=r,jt=t,ht=null)):e=null,e===null)throw vr(t);return jf(e)?t.lanes=32:t.lanes=536870912,null}var R=a.children;return a=a.fallback,d?(Cr(),d=t.mode,R=Io({mode:"hidden",children:R},d),a=$r(a,d,r,null),R.return=t,a.return=t,R.sibling=a,t.child=R,a=t.child,a.memoizedState=Jc(r),a.childLanes=Wc(e,x,r),t.memoizedState=Qc,fl(null,a)):(wr(t),$c(t,R))}var G=e.memoizedState;if(G!==null&&(R=G.dehydrated,R!==null)){if(p)t.flags&256?(wr(t),t.flags&=-257,t=ef(e,t,r)):t.memoizedState!==null?(Cr(),t.child=e.child,t.flags|=128,t=null):(Cr(),R=a.fallback,d=t.mode,a=Io({mode:"visible",children:a.children},d),R=$r(R,d,r,null),R.flags|=2,a.return=t,R.return=t,a.sibling=R,t.child=a,li(t,e.child,null,r),a=t.child,a.memoizedState=Jc(r),a.childLanes=Wc(e,x,r),t.memoizedState=Qc,t=fl(null,a));else if(wr(t),jf(R)){if(x=R.nextSibling&&R.nextSibling.dataset,x)var oe=x.dgst;x=oe,a=Error(o(419)),a.stack="",a.digest=x,$a({value:a,source:null,stack:null}),t=ef(e,t,r)}else if(Ct||Hi(e,t,r,!1),x=(r&e.childLanes)!==0,Ct||x){if(x=ct,x!==null&&(a=Dp(x,r),a!==0&&a!==G.retryLane))throw G.retryLane=a,Wr(e,a),$t(x,e,a),Zc;Df(R)||Go(),t=ef(e,t,r)}else Df(R)?(t.flags|=192,t.child=e.child,t=null):(e=G.treeContext,ht=xn(R.nextSibling),jt=t,et=!0,br=null,Sn=!1,e!==null&&Rg(t,e),t=$c(t,a.children),t.flags|=4096);return t}return d?(Cr(),R=a.fallback,d=t.mode,G=e.child,oe=G.sibling,a=Xn(G,{mode:"hidden",children:a.children}),a.subtreeFlags=G.subtreeFlags&65011712,oe!==null?R=Xn(oe,R):(R=$r(R,d,r,null),R.flags|=2),R.return=t,a.return=t,a.sibling=R,t.child=a,fl(null,a),a=t.child,R=e.child.memoizedState,R===null?R=Jc(r):(d=R.cachePool,d!==null?(G=_t._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Lg(),R={baseLanes:R.baseLanes|r,cachePool:d}),a.memoizedState=R,a.childLanes=Wc(e,x,r),t.memoizedState=Qc,fl(e.child,a)):(wr(t),r=e.child,e=r.sibling,r=Xn(r,{mode:"visible",children:a.children}),r.return=t,r.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=r,t.memoizedState=null,r)}function $c(e,t){return t=Io({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Io(e,t){return e=an(22,e,null,t),e.lanes=0,e}function ef(e,t,r){return li(t,e.child,null,r),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ky(e,t,r){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),pc(e.return,t,r)}function tf(e,t,r,a,d,p){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:r,tailMode:d,treeForkCount:p}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=r,x.tailMode=d,x.treeForkCount=p)}function Qy(e,t,r){var a=t.pendingProps,d=a.revealOrder,p=a.tail;a=a.children;var x=St.current,R=(x&2)!==0;if(R?(x=x&1|2,t.flags|=128):x&=1,z(St,x),It(e,t,a,r),a=et?Wa:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ky(e,r,t);else if(e.tag===19)Ky(e,r,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(d){case"forwards":for(r=t.child,d=null;r!==null;)e=r.alternate,e!==null&&Co(e)===null&&(d=r),r=r.sibling;r=d,r===null?(d=t.child,t.child=null):(d=r.sibling,r.sibling=null),tf(t,!1,d,r,p,a);break;case"backwards":case"unstable_legacy-backwards":for(r=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&Co(e)===null){t.child=d;break}e=d.sibling,d.sibling=r,r=d,d=e}tf(t,!0,r,null,p,a);break;case"together":tf(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function $n(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),kr|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Hi(e,t,r,!1),(r&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,r=Xn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Xn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function nf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yo(e)))}function cC(e,t,r){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),Sr(t,_t,e.memoizedState.cache),ei();break;case 27:case 5:He(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:Sr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ac(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wr(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Zy(e,t,r):(wr(t),e=$n(e,t,r),e!==null?e.sibling:null);wr(t);break;case 19:var d=(e.flags&128)!==0;if(a=(r&t.childLanes)!==0,a||(Hi(e,t,r,!1),a=(r&t.childLanes)!==0),d){if(a)return Qy(e,t,r);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),z(St,St.current),a)break;return null;case 22:return t.lanes=0,Py(e,t,r,t.pendingProps);case 24:Sr(t,_t,e.memoizedState.cache)}return $n(e,t,r)}function Jy(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!nf(e,r)&&(t.flags&128)===0)return Ct=!1,cC(e,t,r);Ct=(e.flags&131072)!==0}else Ct=!1,et&&(t.flags&1048576)!==0&&Ng(t,Wa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ii(t.elementType),t.type=e,typeof e=="function")oc(e)?(a=si(e,a),t.tag=1,t=Gy(null,t,e,a,r)):(t.tag=0,t=Kc(null,t,e,a,r));else{if(e!=null){var d=e.$$typeof;if(d===q){t.tag=11,t=Uy(null,t,e,a,r);break e}else if(d===I){t.tag=14,t=Hy(null,t,e,a,r);break e}}throw t=C(e)||e,Error(o(306,t,""))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,r);case 1:return a=t.type,d=si(a,t.pendingProps),Gy(e,t,a,d,r);case 3:e:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var p=t.memoizedState;d=p.element,xc(e,t),ll(t,a,null,r);var x=t.memoizedState;if(a=x.cache,Sr(t,_t,a),a!==p.cache&&gc(t,[_t],r,!0),al(),a=x.element,p.isDehydrated)if(p={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){t=Xy(e,t,a,r);break e}else if(a!==d){d=yn(Error(o(424)),t),$a(d),t=Xy(e,t,a,r);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(ht=xn(e.firstChild),jt=t,et=!0,br=null,Sn=!0,r=Pg(t,null,a,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(ei(),a===d){t=$n(e,t,r);break e}It(e,t,a,r)}t=t.child}return t;case 26:return Lo(e,t),e===null?(r=sb(t.type,null,t.pendingProps,null))?t.memoizedState=r:et||(r=t.type,e=t.pendingProps,a=$o(we.current).createElement(r),a[Dt]=t,a[Xt]=e,Bt(a,r,e),zt(a),t.stateNode=a):t.memoizedState=sb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return He(t),e===null&&et&&(a=t.stateNode=ab(t.type,t.pendingProps,we.current),jt=t,Sn=!0,d=ht,Mr(t.type)?(Lf=d,ht=xn(a.firstChild)):ht=d),It(e,t,t.pendingProps.children,r),Lo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&et&&((d=a=ht)&&(a=HC(a,t.type,t.pendingProps,Sn),a!==null?(t.stateNode=a,jt=t,ht=xn(a.firstChild),Sn=!1,d=!0):d=!1),d||vr(t)),He(t),d=t.type,p=t.pendingProps,x=e!==null?e.memoizedProps:null,a=p.children,Of(d,p)?a=null:x!==null&&Of(d,x)&&(t.flags|=32),t.memoizedState!==null&&(d=Nc(e,t,tC,null,null,r),Tl._currentValue=d),Lo(e,t),It(e,t,a,r),t.child;case 6:return e===null&&et&&((e=r=ht)&&(r=qC(r,t.pendingProps,Sn),r!==null?(t.stateNode=r,jt=t,ht=null,e=!0):e=!1),e||vr(t)),null;case 13:return Zy(e,t,r);case 4:return ke(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=li(t,null,a,r):It(e,t,a,r),t.child;case 11:return Uy(e,t,t.type,t.pendingProps,r);case 7:return It(e,t,t.pendingProps,r),t.child;case 8:return It(e,t,t.pendingProps.children,r),t.child;case 12:return It(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,Sr(t,t.type,a.value),It(e,t,a.children,r),t.child;case 9:return d=t.type._context,a=t.pendingProps.children,ni(t),d=Lt(d),a=a(d),t.flags|=1,It(e,t,a,r),t.child;case 14:return Hy(e,t,t.type,t.pendingProps,r);case 15:return qy(e,t,t.type,t.pendingProps,r);case 19:return Qy(e,t,r);case 31:return uC(e,t,r);case 22:return Py(e,t,r,t.pendingProps);case 24:return ni(t),a=Lt(_t),e===null?(d=vc(),d===null&&(d=ct,p=yc(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=r),d=p),t.memoizedState={parent:a,cache:d},Ec(t),Sr(t,_t,d)):((e.lanes&r)!==0&&(xc(e,t),ll(t,null,null,r),al()),d=e.memoizedState,p=t.memoizedState,d.parent!==a?(d={parent:a,cache:a},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Sr(t,_t,a)):(a=p.cache,Sr(t,_t,a),a!==d.cache&&gc(t,[_t],r,!0))),It(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function er(e){e.flags|=4}function rf(e,t,r,a,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(w0())e.flags|=8192;else throw ai=Eo,Sc}else e.flags&=-16777217}function Wy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hb(t))if(w0())e.flags|=8192;else throw ai=Eo,Sc}function Bo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Op():536870912,e.lanes|=t,Wi|=t)}function dl(e,t){if(!et)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,a=0;if(t)for(var d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags&65011712,a|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)r|=d.lanes|d.childLanes,a|=d.subtreeFlags,a|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=a,e.childLanes=r,t}function fC(e,t,r){var a=t.pendingProps;switch(fc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return r=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qn(_t),Ae(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?er(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,hc())),mt(t),null;case 26:var d=t.type,p=t.memoizedState;return e===null?(er(t),p!==null?(mt(t),Wy(t,p)):(mt(t),rf(t,d,null,a,r))):p?p!==e.memoizedState?(er(t),mt(t),Wy(t,p)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&er(t),mt(t),rf(t,d,e,a,r)),null;case 27:if(ve(t),r=we.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}e=re.current,Ui(t)?Og(t):(e=ab(d,a,r),t.stateNode=e,er(t))}return mt(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return mt(t),null}if(p=re.current,Ui(t))Og(t);else{var x=$o(we.current);switch(p){case 1:p=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=x.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?p.multiple=!0:a.size&&(p.size=a.size);break;default:p=typeof a.is=="string"?x.createElement(d,{is:a.is}):x.createElement(d)}}p[Dt]=t,p[Xt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)p.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=p;e:switch(Bt(p,d,a),d){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&er(t)}}return mt(t),rf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&er(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=we.current,Ui(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,d=jt,d!==null)switch(d.tag){case 27:case 5:a=d.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||Z0(e.nodeValue,r)),e||vr(t,!0)}else e=$o(e).createTextNode(a),e[Dt]=t,t.stateNode=e}return mt(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ui(t),r!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Dt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else r=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(o(558))}return mt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Ui(t),a!==null&&a.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[Dt]=t}else ei(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),d=!1}else d=hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(on(t),t):(on(t),null)}return on(t),(t.flags&128)!==0?(t.lanes=r,t):(r=a!==null,e=e!==null&&e.memoizedState!==null,r&&(a=t.child,d=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(d=a.alternate.memoizedState.cachePool.pool),p=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(p=a.memoizedState.cachePool.pool),p!==d&&(a.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),Bo(t,t.updateQueue),mt(t),null);case 4:return Ae(),e===null&&Tf(t.stateNode.containerInfo),mt(t),null;case 10:return Qn(t.type),mt(t),null;case 19:if(B(St),a=t.memoizedState,a===null)return mt(t),null;if(d=(t.flags&128)!==0,p=a.rendering,p===null)if(d)dl(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=Co(e),p!==null){for(t.flags|=128,dl(a,!1),e=p.updateQueue,t.updateQueue=e,Bo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Tg(r,e),r=r.sibling;return z(St,St.current&1|2),et&&Zn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_e()>Fo&&(t.flags|=128,d=!0,dl(a,!1),t.lanes=4194304)}else{if(!d)if(e=Co(p),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Bo(t,e),dl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!p.alternate&&!et)return mt(t),null}else 2*_e()-a.renderingStartTime>Fo&&r!==536870912&&(t.flags|=128,d=!0,dl(a,!1),t.lanes=4194304);a.isBackwards?(p.sibling=t.child,t.child=p):(e=a.last,e!==null?e.sibling=p:t.child=p,a.last=p)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_e(),e.sibling=null,r=St.current,z(St,d?r&1|2:r&1),et&&Zn(t,a.treeForkCount),e):(mt(t),null);case 22:case 23:return on(t),Tc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(r&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),r=t.updateQueue,r!==null&&Bo(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==r&&(t.flags|=2048),e!==null&&B(ri),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qn(_t),mt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function dC(e,t){switch(fc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(_t),Ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(St),null;case 4:return Ae(),null;case 10:return Qn(t.type),null;case 22:case 23:return on(t),Tc(),e!==null&&B(ri),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qn(_t),null;case 25:return null;default:return null}}function $y(e,t){switch(fc(t),t.tag){case 3:Qn(_t),Ae();break;case 26:case 27:case 5:ve(t);break;case 4:Ae();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:B(St);break;case 10:Qn(t.type);break;case 22:case 23:on(t),Tc(),e!==null&&B(ri);break;case 24:Qn(_t)}}function hl(e,t){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var d=a.next;r=d;do{if((r.tag&e)===e){a=void 0;var p=r.create,x=r.inst;a=p(),x.destroy=a}r=r.next}while(r!==d)}}catch(R){lt(t,t.return,R)}}function Tr(e,t,r){try{var a=t.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var p=d.next;a=p;do{if((a.tag&e)===e){var x=a.inst,R=x.destroy;if(R!==void 0){x.destroy=void 0,d=t;var G=r,oe=R;try{oe()}catch(me){lt(d,G,me)}}}a=a.next}while(a!==p)}}catch(me){lt(t,t.return,me)}}function e0(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{Yg(t,r)}catch(a){lt(e,e.return,a)}}}function t0(e,t,r){r.props=si(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){lt(e,t,a)}}function ml(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof r=="function"?e.refCleanup=r(a):r.current=a}}catch(d){lt(e,t,d)}}function Bn(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(d){lt(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(d){lt(e,t,d)}else r.current=null}function n0(e){var t=e.type,r=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&a.focus();break e;case"img":r.src?a.src=r.src:r.srcSet&&(a.srcset=r.srcSet)}}catch(d){lt(e,e.return,d)}}function af(e,t,r){try{var a=e.stateNode;DC(a,e.type,r,t),a[Xt]=t}catch(d){lt(e,e.return,d)}}function r0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mr(e.type)||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r0(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&&Mr(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 of(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Vn));else if(a!==4&&(a===27&&Mr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(of(e,t,r),e=e.sibling;e!==null;)of(e,t,r),e=e.sibling}function Uo(e,t,r){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(a!==4&&(a===27&&Mr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Uo(e,t,r),e=e.sibling;e!==null;)Uo(e,t,r),e=e.sibling}function i0(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);Bt(t,a,r),t[Dt]=e,t[Xt]=r}catch(p){lt(e,e.return,p)}}var tr=!1,Tt=!1,sf=!1,a0=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function hC(e,t){if(e=e.containerInfo,Nf=ls,e=yg(e),ec(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var a=r.getSelection&&r.getSelection();if(a&&a.rangeCount!==0){r=a.anchorNode;var d=a.anchorOffset,p=a.focusNode;a=a.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var x=0,R=-1,G=-1,oe=0,me=0,ye=e,ue=null;t:for(;;){for(var fe;ye!==r||d!==0&&ye.nodeType!==3||(R=x+d),ye!==p||a!==0&&ye.nodeType!==3||(G=x+a),ye.nodeType===3&&(x+=ye.nodeValue.length),(fe=ye.firstChild)!==null;)ue=ye,ye=fe;for(;;){if(ye===e)break t;if(ue===r&&++oe===d&&(R=x),ue===p&&++me===a&&(G=x),(fe=ye.nextSibling)!==null)break;ye=ue,ue=ye.parentNode}ye=fe}r=R===-1||G===-1?null:{start:R,end:G}}else r=null}r=r||{start:0,end:0}}else r=null;for(Rf={focusedElem:e,selectionRange:r},ls=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,p=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(r=0;r<e.length;r++)d=e[r],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=t,d=p.memoizedProps,p=p.memoizedState,a=r.stateNode;try{var Ne=si(r.type,d);e=a.getSnapshotBeforeUpdate(Ne,p),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){lt(r,r.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)Mf(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mf(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,Mt=e;break}Mt=t.return}}function l0(e,t,r){var a=r.flags;switch(r.tag){case 0:case 11:case 15:rr(e,r),a&4&&hl(5,r);break;case 1:if(rr(e,r),a&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(x){lt(r,r.return,x)}else{var d=si(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){lt(r,r.return,x)}}a&64&&e0(r),a&512&&ml(r,r.return);break;case 3:if(rr(e,r),a&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{Yg(e,t)}catch(x){lt(r,r.return,x)}}break;case 27:t===null&&a&4&&i0(r);case 26:case 5:rr(e,r),t===null&&a&4&&n0(r),a&512&&ml(r,r.return);break;case 12:rr(e,r);break;case 31:rr(e,r),a&4&&u0(e,r);break;case 13:rr(e,r),a&4&&c0(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=xC.bind(null,r),PC(e,r))));break;case 22:if(a=r.memoizedState!==null||tr,!a){t=t!==null&&t.memoizedState!==null||Tt,d=tr;var p=Tt;tr=a,(Tt=t)&&!p?ir(e,r,(r.subtreeFlags&8772)!==0):rr(e,r),tr=d,Tt=p}break;case 30:break;default:rr(e,r)}}function o0(e){var t=e.alternate;t!==null&&(e.alternate=null,o0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Iu(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 yt=null,Kt=!1;function nr(e,t,r){for(r=r.child;r!==null;)s0(e,t,r),r=r.sibling}function s0(e,t,r){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Xe,r)}catch{}switch(r.tag){case 26:Tt||Bn(r,t),nr(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Tt||Bn(r,t);var a=yt,d=Kt;Mr(r.type)&&(yt=r.stateNode,Kt=!1),nr(e,t,r),_l(r.stateNode),yt=a,Kt=d;break;case 5:Tt||Bn(r,t);case 6:if(a=yt,d=Kt,yt=null,nr(e,t,r),yt=a,Kt=d,yt!==null)if(Kt)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(r.stateNode)}catch(p){lt(r,t,p)}else try{yt.removeChild(r.stateNode)}catch(p){lt(r,t,p)}break;case 18:yt!==null&&(Kt?(e=yt,eb(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),la(e)):eb(yt,r.stateNode));break;case 4:a=yt,d=Kt,yt=r.stateNode.containerInfo,Kt=!0,nr(e,t,r),yt=a,Kt=d;break;case 0:case 11:case 14:case 15:Tr(2,r,t),Tt||Tr(4,r,t),nr(e,t,r);break;case 1:Tt||(Bn(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&t0(r,t,a)),nr(e,t,r);break;case 21:nr(e,t,r);break;case 22:Tt=(a=Tt)||r.memoizedState!==null,nr(e,t,r),Tt=a;break;default:nr(e,t,r)}}function u0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{la(e)}catch(r){lt(t,t.return,r)}}}function c0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{la(e)}catch(r){lt(t,t.return,r)}}function mC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new a0),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new a0),t;default:throw Error(o(435,e.tag))}}function Ho(e,t){var r=mC(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var d=_C.bind(null,e,a);a.then(d,d)}})}function Qt(e,t){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var d=r[a],p=e,x=t,R=x;e:for(;R!==null;){switch(R.tag){case 27:if(Mr(R.type)){yt=R.stateNode,Kt=!1;break e}break;case 5:yt=R.stateNode,Kt=!1;break e;case 3:case 4:yt=R.stateNode.containerInfo,Kt=!0;break e}R=R.return}if(yt===null)throw Error(o(160));s0(p,x,d),yt=null,Kt=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)f0(t,e),t=t.sibling}var An=null;function f0(e,t){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Qt(t,e),Jt(e),a&4&&(Tr(3,e,e.return),hl(3,e),Tr(5,e,e.return));break;case 1:Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),a&64&&tr&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?a:r.concat(a))));break;case 26:var d=An;if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),a&4){var p=r!==null?r.memoizedState:null;if(a=e.memoizedState,r===null)if(a===null)if(e.stateNode===null){e:{a=e.type,r=e.memoizedProps,d=d.ownerDocument||d;t:switch(a){case"title":p=d.getElementsByTagName("title")[0],(!p||p[qa]||p[Dt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(a),d.head.insertBefore(p,d.querySelector("head > title"))),Bt(p,a,r),p[Dt]=e,zt(p),a=p;break e;case"link":var x=fb("link","href",d).get(a+(r.href||""));if(x){for(var R=0;R<x.length;R++)if(p=x[R],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){x.splice(R,1);break t}}p=d.createElement(a),Bt(p,a,r),d.head.appendChild(p);break;case"meta":if(x=fb("meta","content",d).get(a+(r.content||""))){for(R=0;R<x.length;R++)if(p=x[R],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){x.splice(R,1);break t}}p=d.createElement(a),Bt(p,a,r),d.head.appendChild(p);break;default:throw Error(o(468,a))}p[Dt]=e,zt(p),a=p}e.stateNode=a}else db(d,e.type,e.stateNode);else e.stateNode=cb(d,a,e.memoizedProps);else p!==a?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,a===null?db(d,e.type,e.stateNode):cb(d,a,e.memoizedProps)):a===null&&e.stateNode!==null&&af(e,e.memoizedProps,r.memoizedProps)}break;case 27:Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),r!==null&&a&4&&af(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Qt(t,e),Jt(e),a&512&&(Tt||r===null||Bn(r,r.return)),e.flags&32){d=e.stateNode;try{Ni(d,"")}catch(Ne){lt(e,e.return,Ne)}}a&4&&e.stateNode!=null&&(d=e.memoizedProps,af(e,d,r!==null?r.memoizedProps:d)),a&1024&&(sf=!0);break;case 6:if(Qt(t,e),Jt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,r=e.stateNode;try{r.nodeValue=a}catch(Ne){lt(e,e.return,Ne)}}break;case 3:if(ns=null,d=An,An=es(t.containerInfo),Qt(t,e),An=d,Jt(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{la(t.containerInfo)}catch(Ne){lt(e,e.return,Ne)}sf&&(sf=!1,d0(e));break;case 4:a=An,An=es(e.stateNode.containerInfo),Qt(t,e),Jt(e),An=a;break;case 12:Qt(t,e),Jt(e);break;case 31:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 13:Qt(t,e),Jt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Po=_e()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 22:d=e.memoizedState!==null;var G=r!==null&&r.memoizedState!==null,oe=tr,me=Tt;if(tr=oe||d,Tt=me||G,Qt(t,e),Tt=me,tr=oe,Jt(e),a&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(r===null||G||tr||Tt||ui(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){G=r=t;try{if(p=G.stateNode,d)x=p.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{R=G.stateNode;var ye=G.memoizedProps.style,ue=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;R.style.display=ue==null||typeof ue=="boolean"?"":(""+ue).trim()}}catch(Ne){lt(G,G.return,Ne)}}}else if(t.tag===6){if(r===null){G=t;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(Ne){lt(G,G.return,Ne)}}}else if(t.tag===18){if(r===null){G=t;try{var fe=G.stateNode;d?tb(fe,!0):tb(G.stateNode,!1)}catch(Ne){lt(G,G.return,Ne)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(r=a.retryQueue,r!==null&&(a.retryQueue=null,Ho(e,r))));break;case 19:Qt(t,e),Jt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ho(e,a)));break;case 30:break;case 21:break;default:Qt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{for(var r,a=e.return;a!==null;){if(r0(a)){r=a;break}a=a.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var d=r.stateNode,p=lf(e);Uo(e,p,d);break;case 5:var x=r.stateNode;r.flags&32&&(Ni(x,""),r.flags&=-33);var R=lf(e);Uo(e,R,x);break;case 3:case 4:var G=r.stateNode.containerInfo,oe=lf(e);of(e,oe,G);break;default:throw Error(o(161))}}catch(me){lt(e,e.return,me)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function d0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;d0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function rr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)l0(e,t.alternate,t),t=t.sibling}function ui(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tr(4,t,t.return),ui(t);break;case 1:Bn(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&t0(t,t.return,r),ui(t);break;case 27:_l(t.stateNode);case 26:case 5:Bn(t,t.return),ui(t);break;case 22:t.memoizedState===null&&ui(t);break;case 30:ui(t);break;default:ui(t)}e=e.sibling}}function ir(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,d=e,p=t,x=p.flags;switch(p.tag){case 0:case 11:case 15:ir(d,p,r),hl(4,p);break;case 1:if(ir(d,p,r),a=p,d=a.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(oe){lt(a,a.return,oe)}if(a=p,d=a.updateQueue,d!==null){var R=a.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)Fg(G[d],R)}catch(oe){lt(a,a.return,oe)}}r&&x&64&&e0(p),ml(p,p.return);break;case 27:i0(p);case 26:case 5:ir(d,p,r),r&&a===null&&x&4&&n0(p),ml(p,p.return);break;case 12:ir(d,p,r);break;case 31:ir(d,p,r),r&&x&4&&u0(d,p);break;case 13:ir(d,p,r),r&&x&4&&c0(d,p);break;case 22:p.memoizedState===null&&ir(d,p,r),ml(p,p.return);break;case 30:break;default:ir(d,p,r)}t=t.sibling}}function uf(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&el(r))}function cf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e))}function kn(e,t,r,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)h0(e,t,r,a),t=t.sibling}function h0(e,t,r,a){var d=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,r,a),d&2048&&hl(9,t);break;case 1:kn(e,t,r,a);break;case 3:kn(e,t,r,a),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e)));break;case 12:if(d&2048){kn(e,t,r,a),e=t.stateNode;try{var p=t.memoizedProps,x=p.id,R=p.onPostCommit;typeof R=="function"&&R(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(G){lt(t,t.return,G)}}else kn(e,t,r,a);break;case 31:kn(e,t,r,a);break;case 13:kn(e,t,r,a);break;case 23:break;case 22:p=t.stateNode,x=t.alternate,t.memoizedState!==null?p._visibility&2?kn(e,t,r,a):pl(e,t):p._visibility&2?kn(e,t,r,a):(p._visibility|=2,Ki(e,t,r,a,(t.subtreeFlags&10256)!==0||!1)),d&2048&&uf(x,t);break;case 24:kn(e,t,r,a),d&2048&&cf(t.alternate,t);break;default:kn(e,t,r,a)}}function Ki(e,t,r,a,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var p=e,x=t,R=r,G=a,oe=x.flags;switch(x.tag){case 0:case 11:case 15:Ki(p,x,R,G,d),hl(8,x);break;case 23:break;case 22:var me=x.stateNode;x.memoizedState!==null?me._visibility&2?Ki(p,x,R,G,d):pl(p,x):(me._visibility|=2,Ki(p,x,R,G,d)),d&&oe&2048&&uf(x.alternate,x);break;case 24:Ki(p,x,R,G,d),d&&oe&2048&&cf(x.alternate,x);break;default:Ki(p,x,R,G,d)}t=t.sibling}}function pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,a=t,d=a.flags;switch(a.tag){case 22:pl(r,a),d&2048&&uf(a.alternate,a);break;case 24:pl(r,a),d&2048&&cf(a.alternate,a);break;default:pl(r,a)}t=t.sibling}}var gl=8192;function Qi(e,t,r){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)m0(e,t,r),e=e.sibling}function m0(e,t,r){switch(e.tag){case 26:Qi(e,t,r),e.flags&gl&&e.memoizedState!==null&&eT(r,An,e.memoizedState,e.memoizedProps);break;case 5:Qi(e,t,r);break;case 3:case 4:var a=An;An=es(e.stateNode.containerInfo),Qi(e,t,r),An=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gl,gl=16777216,Qi(e,t,r),gl=a):Qi(e,t,r));break;default:Qi(e,t,r)}}function p0(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 yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Mt=a,y0(a,e)}p0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)g0(e),e=e.sibling}function g0(e){switch(e.tag){case 0:case 11:case 15:yl(e),e.flags&2048&&Tr(9,e,e.return);break;case 3:yl(e);break;case 12:yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qo(e)):yl(e);break;default:yl(e)}}function qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var a=t[r];Mt=a,y0(a,e)}p0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tr(8,t,t.return),qo(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,qo(t));break;default:qo(t)}e=e.sibling}}function y0(e,t){for(;Mt!==null;){var r=Mt;switch(r.tag){case 0:case 11:case 15:Tr(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var a=r.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:el(r.memoizedState.cache)}if(a=r.child,a!==null)a.return=r,Mt=a;else e:for(r=e;Mt!==null;){a=Mt;var d=a.sibling,p=a.return;if(o0(a),a===r){Mt=null;break e}if(d!==null){d.return=p,Mt=d;break e}Mt=p}}}var pC={getCacheForType:function(e){var t=Lt(_t),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Lt(_t).controller.signal}},gC=typeof WeakMap=="function"?WeakMap:Map,it=0,ct=null,Ke=null,We=0,at=0,sn=null,Ar=!1,Ji=!1,ff=!1,ar=0,vt=0,kr=0,ci=0,df=0,un=0,Wi=0,bl=null,Wt=null,hf=!1,Po=0,b0=0,Fo=1/0,Yo=null,Nr=null,Nt=0,Rr=null,$i=null,lr=0,mf=0,pf=null,v0=null,vl=0,gf=null;function cn(){return(it&2)!==0&&We!==0?We&-We:Z.T!==null?xf():jp()}function S0(){if(un===0)if((We&536870912)===0||et){var e=Xr;Xr<<=1,(Xr&3932160)===0&&(Xr=262144),un=e}else un=536870912;return e=ln.current,e!==null&&(e.flags|=32),un}function $t(e,t,r){(e===ct&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(ea(e,0),Or(e,We,un,!1)),Ha(e,r),((it&2)===0||e!==ct)&&(e===ct&&((it&2)===0&&(ci|=r),vt===4&&Or(e,We,un,!1)),Un(e))}function E0(e,t,r){if((it&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Ua(e,t),d=a?vC(e,t):bf(e,t,!0),p=a;do{if(d===0){Ji&&!a&&Or(e,t,0,!1);break}else{if(r=e.current.alternate,p&&!yC(r)){d=bf(e,t,!1),p=!1;continue}if(d===2){if(p=t,e.errorRecoveryDisabledLanes&p)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var R=e;d=bl;var G=R.current.memoizedState.isDehydrated;if(G&&(ea(R,x).flags|=256),x=bf(R,x,!1),x!==2){if(ff&&!G){R.errorRecoveryDisabledLanes|=p,ci|=p,d=4;break e}p=Wt,Wt=d,p!==null&&(Wt===null?Wt=p:Wt.push.apply(Wt,p))}d=x}if(p=!1,d!==2)continue}}if(d===1){ea(e,0),Or(e,t,0,!0);break}e:{switch(a=e,p=d,p){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Or(a,t,un,!Ar);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Po+300-_e(),10<d)){if(Or(a,t,un,!Ar),$l(a,0,!0)!==0)break e;lr=t,a.timeoutHandle=W0(x0.bind(null,a,r,Wt,Yo,hf,t,un,ci,Wi,Ar,p,"Throttled",-0,0),d);break e}x0(a,r,Wt,Yo,hf,t,un,ci,Wi,Ar,p,null,-0,0)}}break}while(!0);Un(e)}function x0(e,t,r,a,d,p,x,R,G,oe,me,ye,ue,fe){if(e.timeoutHandle=-1,ye=t.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},m0(t,p,ye);var Ne=(p&62914560)===p?Po-_e():(p&4194048)===p?b0-_e():0;if(Ne=tT(ye,Ne),Ne!==null){lr=p,e.cancelPendingCommit=Ne(R0.bind(null,e,t,p,r,a,d,x,R,G,me,ye,null,ue,fe)),Or(e,p,x,!oe);return}}R0(e,t,p,r,a,d,x,R,G)}function yC(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var a=0;a<r.length;a++){var d=r[a],p=d.getSnapshot;d=d.value;try{if(!rn(p(),d))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Or(e,t,r,a){t&=~df,t&=~ci,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var d=t;0<d;){var p=31-Ze(d),x=1<<p;a[p]=-1,d&=~x}r!==0&&zp(e,r,t)}function Vo(){return(it&6)===0?(Sl(0),!1):!0}function yf(){if(Ke!==null){if(at===0)var e=Ke.return;else e=Ke,Kn=ti=null,zc(e),Yi=null,nl=0,e=Ke;for(;e!==null;)$y(e.alternate,e),e=e.return;Ke=null}}function ea(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,IC(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),lr=0,yf(),ct=e,Ke=r=Xn(e.current,null),We=t,at=0,sn=null,Ar=!1,Ji=Ua(e,t),ff=!1,Wi=un=df=ci=kr=vt=0,Wt=bl=null,hf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var d=31-Ze(a),p=1<<d;t|=e[d],a&=~p}return ar=t,fo(),r}function _0(e,t){qe=null,Z.H=cl,t===Fi||t===So?(t=Ug(),at=3):t===Sc?(t=Ug(),at=4):at=t===Zc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,Ke===null&&(vt=1,Do(e,yn(t,e.current)))}function w0(){var e=ln.current;return e===null?!0:(We&4194048)===We?En===null:(We&62914560)===We||(We&536870912)!==0?e===En:!1}function C0(){var e=Z.H;return Z.H=cl,e===null?cl:e}function T0(){var e=Z.A;return Z.A=pC,e}function Go(){vt=4,Ar||(We&4194048)!==We&&ln.current!==null||(Ji=!0),(kr&134217727)===0&&(ci&134217727)===0||ct===null||Or(ct,We,un,!1)}function bf(e,t,r){var a=it;it|=2;var d=C0(),p=T0();(ct!==e||We!==t)&&(Yo=null,ea(e,t)),t=!1;var x=vt;e:do try{if(at!==0&&Ke!==null){var R=Ke,G=sn;switch(at){case 8:yf(),x=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var oe=at;if(at=0,sn=null,ta(e,R,G,oe),r&&Ji){x=0;break e}break;default:oe=at,at=0,sn=null,ta(e,R,G,oe)}}bC(),x=vt;break}catch(me){_0(e,me)}while(!0);return t&&e.shellSuspendCounter++,Kn=ti=null,it=a,Z.H=d,Z.A=p,Ke===null&&(ct=null,We=0,fo()),x}function bC(){for(;Ke!==null;)A0(Ke)}function vC(e,t){var r=it;it|=2;var a=C0(),d=T0();ct!==e||We!==t?(Yo=null,Fo=_e()+500,ea(e,t)):Ji=Ua(e,t);e:do try{if(at!==0&&Ke!==null){t=Ke;var p=sn;t:switch(at){case 1:at=0,sn=null,ta(e,t,p,1);break;case 2:case 9:if(Ig(p)){at=0,sn=null,k0(t);break}t=function(){at!==2&&at!==9||ct!==e||(at=7),Un(e)},p.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Ig(p)?(at=0,sn=null,k0(t)):(at=0,sn=null,ta(e,t,p,7));break;case 5:var x=null;switch(Ke.tag){case 26:x=Ke.memoizedState;case 5:case 27:var R=Ke;if(x?hb(x):R.stateNode.complete){at=0,sn=null;var G=R.sibling;if(G!==null)Ke=G;else{var oe=R.return;oe!==null?(Ke=oe,Xo(oe)):Ke=null}break t}}at=0,sn=null,ta(e,t,p,5);break;case 6:at=0,sn=null,ta(e,t,p,6);break;case 8:yf(),vt=6;break e;default:throw Error(o(462))}}SC();break}catch(me){_0(e,me)}while(!0);return Kn=ti=null,Z.H=a,Z.A=d,it=r,Ke!==null?0:(ct=null,We=0,fo(),vt)}function SC(){for(;Ke!==null&&!le();)A0(Ke)}function A0(e){var t=Jy(e.alternate,e,ar);e.memoizedProps=e.pendingProps,t===null?Xo(e):Ke=t}function k0(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=Vy(r,t,t.pendingProps,t.type,void 0,We);break;case 11:t=Vy(r,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:zc(t);default:$y(r,t),t=Ke=Tg(t,ar),t=Jy(r,t,ar)}e.memoizedProps=e.pendingProps,t===null?Xo(e):Ke=t}function ta(e,t,r,a){Kn=ti=null,zc(t),Yi=null,nl=0;var d=t.return;try{if(sC(e,d,t,r,We)){vt=1,Do(e,yn(r,e.current)),Ke=null;return}}catch(p){if(d!==null)throw Ke=d,p;vt=1,Do(e,yn(r,e.current)),Ke=null;return}t.flags&32768?(et||a===1?e=!0:Ji||(We&536870912)!==0?e=!1:(Ar=e=!0,(a===2||a===9||a===3||a===6)&&(a=ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),N0(t,e)):Xo(t)}function Xo(e){var t=e;do{if((t.flags&32768)!==0){N0(t,Ar);return}e=t.return;var r=fC(t.alternate,t,ar);if(r!==null){Ke=r;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);vt===0&&(vt=5)}function N0(e,t){do{var r=dC(e.alternate,e);if(r!==null){r.flags&=32767,Ke=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Ke=e;return}Ke=e=r}while(e!==null);vt=6,Ke=null}function R0(e,t,r,a,d,p,x,R,G){e.cancelPendingCommit=null;do Zo();while(Nt!==0);if((it&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(p=t.lanes|t.childLanes,p|=ac,$w(e,r,p,x,R,G),e===ct&&(Ke=ct=null,We=0),$i=t,Rr=e,lr=r,mf=p,pf=d,v0=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,wC(Ce,function(){return j0(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=Z.T,Z.T=null,d=Q.p,Q.p=2,x=it,it|=4;try{hC(e,t,r)}finally{it=x,Q.p=d,Z.T=a}}Nt=1,O0(),z0(),M0()}}function O0(){if(Nt===1){Nt=0;var e=Rr,t=$i,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Z.T,Z.T=null;var a=Q.p;Q.p=2;var d=it;it|=4;try{f0(t,e);var p=Rf,x=yg(e.containerInfo),R=p.focusedElem,G=p.selectionRange;if(x!==R&&R&&R.ownerDocument&&gg(R.ownerDocument.documentElement,R)){if(G!==null&&ec(R)){var oe=G.start,me=G.end;if(me===void 0&&(me=oe),"selectionStart"in R)R.selectionStart=oe,R.selectionEnd=Math.min(me,R.value.length);else{var ye=R.ownerDocument||document,ue=ye&&ye.defaultView||window;if(ue.getSelection){var fe=ue.getSelection(),Ne=R.textContent.length,Le=Math.min(G.start,Ne),ut=G.end===void 0?Le:Math.min(G.end,Ne);!fe.extend&&Le>ut&&(x=ut,ut=Le,Le=x);var ee=pg(R,Le),J=pg(R,ut);if(ee&&J&&(fe.rangeCount!==1||fe.anchorNode!==ee.node||fe.anchorOffset!==ee.offset||fe.focusNode!==J.node||fe.focusOffset!==J.offset)){var ae=ye.createRange();ae.setStart(ee.node,ee.offset),fe.removeAllRanges(),Le>ut?(fe.addRange(ae),fe.extend(J.node,J.offset)):(ae.setEnd(J.node,J.offset),fe.addRange(ae))}}}}for(ye=[],fe=R;fe=fe.parentNode;)fe.nodeType===1&&ye.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ye.length;R++){var ge=ye[R];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}ls=!!Nf,Rf=Nf=null}finally{it=d,Q.p=a,Z.T=r}}e.current=t,Nt=2}}function z0(){if(Nt===2){Nt=0;var e=Rr,t=$i,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Z.T,Z.T=null;var a=Q.p;Q.p=2;var d=it;it|=4;try{l0(e,t.alternate,t)}finally{it=d,Q.p=a,Z.T=r}}Nt=3}}function M0(){if(Nt===4||Nt===3){Nt=0,Ee();var e=Rr,t=$i,r=lr,a=v0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,$i=Rr=null,D0(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Nr=null),ju(r),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Xe,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=Z.T,d=Q.p,Q.p=2,Z.T=null;try{for(var p=e.onRecoverableError,x=0;x<a.length;x++){var R=a[x];p(R.value,{componentStack:R.stack})}}finally{Z.T=t,Q.p=d}}(lr&3)!==0&&Zo(),Un(e),d=e.pendingLanes,(r&261930)!==0&&(d&42)!==0?e===gf?vl++:(vl=0,gf=e):vl=0,Sl(0)}}function D0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,el(t)))}function Zo(){return O0(),z0(),M0(),j0()}function j0(){if(Nt!==5)return!1;var e=Rr,t=mf;mf=0;var r=ju(lr),a=Z.T,d=Q.p;try{Q.p=32>r?32:r,Z.T=null,r=pf,pf=null;var p=Rr,x=lr;if(Nt=0,$i=Rr=null,lr=0,(it&6)!==0)throw Error(o(331));var R=it;if(it|=4,g0(p.current),h0(p,p.current,x,r),it=R,Sl(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Xe,p)}catch{}return!0}finally{Q.p=d,Z.T=a,D0(e,t)}}function L0(e,t,r){t=yn(r,t),t=Xc(e.stateNode,t,2),e=_r(e,t,2),e!==null&&(Ha(e,2),Un(e))}function lt(e,t,r){if(e.tag===3)L0(e,e,r);else for(;t!==null;){if(t.tag===3){L0(t,e,r);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Nr===null||!Nr.has(a))){e=yn(r,e),r=Iy(2),a=_r(t,r,2),a!==null&&(By(r,a,t,e),Ha(a,2),Un(a));break}}t=t.return}}function vf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new gC;var d=new Set;a.set(t,d)}else d=a.get(t),d===void 0&&(d=new Set,a.set(t,d));d.has(r)||(ff=!0,d.add(r),e=EC.bind(null,e,t,r),t.then(e,e))}function EC(e,t,r){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,ct===e&&(We&r)===r&&(vt===4||vt===3&&(We&62914560)===We&&300>_e()-Po?(it&2)===0&&ea(e,0):df|=r,Wi===We&&(Wi=0)),Un(e)}function I0(e,t){t===0&&(t=Op()),e=Wr(e,t),e!==null&&(Ha(e,t),Un(e))}function xC(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),I0(e,r)}function _C(e,t){var r=0;switch(e.tag){case 31:case 13:var a=e.stateNode,d=e.memoizedState;d!==null&&(r=d.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),I0(e,r)}function wC(e,t){return he(e,t)}var Ko=null,na=null,Sf=!1,Qo=!1,Ef=!1,zr=0;function Un(e){e!==na&&e.next===null&&(na===null?Ko=na=e:na=na.next=e),Qo=!0,Sf||(Sf=!0,TC())}function Sl(e,t){if(!Ef&&Qo){Ef=!0;do for(var r=!1,a=Ko;a!==null;){if(e!==0){var d=a.pendingLanes;if(d===0)var p=0;else{var x=a.suspendedLanes,R=a.pingedLanes;p=(1<<31-Ze(42|e)+1)-1,p&=d&~(x&~R),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,q0(a,p))}else p=We,p=$l(a,a===ct?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(p&3)===0||Ua(a,p)||(r=!0,q0(a,p));a=a.next}while(r);Ef=!1}}function CC(){B0()}function B0(){Qo=Sf=!1;var e=0;zr!==0&&LC()&&(e=zr);for(var t=_e(),r=null,a=Ko;a!==null;){var d=a.next,p=U0(a,t);p===0?(a.next=null,r===null?Ko=d:r.next=d,d===null&&(na=r)):(r=a,(e!==0||(p&3)!==0)&&(Qo=!0)),a=d}Nt!==0&&Nt!==5||Sl(e),zr!==0&&(zr=0)}function U0(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var x=31-Ze(p),R=1<<x,G=d[x];G===-1?((R&r)===0||(R&a)!==0)&&(d[x]=Ww(R,t)):G<=t&&(e.expiredLanes|=R),p&=~R}if(t=ct,r=We,r=$l(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&pe(a),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Ua(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(a!==null&&pe(a),ju(r)){case 2:case 8:r=be;break;case 32:r=Ce;break;case 268435456:r=Je;break;default:r=Ce}return a=H0.bind(null,e),r=he(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&pe(a),e.callbackPriority=2,e.callbackNode=null,2}function H0(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Zo()&&e.callbackNode!==r)return null;var a=We;return a=$l(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(E0(e,a,t),U0(e,_e()),e.callbackNode!=null&&e.callbackNode===r?H0.bind(null,e):null)}function q0(e,t){if(Zo())return null;E0(e,t,!0)}function TC(){BC(function(){(it&6)!==0?he(te,CC):B0()})}function xf(){if(zr===0){var e=qi;e===0&&(e=xi,xi<<=1,(xi&261888)===0&&(xi=256)),zr=e}return zr}function P0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ro(""+e)}function F0(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function AC(e,t,r,a,d){if(t==="submit"&&r&&r.stateNode===d){var p=P0((d[Xt]||null).action),x=a.submitter;x&&(t=(t=x[Xt]||null)?P0(t.formAction):x.getAttribute("formAction"),t!==null&&(p=t,x=null));var R=new oo("action","action",null,a,d);e.push({event:R,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(zr!==0){var G=x?F0(d,x):new FormData(d);qc(r,{pending:!0,data:G,method:d.method,action:p},null,G)}}else typeof p=="function"&&(R.preventDefault(),G=x?F0(d,x):new FormData(d),qc(r,{pending:!0,data:G,method:d.method,action:p},p,G))},currentTarget:d}]})}}for(var _f=0;_f<ic.length;_f++){var wf=ic[_f],kC=wf.toLowerCase(),NC=wf[0].toUpperCase()+wf.slice(1);Tn(kC,"on"+NC)}Tn(Sg,"onAnimationEnd"),Tn(Eg,"onAnimationIteration"),Tn(xg,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(V2,"onTransitionRun"),Tn(G2,"onTransitionStart"),Tn(X2,"onTransitionCancel"),Tn(_g,"onTransitionEnd"),Ai("onMouseEnter",["mouseout","mouseover"]),Ai("onMouseLeave",["mouseout","mouseover"]),Ai("onPointerEnter",["pointerout","pointerover"]),Ai("onPointerLeave",["pointerout","pointerover"]),Zr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="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(" "),RC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function Y0(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var a=e[r],d=a.event;a=a.listeners;e:{var p=void 0;if(t)for(var x=a.length-1;0<=x;x--){var R=a[x],G=R.instance,oe=R.currentTarget;if(R=R.listener,G!==p&&d.isPropagationStopped())break e;p=R,d.currentTarget=oe;try{p(d)}catch(me){co(me)}d.currentTarget=null,p=G}else for(x=0;x<a.length;x++){if(R=a[x],G=R.instance,oe=R.currentTarget,R=R.listener,G!==p&&d.isPropagationStopped())break e;p=R,d.currentTarget=oe;try{p(d)}catch(me){co(me)}d.currentTarget=null,p=G}}}}function Qe(e,t){var r=t[Lu];r===void 0&&(r=t[Lu]=new Set);var a=e+"__bubble";r.has(a)||(V0(t,e,2,!1),r.add(a))}function Cf(e,t,r){var a=0;t&&(a|=4),V0(r,e,a,t)}var Jo="_reactListening"+Math.random().toString(36).slice(2);function Tf(e){if(!e[Jo]){e[Jo]=!0,Bp.forEach(function(r){r!=="selectionchange"&&(RC.has(r)||Cf(r,!1,e),Cf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jo]||(t[Jo]=!0,Cf("selectionchange",!1,t))}}function V0(e,t,r,a){switch(Sb(t)){case 2:var d=iT;break;case 8:d=aT;break;default:d=qf}r=d.bind(null,t,r,e),d=void 0,!Vu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),a?d!==void 0?e.addEventListener(t,r,{capture:!0,passive:d}):e.addEventListener(t,r,!0):d!==void 0?e.addEventListener(t,r,{passive:d}):e.addEventListener(t,r,!1)}function Af(e,t,r,a,d){var p=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var R=a.stateNode.containerInfo;if(R===d)break;if(x===4)for(x=a.return;x!==null;){var G=x.tag;if((G===3||G===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;R!==null;){if(x=wi(R),x===null)return;if(G=x.tag,G===5||G===6||G===26||G===27){a=p=x;continue e}R=R.parentNode}}a=a.return}Qp(function(){var oe=p,me=Fu(r),ye=[];e:{var ue=wg.get(e);if(ue!==void 0){var fe=oo,Ne=e;switch(e){case"keypress":if(ao(r)===0)break e;case"keydown":case"keyup":fe=_2;break;case"focusin":Ne="focus",fe=Ku;break;case"focusout":Ne="blur",fe=Ku;break;case"beforeblur":case"afterblur":fe=Ku;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=$p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=f2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=T2;break;case Sg:case Eg:case xg:fe=m2;break;case _g:fe=k2;break;case"scroll":case"scrollend":fe=u2;break;case"wheel":fe=R2;break;case"copy":case"cut":case"paste":fe=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=tg;break;case"toggle":case"beforetoggle":fe=z2}var Le=(t&4)!==0,ut=!Le&&(e==="scroll"||e==="scrollend"),ee=Le?ue!==null?ue+"Capture":null:ue;Le=[];for(var J=oe,ae;J!==null;){var ge=J;if(ae=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||ae===null||ee===null||(ge=Fa(J,ee),ge!=null&&Le.push(xl(J,ge,ae))),ut)break;J=J.return}0<Le.length&&(ue=new fe(ue,Ne,null,r,me),ye.push({event:ue,listeners:Le}))}}if((t&7)===0){e:{if(ue=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",ue&&r!==Pu&&(Ne=r.relatedTarget||r.fromElement)&&(wi(Ne)||Ne[_i]))break e;if((fe||ue)&&(ue=me.window===me?me:(ue=me.ownerDocument)?ue.defaultView||ue.parentWindow:window,fe?(Ne=r.relatedTarget||r.toElement,fe=oe,Ne=Ne?wi(Ne):null,Ne!==null&&(ut=s(Ne),Le=Ne.tag,Ne!==ut||Le!==5&&Le!==27&&Le!==6)&&(Ne=null)):(fe=null,Ne=oe),fe!==Ne)){if(Le=$p,ge="onMouseLeave",ee="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Le=tg,ge="onPointerLeave",ee="onPointerEnter",J="pointer"),ut=fe==null?ue:Pa(fe),ae=Ne==null?ue:Pa(Ne),ue=new Le(ge,J+"leave",fe,r,me),ue.target=ut,ue.relatedTarget=ae,ge=null,wi(me)===oe&&(Le=new Le(ee,J+"enter",Ne,r,me),Le.target=ae,Le.relatedTarget=ut,ge=Le),ut=ge,fe&&Ne)t:{for(Le=OC,ee=fe,J=Ne,ae=0,ge=ee;ge;ge=Le(ge))ae++;ge=0;for(var De=J;De;De=Le(De))ge++;for(;0<ae-ge;)ee=Le(ee),ae--;for(;0<ge-ae;)J=Le(J),ge--;for(;ae--;){if(ee===J||J!==null&&ee===J.alternate){Le=ee;break t}ee=Le(ee),J=Le(J)}Le=null}else Le=null;fe!==null&&G0(ye,ue,fe,Le,!1),Ne!==null&&ut!==null&&G0(ye,ut,Ne,Le,!0)}}e:{if(ue=oe?Pa(oe):window,fe=ue.nodeName&&ue.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ue.type==="file")var tt=ug;else if(og(ue))if(cg)tt=P2;else{tt=H2;var Me=U2}else fe=ue.nodeName,!fe||fe.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?oe&&qu(oe.elementType)&&(tt=ug):tt=q2;if(tt&&(tt=tt(e,oe))){sg(ye,tt,r,me);break e}Me&&Me(e,ue,oe),e==="focusout"&&oe&&ue.type==="number"&&oe.memoizedProps.value!=null&&Hu(ue,"number",ue.value)}switch(Me=oe?Pa(oe):window,e){case"focusin":(og(Me)||Me.contentEditable==="true")&&(Mi=Me,tc=oe,Ja=null);break;case"focusout":Ja=tc=Mi=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,bg(ye,r,me);break;case"selectionchange":if(Y2)break;case"keydown":case"keyup":bg(ye,r,me)}var Fe;if(Ju)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else zi?ag(e,r)&&($e="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&($e="onCompositionStart");$e&&(ng&&r.locale!=="ko"&&(zi||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&zi&&(Fe=Jp()):(gr=me,Gu="value"in gr?gr.value:gr.textContent,zi=!0)),Me=Wo(oe,$e),0<Me.length&&($e=new eg($e,e,null,r,me),ye.push({event:$e,listeners:Me}),Fe?$e.data=Fe:(Fe=lg(r),Fe!==null&&($e.data=Fe)))),(Fe=D2?j2(e,r):L2(e,r))&&($e=Wo(oe,"onBeforeInput"),0<$e.length&&(Me=new eg("onBeforeInput","beforeinput",null,r,me),ye.push({event:Me,listeners:$e}),Me.data=Fe)),AC(ye,e,oe,r,me)}Y0(ye,t)})}function xl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wo(e,t){for(var r=t+"Capture",a=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=Fa(e,r),d!=null&&a.unshift(xl(e,d,p)),d=Fa(e,t),d!=null&&a.push(xl(e,d,p))),e.tag===3)return a;e=e.return}return[]}function OC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function G0(e,t,r,a,d){for(var p=t._reactName,x=[];r!==null&&r!==a;){var R=r,G=R.alternate,oe=R.stateNode;if(R=R.tag,G!==null&&G===a)break;R!==5&&R!==26&&R!==27||oe===null||(G=oe,d?(oe=Fa(r,p),oe!=null&&x.unshift(xl(r,oe,G))):d||(oe=Fa(r,p),oe!=null&&x.push(xl(r,oe,G)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var zC=/\r\n?/g,MC=/\u0000|\uFFFD/g;function X0(e){return(typeof e=="string"?e:""+e).replace(zC,`
9
+ `).replace(MC,"")}function Z0(e,t){return t=X0(t),X0(e)===t}function st(e,t,r,a,d,p){switch(r){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ni(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ni(e,""+a);break;case"className":to(e,"class",a);break;case"tabIndex":to(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":to(e,r,a);break;case"style":Zp(e,a,p);break;case"data":if(t!=="object"){to(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=ro(""+a),e.setAttribute(r,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(r==="formAction"?(t!=="input"&&st(e,t,"name",d.name,d,null),st(e,t,"formEncType",d.formEncType,d,null),st(e,t,"formMethod",d.formMethod,d,null),st(e,t,"formTarget",d.formTarget,d,null)):(st(e,t,"encType",d.encType,d,null),st(e,t,"method",d.method,d,null),st(e,t,"target",d.target,d,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(r);break}a=ro(""+a),e.setAttribute(r,a);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}r=ro(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""+a):e.removeAttribute(r);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":a===!0?e.setAttribute(r,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(r,a):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(r,a):e.removeAttribute(r);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(r):e.setAttribute(r,a);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),eo(e,"popover",a);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":eo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=o2.get(r)||r,eo(e,r,a))}}function kf(e,t,r,a,d,p){switch(r){case"style":Zp(e,a,p);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(r=a.__html,r!=null){if(d.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof a=="string"?Ni(e,a):(typeof a=="number"||typeof a=="bigint")&&Ni(e,""+a);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Up.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(d=r.endsWith("Capture"),t=r.slice(2,d?r.length-7:void 0),p=e[Xt]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(t,p,d),typeof a=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,a,d);break e}r in e?e[r]=a:a===!0?e.setAttribute(r,""):eo(e,r,a)}}}function Bt(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var a=!1,d=!1,p;for(p in r)if(r.hasOwnProperty(p)){var x=r[p];if(x!=null)switch(p){case"src":a=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,p,x,r,null)}}d&&st(e,t,"srcSet",r.srcSet,r,null),a&&st(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var R=p=x=d=null,G=null,oe=null;for(a in r)if(r.hasOwnProperty(a)){var me=r[a];if(me!=null)switch(a){case"name":d=me;break;case"type":x=me;break;case"checked":G=me;break;case"defaultChecked":oe=me;break;case"value":p=me;break;case"defaultValue":R=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(o(137,t));break;default:st(e,t,a,me,r,null)}}Yp(e,p,R,G,oe,x,d,!1);return;case"select":Qe("invalid",e),a=x=p=null;for(d in r)if(r.hasOwnProperty(d)&&(R=r[d],R!=null))switch(d){case"value":p=R;break;case"defaultValue":x=R;break;case"multiple":a=R;default:st(e,t,d,R,r,null)}t=p,r=x,e.multiple=!!a,t!=null?ki(e,!!a,t,!1):r!=null&&ki(e,!!a,r,!0);return;case"textarea":Qe("invalid",e),p=d=a=null;for(x in r)if(r.hasOwnProperty(x)&&(R=r[x],R!=null))switch(x){case"value":a=R;break;case"defaultValue":d=R;break;case"children":p=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(o(91));break;default:st(e,t,x,R,r,null)}Gp(e,a,d,p);return;case"option":for(G in r)if(r.hasOwnProperty(G)&&(a=r[G],a!=null))switch(G){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:st(e,t,G,a,r,null)}return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<El.length;a++)Qe(El[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("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(oe in r)if(r.hasOwnProperty(oe)&&(a=r[oe],a!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,oe,a,r,null)}return;default:if(qu(t)){for(me in r)r.hasOwnProperty(me)&&(a=r[me],a!==void 0&&kf(e,t,me,a,r,void 0));return}}for(R in r)r.hasOwnProperty(R)&&(a=r[R],a!=null&&st(e,t,R,a,r,null))}function DC(e,t,r,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,p=null,x=null,R=null,G=null,oe=null,me=null;for(fe in r){var ye=r[fe];if(r.hasOwnProperty(fe)&&ye!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":G=ye;default:a.hasOwnProperty(fe)||st(e,t,fe,null,a,ye)}}for(var ue in a){var fe=a[ue];if(ye=r[ue],a.hasOwnProperty(ue)&&(fe!=null||ye!=null))switch(ue){case"type":p=fe;break;case"name":d=fe;break;case"checked":oe=fe;break;case"defaultChecked":me=fe;break;case"value":x=fe;break;case"defaultValue":R=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==ye&&st(e,t,ue,fe,a,ye)}}Uu(e,x,R,G,oe,me,p,d);return;case"select":fe=x=R=ue=null;for(p in r)if(G=r[p],r.hasOwnProperty(p)&&G!=null)switch(p){case"value":break;case"multiple":fe=G;default:a.hasOwnProperty(p)||st(e,t,p,null,a,G)}for(d in a)if(p=a[d],G=r[d],a.hasOwnProperty(d)&&(p!=null||G!=null))switch(d){case"value":ue=p;break;case"defaultValue":R=p;break;case"multiple":x=p;default:p!==G&&st(e,t,d,p,a,G)}t=R,r=x,a=fe,ue!=null?ki(e,!!r,ue,!1):!!a!=!!r&&(t!=null?ki(e,!!r,t,!0):ki(e,!!r,r?[]:"",!1));return;case"textarea":fe=ue=null;for(R in r)if(d=r[R],r.hasOwnProperty(R)&&d!=null&&!a.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:st(e,t,R,null,a,d)}for(x in a)if(d=a[x],p=r[x],a.hasOwnProperty(x)&&(d!=null||p!=null))switch(x){case"value":ue=d;break;case"defaultValue":fe=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==p&&st(e,t,x,d,a,p)}Vp(e,ue,fe);return;case"option":for(var Ne in r)if(ue=r[Ne],r.hasOwnProperty(Ne)&&ue!=null&&!a.hasOwnProperty(Ne))switch(Ne){case"selected":e.selected=!1;break;default:st(e,t,Ne,null,a,ue)}for(G in a)if(ue=a[G],fe=r[G],a.hasOwnProperty(G)&&ue!==fe&&(ue!=null||fe!=null))switch(G){case"selected":e.selected=ue&&typeof ue!="function"&&typeof ue!="symbol";break;default:st(e,t,G,ue,a,fe)}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 Le in r)ue=r[Le],r.hasOwnProperty(Le)&&ue!=null&&!a.hasOwnProperty(Le)&&st(e,t,Le,null,a,ue);for(oe in a)if(ue=a[oe],fe=r[oe],a.hasOwnProperty(oe)&&ue!==fe&&(ue!=null||fe!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,t));break;default:st(e,t,oe,ue,a,fe)}return;default:if(qu(t)){for(var ut in r)ue=r[ut],r.hasOwnProperty(ut)&&ue!==void 0&&!a.hasOwnProperty(ut)&&kf(e,t,ut,void 0,a,ue);for(me in a)ue=a[me],fe=r[me],!a.hasOwnProperty(me)||ue===fe||ue===void 0&&fe===void 0||kf(e,t,me,ue,a,fe);return}}for(var ee in r)ue=r[ee],r.hasOwnProperty(ee)&&ue!=null&&!a.hasOwnProperty(ee)&&st(e,t,ee,null,a,ue);for(ye in a)ue=a[ye],fe=r[ye],!a.hasOwnProperty(ye)||ue===fe||ue==null&&fe==null||st(e,t,ye,ue,a,fe)}function K0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),a=0;a<r.length;a++){var d=r[a],p=d.transferSize,x=d.initiatorType,R=d.duration;if(p&&R&&K0(x)){for(x=0,R=d.responseEnd,a+=1;a<r.length;a++){var G=r[a],oe=G.startTime;if(oe>R)break;var me=G.transferSize,ye=G.initiatorType;me&&K0(ye)&&(G=G.responseEnd,x+=me*(G<R?1:(R-oe)/(G-oe)))}if(--a,t+=8*(p+x)/(d.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 Nf=null,Rf=null;function $o(e){return e.nodeType===9?e:e.ownerDocument}function Q0(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 J0(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 Of(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 zf=null;function LC(){var e=window.event;return e&&e.type==="popstate"?e===zf?!1:(zf=e,!0):(zf=null,!1)}var W0=typeof setTimeout=="function"?setTimeout:void 0,IC=typeof clearTimeout=="function"?clearTimeout:void 0,$0=typeof Promise=="function"?Promise:void 0,BC=typeof queueMicrotask=="function"?queueMicrotask:typeof $0<"u"?function(e){return $0.resolve(null).then(e).catch(UC)}:W0;function UC(e){setTimeout(function(){throw e})}function Mr(e){return e==="head"}function eb(e,t){var r=t,a=0;do{var d=r.nextSibling;if(e.removeChild(r),d&&d.nodeType===8)if(r=d.data,r==="/$"||r==="/&"){if(a===0){e.removeChild(d),la(t);return}a--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")a++;else if(r==="html")_l(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,_l(r);for(var p=r.firstChild;p;){var x=p.nextSibling,R=p.nodeName;p[qa]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=x}}else r==="body"&&_l(e.ownerDocument.body);r=d}while(r);la(t)}function tb(e,t){var r=e;e=0;do{var a=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=a}while(r)}function Mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Mf(r),Iu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function HC(e,t,r,a){for(;e.nodeType===1;){var d=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=xn(e.nextSibling),e===null)break}return null}function qC(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=xn(e.nextSibling),e===null))return null;return e}function nb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=xn(e.nextSibling),e===null))return null;return e}function Df(e){return e.data==="$?"||e.data==="$~"}function jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function PC(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var a=function(){t(),r.removeEventListener("DOMContentLoaded",a)};r.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function xn(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 Lf=null;function rb(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return xn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function ib(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function ab(e,t,r){switch(t=$o(r),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 _l(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Iu(e)}var _n=new Map,lb=new Set;function es(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var or=Q.d;Q.d={f:FC,r:YC,D:VC,C:GC,L:XC,m:ZC,X:QC,S:KC,M:JC};function FC(){var e=or.f(),t=Vo();return e||t}function YC(e){var t=Ci(e);t!==null&&t.tag===5&&t.type==="form"?_y(t):or.r(e)}var ra=typeof document>"u"?null:document;function ob(e,t,r){var a=ra;if(a&&typeof t=="string"&&t){var d=pn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof r=="string"&&(d+='[crossorigin="'+r+'"]'),lb.has(d)||(lb.add(d),e={rel:e,crossOrigin:r,href:t},a.querySelector(d)===null&&(t=a.createElement("link"),Bt(t,"link",e),zt(t),a.head.appendChild(t)))}}function VC(e){or.D(e),ob("dns-prefetch",e,null)}function GC(e,t){or.C(e,t),ob("preconnect",e,t)}function XC(e,t,r){or.L(e,t,r);var a=ra;if(a&&e&&t){var d='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(d+='[imagesrcset="'+pn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(d+='[imagesizes="'+pn(r.imageSizes)+'"]')):d+='[href="'+pn(e)+'"]';var p=d;switch(t){case"style":p=ia(e);break;case"script":p=aa(e)}_n.has(p)||(e=y({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),_n.set(p,e),a.querySelector(d)!==null||t==="style"&&a.querySelector(wl(p))||t==="script"&&a.querySelector(Cl(p))||(t=a.createElement("link"),Bt(t,"link",e),zt(t),a.head.appendChild(t)))}}function ZC(e,t){or.m(e,t);var r=ra;if(r&&e){var a=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+pn(a)+'"][href="'+pn(e)+'"]',p=d;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=aa(e)}if(!_n.has(p)&&(e=y({rel:"modulepreload",href:e},t),_n.set(p,e),r.querySelector(d)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Cl(p)))return}a=r.createElement("link"),Bt(a,"link",e),zt(a),r.head.appendChild(a)}}}function KC(e,t,r){or.S(e,t,r);var a=ra;if(a&&e){var d=Ti(a).hoistableStyles,p=ia(e);t=t||"default";var x=d.get(p);if(!x){var R={loading:0,preload:null};if(x=a.querySelector(wl(p)))R.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},r),(r=_n.get(p))&&If(e,r);var G=x=a.createElement("link");zt(G),Bt(G,"link",e),G._p=new Promise(function(oe,me){G.onload=oe,G.onerror=me}),G.addEventListener("load",function(){R.loading|=1}),G.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ts(x,t,a)}x={type:"stylesheet",instance:x,count:1,state:R},d.set(p,x)}}}function QC(e,t){or.X(e,t);var r=ra;if(r&&e){var a=Ti(r).hoistableScripts,d=aa(e),p=a.get(d);p||(p=r.querySelector(Cl(d)),p||(e=y({src:e,async:!0},t),(t=_n.get(d))&&Bf(e,t),p=r.createElement("script"),zt(p),Bt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(d,p))}}function JC(e,t){or.M(e,t);var r=ra;if(r&&e){var a=Ti(r).hoistableScripts,d=aa(e),p=a.get(d);p||(p=r.querySelector(Cl(d)),p||(e=y({src:e,async:!0,type:"module"},t),(t=_n.get(d))&&Bf(e,t),p=r.createElement("script"),zt(p),Bt(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},a.set(d,p))}}function sb(e,t,r,a){var d=(d=we.current)?es(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=ia(r.href),r=Ti(d).hoistableStyles,a=r.get(t),a||(a={type:"style",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=ia(r.href);var p=Ti(d).hoistableStyles,x=p.get(e);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,x),(p=d.querySelector(wl(e)))&&!p._p&&(x.instance=p,x.state.loading=5),_n.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},_n.set(e,r),p||WC(d,e,r,x.state))),t&&a===null)throw Error(o(528,""));return x}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=aa(r),r=Ti(d).hoistableScripts,a=r.get(t),a||(a={type:"script",instance:null,count:0,state:null},r.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ia(e){return'href="'+pn(e)+'"'}function wl(e){return'link[rel="stylesheet"]['+e+"]"}function ub(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function WC(e,t,r,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Bt(t,"link",r),zt(t),e.head.appendChild(t))}function aa(e){return'[src="'+pn(e)+'"]'}function Cl(e){return"script[async]"+e}function cb(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+pn(r.href)+'"]');if(a)return t.instance=a,zt(a),a;var d=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),zt(a),Bt(a,"style",d),ts(a,r.precedence,e),t.instance=a;case"stylesheet":d=ia(r.href);var p=e.querySelector(wl(d));if(p)return t.state.loading|=4,t.instance=p,zt(p),p;a=ub(r),(d=_n.get(d))&&If(a,d),p=(e.ownerDocument||e).createElement("link"),zt(p);var x=p;return x._p=new Promise(function(R,G){x.onload=R,x.onerror=G}),Bt(p,"link",a),t.state.loading|=4,ts(p,r.precedence,e),t.instance=p;case"script":return p=aa(r.src),(d=e.querySelector(Cl(p)))?(t.instance=d,zt(d),d):(a=r,(d=_n.get(p))&&(a=y({},r),Bf(a,d)),e=e.ownerDocument||e,d=e.createElement("script"),zt(d),Bt(d,"link",a),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ts(a,r.precedence,e));return t.instance}function ts(e,t,r){for(var a=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=a.length?a[a.length-1]:null,p=d,x=0;x<a.length;x++){var R=a[x];if(R.dataset.precedence===t)p=R;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Bf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ns=null;function fb(e,t,r){if(ns===null){var a=new Map,d=ns=new Map;d.set(r,a)}else d=ns,a=d.get(r),a||(a=new Map,d.set(r,a));if(a.has(e))return a;for(a.set(e,null),r=r.getElementsByTagName(e),d=0;d<r.length;d++){var p=r[d];if(!(p[qa]||p[Dt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var x=p.getAttribute(t)||"";x=e+x;var R=a.get(x);R?R.push(p):a.set(x,[p])}}return a}function db(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function $C(e,t,r){if(r===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 hb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function eT(e,t,r,a){if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var d=ia(a.href),p=t.querySelector(wl(d));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rs.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=p,zt(p);return}p=t.ownerDocument||t,a=ub(a),(d=_n.get(d))&&If(a,d),p=p.createElement("link"),zt(p);var x=p;x._p=new Promise(function(R,G){x.onload=R,x.onerror=G}),Bt(p,"link",a),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=rs.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Uf=0;function tT(e,t){return e.stylesheets&&e.count===0&&as(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&as(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+t);0<e.imgBytes&&Uf===0&&(Uf=62500*jC());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&as(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Uf?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(d)}}:null}function rs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)as(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var is=null;function as(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,is=new Map,t.forEach(nT,e),is=null,rs.call(e))}function nT(e,t){if(!(t.state.loading&4)){var r=is.get(e);if(r)var a=r.get(null);else{r=new Map,is.set(e,r);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var x=d[p];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(r.set(x.dataset.precedence,x),a=x)}a&&r.set(null,a)}d=t.instance,x=d.getAttribute("data-precedence"),p=r.get(x)||a,p===a&&r.set(null,d),r.set(x,d),this.count++,a=rs.bind(this),d.addEventListener("load",a),d.addEventListener("error",a),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var Tl={$$typeof:k,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function rT(e,t,r,a,d,p,x,R,G){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=Mu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.hiddenUpdates=Mu(null),this.identifierPrefix=a,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function mb(e,t,r,a,d,p,x,R,G,oe,me,ye){return e=new rT(e,t,r,x,G,oe,me,ye,R),t=1,p===!0&&(t|=24),p=an(3,null,null,t),e.current=p,p.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,p.memoizedState={element:a,isDehydrated:r,cache:t},Ec(p),e}function pb(e){return e?(e=Li,e):Li}function gb(e,t,r,a,d,p){d=pb(d),a.context===null?a.context=d:a.pendingContext=d,a=xr(t),a.payload={element:r},p=p===void 0?null:p,p!==null&&(a.callback=p),r=_r(e,a,t),r!==null&&($t(r,e,t),il(r,e,t))}function yb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Hf(e,t){yb(e,t),(e=e.alternate)&&yb(e,t)}function bb(e){if(e.tag===13||e.tag===31){var t=Wr(e,67108864);t!==null&&$t(t,e,67108864),Hf(e,67108864)}}function vb(e){if(e.tag===13||e.tag===31){var t=cn();t=Du(t);var r=Wr(e,t);r!==null&&$t(r,e,t),Hf(e,t)}}var ls=!0;function iT(e,t,r,a){var d=Z.T;Z.T=null;var p=Q.p;try{Q.p=2,qf(e,t,r,a)}finally{Q.p=p,Z.T=d}}function aT(e,t,r,a){var d=Z.T;Z.T=null;var p=Q.p;try{Q.p=8,qf(e,t,r,a)}finally{Q.p=p,Z.T=d}}function qf(e,t,r,a){if(ls){var d=Pf(a);if(d===null)Af(e,t,a,os,r),Eb(e,a);else if(oT(d,e,t,r,a))a.stopPropagation();else if(Eb(e,a),t&4&&-1<lT.indexOf(e)){for(;d!==null;){var p=Ci(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var x=hn(p.pendingLanes);if(x!==0){var R=p;for(R.pendingLanes|=2,R.entangledLanes|=2;x;){var G=1<<31-Ze(x);R.entanglements[1]|=G,x&=~G}Un(p),(it&6)===0&&(Fo=_e()+500,Sl(0))}}break;case 31:case 13:R=Wr(p,2),R!==null&&$t(R,p,2),Vo(),Hf(p,2)}if(p=Pf(a),p===null&&Af(e,t,a,os,r),p===d)break;d=p}d!==null&&a.stopPropagation()}else Af(e,t,a,null,r)}}function Pf(e){return e=Fu(e),Ff(e)}var os=null;function Ff(e){if(os=null,e=wi(e),e!==null){var t=s(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=c(t),e!==null)return e;e=null}else if(r===31){if(e=f(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return os=e,null}function Sb(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(Se()){case te:return 2;case be:return 8;case Ce:case Ie:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Yf=!1,Dr=null,jr=null,Lr=null,Al=new Map,kl=new Map,Ir=[],lT="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 Eb(e,t){switch(e){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":jr=null;break;case"mouseover":case"mouseout":Lr=null;break;case"pointerover":case"pointerout":Al.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Nl(e,t,r,a,d,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:r,eventSystemFlags:a,nativeEvent:p,targetContainers:[d]},t!==null&&(t=Ci(t),t!==null&&bb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function oT(e,t,r,a,d){switch(t){case"focusin":return Dr=Nl(Dr,e,t,r,a,d),!0;case"dragenter":return jr=Nl(jr,e,t,r,a,d),!0;case"mouseover":return Lr=Nl(Lr,e,t,r,a,d),!0;case"pointerover":var p=d.pointerId;return Al.set(p,Nl(Al.get(p)||null,e,t,r,a,d)),!0;case"gotpointercapture":return p=d.pointerId,kl.set(p,Nl(kl.get(p)||null,e,t,r,a,d)),!0}return!1}function xb(e){var t=wi(e.target);if(t!==null){var r=s(t);if(r!==null){if(t=r.tag,t===13){if(t=c(r),t!==null){e.blockedOn=t,Lp(e.priority,function(){vb(r)});return}}else if(t===31){if(t=f(r),t!==null){e.blockedOn=t,Lp(e.priority,function(){vb(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ss(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Pf(e.nativeEvent);if(r===null){r=e.nativeEvent;var a=new r.constructor(r.type,r);Pu=a,r.target.dispatchEvent(a),Pu=null}else return t=Ci(r),t!==null&&bb(t),e.blockedOn=r,!1;t.shift()}return!0}function _b(e,t,r){ss(e)&&r.delete(t)}function sT(){Yf=!1,Dr!==null&&ss(Dr)&&(Dr=null),jr!==null&&ss(jr)&&(jr=null),Lr!==null&&ss(Lr)&&(Lr=null),Al.forEach(_b),kl.forEach(_b)}function us(e,t){e.blockedOn===t&&(e.blockedOn=null,Yf||(Yf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,sT)))}var cs=null;function wb(e){cs!==e&&(cs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){cs===e&&(cs=null);for(var t=0;t<e.length;t+=3){var r=e[t],a=e[t+1],d=e[t+2];if(typeof a!="function"){if(Ff(a||r)===null)continue;break}var p=Ci(r);p!==null&&(e.splice(t,3),t-=3,qc(p,{pending:!0,data:d,method:r.method,action:a},a,d))}}))}function la(e){function t(G){return us(G,e)}Dr!==null&&us(Dr,e),jr!==null&&us(jr,e),Lr!==null&&us(Lr,e),Al.forEach(t),kl.forEach(t);for(var r=0;r<Ir.length;r++){var a=Ir[r];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ir.length&&(r=Ir[0],r.blockedOn===null);)xb(r),r.blockedOn===null&&Ir.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(a=0;a<r.length;a+=3){var d=r[a],p=r[a+1],x=d[Xt]||null;if(typeof p=="function")x||wb(r);else if(x){var R=null;if(p&&p.hasAttribute("formAction")){if(d=p,x=p[Xt]||null)R=x.formAction;else if(Ff(d)!==null)continue}else R=x.action;typeof R=="function"?r[a+1]=R:(r.splice(a,3),a-=3),wb(r)}}}function Cb(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(x){return d=x})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),a||setTimeout(r,20)}function r(){if(!a&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Vf(e){this._internalRoot=e}fs.prototype.render=Vf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=cn();gb(r,a,e,t,null,null)},fs.prototype.unmount=Vf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gb(e.current,2,null,e,null,null),Vo(),t[_i]=null}};function fs(e){this._internalRoot=e}fs.prototype.unstable_scheduleHydration=function(e){if(e){var t=jp();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ir.length&&t!==0&&t<Ir[r].priority;r++);Ir.splice(r,0,e),r===0&&xb(e)}};var Tb=l.version;if(Tb!=="19.2.0")throw Error(o(527,Tb,"19.2.0"));Q.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=h(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var uT={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ds.isDisabled&&ds.supportsFiber)try{Xe=ds.inject(uT),gt=ds}catch{}}return ua.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,a="",d=My,p=Dy,x=jy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(p=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=mb(e,1,!1,null,null,r,a,null,d,p,x,Cb),e[_i]=t.current,Tf(e),new Vf(t)},ua.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var a=!1,d="",p=My,x=Dy,R=jy,G=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(x=r.onCaughtError),r.onRecoverableError!==void 0&&(R=r.onRecoverableError),r.formState!==void 0&&(G=r.formState)),t=mb(e,1,!0,t,r??null,a,d,G,p,x,R,Cb),t.context=pb(null),r=t.current,a=cn(),a=Du(a),d=xr(a),d.callback=null,_r(r,d,a),r=a,t.current.lanes=r,Ha(t,r),Un(t),e[_i]=t.current,Tf(e),new fs(t)},ua.version="19.2.0",ua}var rd;function jb(){if(rd)return ys.exports;rd=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=Db(),ys.exports}var Lb=jb();td();function id(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Es(...n){return l=>{let i=!1;const o=n.map(u=>{const s=id(u,l);return!i&&typeof s=="function"&&(i=!0),s});if(i)return()=>{for(let u=0;u<o.length;u++){const s=o[u];typeof s=="function"?s():id(n[u],null)}}}}function Hn(...n){return P.useCallback(Es(...n),n)}function Ib(n){const l=Bb(n),i=P.forwardRef((o,u)=>{const{children:s,...c}=o,f=P.Children.toArray(s),m=f.find(Hb);if(m){const h=m.props.children,g=f.map(y=>y===m?P.Children.count(h)>1?P.Children.only(null):P.isValidElement(h)?h.props.children:null:y);return O.jsx(l,{...c,ref:u,children:P.isValidElement(h)?P.cloneElement(h,void 0,g):null})}return O.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}function Bb(n){const l=P.forwardRef((i,o)=>{const{children:u,...s}=i;if(P.isValidElement(u)){const c=Pb(u),f=qb(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Es(o,c):c),P.cloneElement(u,f)}return P.Children.count(u)>1?P.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Ub=Symbol("radix.slottable");function Hb(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ub}function qb(n,l){const i={...l};for(const o in l){const u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...f)=>{const m=s(...f);return u(...f),m}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function Pb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}var Fb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sr=Fb.reduce((n,l)=>{const i=Ib(`Primitive.${l}`),o=P.forwardRef((u,s)=>{const{asChild:c,...f}=u,m=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(m,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),ur=globalThis?.document?P.useLayoutEffect:()=>{};function Yb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var fi=n=>{const{present:l,children:i}=n,o=Vb(l),u=typeof i=="function"?i({present:o.isPresent}):P.Children.only(i),s=Hn(o.ref,Gb(u));return typeof i=="function"||o.isPresent?P.cloneElement(u,{ref:s}):null};fi.displayName="Presence";function Vb(n){const[l,i]=P.useState(),o=P.useRef(null),u=P.useRef(n),s=P.useRef("none"),c=n?"mounted":"unmounted",[f,m]=Yb(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const h=zl(o.current);s.current=f==="mounted"?h:"none"},[f]),ur(()=>{const h=o.current,g=u.current;if(g!==n){const v=s.current,b=zl(h);n?m("MOUNT"):b==="none"||h?.display==="none"?m("UNMOUNT"):m(g&&v!==b?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,m]),ur(()=>{if(l){let h;const g=l.ownerDocument.defaultView??window,y=b=>{const E=zl(o.current).includes(CSS.escape(b.animationName));if(b.target===l&&E&&(m("ANIMATION_END"),!u.current)){const T=l.style.animationFillMode;l.style.animationFillMode="forwards",h=g.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=T)})}},v=b=>{b.target===l&&(s.current=zl(o.current))};return l.addEventListener("animationstart",v),l.addEventListener("animationcancel",y),l.addEventListener("animationend",y),()=>{g.clearTimeout(h),l.removeEventListener("animationstart",v),l.removeEventListener("animationcancel",y),l.removeEventListener("animationend",y)}}else m("ANIMATION_END")},[l,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:P.useCallback(h=>{o.current=h?getComputedStyle(h):null,i(h)},[])}}function zl(n){return n?.animationName||"none"}function Gb(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}function ad(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c),m=i.length;i=[...i,c];const h=y=>{const{scope:v,children:b,...w}=y,E=v?.[n]?.[m]||f,T=P.useMemo(()=>w,Object.values(w));return O.jsx(E.Provider,{value:T,children:b})};h.displayName=s+"Provider";function g(y,v){const b=v?.[n]?.[m]||f,w=P.useContext(b);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,g]}const u=()=>{const s=i.map(c=>P.createContext(c));return function(f){const m=f?.[n]||s;return P.useMemo(()=>({[`__scope${n}`]:{...f,[n]:m}}),[f,m])}};return u.scopeName=n,[o,Xb(u,...l)]}function Xb(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(s){const c=o.reduce((f,{useScope:m,scopeName:h})=>{const y=m(s)[`__scope${h}`];return{...f,...y}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}function cr(n){const l=P.useRef(n);return P.useEffect(()=>{l.current=n}),P.useMemo(()=>(...i)=>l.current?.(...i),[])}var Zb=P.createContext(void 0);function Kb(n){const l=P.useContext(Zb);return n||l||"ltr"}function Qb(n,[l,i]){return Math.min(i,Math.max(l,n))}function qn(n,l,{checkForDefaultPrevented:i=!0}={}){return function(u){if(n?.(u),i===!1||!u.defaultPrevented)return l?.(u)}}function Jb(n,l){return P.useReducer((i,o)=>l[i][o]??i,n)}var xs="ScrollArea",[ld]=ad(xs),[Wb,fn]=ld(xs),od=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:u,scrollHideDelay:s=600,...c}=n,[f,m]=P.useState(null),[h,g]=P.useState(null),[y,v]=P.useState(null),[b,w]=P.useState(null),[E,T]=P.useState(null),[_,A]=P.useState(0),[k,q]=P.useState(0),[H,M]=P.useState(!1),[I,Y]=P.useState(!1),F=Hn(l,ie=>m(ie)),$=Kb(u);return O.jsx(Wb,{scope:i,type:o,dir:$,scrollHideDelay:s,scrollArea:f,viewport:h,onViewportChange:g,content:y,onContentChange:v,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:H,onScrollbarXEnabledChange:M,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:I,onScrollbarYEnabledChange:Y,onCornerWidthChange:A,onCornerHeightChange:q,children:O.jsx(sr.div,{dir:$,...c,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":k+"px",...n.style}})})});od.displayName=xs;var sd="ScrollAreaViewport",ud=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:u,...s}=n,c=fn(sd,i),f=P.useRef(null),m=Hn(l,f,c.onViewportChange);return O.jsxs(O.Fragment,{children:[O.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:u}),O.jsx(sr.div,{"data-radix-scroll-area-viewport":"",...s,ref:m,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...n.style},children:O.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});ud.displayName=sd;var Nn="ScrollAreaScrollbar",_s=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=u,f=n.orientation==="horizontal";return P.useEffect(()=>(f?s(!0):c(!0),()=>{f?s(!1):c(!1)}),[f,s,c]),u.type==="hover"?O.jsx($b,{...o,ref:l,forceMount:i}):u.type==="scroll"?O.jsx(ev,{...o,ref:l,forceMount:i}):u.type==="auto"?O.jsx(cd,{...o,ref:l,forceMount:i}):u.type==="always"?O.jsx(ws,{...o,ref:l}):null});_s.displayName=Nn;var $b=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),[s,c]=P.useState(!1);return P.useEffect(()=>{const f=u.scrollArea;let m=0;if(f){const h=()=>{window.clearTimeout(m),c(!0)},g=()=>{m=window.setTimeout(()=>c(!1),u.scrollHideDelay)};return f.addEventListener("pointerenter",h),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(m),f.removeEventListener("pointerenter",h),f.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),O.jsx(fi,{present:i||s,children:O.jsx(cd,{"data-state":s?"visible":"hidden",...o,ref:l})})}),ev=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fn(Nn,n.__scopeScrollArea),s=n.orientation==="horizontal",c=Ll(()=>m("SCROLL_END"),100),[f,m]=Jb("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 P.useEffect(()=>{if(f==="idle"){const h=window.setTimeout(()=>m("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(h)}},[f,u.scrollHideDelay,m]),P.useEffect(()=>{const h=u.viewport,g=s?"scrollLeft":"scrollTop";if(h){let y=h[g];const v=()=>{const b=h[g];y!==b&&(m("SCROLL"),c()),y=b};return h.addEventListener("scroll",v),()=>h.removeEventListener("scroll",v)}},[u.viewport,s,m,c]),O.jsx(fi,{present:i||f!=="hidden",children:O.jsx(ws,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:l,onPointerEnter:qn(n.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:qn(n.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),cd=P.forwardRef((n,l)=>{const i=fn(Nn,n.__scopeScrollArea),{forceMount:o,...u}=n,[s,c]=P.useState(!1),f=n.orientation==="horizontal",m=Ll(()=>{if(i.viewport){const h=i.viewport.offsetWidth<i.viewport.scrollWidth,g=i.viewport.offsetHeight<i.viewport.scrollHeight;c(f?h:g)}},10);return di(i.viewport,m),di(i.content,m),O.jsx(fi,{present:o||s,children:O.jsx(ws,{"data-state":s?"visible":"hidden",...u,ref:l})})}),ws=P.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,u=fn(Nn,n.__scopeScrollArea),s=P.useRef(null),c=P.useRef(0),[f,m]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=pd(f.viewport,f.content),g={...o,sizes:f,onSizesChange:m,hasThumb:h>0&&h<1,onThumbChange:v=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function y(v,b){return lv(v,c.current,f,b)}return i==="horizontal"?O.jsx(tv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollLeft,b=gd(v,f,u.dir);s.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollLeft=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollLeft=y(v,u.dir))}}):i==="vertical"?O.jsx(nv,{...g,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollTop,b=gd(v,f);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollTop=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollTop=y(v))}}):null}),tv=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=P.useState(),m=P.useRef(null),h=Hn(l,m,s.onScrollbarXChange);return P.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),O.jsx(dd,{"data-orientation":"horizontal",...u,ref:h,sizes:i,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.x),onDragScroll:g=>n.onDragScroll(g.x),onWheelScroll:(g,y)=>{if(s.viewport){const v=s.viewport.scrollLeft+g.deltaX;n.onWheelScroll(v),bd(v,y)&&g.preventDefault()}},onResize:()=>{m.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:Dl(c.paddingLeft),paddingEnd:Dl(c.paddingRight)}})}})}),nv=P.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=fn(Nn,n.__scopeScrollArea),[c,f]=P.useState(),m=P.useRef(null),h=Hn(l,m,s.onScrollbarYChange);return P.useEffect(()=>{m.current&&f(getComputedStyle(m.current))},[m]),O.jsx(dd,{"data-orientation":"vertical",...u,ref:h,sizes:i,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jl(i)+"px",...n.style},onThumbPointerDown:g=>n.onThumbPointerDown(g.y),onDragScroll:g=>n.onDragScroll(g.y),onWheelScroll:(g,y)=>{if(s.viewport){const v=s.viewport.scrollTop+g.deltaY;n.onWheelScroll(v),bd(v,y)&&g.preventDefault()}},onResize:()=>{m.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:Dl(c.paddingTop),paddingEnd:Dl(c.paddingBottom)}})}})}),[rv,fd]=ld(Nn),dd=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:u,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:f,onThumbPositionChange:m,onDragScroll:h,onWheelScroll:g,onResize:y,...v}=n,b=fn(Nn,i),[w,E]=P.useState(null),T=Hn(l,F=>E(F)),_=P.useRef(null),A=P.useRef(""),k=b.viewport,q=o.content-o.viewport,H=cr(g),M=cr(m),I=Ll(y,10);function Y(F){if(_.current){const $=F.clientX-_.current.left,ie=F.clientY-_.current.top;h({x:$,y:ie})}}return P.useEffect(()=>{const F=$=>{const ie=$.target;w?.contains(ie)&&H($,q)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[k,w,q,H]),P.useEffect(M,[o,M]),di(w,I),di(b.content,I),O.jsx(rv,{scope:i,scrollbar:w,hasThumb:u,onThumbChange:cr(s),onThumbPointerUp:cr(c),onThumbPositionChange:M,onThumbPointerDown:cr(f),children:O.jsx(sr.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:qn(n.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),_.current=w.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),Y(F))}),onPointerMove:qn(n.onPointerMove,Y),onPointerUp:qn(n.onPointerUp,F=>{const $=F.target;$.hasPointerCapture(F.pointerId)&&$.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=A.current,b.viewport&&(b.viewport.style.scrollBehavior=""),_.current=null})})})}),Ml="ScrollAreaThumb",hd=P.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=fd(Ml,n.__scopeScrollArea);return O.jsx(fi,{present:i||u.hasThumb,children:O.jsx(iv,{ref:l,...o})})}),iv=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...u}=n,s=fn(Ml,i),c=fd(Ml,i),{onThumbPositionChange:f}=c,m=Hn(l,y=>c.onThumbChange(y)),h=P.useRef(void 0),g=Ll(()=>{h.current&&(h.current(),h.current=void 0)},100);return P.useEffect(()=>{const y=s.viewport;if(y){const v=()=>{if(g(),!h.current){const b=ov(y,f);h.current=b,f()}};return f(),y.addEventListener("scroll",v),()=>y.removeEventListener("scroll",v)}},[s.viewport,g,f]),O.jsx(sr.div,{"data-state":c.hasThumb?"visible":"hidden",...u,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:qn(n.onPointerDownCapture,y=>{const b=y.target.getBoundingClientRect(),w=y.clientX-b.left,E=y.clientY-b.top;c.onThumbPointerDown({x:w,y:E})}),onPointerUp:qn(n.onPointerUp,c.onThumbPointerUp)})});hd.displayName=Ml;var Cs="ScrollAreaCorner",md=P.forwardRef((n,l)=>{const i=fn(Cs,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?O.jsx(av,{...n,ref:l}):null});md.displayName=Cs;var av=P.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,u=fn(Cs,i),[s,c]=P.useState(0),[f,m]=P.useState(0),h=!!(s&&f);return di(u.scrollbarX,()=>{const g=u.scrollbarX?.offsetHeight||0;u.onCornerHeightChange(g),m(g)}),di(u.scrollbarY,()=>{const g=u.scrollbarY?.offsetWidth||0;u.onCornerWidthChange(g),c(g)}),h?O.jsx(sr.div,{...o,ref:l,style:{width:s,height:f,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Dl(n){return n?parseInt(n,10):0}function pd(n,l){const i=n/l;return isNaN(i)?0:i}function jl(n){const l=pd(n.viewport,n.content),i=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,o=(n.scrollbar.size-i)*l;return Math.max(o,18)}function lv(n,l,i,o="ltr"){const u=jl(i),s=u/2,c=l||s,f=u-c,m=i.scrollbar.paddingStart+c,h=i.scrollbar.size-i.scrollbar.paddingEnd-f,g=i.content-i.viewport,y=o==="ltr"?[0,g]:[g*-1,0];return yd([m,h],y)(n)}function gd(n,l,i="ltr"){const o=jl(l),u=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,s=l.scrollbar.size-u,c=l.content-l.viewport,f=s-o,m=i==="ltr"?[0,c]:[c*-1,0],h=Qb(n,m);return yd([0,c],[0,f])(h)}function yd(n,l){return i=>{if(n[0]===n[1]||l[0]===l[1])return l[0];const o=(l[1]-l[0])/(n[1]-n[0]);return l[0]+o*(i-n[0])}}function bd(n,l){return n>0&&n<l}var ov=(n,l=()=>{})=>{let i={left:n.scrollLeft,top:n.scrollTop},o=0;return(function u(){const s={left:n.scrollLeft,top:n.scrollTop},c=i.left!==s.left,f=i.top!==s.top;(c||f)&&l(),i=s,o=window.requestAnimationFrame(u)})(),()=>window.cancelAnimationFrame(o)};function Ll(n,l){const i=cr(n),o=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(o.current),[]),P.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(i,l)},[i,l])}function di(n,l){const i=cr(l);ur(()=>{let o=0;if(n){const u=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return u.observe(n),()=>{window.cancelAnimationFrame(o),u.unobserve(n)}}},[n,i])}var vd=od,sv=ud,uv=md;function Sd(n){var l,i,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(i=Sd(n[l]))&&(o&&(o+=" "),o+=i)}else for(i in n)n[i]&&(o&&(o+=" "),o+=i);return o}function Ed(){for(var n,l,i=0,o="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=Sd(n))&&(o&&(o+=" "),o+=l);return o}const cv=(n,l)=>{const i=new Array(n.length+l.length);for(let o=0;o<n.length;o++)i[o]=n[o];for(let o=0;o<l.length;o++)i[n.length+o]=l[o];return i},fv=(n,l)=>({classGroupId:n,validator:l}),xd=(n=new Map,l=null,i)=>({nextPart:n,validators:l,classGroupId:i}),Il="-",_d=[],dv="arbitrary..",hv=n=>{const l=pv(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return mv(c);const f=c.split(Il),m=f[0]===""&&f.length>1?1:0;return wd(f,m,l)},getConflictingClassGroupIds:(c,f)=>{if(f){const m=o[c],h=i[c];return m?h?cv(h,m):m:h||_d}return i[c]||_d}}},wd=(n,l,i)=>{if(n.length-l===0)return i.classGroupId;const u=n[l],s=i.nextPart.get(u);if(s){const h=wd(n,l+1,s);if(h)return h}const c=i.validators;if(c===null)return;const f=l===0?n.join(Il):n.slice(l).join(Il),m=c.length;for(let h=0;h<m;h++){const g=c[h];if(g.validator(f))return g.classGroupId}},mv=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),i=l.indexOf(":"),o=l.slice(0,i);return o?dv+o:void 0})(),pv=n=>{const{theme:l,classGroups:i}=n;return gv(i,l)},gv=(n,l)=>{const i=xd();for(const o in n){const u=n[o];Ts(u,i,o,l)}return i},Ts=(n,l,i,o)=>{const u=n.length;for(let s=0;s<u;s++){const c=n[s];yv(c,l,i,o)}},yv=(n,l,i,o)=>{if(typeof n=="string"){bv(n,l,i);return}if(typeof n=="function"){vv(n,l,i,o);return}Sv(n,l,i,o)},bv=(n,l,i)=>{const o=n===""?l:Cd(l,n);o.classGroupId=i},vv=(n,l,i,o)=>{if(Ev(n)){Ts(n(o),l,i,o);return}l.validators===null&&(l.validators=[]),l.validators.push(fv(i,n))},Sv=(n,l,i,o)=>{const u=Object.entries(n),s=u.length;for(let c=0;c<s;c++){const[f,m]=u[c];Ts(m,Cd(l,f),i,o)}},Cd=(n,l)=>{let i=n;const o=l.split(Il),u=o.length;for(let s=0;s<u;s++){const c=o[s];let f=i.nextPart.get(c);f||(f=xd(),i.nextPart.set(c,f)),i=f}return i},Ev=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,xv=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,i=Object.create(null),o=Object.create(null);const u=(s,c)=>{i[s]=c,l++,l>n&&(l=0,o=i,i=Object.create(null))};return{get(s){let c=i[s];if(c!==void 0)return c;if((c=o[s])!==void 0)return u(s,c),c},set(s,c){s in i?i[s]=c:u(s,c)}}},As="!",Td=":",_v=[],Ad=(n,l,i,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:o,isExternal:u}),wv=n=>{const{prefix:l,experimentalParseClassName:i}=n;let o=u=>{const s=[];let c=0,f=0,m=0,h;const g=u.length;for(let E=0;E<g;E++){const T=u[E];if(c===0&&f===0){if(T===Td){s.push(u.slice(m,E)),m=E+1;continue}if(T==="/"){h=E;continue}}T==="["?c++:T==="]"?c--:T==="("?f++:T===")"&&f--}const y=s.length===0?u:u.slice(m);let v=y,b=!1;y.endsWith(As)?(v=y.slice(0,-1),b=!0):y.startsWith(As)&&(v=y.slice(1),b=!0);const w=h&&h>m?h-m:void 0;return Ad(s,b,v,w)};if(l){const u=l+Td,s=o;o=c=>c.startsWith(u)?s(c.slice(u.length)):Ad(_v,!1,c,void 0,!0)}if(i){const u=o;o=s=>i({className:s,parseClassName:u})}return o},Cv=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((i,o)=>{l.set(i,1e6+o)}),i=>{const o=[];let u=[];for(let s=0;s<i.length;s++){const c=i[s],f=c[0]==="[",m=l.has(c);f||m?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(c)):u.push(c)}return u.length>0&&(u.sort(),o.push(...u)),o}},Tv=n=>({cache:xv(n.cacheSize),parseClassName:wv(n),sortModifiers:Cv(n),...hv(n)}),Av=/\s+/,kv=(n,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:s}=l,c=[],f=n.trim().split(Av);let m="";for(let h=f.length-1;h>=0;h-=1){const g=f[h],{isExternal:y,modifiers:v,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:E}=i(g);if(y){m=g+(m.length>0?" "+m:m);continue}let T=!!E,_=o(T?w.substring(0,E):w);if(!_){if(!T){m=g+(m.length>0?" "+m:m);continue}if(_=o(w),!_){m=g+(m.length>0?" "+m:m);continue}T=!1}const A=v.length===0?"":v.length===1?v[0]:s(v).join(":"),k=b?A+As:A,q=k+_;if(c.indexOf(q)>-1)continue;c.push(q);const H=u(_,T);for(let M=0;M<H.length;++M){const I=H[M];c.push(k+I)}m=g+(m.length>0?" "+m:m)}return m},Nv=(...n)=>{let l=0,i,o,u="";for(;l<n.length;)(i=n[l++])&&(o=kd(i))&&(u&&(u+=" "),u+=o);return u},kd=n=>{if(typeof n=="string")return n;let l,i="";for(let o=0;o<n.length;o++)n[o]&&(l=kd(n[o]))&&(i&&(i+=" "),i+=l);return i},Rv=(n,...l)=>{let i,o,u,s;const c=m=>{const h=l.reduce((g,y)=>y(g),n());return i=Tv(h),o=i.cache.get,u=i.cache.set,s=f,f(m)},f=m=>{const h=o(m);if(h)return h;const g=kv(m,i);return u(m,g),g};return s=c,(...m)=>s(Nv(...m))},Ov=[],At=n=>{const l=i=>i[n]||Ov;return l.isThemeGetter=!0,l},Nd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zv=/^\d+\/\d+$/,Mv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dv=/\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$/,jv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Iv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hi=n=>zv.test(n),Ve=n=>!!n&&!Number.isNaN(Number(n)),fr=n=>!!n&&Number.isInteger(Number(n)),ks=n=>n.endsWith("%")&&Ve(n.slice(0,-1)),Pn=n=>Mv.test(n),Bv=()=>!0,Uv=n=>Dv.test(n)&&!jv.test(n),Od=()=>!1,Hv=n=>Lv.test(n),qv=n=>Iv.test(n),Pv=n=>!Re(n)&&!Oe(n),Fv=n=>mi(n,Ld,Od),Re=n=>Nd.test(n),Ur=n=>mi(n,Id,Uv),Ns=n=>mi(n,Zv,Ve),zd=n=>mi(n,Dd,Od),Yv=n=>mi(n,jd,qv),Bl=n=>mi(n,Bd,Hv),Oe=n=>Rd.test(n),ca=n=>pi(n,Id),Vv=n=>pi(n,Kv),Md=n=>pi(n,Dd),Gv=n=>pi(n,Ld),Xv=n=>pi(n,jd),Ul=n=>pi(n,Bd,!0),mi=(n,l,i)=>{const o=Nd.exec(n);return o?o[1]?l(o[1]):i(o[2]):!1},pi=(n,l,i=!1)=>{const o=Rd.exec(n);return o?o[1]?l(o[1]):i:!1},Dd=n=>n==="position"||n==="percentage",jd=n=>n==="image"||n==="url",Ld=n=>n==="length"||n==="size"||n==="bg-size",Id=n=>n==="length",Zv=n=>n==="number",Kv=n=>n==="family-name",Bd=n=>n==="shadow",Qv=Rv(()=>{const n=At("color"),l=At("font"),i=At("text"),o=At("font-weight"),u=At("tracking"),s=At("leading"),c=At("breakpoint"),f=At("container"),m=At("spacing"),h=At("radius"),g=At("shadow"),y=At("inset-shadow"),v=At("text-shadow"),b=At("drop-shadow"),w=At("blur"),E=At("perspective"),T=At("aspect"),_=At("ease"),A=At("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...q(),Oe,Re],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],Y=()=>[Oe,Re,m],F=()=>[hi,"full","auto",...Y()],$=()=>[fr,"none","subgrid",Oe,Re],ie=()=>["auto",{span:["full",fr,Oe,Re]},fr,Oe,Re],D=()=>[fr,"auto",Oe,Re],ne=()=>["auto","min","max","fr",Oe,Re],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...Y()],Q=()=>[hi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],se=()=>[n,Oe,Re],de=()=>[...q(),Md,zd,{position:[Oe,Re]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Gv,Fv,{size:[Oe,Re]}],B=()=>[ks,ca,Ur],z=()=>["","none","full",h,Oe,Re],re=()=>["",Ve,ca,Ur],ce=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[Ve,ks,Md,zd],ke=()=>["","none",w,Oe,Re],Ae=()=>["none",Ve,Oe,Re],He=()=>["none",Ve,Oe,Re],ve=()=>[Ve,Oe,Re],ze=()=>[hi,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pn],breakpoint:[Pn],color:[Bv],container:[Pn],"drop-shadow":[Pn],ease:["in","out","in-out"],font:[Pv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pn],shadow:[Pn],spacing:["px",Ve],text:[Pn],"text-shadow":[Pn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hi,Re,Oe,T]}],container:["container"],columns:[{columns:[Ve,Re,Oe,f]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:H()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[fr,"auto",Oe,Re]}],basis:[{basis:[hi,"full","auto",f,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ve,hi,"auto","initial","none",Re]}],grow:[{grow:["",Ve,Oe,Re]}],shrink:[{shrink:["",Ve,Oe,Re]}],order:[{order:[fr,"first","last","none",Oe,Re]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",i,ca,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Oe,Ns]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ks,Re]}],"font-family":[{font:[Vv,Re,l]}],"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:[u,Oe,Re]}],"line-clamp":[{"line-clamp":[Ve,"none",Oe,Ns]}],leading:[{leading:[s,...Y()]}],"list-image":[{"list-image":["none",Oe,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:se()}],"text-color":[{text:se()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ve,"from-font","auto",Oe,Ur]}],"text-decoration-color":[{decoration:se()}],"underline-offset":[{"underline-offset":[Ve,"auto",Oe,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Re]}],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",Oe,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fr,Oe,Re],radial:["",Oe,Re],conic:[fr,Oe,Re]},Xv,Yv]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:se()}],"border-color-x":[{"border-x":se()}],"border-color-y":[{"border-y":se()}],"border-color-s":[{"border-s":se()}],"border-color-e":[{"border-e":se()}],"border-color-t":[{"border-t":se()}],"border-color-r":[{"border-r":se()}],"border-color-b":[{"border-b":se()}],"border-color-l":[{"border-l":se()}],"divide-color":[{divide:se()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ve,Oe,Re]}],"outline-w":[{outline:["",Ve,ca,Ur]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",g,Ul,Bl]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",y,Ul,Bl]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[Ve,Ur]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",v,Ul,Bl]}],"text-shadow-color":[{"text-shadow":se()}],opacity:[{opacity:[Ve,Oe,Re]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"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":[Ve]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":se()}],"mask-image-linear-to-color":[{"mask-linear-to":se()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":se()}],"mask-image-t-to-color":[{"mask-t-to":se()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":se()}],"mask-image-r-to-color":[{"mask-r-to":se()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":se()}],"mask-image-b-to-color":[{"mask-b-to":se()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":se()}],"mask-image-l-to-color":[{"mask-l-to":se()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":se()}],"mask-image-x-to-color":[{"mask-x-to":se()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":se()}],"mask-image-y-to-color":[{"mask-y-to":se()}],"mask-image-radial":[{"mask-radial":[Oe,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":se()}],"mask-image-radial-to-color":[{"mask-radial-to":se()}],"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":q()}],"mask-image-conic-pos":[{"mask-conic":[Ve]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":se()}],"mask-image-conic-to-color":[{"mask-conic-to":se()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Re]}],filter:[{filter:["","none",Oe,Re]}],blur:[{blur:ke()}],brightness:[{brightness:[Ve,Oe,Re]}],contrast:[{contrast:[Ve,Oe,Re]}],"drop-shadow":[{"drop-shadow":["","none",b,Ul,Bl]}],"drop-shadow-color":[{"drop-shadow":se()}],grayscale:[{grayscale:["",Ve,Oe,Re]}],"hue-rotate":[{"hue-rotate":[Ve,Oe,Re]}],invert:[{invert:["",Ve,Oe,Re]}],saturate:[{saturate:[Ve,Oe,Re]}],sepia:[{sepia:["",Ve,Oe,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Re]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ve,Oe,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ve,Oe,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ve,Oe,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ve,Oe,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ve,Oe,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ve,Oe,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ve,Oe,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ve,Oe,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ve,"initial",Oe,Re]}],ease:[{ease:["linear","initial",_,Oe,Re]}],delay:[{delay:[Ve,Oe,Re]}],animate:[{animate:["none",A,Oe,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Oe,Re]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:Ae()}],"rotate-x":[{"rotate-x":Ae()}],"rotate-y":[{"rotate-y":Ae()}],"rotate-z":[{"rotate-z":Ae()}],scale:[{scale:He()}],"scale-x":[{"scale-x":He()}],"scale-y":[{"scale-y":He()}],"scale-z":[{"scale-z":He()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Oe,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ze()}],"translate-x":[{"translate-x":ze()}],"translate-y":[{"translate-y":ze()}],"translate-z":[{"translate-z":ze()}],"translate-none":["translate-none"],accent:[{accent:se()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:se()}],"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",Oe,Re]}],"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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",Oe,Re]}],fill:[{fill:["none",...se()]}],"stroke-w":[{stroke:[Ve,ca,Ur,Ns]}],stroke:[{stroke:["none",...se()]}],"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 Ye(...n){return Qv(Ed(n))}function fa(n){if(!n&&n!==0)return"";const l=n instanceof Date?n:new Date(typeof n=="number"?n:Number(n)||n);return Number.isNaN(l.getTime())?"":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Jv=n=>new Promise(l=>setTimeout(l,n)),Ud=P.forwardRef(({className:n,children:l,...i},o)=>O.jsxs(vd,{ref:o,className:Ye("relative overflow-hidden",n),...i,children:[O.jsx(sv,{className:"h-full w-full rounded-[inherit]",children:l}),O.jsx(Hd,{}),O.jsx(uv,{})]}));Ud.displayName=vd.displayName;const Hd=P.forwardRef(({className:n,orientation:l="vertical",...i},o)=>O.jsx(_s,{ref:o,orientation:l,className:Ye("flex touch-none select-none transition-colors",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...i,children:O.jsx(hd,{className:"relative flex-1 rounded-full bg-border"})}));Hd.displayName=_s.displayName;var Wv=Symbol.for("react.lazy"),Hl=Qf[" use ".trim().toString()];function $v(n){return typeof n=="object"&&n!==null&&"then"in n}function qd(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Wv&&"_payload"in n&&$v(n._payload)}function Pd(n){const l=tS(n),i=P.forwardRef((o,u)=>{let{children:s,...c}=o;qd(s)&&typeof Hl=="function"&&(s=Hl(s._payload));const f=P.Children.toArray(s),m=f.find(rS);if(m){const h=m.props.children,g=f.map(y=>y===m?P.Children.count(h)>1?P.Children.only(null):P.isValidElement(h)?h.props.children:null:y);return O.jsx(l,{...c,ref:u,children:P.isValidElement(h)?P.cloneElement(h,void 0,g):null})}return O.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}var eS=Pd("Slot");function tS(n){const l=P.forwardRef((i,o)=>{let{children:u,...s}=i;if(qd(u)&&typeof Hl=="function"&&(u=Hl(u._payload)),P.isValidElement(u)){const c=aS(u),f=iS(s,u.props);return u.type!==P.Fragment&&(f.ref=o?Es(o,c):c),P.cloneElement(u,f)}return P.Children.count(u)>1?P.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var nS=Symbol("radix.slottable");function rS(n){return P.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===nS}function iS(n,l){const i={...l};for(const o in l){const u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...f)=>{const m=s(...f);return u(...f),m}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function aS(n){let l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning;return i?n.ref:(l=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=l&&"isReactWarning"in l&&l.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}const Fd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Yd=Ed,lS=((n,l)=>i=>{var o;if(l?.variants==null)return Yd(n,i?.class,i?.className);const{variants:u,defaultVariants:s}=l,c=Object.keys(u).map(h=>{const g=i?.[h],y=s?.[h];if(g===null)return null;const v=Fd(g)||Fd(y);return u[h][v]}),f=i&&Object.entries(i).reduce((h,g)=>{let[y,v]=g;return v===void 0||(h[y]=v),h},{}),m=l==null||(o=l.compoundVariants)===null||o===void 0?void 0:o.reduce((h,g)=>{let{class:y,className:v,...b}=g;return Object.entries(b).every(w=>{let[E,T]=w;return Array.isArray(T)?T.includes({...s,...f}[E]):{...s,...f}[E]===T})?[...h,y,v]:h},[]);return Yd(n,c,m,i?.class,i?.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"}}),kt=P.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...u},s)=>{const c=o?eS:"button";return O.jsx(c,{className:Ye(lS({variant:l,size:i,className:n})),ref:s,...u})});kt.displayName="Button";const oS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sS=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,o)=>o?o.toUpperCase():i.toLowerCase()),Vd=n=>{const l=sS(n);return l.charAt(0).toUpperCase()+l.slice(1)},Gd=(...n)=>n.filter((l,i,o)=>!!l&&l.trim()!==""&&o.indexOf(l)===i).join(" ").trim(),uS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var cS={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 fS=P.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:s,iconNode:c,...f},m)=>P.createElement("svg",{ref:m,...cS,width:l,height:l,stroke:n,strokeWidth:o?Number(i)*24/Number(l):i,className:Gd("lucide",u),...!s&&!uS(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,g])=>P.createElement(h,g)),...Array.isArray(s)?s:[s]]));const Rt=(n,l)=>{const i=P.forwardRef(({className:o,...u},s)=>P.createElement(fS,{ref:s,iconNode:l,className:Gd(`lucide-${oS(Vd(n))}`,`lucide-${n}`,o),...u}));return i.displayName=Vd(n),i};const dS=Rt("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Xd=Rt("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 Zd=Rt("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 hS=Rt("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 Kd=Rt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Rs=Rt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const mS=Rt("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const pS=Rt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const gS=Rt("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const yS=Rt("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 bS=Rt("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 Qd=Rt("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const vS=Rt("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 SS=Rt("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 ES=Rt("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 xS=Rt("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 _S=Rt("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const Os=Rt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),da=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("rounded-xl border bg-card text-card-foreground shadow",n),...l}));da.displayName="Card";const Jd=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("flex flex-col space-y-1.5 p-6",n),...l}));Jd.displayName="CardHeader";const wS=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("font-semibold leading-none tracking-tight",n),...l}));wS.displayName="CardTitle";const CS=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("text-sm text-muted-foreground",n),...l}));CS.displayName="CardDescription";const Wd=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("p-6 pt-0",n),...l}));Wd.displayName="CardContent";const TS=P.forwardRef(({className:n,...l},i)=>O.jsx("div",{ref:i,className:Ye("flex items-center p-6 pt-0",n),...l}));TS.displayName="CardFooter";function AS(n,l=[]){let i=[];function o(s,c){const f=P.createContext(c);f.displayName=s+"Context";const m=i.length;i=[...i,c];const h=y=>{const{scope:v,children:b,...w}=y,E=v?.[n]?.[m]||f,T=P.useMemo(()=>w,Object.values(w));return O.jsx(E.Provider,{value:T,children:b})};h.displayName=s+"Provider";function g(y,v){const b=v?.[n]?.[m]||f,w=P.useContext(b);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${y}\` must be used within \`${s}\``)}return[h,g]}const u=()=>{const s=i.map(c=>P.createContext(c));return function(f){const m=f?.[n]||s;return P.useMemo(()=>({[`__scope${n}`]:{...f,[n]:m}}),[f,m])}};return u.scopeName=n,[o,kS(u,...l)]}function kS(...n){const l=n[0];if(n.length===1)return l;const i=()=>{const o=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(s){const c=o.reduce((f,{useScope:m,scopeName:h})=>{const y=m(s)[`__scope${h}`];return{...f,...y}},{});return P.useMemo(()=>({[`__scope${l.scopeName}`]:c}),[c])}};return i.scopeName=l.scopeName,i}var NS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zs=NS.reduce((n,l)=>{const i=Pd(`Primitive.${l}`),o=P.forwardRef((u,s)=>{const{asChild:c,...f}=u,m=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(m,{...f,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),Ms={exports:{}},Ds={};var $d;function RS(){if($d)return Ds;$d=1;var n=Ol();function l(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var i=typeof Object.is=="function"?Object.is:l,o=n.useState,u=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function f(y,v){var b=v(),w=o({inst:{value:b,getSnapshot:v}}),E=w[0].inst,T=w[1];return s(function(){E.value=b,E.getSnapshot=v,m(E)&&T({inst:E})},[y,b,v]),u(function(){return m(E)&&T({inst:E}),y(function(){m(E)&&T({inst:E})})},[y]),c(b),b}function m(y){var v=y.getSnapshot;y=y.value;try{var b=v();return!i(y,b)}catch{return!0}}function h(y,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Ds.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,Ds}var eh;function OS(){return eh||(eh=1,Ms.exports=RS()),Ms.exports}var zS=OS();function MS(){return zS.useSyncExternalStore(DS,()=>!0,()=>!1)}function DS(){return()=>{}}var js="Avatar",[jS]=AS(js),[LS,th]=jS(js),nh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[u,s]=P.useState("idle");return O.jsx(LS,{scope:i,imageLoadingStatus:u,onImageLoadingStatusChange:s,children:O.jsx(zs.span,{...o,ref:l})})});nh.displayName=js;var rh="AvatarImage",ih=P.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:u=()=>{},...s}=n,c=th(rh,i),f=IS(o,s),m=cr(h=>{u(h),c.onImageLoadingStatusChange(h)});return ur(()=>{f!=="idle"&&m(f)},[f,m]),f==="loaded"?O.jsx(zs.img,{...s,ref:l,src:o}):null});ih.displayName=rh;var ah="AvatarFallback",lh=P.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...u}=n,s=th(ah,i),[c,f]=P.useState(o===void 0);return P.useEffect(()=>{if(o!==void 0){const m=window.setTimeout(()=>f(!0),o);return()=>window.clearTimeout(m)}},[o]),c&&s.imageLoadingStatus!=="loaded"?O.jsx(zs.span,{...u,ref:l}):null});lh.displayName=ah;function oh(n,l){return n?l?(n.src!==l&&(n.src=l),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function IS(n,{referrerPolicy:l,crossOrigin:i}){const o=MS(),u=P.useRef(null),s=o?(u.current||(u.current=new window.Image),u.current):null,[c,f]=P.useState(()=>oh(s,n));return ur(()=>{f(oh(s,n))},[s,n]),ur(()=>{const m=y=>()=>{f(y)};if(!s)return;const h=m("loaded"),g=m("error");return s.addEventListener("load",h),s.addEventListener("error",g),l&&(s.referrerPolicy=l),typeof i=="string"&&(s.crossOrigin=i),()=>{s.removeEventListener("load",h),s.removeEventListener("error",g)}},[s,i,l]),c}var sh=nh,uh=ih,ch=lh;const ha=P.forwardRef(({className:n,...l},i)=>O.jsx(sh,{ref:i,className:Ye("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...l}));ha.displayName=sh.displayName;const fh=P.forwardRef(({className:n,...l},i)=>O.jsx(uh,{ref:i,className:Ye("aspect-square h-full w-full",n),...l}));fh.displayName=uh.displayName;const ma=P.forwardRef(({className:n,...l},i)=>O.jsx(ch,{ref:i,className:Ye("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...l}));ma.displayName=ch.displayName;var Hr={},pa={},Ls={},ga={},ya={},ba={},dh;function BS(){if(dh)return ba;dh=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.EventEmitter=void 0;let n=class{eventListeners=new Map;on(i,o){const u=this.eventListeners.get(i)||new Set;u.add(o),this.eventListeners.set(i,u)}off(i,o){const u=this.eventListeners.get(i);u&&(u.delete(o),u.size===0&&this.eventListeners.delete(i))}emit(i,...o){const u=this.eventListeners.get(i);u&&u.forEach(s=>s(...o))}};return ba.EventEmitter=n,ba}var qr={},hh;function Is(){return hh||(hh=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.DisconnectionReason=qr.ConnectionStatus=void 0,qr.ConnectionStatus={CONNECTING:"connecting",CONNECTED:"connected",NOT_CONNECTED:"not_connected"},qr.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"}),qr}var mh;function ph(){if(mh)return ya;mh=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.BaseConnection=void 0;const n=BS(),l=Is();let i=class{status=l.ConnectionStatus.CONNECTING;queue=[];eventEmitter=new n.EventEmitter;disconnectionDetails=null;onErrorCallback=null;onDisconnectCallback=null;onMessageCallback=null;onOpenCallback=null;onStatusChangeCallback=null;getStatus(){return this.status}onOpen(u){this.onOpenCallback=u}onMessage(u){if(this.onMessageCallback=u,this.queue.length>0){const s=[...this.queue];this.queue.length=0,queueMicrotask(()=>{s.forEach(c=>{this.onMessageCallback?.(c)})})}}onDisconnect(u){this.onDisconnectCallback=u;const s=this.disconnectionDetails;s&&queueMicrotask(()=>{this.onDisconnectCallback?.(s)})}onError(u){this.onErrorCallback=u}on(u,s){this.eventEmitter.on(u,s)}off(u,s){this.eventEmitter.off(u,s)}emit(u,...s){this.eventEmitter.emit(u,...s)}onStatusChange(u){this.onStatusChangeCallback=u,queueMicrotask(()=>{u(this.status)})}disconnect(u){this.disconnectionDetails||(this.disconnectionDetails=u,this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.onDisconnectCallback?.(u))}handleMessage(u){this.onMessageCallback?this.onMessageCallback(u):this.queue.push(u)}updateStatus(u){this.status!==u&&(this.status=u,this.onStatusChangeCallback?.(u))}};return ya.BaseConnection=i,ya}var Bs={},gh;function Rn(){return gh||(gh=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=q,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 l extends Error{code;timestamp;cause;context;hint;displayMessage;constructor(M,I=n.SynapseErrorCode.UNKNOWN,Y={}){super(M),this.name="SynapseError",this.code=I,this.timestamp=new Date,this.cause=Y.cause,this.context=Y.context,this.hint=Y.hint,this.displayMessage=Y.displayMessage||Y?.hint||M,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}n.SynapseError=l;class i extends l{status;error;headers;constructor(M,I,Y,F){const $=i.makeMessage(I,Y,M);super($,n.SynapseErrorCode.API,{cause:Y,context:{status:I,hasBody:!!Y},hint:I&&I>=500?"Retry the request or contact support if the issue persists.":void 0,displayMessage:M||"Something went wrong"}),this.name="APIError",this.status=I,this.error=Y,this.headers=F}static makeMessage(M,I,Y){const F=I instanceof Error?I.message:Y;return M&&F?`HTTP ${M}: ${F}`:M?`${M} status code (no body)`:F||"(no status code or body)"}static generate(M,I,Y,F){if(!M)return new o({message:Y});const $=I?.error,ie=$&&typeof $=="object"&&!Array.isArray($)?$:void 0;switch(M){case 400:return new s(Y||"Bad Request",M,ie,F);case 401:return new c(Y||"Unauthorized",M,ie,F);case 403:return new f(Y||"Permission Denied",M,ie,F);case 404:return new m(Y||"Not Found",M,ie,F);case 405:return new h(Y||"Method Not Allowed",M,ie,F);case 429:return new g(Y||"Rate Limit Exceeded",M,ie,F);case 500:return new y(Y||"Internal Server Error",M,ie,F);default:return new i(Y||"API Error",M,ie,F)}}}n.APIError=i;class o extends i{constructor({message:M}={}){super(M||"Request was aborted.",void 0,void 0,void 0),this.name="APIUserAbortError"}}n.APIUserAbortError=o;class u extends i{constructor({message:M}={}){super(M||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=u;class s extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="BadRequestError"}}n.BadRequestError=s;class c extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class f extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="PermissionDeniedError"}}n.PermissionDeniedError=f;class m extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="NotFoundError"}}n.NotFoundError=m;class h extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=h;class g extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="RateLimitError"}}n.RateLimitError=g;class y extends i{constructor(M,I,Y,F){super(M,I,Y,F),this.name="InternalServerError"}}n.InternalServerError=y;class v extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.CONNECTION,I),this.name="ConnectionError"}}n.ConnectionError=v;class b extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.RECORDING,I),this.name="RecordingError"}}n.RecordingError=b;class w extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.FILE,I),this.name="FileError"}}n.FileError=w;class E extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.SESSION,I),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.MESSAGE,I),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.STORE,I),this.name="StoreError"}}n.StoreError=_;class A extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.CONFIGURATION,I),this.name="ConfigurationError"}}n.ConfigurationError=A;class k extends l{constructor(M,I={}){super(M,n.SynapseErrorCode.VALIDATION,I),this.name="ValidationError"}}n.ValidationError=k;function q(H,M,I,Y={}){if(H instanceof M)return H;const F={...Y,context:{...H instanceof l?H.context:void 0,...Y.context},hint:Y.hint??(H instanceof l?H.hint:void 0),cause:Y.cause??H};if(H instanceof l)return new M(H.message,F);const $=H instanceof Error&&H.message?H.message:I;return new M($,F)}})(Bs)),Bs}var yh;function bh(){if(yh)return ga;yh=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.WebSocketConnection=void 0;const n=ph(),l=Is(),i=Rn();class o extends n.BaseConnection{conversationId;socket=null;config;reconnectCount=0;constructor(s){super(),this.config={...s,reconnect:s.reconnect||!0,reconnectAttempts:s.reconnectAttempts||3,reconnectDelay:s.reconnectDelay||1e3},this.conversationId=s.auth.sessionId,this.connect()}connect(){try{this.updateStatus(l.ConnectionStatus.CONNECTING);const s=this.buildConnectionUrl();this.socket=new WebSocket(s),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(s){const c=(0,i.normalizeError)(s,i.ConnectionError,"Failed to establish WebSocket connection",{context:{stage:"connect"}});this.onErrorCallback?.(c),this.disconnect({reason:l.DisconnectionReason.CONNECTION_ERROR,message:c.message,timestamp:new Date})}}buildConnectionUrl(){const s=new URL(this.config.serverUrl);return s.pathname=`/reloaded/ws/med-assist/session/${this.config.auth.sessionId}/`,s.toString()}handleOpen(){this.onOpenCallback?.()}handleSocketMessage(s){try{const c=JSON.parse(s.data);this.handleMessage(c)}catch(c){const f=(0,i.normalizeError)(c,i.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(f)}}handleError(s){const c=new i.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:s});this.onErrorCallback?.(c)}handleClose(s){const c=s.wasClean,f=s.code,m=s.reason;let h,g;f===1e3?(h=l.DisconnectionReason.CLIENT_CLOSED,g="Connection closed normally"):f===1001||f===1006?(h=l.DisconnectionReason.NETWORK_ERROR,g="Network connection lost"):f===4001?(h=l.DisconnectionReason.AUTHENTICATION_ERROR,g="Authentication failed"):c?(h=l.DisconnectionReason.SERVER_CLOSED,g=m||"Server closed connection"):(h=l.DisconnectionReason.CONNECTION_ERROR,g=m||"Connection closed unexpectedly"),this.config.reconnect&&h!==l.DisconnectionReason.AUTHENTICATION_ERROR&&h!==l.DisconnectionReason.CLIENT_CLOSED&&this.reconnectCount<(this.config.reconnectAttempts||3)?(this.reconnectCount++,setTimeout(()=>{this.connect()},this.config.reconnectDelay||1e3)):this.disconnect({reason:h,message:g,code:f,timestamp:new Date})}sendMessage(s){if(!this.socket||this.socket.readyState!==WebSocket.OPEN)throw new i.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(s))}catch(c){const f=(0,i.normalizeError)(c,i.ConnectionError,"Failed to send WebSocket message",{context:{stage:"sendMessage"}});throw this.onErrorCallback?.(f),f}}close(){this.socket&&(this.updateStatus(l.ConnectionStatus.NOT_CONNECTED),this.socket.close(1e3,"Client closed connection"),this.socket=null)}isConnected(){return this.socket?.readyState===WebSocket.OPEN}handleConnected(){this.updateStatus(l.ConnectionStatus.CONNECTED),this.reconnectCount=0}}return ga.WebSocketConnection=o,ga}var vh;function Sh(){return vh||(vh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const l=bh(),i=Rn();n.ConnectionType={SOCKET:"socket"};class o{static async createConnection(s,c){switch(s){case n.ConnectionType.SOCKET:return new l.WebSocketConnection(c);default:throw new i.ConnectionError(`Unsupported connection type: ${s}`,{context:{type:s}})}}}n.ConnectionFactory=o})(Ls)),Ls}var Pr={},Eh;function US(){if(Eh)return Pr;Eh=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.SYNAPSE_TOOL_NAME=Pr.getConfig=void 0;const n={WEBSOCKET_URL:"wss://matrix-ws.eka.care/reloaded",BASE_API_URL:"https://matrix.eka.care/reloaded"},l={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care/reloaded",BASE_API_URL:"https://matrix.dev.eka.care/reloaded"},i={WEBSOCKET_URL:"wss://matrix-ws.dev.eka.care",BASE_API_URL:"https://matrix.dev.eka.care"},o=(s="production")=>s==="development"?l:s==="production"?n:s==="staging"?i:n;Pr.getConfig=o;var u;return(function(s){s.MOBILE_VERIFICATION="mobile_verification",s.AVAILABILITY_DATES="availability_dates",s.AVAILABILITY_SLOTS="availability_slots",s.DOCTOR_DETAILS="doctor_details",s.GET_LOCATION="get_location"})(u||(Pr.SYNAPSE_TOOL_NAME=u={})),Pr}var va={},Sa={},xh;function _h(){if(xh)return Sa;xh=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.HttpClient=void 0;const n=Rn();let l=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,u,s){const c=s?.retries??this.maxRetries;let f;for(let m=0;m<=c;m++)try{const h=this.buildUrl(u,s?.params),g=await fetch(h,{method:o,headers:{...this.headers,...s?.headers},body:s?.body?JSON.stringify(s.body):void 0,signal:AbortSignal.timeout(this.timeout)});return g.ok||await this.handleError(g),g.json()}catch(h){if(f=h,m===c||!(h instanceof TypeError&&h.message==="Failed to fetch"||h instanceof DOMException&&h.name==="AbortError"||h instanceof SyntaxError))break;const y=Math.pow(2,m)*100;await new Promise(v=>setTimeout(v,y))}throw f?f instanceof TypeError&&f.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:f.message}):f instanceof DOMException&&f.name==="AbortError"?new n.APIConnectionTimeoutError({message:`Request timed out after ${this.timeout}ms`}):f instanceof SyntaxError?new n.APIError("Invalid response format from server",502,{type:"PARSE_ERROR",originalError:f.message}):f instanceof n.APIError?f:new n.APIError(`Request failed: ${f.message||"Unknown error"}`,500,{type:"UNKNOWN_ERROR",originalError:f}):new n.APIError("Unknown error occurred",500,{type:"UNKNOWN_ERROR"})}async get(o,u,s){return this.request("GET",o,{params:u,...s})}async post(o,u,s){return this.request("POST",o,{body:u,...s})}async put(o,u,s){return this.request("PUT",o,{body:u,...s})}async delete(o,u){return this.request("DELETE",o,{...u})}async patch(o,u,s){return this.request("PATCH",o,{body:u,...s})}buildUrl(o,u){let s=`${this.baseUrl}${o}`;if(u){const c=new URLSearchParams(u).toString();s+=`?${c}`}return s}async handleError(o){let u,s;try{s=await o.json(),u=s.message||s?.msg||o.statusText}catch{u=o.statusText}throw n.APIError.generate(o.status,s,u,o.headers)}};return Sa.HttpClient=l,Sa}var Ea={},xa={},wh;function Ch(){if(wh)return xa;wh=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.BaseResource=void 0;let n=class{client;constructor(i){this.client=i}async get(i,o,u){return this.client.get(i,o,u)}async post(i,o,u){return this.client.post(i,o,u)}async put(i,o,u){return this.client.put(i,o,u)}async delete(i,o){return this.client.delete(i,o)}async patch(i,o,u){return this.client.patch(i,o,u)}buildPath(i,o){let u=i;for(const[s,c]of Object.entries(o))u=u.replace(`:${s}`,encodeURIComponent(c));return u}};return xa.BaseResource=n,xa}var Th;function Ah(){if(Th)return Ea;Th=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.Session=void 0;const n=Ch();let l=class extends n.BaseResource{basePath="/med-assist/session";async create(o){return this.post(this.basePath,{user_id:o})}async retrieve(o){return this.get(`${this.basePath}/${o}`)}async refresh(o,u){return this.get(`${this.basePath}/${o}/refresh`,void 0,{headers:{"x-sess-token":u}})}async feedback(o,u,s,c){return this.patch(`${this.basePath}/${o}/${u}`,{feedback:s,feedback_reason:c})}};return Ea.Session=l,Ea}var _a={},Fn={},kh;function Nh(){if(kh)return Fn;kh=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.SYNAPSE_TOOL_CALLBACK_NAME=Fn.SYNAPSE_COMPONENTS=Fn.SYNAPSE_TOOL_NAME=void 0;var n;(function(i){i.MOBILE_VERIFICATION="mobile_verification",i.AVAILABILITY_DATES="availability_dates",i.AVAILABILITY_SLOTS="availability_slots",i.DOCTOR_DETAILS="doctor_details",i.GET_LOCATION="get_location"})(n||(Fn.SYNAPSE_TOOL_NAME=n={})),Fn.SYNAPSE_COMPONENTS={MOBILE_VERIFICATION:"mobile_verification",PILL:"pills",MULTI:"multi",DOCTOR_CARD:"doctor_card"};var l;return(function(i){i.AVAILABILITY_DATES="tool_callback_availability_dates",i.AVAILABILITY_SLOTS="tool_callback_availability_slots",i.MOBILE_VERIFICATION="tool_callback_mobile_verification",i.DOCTOR_DETAILS="tool_callback_doctor_details"})(l||(Fn.SYNAPSE_TOOL_CALLBACK_NAME=l={})),Fn}var Rh;function Oh(){if(Rh)return _a;Rh=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.ToolCall=void 0;const n=Ch(),l=Nh();let i=class extends n.BaseResource{basePath="/med-assist/api-call-tool";async callTool(u,s,c){return s===l.SYNAPSE_TOOL_NAME.GET_LOCATION?this.requestLocation():this.post(`${this.basePath}?session_id=${u}&tool_name=${s}`,{tool_params:c})}async requestLocation(){return new Promise((u,s)=>{if(typeof navigator>"u"||!navigator.geolocation){s({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(c=>{u({latitude:c.coords.latitude,longitude:c.coords.longitude,accuracy:c.coords?.accuracy??void 0})},c=>{s({code:c.code,message:c.message,status:500,type:"GEOLOCATION_ERROR",originalError:c})},{timeout:1e4,maximumAge:0,enableHighAccuracy:!0})})}};return _a.ToolCall=i,_a}var zh;function Mh(){if(zh)return va;zh=1,Object.defineProperty(va,"__esModule",{value:!0}),va.ResourceManager=void 0;const n=_h(),l=Ah(),i=Rn(),o=Oh();class u{resourceConfig;httpClient;session;toolCall=null;constructor(c){this.resourceConfig=c,this.httpClient=new n.HttpClient({baseUrl:this.resourceConfig.serverUrl,headers:{"X-agent-id":this.resourceConfig.agentId}}),this.session=new l.Session(this.httpClient)}async createSession(c){try{const f=await this.session.create(c);if(!f?.session_id||!f?.session_token)throw new i.APIError("Failed to start session.",500,void 0,void 0);return f}catch(f){throw f instanceof i.APIError?f:new i.APIError("Failed to start session.",500,void 0,void 0)}}async validateSession(c){try{const f=await this.session.retrieve(c);return f.msg&&f.msg==="Session Active"?{expired:!1,active:!0}:{expired:!0,active:!1}}catch(f){if(f instanceof i.APIError)switch(f.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 i.APIError("Failed to validate session.",500,void 0,void 0)}}async refreshSession(c,f){return await this.session.refresh(c,f)}async sendFeedback(c,f,m,h){return await this.session.feedback(c,f,m,h)}async callTool(c,f,m){return this.toolCall||(this.toolCall=new o.ToolCall(this.httpClient)),await this.toolCall.callTool(c,f,m)}}return va.ResourceManager=u,va}var wa={},Us={},Dh;function Hs(){return Dh||(Dh=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=l,n.SOCKET_CONTENT_TYPES={TEXT:"text",AUDIO:"audio",FILE:"file",TOOL_CALL:"tool",TIPS:"tips",INLINE_TEXT:"inline_text",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 l(i){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(i.ev)}})(Us)),Us}var Fr={};function ql(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qs={exports:{}};var jh;function HS(){return jh||(jh=1,(function(n,l){(function(i){n.exports=i()})(function(){return(function i(o,u,s){function c(h,g){if(!u[h]){if(!o[h]){var y=typeof ql=="function"&&ql;if(!g&&y)return y(h,!0);if(f)return f(h,!0);var v=new Error("Cannot find module '"+h+"'");throw v.code="MODULE_NOT_FOUND",v}var b=u[h]={exports:{}};o[h][0].call(b.exports,function(w){var E=o[h][1][w];return c(E||w)},b,b.exports,i,o,u,s)}return u[h].exports}for(var f=typeof ql=="function"&&ql,m=0;m<s.length;m++)c(s[m]);return c})({1:[function(i,o,u){var s=i("./utils"),c=i("./support"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(m){for(var h,g,y,v,b,w,E,T=[],_=0,A=m.length,k=A,q=s.getTypeOf(m)!=="string";_<m.length;)k=A-_,y=q?(h=m[_++],g=_<A?m[_++]:0,_<A?m[_++]:0):(h=m.charCodeAt(_++),g=_<A?m.charCodeAt(_++):0,_<A?m.charCodeAt(_++):0),v=h>>2,b=(3&h)<<4|g>>4,w=1<k?(15&g)<<2|y>>6:64,E=2<k?63&y:64,T.push(f.charAt(v)+f.charAt(b)+f.charAt(w)+f.charAt(E));return T.join("")},u.decode=function(m){var h,g,y,v,b,w,E=0,T=0,_="data:";if(m.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var A,k=3*(m=m.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(m.charAt(m.length-1)===f.charAt(64)&&k--,m.charAt(m.length-2)===f.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=c.uint8array?new Uint8Array(0|k):new Array(0|k);E<m.length;)h=f.indexOf(m.charAt(E++))<<2|(v=f.indexOf(m.charAt(E++)))>>4,g=(15&v)<<4|(b=f.indexOf(m.charAt(E++)))>>2,y=(3&b)<<6|(w=f.indexOf(m.charAt(E++))),A[T++]=h,b!==64&&(A[T++]=g),w!==64&&(A[T++]=y);return A}},{"./support":30,"./utils":32}],2:[function(i,o,u){var s=i("./external"),c=i("./stream/DataWorker"),f=i("./stream/Crc32Probe"),m=i("./stream/DataLengthProbe");function h(g,y,v,b,w){this.compressedSize=g,this.uncompressedSize=y,this.crc32=v,this.compression=b,this.compressedContent=w}h.prototype={getContentWorker:function(){var g=new c(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new m("data_length")),y=this;return g.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),g},getCompressedWorker:function(){return new c(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(g,y,v){return g.pipe(new f).pipe(new m("uncompressedSize")).pipe(y.compressWorker(v)).pipe(new m("compressedSize")).withStreamInfo("compression",y)},o.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(i,o,u){var s=i("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},u.DEFLATE=i("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(i,o,u){var s=i("./utils"),c=(function(){for(var f,m=[],h=0;h<256;h++){f=h;for(var g=0;g<8;g++)f=1&f?3988292384^f>>>1:f>>>1;m[h]=f}return m})();o.exports=function(f,m){return f!==void 0&&f.length?s.getTypeOf(f)!=="string"?(function(h,g,y,v){var b=c,w=v+y;h^=-1;for(var E=v;E<w;E++)h=h>>>8^b[255&(h^g[E])];return-1^h})(0|m,f,f.length,0):(function(h,g,y,v){var b=c,w=v+y;h^=-1;for(var E=v;E<w;E++)h=h>>>8^b[255&(h^g.charCodeAt(E))];return-1^h})(0|m,f,f.length,0):0}},{"./utils":32}],5:[function(i,o,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(i,o,u){var s=null;s=typeof Promise<"u"?Promise:i("lie"),o.exports={Promise:s}},{lie:37}],7:[function(i,o,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",c=i("pako"),f=i("./utils"),m=i("./stream/GenericWorker"),h=s?"uint8array":"array";function g(y,v){m.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=v,this.meta={}}u.magic="\b\0",f.inherits(g,m),g.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(f.transformTo(h,y.data),!1)},g.prototype.flush=function(){m.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},g.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this._pako=null},g.prototype._createPako=function(){this._pako=new c[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(v){y.push({data:v,meta:y.meta})}},u.compressWorker=function(y){return new g("Deflate",y)},u.uncompressWorker=function(){return new g("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,u){function s(b,w){var E,T="";for(E=0;E<w;E++)T+=String.fromCharCode(255&b),b>>>=8;return T}function c(b,w,E,T,_,A){var k,q,H=b.file,M=b.compression,I=A!==h.utf8encode,Y=f.transformTo("string",A(H.name)),F=f.transformTo("string",h.utf8encode(H.name)),$=H.comment,ie=f.transformTo("string",A($)),D=f.transformTo("string",h.utf8encode($)),ne=F.length!==H.name.length,C=D.length!==$.length,V="",Z="",Q="",se=H.dir,de=H.date,L={crc32:0,compressedSize:0,uncompressedSize:0};w&&!E||(L.crc32=b.crc32,L.compressedSize=b.compressedSize,L.uncompressedSize=b.uncompressedSize);var N=0;w&&(N|=8),I||!ne&&!C||(N|=2048);var B=0,z=0;se&&(B|=16),_==="UNIX"?(z=798,B|=(function(ce,we){var Te=ce;return ce||(Te=we?16893:33204),(65535&Te)<<16})(H.unixPermissions,se)):(z=20,B|=(function(ce){return 63&(ce||0)})(H.dosPermissions)),k=de.getUTCHours(),k<<=6,k|=de.getUTCMinutes(),k<<=5,k|=de.getUTCSeconds()/2,q=de.getUTCFullYear()-1980,q<<=4,q|=de.getUTCMonth()+1,q<<=5,q|=de.getUTCDate(),ne&&(Z=s(1,1)+s(g(Y),4)+F,V+="up"+s(Z.length,2)+Z),C&&(Q=s(1,1)+s(g(ie),4)+D,V+="uc"+s(Q.length,2)+Q);var re="";return re+=`
10
+ \0`,re+=s(N,2),re+=M.magic,re+=s(k,2),re+=s(q,2),re+=s(L.crc32,4),re+=s(L.compressedSize,4),re+=s(L.uncompressedSize,4),re+=s(Y.length,2),re+=s(V.length,2),{fileRecord:y.LOCAL_FILE_HEADER+re+Y+V,dirRecord:y.CENTRAL_FILE_HEADER+s(z,2)+re+s(ie.length,2)+"\0\0\0\0"+s(B,4)+s(T,4)+Y+V+ie}}var f=i("../utils"),m=i("../stream/GenericWorker"),h=i("../utf8"),g=i("../crc32"),y=i("../signature");function v(b,w,E,T){m.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=E,this.encodeFileName=T,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}f.inherits(v,m),v.prototype.push=function(b){var w=b.meta.percent||0,E=this.entriesCount,T=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,m.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:E?(w+100*(E-T-1))/E:100}}))},v.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var w=this.streamFiles&&!b.file.dir;if(w){var E=c(b,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(b){this.accumulate=!1;var w=this.streamFiles&&!b.file.dir,E=c(b,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),w)this.push({data:(function(T){return y.DATA_DESCRIPTOR+s(T.crc32,4)+s(T.compressedSize,4)+s(T.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var b=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var E=this.bytesWritten-b,T=(function(_,A,k,q,H){var M=f.transformTo("string",H(q));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(_,2)+s(_,2)+s(A,4)+s(k,4)+s(M.length,2)+M})(this.dirRecords.length,E,b,this.zipComment,this.encodeFileName);this.push({data:T,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(b){this._sources.push(b);var w=this;return b.on("data",function(E){w.processChunk(E)}),b.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),b.on("error",function(E){w.error(E)}),this},v.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(b){var w=this._sources;if(!m.prototype.error.call(this,b))return!1;for(var E=0;E<w.length;E++)try{w[E].error(b)}catch{}return!0},v.prototype.lock=function(){m.prototype.lock.call(this);for(var b=this._sources,w=0;w<b.length;w++)b[w].lock()},o.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(i,o,u){var s=i("../compressions"),c=i("./ZipFileWorker");u.generateWorker=function(f,m,h){var g=new c(m.streamFiles,h,m.platform,m.encodeFileName),y=0;try{f.forEach(function(v,b){y++;var w=(function(A,k){var q=A||k,H=s[q];if(!H)throw new Error(q+" is not a valid compression method !");return H})(b.options.compression,m.compression),E=b.options.compressionOptions||m.compressionOptions||{},T=b.dir,_=b.date;b._compressWorker(w,E).withStreamInfo("file",{name:v,dir:T,date:_,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(g)}),g.entriesCount=y}catch(v){g.error(v)}return g}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(i,o,u){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var c=new s;for(var f in this)typeof this[f]!="function"&&(c[f]=this[f]);return c}}(s.prototype=i("./object")).loadAsync=i("./load"),s.support=i("./support"),s.defaults=i("./defaults"),s.version="3.10.1",s.loadAsync=function(c,f){return new s().loadAsync(c,f)},s.external=i("./external"),o.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(i,o,u){var s=i("./utils"),c=i("./external"),f=i("./utf8"),m=i("./zipEntries"),h=i("./stream/Crc32Probe"),g=i("./nodejsUtils");function y(v){return new c.Promise(function(b,w){var E=v.decompressed.getContentWorker().pipe(new h);E.on("error",function(T){w(T)}).on("end",function(){E.streamInfo.crc32!==v.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(v,b){var w=this;return b=s.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:f.utf8decode}),g.isNode&&g.isStream(v)?c.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",v,!0,b.optimizedBinaryString,b.base64).then(function(E){var T=new m(b);return T.load(E),T}).then(function(E){var T=[c.Promise.resolve(E)],_=E.files;if(b.checkCRC32)for(var A=0;A<_.length;A++)T.push(y(_[A]));return c.Promise.all(T)}).then(function(E){for(var T=E.shift(),_=T.files,A=0;A<_.length;A++){var k=_[A],q=k.fileNameStr,H=s.resolve(k.fileNameStr);w.file(H,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:b.createFolders}),k.dir||(w.file(H).unsafeOriginalName=q)}return T.zipComment.length&&(w.comment=T.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(i,o,u){var s=i("../utils"),c=i("../stream/GenericWorker");function f(m,h){c.call(this,"Nodejs stream input adapter for "+m),this._upstreamEnded=!1,this._bindStream(h)}s.inherits(f,c),f.prototype._bindStream=function(m){var h=this;(this._stream=m).pause(),m.on("data",function(g){h.push({data:g,meta:{percent:0}})}).on("error",function(g){h.isPaused?this.generatedError=g:h.error(g)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},f.prototype.pause=function(){return!!c.prototype.pause.call(this)&&(this._stream.pause(),!0)},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=f},{"../stream/GenericWorker":28,"../utils":32}],13:[function(i,o,u){var s=i("readable-stream").Readable;function c(f,m,h){s.call(this,m),this._helper=f;var g=this;f.on("data",function(y,v){g.push(y)||g._helper.pause(),h&&h(v)}).on("error",function(y){g.emit("error",y)}).on("end",function(){g.push(null)})}i("../utils").inherits(c,s),c.prototype._read=function(){this._helper.resume()},o.exports=c},{"../utils":32,"readable-stream":16}],14:[function(i,o,u){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,c){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,c);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,c)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var c=new Buffer(s);return c.fill(0),c},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(i,o,u){function s(H,M,I){var Y,F=f.getTypeOf(M),$=f.extend(I||{},g);$.date=$.date||new Date,$.compression!==null&&($.compression=$.compression.toUpperCase()),typeof $.unixPermissions=="string"&&($.unixPermissions=parseInt($.unixPermissions,8)),$.unixPermissions&&16384&$.unixPermissions&&($.dir=!0),$.dosPermissions&&16&$.dosPermissions&&($.dir=!0),$.dir&&(H=_(H)),$.createFolders&&(Y=T(H))&&A.call(this,Y,!0);var ie=F==="string"&&$.binary===!1&&$.base64===!1;I&&I.binary!==void 0||($.binary=!ie),(M instanceof y&&M.uncompressedSize===0||$.dir||!M||M.length===0)&&($.base64=!1,$.binary=!0,M="",$.compression="STORE",F="string");var D=null;D=M instanceof y||M instanceof m?M:w.isNode&&w.isStream(M)?new E(H,M):f.prepareContent(H,M,$.binary,$.optimizedBinaryString,$.base64);var ne=new v(H,D,$);this.files[H]=ne}var c=i("./utf8"),f=i("./utils"),m=i("./stream/GenericWorker"),h=i("./stream/StreamHelper"),g=i("./defaults"),y=i("./compressedObject"),v=i("./zipObject"),b=i("./generate"),w=i("./nodejsUtils"),E=i("./nodejs/NodejsStreamInputAdapter"),T=function(H){H.slice(-1)==="/"&&(H=H.substring(0,H.length-1));var M=H.lastIndexOf("/");return 0<M?H.substring(0,M):""},_=function(H){return H.slice(-1)!=="/"&&(H+="/"),H},A=function(H,M){return M=M!==void 0?M:g.createFolders,H=_(H),this.files[H]||s.call(this,H,null,{dir:!0,createFolders:M}),this.files[H]};function k(H){return Object.prototype.toString.call(H)==="[object RegExp]"}var q={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(H){var M,I,Y;for(M in this.files)Y=this.files[M],(I=M.slice(this.root.length,M.length))&&M.slice(0,this.root.length)===this.root&&H(I,Y)},filter:function(H){var M=[];return this.forEach(function(I,Y){H(I,Y)&&M.push(Y)}),M},file:function(H,M,I){if(arguments.length!==1)return H=this.root+H,s.call(this,H,M,I),this;if(k(H)){var Y=H;return this.filter(function($,ie){return!ie.dir&&Y.test($)})}var F=this.files[this.root+H];return F&&!F.dir?F:null},folder:function(H){if(!H)return this;if(k(H))return this.filter(function(F,$){return $.dir&&H.test(F)});var M=this.root+H,I=A.call(this,M),Y=this.clone();return Y.root=I.name,Y},remove:function(H){H=this.root+H;var M=this.files[H];if(M||(H.slice(-1)!=="/"&&(H+="/"),M=this.files[H]),M&&!M.dir)delete this.files[H];else for(var I=this.filter(function(F,$){return $.name.slice(0,H.length)===H}),Y=0;Y<I.length;Y++)delete this.files[I[Y].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(H){var M,I={};try{if((I=f.extend(H||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=I.type.toLowerCase(),I.compression=I.compression.toUpperCase(),I.type==="binarystring"&&(I.type="string"),!I.type)throw new Error("No output type specified.");f.checkSupport(I.type),I.platform!=="darwin"&&I.platform!=="freebsd"&&I.platform!=="linux"&&I.platform!=="sunos"||(I.platform="UNIX"),I.platform==="win32"&&(I.platform="DOS");var Y=I.comment||this.comment||"";M=b.generateWorker(this,I,Y)}catch(F){(M=new m("error")).error(F)}return new h(M,I.type||"string",I.mimeType)},generateAsync:function(H,M){return this.generateInternalStream(H).accumulate(M)},generateNodeStream:function(H,M){return(H=H||{}).type||(H.type="nodebuffer"),this.generateInternalStream(H).toNodejsStream(M)}};o.exports=q},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(i,o,u){o.exports=i("stream")},{stream:void 0}],17:[function(i,o,u){var s=i("./DataReader");function c(f){s.call(this,f);for(var m=0;m<this.data.length;m++)f[m]=255&f[m]}i("../utils").inherits(c,s),c.prototype.byteAt=function(f){return this.data[this.zero+f]},c.prototype.lastIndexOfSignature=function(f){for(var m=f.charCodeAt(0),h=f.charCodeAt(1),g=f.charCodeAt(2),y=f.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===m&&this.data[v+1]===h&&this.data[v+2]===g&&this.data[v+3]===y)return v-this.zero;return-1},c.prototype.readAndCheckSignature=function(f){var m=f.charCodeAt(0),h=f.charCodeAt(1),g=f.charCodeAt(2),y=f.charCodeAt(3),v=this.readData(4);return m===v[0]&&h===v[1]&&g===v[2]&&y===v[3]},c.prototype.readData=function(f){if(this.checkOffset(f),f===0)return[];var m=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./DataReader":18}],18:[function(i,o,u){var s=i("../utils");function c(f){this.data=f,this.length=f.length,this.index=0,this.zero=0}c.prototype={checkOffset:function(f){this.checkIndex(this.index+f)},checkIndex:function(f){if(this.length<this.zero+f||f<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+f+"). Corrupted zip ?")},setIndex:function(f){this.checkIndex(f),this.index=f},skip:function(f){this.setIndex(this.index+f)},byteAt:function(){},readInt:function(f){var m,h=0;for(this.checkOffset(f),m=this.index+f-1;m>=this.index;m--)h=(h<<8)+this.byteAt(m);return this.index+=f,h},readString:function(f){return s.transformTo("string",this.readData(f))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var f=this.readInt(4);return new Date(Date.UTC(1980+(f>>25&127),(f>>21&15)-1,f>>16&31,f>>11&31,f>>5&63,(31&f)<<1))}},o.exports=c},{"../utils":32}],19:[function(i,o,u){var s=i("./Uint8ArrayReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.readData=function(f){this.checkOffset(f);var m=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(i,o,u){var s=i("./DataReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.byteAt=function(f){return this.data.charCodeAt(this.zero+f)},c.prototype.lastIndexOfSignature=function(f){return this.data.lastIndexOf(f)-this.zero},c.prototype.readAndCheckSignature=function(f){return f===this.readData(4)},c.prototype.readData=function(f){this.checkOffset(f);var m=this.data.slice(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./DataReader":18}],21:[function(i,o,u){var s=i("./ArrayReader");function c(f){s.call(this,f)}i("../utils").inherits(c,s),c.prototype.readData=function(f){if(this.checkOffset(f),f===0)return new Uint8Array(0);var m=this.data.subarray(this.zero+this.index,this.zero+this.index+f);return this.index+=f,m},o.exports=c},{"../utils":32,"./ArrayReader":17}],22:[function(i,o,u){var s=i("../utils"),c=i("../support"),f=i("./ArrayReader"),m=i("./StringReader"),h=i("./NodeBufferReader"),g=i("./Uint8ArrayReader");o.exports=function(y){var v=s.getTypeOf(y);return s.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new h(y):c.uint8array?new g(s.transformTo("uint8array",y)):new f(s.transformTo("array",y)):new m(y)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(i,o,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(i,o,u){var s=i("./GenericWorker"),c=i("../utils");function f(m){s.call(this,"ConvertWorker to "+m),this.destType=m}c.inherits(f,s),f.prototype.processChunk=function(m){this.push({data:c.transformTo(this.destType,m.data),meta:m.meta})},o.exports=f},{"../utils":32,"./GenericWorker":28}],25:[function(i,o,u){var s=i("./GenericWorker"),c=i("../crc32");function f(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i("../utils").inherits(f,s),f.prototype.processChunk=function(m){this.streamInfo.crc32=c(m.data,this.streamInfo.crc32||0),this.push(m)},o.exports=f},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(i,o,u){var s=i("../utils"),c=i("./GenericWorker");function f(m){c.call(this,"DataLengthProbe for "+m),this.propName=m,this.withStreamInfo(m,0)}s.inherits(f,c),f.prototype.processChunk=function(m){if(m){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+m.data.length}c.prototype.processChunk.call(this,m)},o.exports=f},{"../utils":32,"./GenericWorker":28}],27:[function(i,o,u){var s=i("../utils"),c=i("./GenericWorker");function f(m){c.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,m.then(function(g){h.dataIsReady=!0,h.data=g,h.max=g&&g.length||0,h.type=s.getTypeOf(g),h.isPaused||h._tickAndRepeat()},function(g){h.error(g)})}s.inherits(f,c),f.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this.data=null},f.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},f.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},f.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var m=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":m=this.data.substring(this.index,h);break;case"uint8array":m=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":m=this.data.slice(this.index,h)}return this.index=h,this.push({data:m,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=f},{"../utils":32,"./GenericWorker":28}],28:[function(i,o,u){function s(c){this.name=c||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(c){this.emit("data",c)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(c){this.emit("error",c)}return!0},error:function(c){return!this.isFinished&&(this.isPaused?this.generatedError=c:(this.isFinished=!0,this.emit("error",c),this.previous&&this.previous.error(c),this.cleanUp()),!0)},on:function(c,f){return this._listeners[c].push(f),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(c,f){if(this._listeners[c])for(var m=0;m<this._listeners[c].length;m++)this._listeners[c][m].call(this,f)},pipe:function(c){return c.registerPrevious(this)},registerPrevious:function(c){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=c.streamInfo,this.mergeStreamInfo(),this.previous=c;var f=this;return c.on("data",function(m){f.processChunk(m)}),c.on("end",function(){f.end()}),c.on("error",function(m){f.error(m)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var c=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),c=!0),this.previous&&this.previous.resume(),!c},flush:function(){},processChunk:function(c){this.push(c)},withStreamInfo:function(c,f){return this.extraStreamInfo[c]=f,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var c in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,c)&&(this.streamInfo[c]=this.extraStreamInfo[c])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var c="Worker "+this.name;return this.previous?this.previous+" -> "+c:c}},o.exports=s},{}],29:[function(i,o,u){var s=i("../utils"),c=i("./ConvertWorker"),f=i("./GenericWorker"),m=i("../base64"),h=i("../support"),g=i("../external"),y=null;if(h.nodestream)try{y=i("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(w,E){return new g.Promise(function(T,_){var A=[],k=w._internalType,q=w._outputType,H=w._mimeType;w.on("data",function(M,I){A.push(M),E&&E(I)}).on("error",function(M){A=[],_(M)}).on("end",function(){try{var M=(function(I,Y,F){switch(I){case"blob":return s.newBlob(s.transformTo("arraybuffer",Y),F);case"base64":return m.encode(Y);default:return s.transformTo(I,Y)}})(q,(function(I,Y){var F,$=0,ie=null,D=0;for(F=0;F<Y.length;F++)D+=Y[F].length;switch(I){case"string":return Y.join("");case"array":return Array.prototype.concat.apply([],Y);case"uint8array":for(ie=new Uint8Array(D),F=0;F<Y.length;F++)ie.set(Y[F],$),$+=Y[F].length;return ie;case"nodebuffer":return Buffer.concat(Y);default:throw new Error("concat : unsupported type '"+I+"'")}})(k,A),H);T(M)}catch(I){_(I)}A=[]}).resume()})}function b(w,E,T){var _=E;switch(E){case"blob":case"arraybuffer":_="uint8array";break;case"base64":_="string"}try{this._internalType=_,this._outputType=E,this._mimeType=T,s.checkSupport(_),this._worker=w.pipe(new c(_)),w.lock()}catch(A){this._worker=new f("error"),this._worker.error(A)}}b.prototype={accumulate:function(w){return v(this,w)},on:function(w,E){var T=this;return w==="data"?this._worker.on(w,function(_){E.call(T,_.data,_.meta)}):this._worker.on(w,function(){s.delay(E,arguments,T)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},w)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(i,o,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var s=new ArrayBuffer(0);try{u.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var c=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);c.append(s),u.blob=c.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!i("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(i,o,u){for(var s=i("./utils"),c=i("./support"),f=i("./nodejsUtils"),m=i("./stream/GenericWorker"),h=new Array(256),g=0;g<256;g++)h[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;h[254]=h[254]=1;function y(){m.call(this,"utf-8 decode"),this.leftOver=null}function v(){m.call(this,"utf-8 encode")}u.utf8encode=function(b){return c.nodebuffer?f.newBufferFrom(b,"utf-8"):(function(w){var E,T,_,A,k,q=w.length,H=0;for(A=0;A<q;A++)(64512&(T=w.charCodeAt(A)))==55296&&A+1<q&&(64512&(_=w.charCodeAt(A+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),A++),H+=T<128?1:T<2048?2:T<65536?3:4;for(E=c.uint8array?new Uint8Array(H):new Array(H),A=k=0;k<H;A++)(64512&(T=w.charCodeAt(A)))==55296&&A+1<q&&(64512&(_=w.charCodeAt(A+1)))==56320&&(T=65536+(T-55296<<10)+(_-56320),A++),T<128?E[k++]=T:(T<2048?E[k++]=192|T>>>6:(T<65536?E[k++]=224|T>>>12:(E[k++]=240|T>>>18,E[k++]=128|T>>>12&63),E[k++]=128|T>>>6&63),E[k++]=128|63&T);return E})(b)},u.utf8decode=function(b){return c.nodebuffer?s.transformTo("nodebuffer",b).toString("utf-8"):(function(w){var E,T,_,A,k=w.length,q=new Array(2*k);for(E=T=0;E<k;)if((_=w[E++])<128)q[T++]=_;else if(4<(A=h[_]))q[T++]=65533,E+=A-1;else{for(_&=A===2?31:A===3?15:7;1<A&&E<k;)_=_<<6|63&w[E++],A--;1<A?q[T++]=65533:_<65536?q[T++]=_:(_-=65536,q[T++]=55296|_>>10&1023,q[T++]=56320|1023&_)}return q.length!==T&&(q.subarray?q=q.subarray(0,T):q.length=T),s.applyFromCharCode(q)})(b=s.transformTo(c.uint8array?"uint8array":"array",b))},s.inherits(y,m),y.prototype.processChunk=function(b){var w=s.transformTo(c.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(c.uint8array){var E=w;(w=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),w.set(E,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var T=(function(A,k){var q;for((k=k||A.length)>A.length&&(k=A.length),q=k-1;0<=q&&(192&A[q])==128;)q--;return q<0||q===0?k:q+h[A[q]]>k?q:k})(w),_=w;T!==w.length&&(c.uint8array?(_=w.subarray(0,T),this.leftOver=w.subarray(T,w.length)):(_=w.slice(0,T),this.leftOver=w.slice(T,w.length))),this.push({data:u.utf8decode(_),meta:b.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=y,s.inherits(v,m),v.prototype.processChunk=function(b){this.push({data:u.utf8encode(b.data),meta:b.meta})},u.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(i,o,u){var s=i("./support"),c=i("./base64"),f=i("./nodejsUtils"),m=i("./external");function h(E){return E}function g(E,T){for(var _=0;_<E.length;++_)T[_]=255&E.charCodeAt(_);return T}i("setimmediate"),u.newBlob=function(E,T){u.checkSupport("blob");try{return new Blob([E],{type:T})}catch{try{var _=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return _.append(E),_.getBlob(T)}catch{throw new Error("Bug : can't construct the Blob.")}}};var y={stringifyByChunk:function(E,T,_){var A=[],k=0,q=E.length;if(q<=_)return String.fromCharCode.apply(null,E);for(;k<q;)T==="array"||T==="nodebuffer"?A.push(String.fromCharCode.apply(null,E.slice(k,Math.min(k+_,q)))):A.push(String.fromCharCode.apply(null,E.subarray(k,Math.min(k+_,q)))),k+=_;return A.join("")},stringifyByChar:function(E){for(var T="",_=0;_<E.length;_++)T+=String.fromCharCode(E[_]);return T},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,f.allocBuffer(1)).length===1}catch{return!1}})()}};function v(E){var T=65536,_=u.getTypeOf(E),A=!0;if(_==="uint8array"?A=y.applyCanBeUsed.uint8array:_==="nodebuffer"&&(A=y.applyCanBeUsed.nodebuffer),A)for(;1<T;)try{return y.stringifyByChunk(E,_,T)}catch{T=Math.floor(T/2)}return y.stringifyByChar(E)}function b(E,T){for(var _=0;_<E.length;_++)T[_]=E[_];return T}u.applyFromCharCode=v;var w={};w.string={string:h,array:function(E){return g(E,new Array(E.length))},arraybuffer:function(E){return w.string.uint8array(E).buffer},uint8array:function(E){return g(E,new Uint8Array(E.length))},nodebuffer:function(E){return g(E,f.allocBuffer(E.length))}},w.array={string:v,array:h,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(E)}},w.arraybuffer={string:function(E){return v(new Uint8Array(E))},array:function(E){return b(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:h,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return f.newBufferFrom(new Uint8Array(E))}},w.uint8array={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:h,nodebuffer:function(E){return f.newBufferFrom(E)}},w.nodebuffer={string:v,array:function(E){return b(E,new Array(E.length))},arraybuffer:function(E){return w.nodebuffer.uint8array(E).buffer},uint8array:function(E){return b(E,new Uint8Array(E.length))},nodebuffer:h},u.transformTo=function(E,T){if(T=T||"",!E)return T;u.checkSupport(E);var _=u.getTypeOf(T);return w[_][E](T)},u.resolve=function(E){for(var T=E.split("/"),_=[],A=0;A<T.length;A++){var k=T[A];k==="."||k===""&&A!==0&&A!==T.length-1||(k===".."?_.pop():_.push(k))}return _.join("/")},u.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":s.nodebuffer&&f.isBuffer(E)?"nodebuffer":s.uint8array&&E instanceof Uint8Array?"uint8array":s.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(E){if(!s[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(E){var T,_,A="";for(_=0;_<(E||"").length;_++)A+="\\x"+((T=E.charCodeAt(_))<16?"0":"")+T.toString(16).toUpperCase();return A},u.delay=function(E,T,_){setImmediate(function(){E.apply(_||null,T||[])})},u.inherits=function(E,T){function _(){}_.prototype=T.prototype,E.prototype=new _},u.extend=function(){var E,T,_={};for(E=0;E<arguments.length;E++)for(T in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],T)&&_[T]===void 0&&(_[T]=arguments[E][T]);return _},u.prepareContent=function(E,T,_,A,k){return m.Promise.resolve(T).then(function(q){return s.blob&&(q instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(q))!==-1)&&typeof FileReader<"u"?new m.Promise(function(H,M){var I=new FileReader;I.onload=function(Y){H(Y.target.result)},I.onerror=function(Y){M(Y.target.error)},I.readAsArrayBuffer(q)}):q}).then(function(q){var H=u.getTypeOf(q);return H?(H==="arraybuffer"?q=u.transformTo("uint8array",q):H==="string"&&(k?q=c.decode(q):_&&A!==!0&&(q=(function(M){return g(M,s.uint8array?new Uint8Array(M.length):new Array(M.length))})(q))),q):m.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(i,o,u){var s=i("./reader/readerFor"),c=i("./utils"),f=i("./signature"),m=i("./zipEntry"),h=i("./support");function g(y){this.files=[],this.loadOptions=y}g.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+c.pretty(v)+", expected "+c.pretty(y)+")")}},isSignature:function(y,v){var b=this.reader.index;this.reader.setIndex(y);var w=this.reader.readString(4)===v;return this.reader.setIndex(b),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var y=this.reader.readData(this.zipCommentLength),v=h.uint8array?"uint8array":"array",b=c.transformTo(v,y);this.zipComment=this.loadOptions.decodeFileName(b)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var y,v,b,w=this.zip64EndOfCentralSize-44;0<w;)y=this.reader.readInt(2),v=this.reader.readInt(4),b=this.reader.readData(v),this.zip64ExtensibleData[y]={id:y,length:v,value:b}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var y,v;for(y=0;y<this.files.length;y++)v=this.files[y],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(f.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(f.CENTRAL_FILE_HEADER);)(y=new m({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var y=this.reader.lastIndexOfSignature(f.CENTRAL_DIRECTORY_END);if(y<0)throw this.isSignature(0,f.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(y);var v=y;if(this.checkSignature(f.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===c.MAX_VALUE_16BITS||this.diskWithCentralDirStart===c.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===c.MAX_VALUE_16BITS||this.centralDirRecords===c.MAX_VALUE_16BITS||this.centralDirSize===c.MAX_VALUE_32BITS||this.centralDirOffset===c.MAX_VALUE_32BITS){if(this.zip64=!0,(y=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(y),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,f.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(f.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var w=v-b;if(0<w)this.isSignature(v,f.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(y){this.reader=s(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=g},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(i,o,u){var s=i("./reader/readerFor"),c=i("./utils"),f=i("./compressedObject"),m=i("./crc32"),h=i("./utf8"),g=i("./compressions"),y=i("./support");function v(b,w){this.options=b,this.loadOptions=w}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var w,E;if(b.skip(22),this.fileNameLength=b.readInt(2),E=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(T){for(var _ in g)if(Object.prototype.hasOwnProperty.call(g,_)&&g[_].magic===T)return g[_];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+c.pretty(this.compressionMethod)+" unknown (inner file : "+c.transformTo("string",this.fileName)+")");this.decompressed=new f(this.compressedSize,this.uncompressedSize,this.crc32,w,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var w=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(w),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=s(this.extraFields[1].value);this.uncompressedSize===c.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===c.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===c.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===c.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var w,E,T,_=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<_;)w=b.readInt(2),E=b.readInt(2),T=b.readData(E),this.extraFields[w]={id:w,length:E,value:T};b.setIndex(_)},handleUTF8:function(){var b=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var E=c.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var T=this.findExtraFieldUnicodeComment();if(T!==null)this.fileCommentStr=T;else{var _=c.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var w=s(b.value);return w.readInt(1)!==1||m(this.fileName)!==w.readInt(4)?null:h.utf8decode(w.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var w=s(b.value);return w.readInt(1)!==1||m(this.fileComment)!==w.readInt(4)?null:h.utf8decode(w.readData(b.length-5))}return null}},o.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(i,o,u){function s(w,E,T){this.name=w,this.dir=T.dir,this.date=T.date,this.comment=T.comment,this.unixPermissions=T.unixPermissions,this.dosPermissions=T.dosPermissions,this._data=E,this._dataBinary=T.binary,this.options={compression:T.compression,compressionOptions:T.compressionOptions}}var c=i("./stream/StreamHelper"),f=i("./stream/DataWorker"),m=i("./utf8"),h=i("./compressedObject"),g=i("./stream/GenericWorker");s.prototype={internalStream:function(w){var E=null,T="string";try{if(!w)throw new Error("No output type specified.");var _=(T=w.toLowerCase())==="string"||T==="text";T!=="binarystring"&&T!=="text"||(T="string"),E=this._decompressWorker();var A=!this._dataBinary;A&&!_&&(E=E.pipe(new m.Utf8EncodeWorker)),!A&&_&&(E=E.pipe(new m.Utf8DecodeWorker))}catch(k){(E=new g("error")).error(k)}return new c(E,T,"")},async:function(w,E){return this.internalStream(w).accumulate(E)},nodeStream:function(w,E){return this.internalStream(w||"nodebuffer").toNodejsStream(E)},_compressWorker:function(w,E){if(this._data instanceof h&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var T=this._decompressWorker();return this._dataBinary||(T=T.pipe(new m.Utf8EncodeWorker)),h.createWorkerFrom(T,w,E)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof g?this._data:new f(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<y.length;b++)s.prototype[y[b]]=v;o.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(i,o,u){(function(s){var c,f,m=s.MutationObserver||s.WebKitMutationObserver;if(m){var h=0,g=new m(w),y=s.document.createTextNode("");g.observe(y,{characterData:!0}),c=function(){y.data=h=++h%2}}else if(s.setImmediate||s.MessageChannel===void 0)c="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var E=s.document.createElement("script");E.onreadystatechange=function(){w(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},s.document.documentElement.appendChild(E)}:function(){setTimeout(w,0)};else{var v=new s.MessageChannel;v.port1.onmessage=w,c=function(){v.port2.postMessage(0)}}var b=[];function w(){var E,T;f=!0;for(var _=b.length;_;){for(T=b,b=[],E=-1;++E<_;)T[E]();_=b.length}f=!1}o.exports=function(E){b.push(E)!==1||f||c()}}).call(this,typeof Rl<"u"?Rl:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(i,o,u){var s=i("immediate");function c(){}var f={},m=["REJECTED"],h=["FULFILLED"],g=["PENDING"];function y(_){if(typeof _!="function")throw new TypeError("resolver must be a function");this.state=g,this.queue=[],this.outcome=void 0,_!==c&&E(this,_)}function v(_,A,k){this.promise=_,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function b(_,A,k){s(function(){var q;try{q=A(k)}catch(H){return f.reject(_,H)}q===_?f.reject(_,new TypeError("Cannot resolve promise with itself")):f.resolve(_,q)})}function w(_){var A=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof A=="function")return function(){A.apply(_,arguments)}}function E(_,A){var k=!1;function q(I){k||(k=!0,f.reject(_,I))}function H(I){k||(k=!0,f.resolve(_,I))}var M=T(function(){A(H,q)});M.status==="error"&&q(M.value)}function T(_,A){var k={};try{k.value=_(A),k.status="success"}catch(q){k.status="error",k.value=q}return k}(o.exports=y).prototype.finally=function(_){if(typeof _!="function")return this;var A=this.constructor;return this.then(function(k){return A.resolve(_()).then(function(){return k})},function(k){return A.resolve(_()).then(function(){throw k})})},y.prototype.catch=function(_){return this.then(null,_)},y.prototype.then=function(_,A){if(typeof _!="function"&&this.state===h||typeof A!="function"&&this.state===m)return this;var k=new this.constructor(c);return this.state!==g?b(k,this.state===h?_:A,this.outcome):this.queue.push(new v(k,_,A)),k},v.prototype.callFulfilled=function(_){f.resolve(this.promise,_)},v.prototype.otherCallFulfilled=function(_){b(this.promise,this.onFulfilled,_)},v.prototype.callRejected=function(_){f.reject(this.promise,_)},v.prototype.otherCallRejected=function(_){b(this.promise,this.onRejected,_)},f.resolve=function(_,A){var k=T(w,A);if(k.status==="error")return f.reject(_,k.value);var q=k.value;if(q)E(_,q);else{_.state=h,_.outcome=A;for(var H=-1,M=_.queue.length;++H<M;)_.queue[H].callFulfilled(A)}return _},f.reject=function(_,A){_.state=m,_.outcome=A;for(var k=-1,q=_.queue.length;++k<q;)_.queue[k].callRejected(A);return _},y.resolve=function(_){return _ instanceof this?_:f.resolve(new this(c),_)},y.reject=function(_){var A=new this(c);return f.reject(A,_)},y.all=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=_.length,q=!1;if(!k)return this.resolve([]);for(var H=new Array(k),M=0,I=-1,Y=new this(c);++I<k;)F(_[I],I);return Y;function F($,ie){A.resolve($).then(function(D){H[ie]=D,++M!==k||q||(q=!0,f.resolve(Y,H))},function(D){q||(q=!0,f.reject(Y,D))})}},y.race=function(_){var A=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=_.length,q=!1;if(!k)return this.resolve([]);for(var H=-1,M=new this(c);++H<k;)I=_[H],A.resolve(I).then(function(Y){q||(q=!0,f.resolve(M,Y))},function(Y){q||(q=!0,f.reject(M,Y))});var I;return M}},{immediate:36}],38:[function(i,o,u){var s={};(0,i("./lib/utils/common").assign)(s,i("./lib/deflate"),i("./lib/inflate"),i("./lib/zlib/constants")),o.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(i,o,u){var s=i("./zlib/deflate"),c=i("./utils/common"),f=i("./utils/strings"),m=i("./zlib/messages"),h=i("./zlib/zstream"),g=Object.prototype.toString,y=0,v=-1,b=0,w=8;function E(_){if(!(this instanceof E))return new E(_);this.options=c.assign({level:v,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},_||{});var A=this.options;A.raw&&0<A.windowBits?A.windowBits=-A.windowBits:A.gzip&&0<A.windowBits&&A.windowBits<16&&(A.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var k=s.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(k!==y)throw new Error(m[k]);if(A.header&&s.deflateSetHeader(this.strm,A.header),A.dictionary){var q;if(q=typeof A.dictionary=="string"?f.string2buf(A.dictionary):g.call(A.dictionary)==="[object ArrayBuffer]"?new Uint8Array(A.dictionary):A.dictionary,(k=s.deflateSetDictionary(this.strm,q))!==y)throw new Error(m[k]);this._dict_set=!0}}function T(_,A){var k=new E(A);if(k.push(_,!0),k.err)throw k.msg||m[k.err];return k.result}E.prototype.push=function(_,A){var k,q,H=this.strm,M=this.options.chunkSize;if(this.ended)return!1;q=A===~~A?A:A===!0?4:0,typeof _=="string"?H.input=f.string2buf(_):g.call(_)==="[object ArrayBuffer]"?H.input=new Uint8Array(_):H.input=_,H.next_in=0,H.avail_in=H.input.length;do{if(H.avail_out===0&&(H.output=new c.Buf8(M),H.next_out=0,H.avail_out=M),(k=s.deflate(H,q))!==1&&k!==y)return this.onEnd(k),!(this.ended=!0);H.avail_out!==0&&(H.avail_in!==0||q!==4&&q!==2)||(this.options.to==="string"?this.onData(f.buf2binstring(c.shrinkBuf(H.output,H.next_out))):this.onData(c.shrinkBuf(H.output,H.next_out)))}while((0<H.avail_in||H.avail_out===0)&&k!==1);return q===4?(k=s.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===y):q!==2||(this.onEnd(y),!(H.avail_out=0))},E.prototype.onData=function(_){this.chunks.push(_)},E.prototype.onEnd=function(_){_===y&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},u.Deflate=E,u.deflate=T,u.deflateRaw=function(_,A){return(A=A||{}).raw=!0,T(_,A)},u.gzip=function(_,A){return(A=A||{}).gzip=!0,T(_,A)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(i,o,u){var s=i("./zlib/inflate"),c=i("./utils/common"),f=i("./utils/strings"),m=i("./zlib/constants"),h=i("./zlib/messages"),g=i("./zlib/zstream"),y=i("./zlib/gzheader"),v=Object.prototype.toString;function b(E){if(!(this instanceof b))return new b(E);this.options=c.assign({chunkSize:16384,windowBits:0,to:""},E||{});var T=this.options;T.raw&&0<=T.windowBits&&T.windowBits<16&&(T.windowBits=-T.windowBits,T.windowBits===0&&(T.windowBits=-15)),!(0<=T.windowBits&&T.windowBits<16)||E&&E.windowBits||(T.windowBits+=32),15<T.windowBits&&T.windowBits<48&&(15&T.windowBits)==0&&(T.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var _=s.inflateInit2(this.strm,T.windowBits);if(_!==m.Z_OK)throw new Error(h[_]);this.header=new y,s.inflateGetHeader(this.strm,this.header)}function w(E,T){var _=new b(T);if(_.push(E,!0),_.err)throw _.msg||h[_.err];return _.result}b.prototype.push=function(E,T){var _,A,k,q,H,M,I=this.strm,Y=this.options.chunkSize,F=this.options.dictionary,$=!1;if(this.ended)return!1;A=T===~~T?T:T===!0?m.Z_FINISH:m.Z_NO_FLUSH,typeof E=="string"?I.input=f.binstring2buf(E):v.call(E)==="[object ArrayBuffer]"?I.input=new Uint8Array(E):I.input=E,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new c.Buf8(Y),I.next_out=0,I.avail_out=Y),(_=s.inflate(I,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&F&&(M=typeof F=="string"?f.string2buf(F):v.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,_=s.inflateSetDictionary(this.strm,M)),_===m.Z_BUF_ERROR&&$===!0&&(_=m.Z_OK,$=!1),_!==m.Z_STREAM_END&&_!==m.Z_OK)return this.onEnd(_),!(this.ended=!0);I.next_out&&(I.avail_out!==0&&_!==m.Z_STREAM_END&&(I.avail_in!==0||A!==m.Z_FINISH&&A!==m.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=f.utf8border(I.output,I.next_out),q=I.next_out-k,H=f.buf2string(I.output,k),I.next_out=q,I.avail_out=Y-q,q&&c.arraySet(I.output,I.output,k,q,0),this.onData(H)):this.onData(c.shrinkBuf(I.output,I.next_out)))),I.avail_in===0&&I.avail_out===0&&($=!0)}while((0<I.avail_in||I.avail_out===0)&&_!==m.Z_STREAM_END);return _===m.Z_STREAM_END&&(A=m.Z_FINISH),A===m.Z_FINISH?(_=s.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===m.Z_OK):A!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(I.avail_out=0))},b.prototype.onData=function(E){this.chunks.push(E)},b.prototype.onEnd=function(E){E===m.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=c.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},u.Inflate=b,u.inflate=w,u.inflateRaw=function(E,T){return(T=T||{}).raw=!0,w(E,T)},u.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(i,o,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(m){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var g=h.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var y in g)g.hasOwnProperty(y)&&(m[y]=g[y])}}return m},u.shrinkBuf=function(m,h){return m.length===h?m:m.subarray?m.subarray(0,h):(m.length=h,m)};var c={arraySet:function(m,h,g,y,v){if(h.subarray&&m.subarray)m.set(h.subarray(g,g+y),v);else for(var b=0;b<y;b++)m[v+b]=h[g+b]},flattenChunks:function(m){var h,g,y,v,b,w;for(h=y=0,g=m.length;h<g;h++)y+=m[h].length;for(w=new Uint8Array(y),h=v=0,g=m.length;h<g;h++)b=m[h],w.set(b,v),v+=b.length;return w}},f={arraySet:function(m,h,g,y,v){for(var b=0;b<y;b++)m[v+b]=h[g+b]},flattenChunks:function(m){return[].concat.apply([],m)}};u.setTyped=function(m){m?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,c)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,f))},u.setTyped(s)},{}],42:[function(i,o,u){var s=i("./common"),c=!0,f=!0;try{String.fromCharCode.apply(null,[0])}catch{c=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f=!1}for(var m=new s.Buf8(256),h=0;h<256;h++)m[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function g(y,v){if(v<65537&&(y.subarray&&f||!y.subarray&&c))return String.fromCharCode.apply(null,s.shrinkBuf(y,v));for(var b="",w=0;w<v;w++)b+=String.fromCharCode(y[w]);return b}m[254]=m[254]=1,u.string2buf=function(y){var v,b,w,E,T,_=y.length,A=0;for(E=0;E<_;E++)(64512&(b=y.charCodeAt(E)))==55296&&E+1<_&&(64512&(w=y.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(w-56320),E++),A+=b<128?1:b<2048?2:b<65536?3:4;for(v=new s.Buf8(A),E=T=0;T<A;E++)(64512&(b=y.charCodeAt(E)))==55296&&E+1<_&&(64512&(w=y.charCodeAt(E+1)))==56320&&(b=65536+(b-55296<<10)+(w-56320),E++),b<128?v[T++]=b:(b<2048?v[T++]=192|b>>>6:(b<65536?v[T++]=224|b>>>12:(v[T++]=240|b>>>18,v[T++]=128|b>>>12&63),v[T++]=128|b>>>6&63),v[T++]=128|63&b);return v},u.buf2binstring=function(y){return g(y,y.length)},u.binstring2buf=function(y){for(var v=new s.Buf8(y.length),b=0,w=v.length;b<w;b++)v[b]=y.charCodeAt(b);return v},u.buf2string=function(y,v){var b,w,E,T,_=v||y.length,A=new Array(2*_);for(b=w=0;b<_;)if((E=y[b++])<128)A[w++]=E;else if(4<(T=m[E]))A[w++]=65533,b+=T-1;else{for(E&=T===2?31:T===3?15:7;1<T&&b<_;)E=E<<6|63&y[b++],T--;1<T?A[w++]=65533:E<65536?A[w++]=E:(E-=65536,A[w++]=55296|E>>10&1023,A[w++]=56320|1023&E)}return g(A,w)},u.utf8border=function(y,v){var b;for((v=v||y.length)>y.length&&(v=y.length),b=v-1;0<=b&&(192&y[b])==128;)b--;return b<0||b===0?v:b+m[y[b]]>v?b:v}},{"./common":41}],43:[function(i,o,u){o.exports=function(s,c,f,m){for(var h=65535&s|0,g=s>>>16&65535|0,y=0;f!==0;){for(f-=y=2e3<f?2e3:f;g=g+(h=h+c[m++]|0)|0,--y;);h%=65521,g%=65521}return h|g<<16|0}},{}],44:[function(i,o,u){o.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(i,o,u){var s=(function(){for(var c,f=[],m=0;m<256;m++){c=m;for(var h=0;h<8;h++)c=1&c?3988292384^c>>>1:c>>>1;f[m]=c}return f})();o.exports=function(c,f,m,h){var g=s,y=h+m;c^=-1;for(var v=h;v<y;v++)c=c>>>8^g[255&(c^f[v])];return-1^c}},{}],46:[function(i,o,u){var s,c=i("../utils/common"),f=i("./trees"),m=i("./adler32"),h=i("./crc32"),g=i("./messages"),y=0,v=4,b=0,w=-2,E=-1,T=4,_=2,A=8,k=9,q=286,H=30,M=19,I=2*q+1,Y=15,F=3,$=258,ie=$+F+1,D=42,ne=113,C=1,V=2,Z=3,Q=4;function se(S,K){return S.msg=g[K],K}function de(S){return(S<<1)-(4<S?9:0)}function L(S){for(var K=S.length;0<=--K;)S[K]=0}function N(S){var K=S.state,W=K.pending;W>S.avail_out&&(W=S.avail_out),W!==0&&(c.arraySet(S.output,K.pending_buf,K.pending_out,W,S.next_out),S.next_out+=W,K.pending_out+=W,S.total_out+=W,S.avail_out-=W,K.pending-=W,K.pending===0&&(K.pending_out=0))}function B(S,K){f._tr_flush_block(S,0<=S.block_start?S.block_start:-1,S.strstart-S.block_start,K),S.block_start=S.strstart,N(S.strm)}function z(S,K){S.pending_buf[S.pending++]=K}function re(S,K){S.pending_buf[S.pending++]=K>>>8&255,S.pending_buf[S.pending++]=255&K}function ce(S,K){var W,U,j=S.max_chain_length,X=S.strstart,he=S.prev_length,pe=S.nice_match,le=S.strstart>S.w_size-ie?S.strstart-(S.w_size-ie):0,Ee=S.window,_e=S.w_mask,Se=S.prev,te=S.strstart+$,be=Ee[X+he-1],Ce=Ee[X+he];S.prev_length>=S.good_match&&(j>>=2),pe>S.lookahead&&(pe=S.lookahead);do if(Ee[(W=K)+he]===Ce&&Ee[W+he-1]===be&&Ee[W]===Ee[X]&&Ee[++W]===Ee[X+1]){X+=2,W++;do;while(Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&Ee[++X]===Ee[++W]&&X<te);if(U=$-(te-X),X=te-$,he<U){if(S.match_start=K,pe<=(he=U))break;be=Ee[X+he-1],Ce=Ee[X+he]}}while((K=Se[K&_e])>le&&--j!=0);return he<=S.lookahead?he:S.lookahead}function we(S){var K,W,U,j,X,he,pe,le,Ee,_e,Se=S.w_size;do{if(j=S.window_size-S.lookahead-S.strstart,S.strstart>=Se+(Se-ie)){for(c.arraySet(S.window,S.window,Se,Se,0),S.match_start-=Se,S.strstart-=Se,S.block_start-=Se,K=W=S.hash_size;U=S.head[--K],S.head[K]=Se<=U?U-Se:0,--W;);for(K=W=Se;U=S.prev[--K],S.prev[K]=Se<=U?U-Se:0,--W;);j+=Se}if(S.strm.avail_in===0)break;if(he=S.strm,pe=S.window,le=S.strstart+S.lookahead,Ee=j,_e=void 0,_e=he.avail_in,Ee<_e&&(_e=Ee),W=_e===0?0:(he.avail_in-=_e,c.arraySet(pe,he.input,he.next_in,_e,le),he.state.wrap===1?he.adler=m(he.adler,pe,_e,le):he.state.wrap===2&&(he.adler=h(he.adler,pe,_e,le)),he.next_in+=_e,he.total_in+=_e,_e),S.lookahead+=W,S.lookahead+S.insert>=F)for(X=S.strstart-S.insert,S.ins_h=S.window[X],S.ins_h=(S.ins_h<<S.hash_shift^S.window[X+1])&S.hash_mask;S.insert&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[X+F-1])&S.hash_mask,S.prev[X&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=X,X++,S.insert--,!(S.lookahead+S.insert<F)););}while(S.lookahead<ie&&S.strm.avail_in!==0)}function Te(S,K){for(var W,U;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===y)return C;if(S.lookahead===0)break}if(W=0,S.lookahead>=F&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),W!==0&&S.strstart-W<=S.w_size-ie&&(S.match_length=ce(S,W)),S.match_length>=F)if(U=f._tr_tally(S,S.strstart-S.match_start,S.match_length-F),S.lookahead-=S.match_length,S.match_length<=S.max_lazy_match&&S.lookahead>=F){for(S.match_length--;S.strstart++,S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart,--S.match_length!=0;);S.strstart++}else S.strstart+=S.match_length,S.match_length=0,S.ins_h=S.window[S.strstart],S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+1])&S.hash_mask;else U=f._tr_tally(S,0,S.window[S.strstart]),S.lookahead--,S.strstart++;if(U&&(B(S,!1),S.strm.avail_out===0))return C}return S.insert=S.strstart<F-1?S.strstart:F-1,K===v?(B(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(B(S,!1),S.strm.avail_out===0)?C:V}function ke(S,K){for(var W,U,j;;){if(S.lookahead<ie){if(we(S),S.lookahead<ie&&K===y)return C;if(S.lookahead===0)break}if(W=0,S.lookahead>=F&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),S.prev_length=S.match_length,S.prev_match=S.match_start,S.match_length=F-1,W!==0&&S.prev_length<S.max_lazy_match&&S.strstart-W<=S.w_size-ie&&(S.match_length=ce(S,W),S.match_length<=5&&(S.strategy===1||S.match_length===F&&4096<S.strstart-S.match_start)&&(S.match_length=F-1)),S.prev_length>=F&&S.match_length<=S.prev_length){for(j=S.strstart+S.lookahead-F,U=f._tr_tally(S,S.strstart-1-S.prev_match,S.prev_length-F),S.lookahead-=S.prev_length-1,S.prev_length-=2;++S.strstart<=j&&(S.ins_h=(S.ins_h<<S.hash_shift^S.window[S.strstart+F-1])&S.hash_mask,W=S.prev[S.strstart&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=S.strstart),--S.prev_length!=0;);if(S.match_available=0,S.match_length=F-1,S.strstart++,U&&(B(S,!1),S.strm.avail_out===0))return C}else if(S.match_available){if((U=f._tr_tally(S,0,S.window[S.strstart-1]))&&B(S,!1),S.strstart++,S.lookahead--,S.strm.avail_out===0)return C}else S.match_available=1,S.strstart++,S.lookahead--}return S.match_available&&(U=f._tr_tally(S,0,S.window[S.strstart-1]),S.match_available=0),S.insert=S.strstart<F-1?S.strstart:F-1,K===v?(B(S,!0),S.strm.avail_out===0?Z:Q):S.last_lit&&(B(S,!1),S.strm.avail_out===0)?C:V}function Ae(S,K,W,U,j){this.good_length=S,this.max_lazy=K,this.nice_length=W,this.max_chain=U,this.func=j}function He(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*I),this.dyn_dtree=new c.Buf16(2*(2*H+1)),this.bl_tree=new c.Buf16(2*(2*M+1)),L(this.dyn_ltree),L(this.dyn_dtree),L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(Y+1),this.heap=new c.Buf16(2*q+1),L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*q+1),L(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ve(S){var K;return S&&S.state?(S.total_in=S.total_out=0,S.data_type=_,(K=S.state).pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?D:ne,S.adler=K.wrap===2?0:1,K.last_flush=y,f._tr_init(K),b):se(S,w)}function ze(S){var K=ve(S);return K===b&&(function(W){W.window_size=2*W.w_size,L(W.head),W.max_lazy_match=s[W.level].max_lazy,W.good_match=s[W.level].good_length,W.nice_match=s[W.level].nice_length,W.max_chain_length=s[W.level].max_chain,W.strstart=0,W.block_start=0,W.lookahead=0,W.insert=0,W.match_length=W.prev_length=F-1,W.match_available=0,W.ins_h=0})(S.state),K}function je(S,K,W,U,j,X){if(!S)return w;var he=1;if(K===E&&(K=6),U<0?(he=0,U=-U):15<U&&(he=2,U-=16),j<1||k<j||W!==A||U<8||15<U||K<0||9<K||X<0||T<X)return se(S,w);U===8&&(U=9);var pe=new He;return(S.state=pe).strm=S,pe.wrap=he,pe.gzhead=null,pe.w_bits=U,pe.w_size=1<<pe.w_bits,pe.w_mask=pe.w_size-1,pe.hash_bits=j+7,pe.hash_size=1<<pe.hash_bits,pe.hash_mask=pe.hash_size-1,pe.hash_shift=~~((pe.hash_bits+F-1)/F),pe.window=new c.Buf8(2*pe.w_size),pe.head=new c.Buf16(pe.hash_size),pe.prev=new c.Buf16(pe.w_size),pe.lit_bufsize=1<<j+6,pe.pending_buf_size=4*pe.lit_bufsize,pe.pending_buf=new c.Buf8(pe.pending_buf_size),pe.d_buf=1*pe.lit_bufsize,pe.l_buf=3*pe.lit_bufsize,pe.level=K,pe.strategy=X,pe.method=W,ze(S)}s=[new Ae(0,0,0,0,function(S,K){var W=65535;for(W>S.pending_buf_size-5&&(W=S.pending_buf_size-5);;){if(S.lookahead<=1){if(we(S),S.lookahead===0&&K===y)return C;if(S.lookahead===0)break}S.strstart+=S.lookahead,S.lookahead=0;var U=S.block_start+W;if((S.strstart===0||S.strstart>=U)&&(S.lookahead=S.strstart-U,S.strstart=U,B(S,!1),S.strm.avail_out===0)||S.strstart-S.block_start>=S.w_size-ie&&(B(S,!1),S.strm.avail_out===0))return C}return S.insert=0,K===v?(B(S,!0),S.strm.avail_out===0?Z:Q):(S.strstart>S.block_start&&(B(S,!1),S.strm.avail_out),C)}),new Ae(4,4,8,4,Te),new Ae(4,5,16,8,Te),new Ae(4,6,32,32,Te),new Ae(4,4,16,16,ke),new Ae(8,16,32,32,ke),new Ae(8,16,128,128,ke),new Ae(8,32,128,256,ke),new Ae(32,128,258,1024,ke),new Ae(32,258,258,4096,ke)],u.deflateInit=function(S,K){return je(S,K,A,15,8,0)},u.deflateInit2=je,u.deflateReset=ze,u.deflateResetKeep=ve,u.deflateSetHeader=function(S,K){return S&&S.state?S.state.wrap!==2?w:(S.state.gzhead=K,b):w},u.deflate=function(S,K){var W,U,j,X;if(!S||!S.state||5<K||K<0)return S?se(S,w):w;if(U=S.state,!S.output||!S.input&&S.avail_in!==0||U.status===666&&K!==v)return se(S,S.avail_out===0?-5:w);if(U.strm=S,W=U.last_flush,U.last_flush=K,U.status===D)if(U.wrap===2)S.adler=0,z(U,31),z(U,139),z(U,8),U.gzhead?(z(U,(U.gzhead.text?1:0)+(U.gzhead.hcrc?2:0)+(U.gzhead.extra?4:0)+(U.gzhead.name?8:0)+(U.gzhead.comment?16:0)),z(U,255&U.gzhead.time),z(U,U.gzhead.time>>8&255),z(U,U.gzhead.time>>16&255),z(U,U.gzhead.time>>24&255),z(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),z(U,255&U.gzhead.os),U.gzhead.extra&&U.gzhead.extra.length&&(z(U,255&U.gzhead.extra.length),z(U,U.gzhead.extra.length>>8&255)),U.gzhead.hcrc&&(S.adler=h(S.adler,U.pending_buf,U.pending,0)),U.gzindex=0,U.status=69):(z(U,0),z(U,0),z(U,0),z(U,0),z(U,0),z(U,U.level===9?2:2<=U.strategy||U.level<2?4:0),z(U,3),U.status=ne);else{var he=A+(U.w_bits-8<<4)<<8;he|=(2<=U.strategy||U.level<2?0:U.level<6?1:U.level===6?2:3)<<6,U.strstart!==0&&(he|=32),he+=31-he%31,U.status=ne,re(U,he),U.strstart!==0&&(re(U,S.adler>>>16),re(U,65535&S.adler)),S.adler=1}if(U.status===69)if(U.gzhead.extra){for(j=U.pending;U.gzindex<(65535&U.gzhead.extra.length)&&(U.pending!==U.pending_buf_size||(U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),N(S),j=U.pending,U.pending!==U.pending_buf_size));)z(U,255&U.gzhead.extra[U.gzindex]),U.gzindex++;U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),U.gzindex===U.gzhead.extra.length&&(U.gzindex=0,U.status=73)}else U.status=73;if(U.status===73)if(U.gzhead.name){j=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),N(S),j=U.pending,U.pending===U.pending_buf_size)){X=1;break}X=U.gzindex<U.gzhead.name.length?255&U.gzhead.name.charCodeAt(U.gzindex++):0,z(U,X)}while(X!==0);U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),X===0&&(U.gzindex=0,U.status=91)}else U.status=91;if(U.status===91)if(U.gzhead.comment){j=U.pending;do{if(U.pending===U.pending_buf_size&&(U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),N(S),j=U.pending,U.pending===U.pending_buf_size)){X=1;break}X=U.gzindex<U.gzhead.comment.length?255&U.gzhead.comment.charCodeAt(U.gzindex++):0,z(U,X)}while(X!==0);U.gzhead.hcrc&&U.pending>j&&(S.adler=h(S.adler,U.pending_buf,U.pending-j,j)),X===0&&(U.status=103)}else U.status=103;if(U.status===103&&(U.gzhead.hcrc?(U.pending+2>U.pending_buf_size&&N(S),U.pending+2<=U.pending_buf_size&&(z(U,255&S.adler),z(U,S.adler>>8&255),S.adler=0,U.status=ne)):U.status=ne),U.pending!==0){if(N(S),S.avail_out===0)return U.last_flush=-1,b}else if(S.avail_in===0&&de(K)<=de(W)&&K!==v)return se(S,-5);if(U.status===666&&S.avail_in!==0)return se(S,-5);if(S.avail_in!==0||U.lookahead!==0||K!==y&&U.status!==666){var pe=U.strategy===2?(function(le,Ee){for(var _e;;){if(le.lookahead===0&&(we(le),le.lookahead===0)){if(Ee===y)return C;break}if(le.match_length=0,_e=f._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++,_e&&(B(le,!1),le.strm.avail_out===0))return C}return le.insert=0,Ee===v?(B(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(B(le,!1),le.strm.avail_out===0)?C:V})(U,K):U.strategy===3?(function(le,Ee){for(var _e,Se,te,be,Ce=le.window;;){if(le.lookahead<=$){if(we(le),le.lookahead<=$&&Ee===y)return C;if(le.lookahead===0)break}if(le.match_length=0,le.lookahead>=F&&0<le.strstart&&(Se=Ce[te=le.strstart-1])===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]){be=le.strstart+$;do;while(Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&Se===Ce[++te]&&te<be);le.match_length=$-(be-te),le.match_length>le.lookahead&&(le.match_length=le.lookahead)}if(le.match_length>=F?(_e=f._tr_tally(le,1,le.match_length-F),le.lookahead-=le.match_length,le.strstart+=le.match_length,le.match_length=0):(_e=f._tr_tally(le,0,le.window[le.strstart]),le.lookahead--,le.strstart++),_e&&(B(le,!1),le.strm.avail_out===0))return C}return le.insert=0,Ee===v?(B(le,!0),le.strm.avail_out===0?Z:Q):le.last_lit&&(B(le,!1),le.strm.avail_out===0)?C:V})(U,K):s[U.level].func(U,K);if(pe!==Z&&pe!==Q||(U.status=666),pe===C||pe===Z)return S.avail_out===0&&(U.last_flush=-1),b;if(pe===V&&(K===1?f._tr_align(U):K!==5&&(f._tr_stored_block(U,0,0,!1),K===3&&(L(U.head),U.lookahead===0&&(U.strstart=0,U.block_start=0,U.insert=0))),N(S),S.avail_out===0))return U.last_flush=-1,b}return K!==v?b:U.wrap<=0?1:(U.wrap===2?(z(U,255&S.adler),z(U,S.adler>>8&255),z(U,S.adler>>16&255),z(U,S.adler>>24&255),z(U,255&S.total_in),z(U,S.total_in>>8&255),z(U,S.total_in>>16&255),z(U,S.total_in>>24&255)):(re(U,S.adler>>>16),re(U,65535&S.adler)),N(S),0<U.wrap&&(U.wrap=-U.wrap),U.pending!==0?b:1)},u.deflateEnd=function(S){var K;return S&&S.state?(K=S.state.status)!==D&&K!==69&&K!==73&&K!==91&&K!==103&&K!==ne&&K!==666?se(S,w):(S.state=null,K===ne?se(S,-3):b):w},u.deflateSetDictionary=function(S,K){var W,U,j,X,he,pe,le,Ee,_e=K.length;if(!S||!S.state||(X=(W=S.state).wrap)===2||X===1&&W.status!==D||W.lookahead)return w;for(X===1&&(S.adler=m(S.adler,K,_e,0)),W.wrap=0,_e>=W.w_size&&(X===0&&(L(W.head),W.strstart=0,W.block_start=0,W.insert=0),Ee=new c.Buf8(W.w_size),c.arraySet(Ee,K,_e-W.w_size,W.w_size,0),K=Ee,_e=W.w_size),he=S.avail_in,pe=S.next_in,le=S.input,S.avail_in=_e,S.next_in=0,S.input=K,we(W);W.lookahead>=F;){for(U=W.strstart,j=W.lookahead-(F-1);W.ins_h=(W.ins_h<<W.hash_shift^W.window[U+F-1])&W.hash_mask,W.prev[U&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=U,U++,--j;);W.strstart=U,W.lookahead=F-1,we(W)}return W.strstart+=W.lookahead,W.block_start=W.strstart,W.insert=W.lookahead,W.lookahead=0,W.match_length=W.prev_length=F-1,W.match_available=0,S.next_in=pe,S.input=le,S.avail_in=he,W.wrap=X,b},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(i,o,u){o.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(i,o,u){o.exports=function(s,c){var f,m,h,g,y,v,b,w,E,T,_,A,k,q,H,M,I,Y,F,$,ie,D,ne,C,V;f=s.state,m=s.next_in,C=s.input,h=m+(s.avail_in-5),g=s.next_out,V=s.output,y=g-(c-s.avail_out),v=g+(s.avail_out-257),b=f.dmax,w=f.wsize,E=f.whave,T=f.wnext,_=f.window,A=f.hold,k=f.bits,q=f.lencode,H=f.distcode,M=(1<<f.lenbits)-1,I=(1<<f.distbits)-1;e:do{k<15&&(A+=C[m++]<<k,k+=8,A+=C[m++]<<k,k+=8),Y=q[A&M];t:for(;;){if(A>>>=F=Y>>>24,k-=F,(F=Y>>>16&255)===0)V[g++]=65535&Y;else{if(!(16&F)){if((64&F)==0){Y=q[(65535&Y)+(A&(1<<F)-1)];continue t}if(32&F){f.mode=12;break e}s.msg="invalid literal/length code",f.mode=30;break e}$=65535&Y,(F&=15)&&(k<F&&(A+=C[m++]<<k,k+=8),$+=A&(1<<F)-1,A>>>=F,k-=F),k<15&&(A+=C[m++]<<k,k+=8,A+=C[m++]<<k,k+=8),Y=H[A&I];n:for(;;){if(A>>>=F=Y>>>24,k-=F,!(16&(F=Y>>>16&255))){if((64&F)==0){Y=H[(65535&Y)+(A&(1<<F)-1)];continue n}s.msg="invalid distance code",f.mode=30;break e}if(ie=65535&Y,k<(F&=15)&&(A+=C[m++]<<k,(k+=8)<F&&(A+=C[m++]<<k,k+=8)),b<(ie+=A&(1<<F)-1)){s.msg="invalid distance too far back",f.mode=30;break e}if(A>>>=F,k-=F,(F=g-y)<ie){if(E<(F=ie-F)&&f.sane){s.msg="invalid distance too far back",f.mode=30;break e}if(ne=_,(D=0)===T){if(D+=w-F,F<$){for($-=F;V[g++]=_[D++],--F;);D=g-ie,ne=V}}else if(T<F){if(D+=w+T-F,(F-=T)<$){for($-=F;V[g++]=_[D++],--F;);if(D=0,T<$){for($-=F=T;V[g++]=_[D++],--F;);D=g-ie,ne=V}}}else if(D+=T-F,F<$){for($-=F;V[g++]=_[D++],--F;);D=g-ie,ne=V}for(;2<$;)V[g++]=ne[D++],V[g++]=ne[D++],V[g++]=ne[D++],$-=3;$&&(V[g++]=ne[D++],1<$&&(V[g++]=ne[D++]))}else{for(D=g-ie;V[g++]=V[D++],V[g++]=V[D++],V[g++]=V[D++],2<($-=3););$&&(V[g++]=V[D++],1<$&&(V[g++]=V[D++]))}break}}break}}while(m<h&&g<v);m-=$=k>>3,A&=(1<<(k-=$<<3))-1,s.next_in=m,s.next_out=g,s.avail_in=m<h?h-m+5:5-(m-h),s.avail_out=g<v?v-g+257:257-(g-v),f.hold=A,f.bits=k}},{}],49:[function(i,o,u){var s=i("../utils/common"),c=i("./adler32"),f=i("./crc32"),m=i("./inffast"),h=i("./inftrees"),g=1,y=2,v=0,b=-2,w=1,E=852,T=592;function _(D){return(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(D){var ne;return D&&D.state?(ne=D.state,D.total_in=D.total_out=ne.total=0,D.msg="",ne.wrap&&(D.adler=1&ne.wrap),ne.mode=w,ne.last=0,ne.havedict=0,ne.dmax=32768,ne.head=null,ne.hold=0,ne.bits=0,ne.lencode=ne.lendyn=new s.Buf32(E),ne.distcode=ne.distdyn=new s.Buf32(T),ne.sane=1,ne.back=-1,v):b}function q(D){var ne;return D&&D.state?((ne=D.state).wsize=0,ne.whave=0,ne.wnext=0,k(D)):b}function H(D,ne){var C,V;return D&&D.state?(V=D.state,ne<0?(C=0,ne=-ne):(C=1+(ne>>4),ne<48&&(ne&=15)),ne&&(ne<8||15<ne)?b:(V.window!==null&&V.wbits!==ne&&(V.window=null),V.wrap=C,V.wbits=ne,q(D))):b}function M(D,ne){var C,V;return D?(V=new A,(D.state=V).window=null,(C=H(D,ne))!==v&&(D.state=null),C):b}var I,Y,F=!0;function $(D){if(F){var ne;for(I=new s.Buf32(512),Y=new s.Buf32(32),ne=0;ne<144;)D.lens[ne++]=8;for(;ne<256;)D.lens[ne++]=9;for(;ne<280;)D.lens[ne++]=7;for(;ne<288;)D.lens[ne++]=8;for(h(g,D.lens,0,288,I,0,D.work,{bits:9}),ne=0;ne<32;)D.lens[ne++]=5;h(y,D.lens,0,32,Y,0,D.work,{bits:5}),F=!1}D.lencode=I,D.lenbits=9,D.distcode=Y,D.distbits=5}function ie(D,ne,C,V){var Z,Q=D.state;return Q.window===null&&(Q.wsize=1<<Q.wbits,Q.wnext=0,Q.whave=0,Q.window=new s.Buf8(Q.wsize)),V>=Q.wsize?(s.arraySet(Q.window,ne,C-Q.wsize,Q.wsize,0),Q.wnext=0,Q.whave=Q.wsize):(V<(Z=Q.wsize-Q.wnext)&&(Z=V),s.arraySet(Q.window,ne,C-V,Z,Q.wnext),(V-=Z)?(s.arraySet(Q.window,ne,C-V,V,0),Q.wnext=V,Q.whave=Q.wsize):(Q.wnext+=Z,Q.wnext===Q.wsize&&(Q.wnext=0),Q.whave<Q.wsize&&(Q.whave+=Z))),0}u.inflateReset=q,u.inflateReset2=H,u.inflateResetKeep=k,u.inflateInit=function(D){return M(D,15)},u.inflateInit2=M,u.inflate=function(D,ne){var C,V,Z,Q,se,de,L,N,B,z,re,ce,we,Te,ke,Ae,He,ve,ze,je,S,K,W,U,j=0,X=new s.Buf8(4),he=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!D||!D.state||!D.output||!D.input&&D.avail_in!==0)return b;(C=D.state).mode===12&&(C.mode=13),se=D.next_out,Z=D.output,L=D.avail_out,Q=D.next_in,V=D.input,de=D.avail_in,N=C.hold,B=C.bits,z=de,re=L,K=v;e:for(;;)switch(C.mode){case w:if(C.wrap===0){C.mode=13;break}for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(2&C.wrap&&N===35615){X[C.check=0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0),B=N=0,C.mode=2;break}if(C.flags=0,C.head&&(C.head.done=!1),!(1&C.wrap)||(((255&N)<<8)+(N>>8))%31){D.msg="incorrect header check",C.mode=30;break}if((15&N)!=8){D.msg="unknown compression method",C.mode=30;break}if(B-=4,S=8+(15&(N>>>=4)),C.wbits===0)C.wbits=S;else if(S>C.wbits){D.msg="invalid window size",C.mode=30;break}C.dmax=1<<S,D.adler=C.check=1,C.mode=512&N?10:12,B=N=0;break;case 2:for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(C.flags=N,(255&C.flags)!=8){D.msg="unknown compression method",C.mode=30;break}if(57344&C.flags){D.msg="unknown header flags set",C.mode=30;break}C.head&&(C.head.text=N>>8&1),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0)),B=N=0,C.mode=3;case 3:for(;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.head&&(C.head.time=N),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,X[2]=N>>>16&255,X[3]=N>>>24&255,C.check=f(C.check,X,4,0)),B=N=0,C.mode=4;case 4:for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.head&&(C.head.xflags=255&N,C.head.os=N>>8),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0)),B=N=0,C.mode=5;case 5:if(1024&C.flags){for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.length=N,C.head&&(C.head.extra_len=N),512&C.flags&&(X[0]=255&N,X[1]=N>>>8&255,C.check=f(C.check,X,2,0)),B=N=0}else C.head&&(C.head.extra=null);C.mode=6;case 6:if(1024&C.flags&&(de<(ce=C.length)&&(ce=de),ce&&(C.head&&(S=C.head.extra_len-C.length,C.head.extra||(C.head.extra=new Array(C.head.extra_len)),s.arraySet(C.head.extra,V,Q,ce,S)),512&C.flags&&(C.check=f(C.check,V,ce,Q)),de-=ce,Q+=ce,C.length-=ce),C.length))break e;C.length=0,C.mode=7;case 7:if(2048&C.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],C.head&&S&&C.length<65536&&(C.head.name+=String.fromCharCode(S)),S&&ce<de;);if(512&C.flags&&(C.check=f(C.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else C.head&&(C.head.name=null);C.length=0,C.mode=8;case 8:if(4096&C.flags){if(de===0)break e;for(ce=0;S=V[Q+ce++],C.head&&S&&C.length<65536&&(C.head.comment+=String.fromCharCode(S)),S&&ce<de;);if(512&C.flags&&(C.check=f(C.check,V,ce,Q)),de-=ce,Q+=ce,S)break e}else C.head&&(C.head.comment=null);C.mode=9;case 9:if(512&C.flags){for(;B<16;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(N!==(65535&C.check)){D.msg="header crc mismatch",C.mode=30;break}B=N=0}C.head&&(C.head.hcrc=C.flags>>9&1,C.head.done=!0),D.adler=C.check=0,C.mode=12;break;case 10:for(;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}D.adler=C.check=_(N),B=N=0,C.mode=11;case 11:if(C.havedict===0)return D.next_out=se,D.avail_out=L,D.next_in=Q,D.avail_in=de,C.hold=N,C.bits=B,2;D.adler=C.check=1,C.mode=12;case 12:if(ne===5||ne===6)break e;case 13:if(C.last){N>>>=7&B,B-=7&B,C.mode=27;break}for(;B<3;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}switch(C.last=1&N,B-=1,3&(N>>>=1)){case 0:C.mode=14;break;case 1:if($(C),C.mode=20,ne!==6)break;N>>>=2,B-=2;break e;case 2:C.mode=17;break;case 3:D.msg="invalid block type",C.mode=30}N>>>=2,B-=2;break;case 14:for(N>>>=7&B,B-=7&B;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if((65535&N)!=(N>>>16^65535)){D.msg="invalid stored block lengths",C.mode=30;break}if(C.length=65535&N,B=N=0,C.mode=15,ne===6)break e;case 15:C.mode=16;case 16:if(ce=C.length){if(de<ce&&(ce=de),L<ce&&(ce=L),ce===0)break e;s.arraySet(Z,V,Q,ce,se),de-=ce,Q+=ce,L-=ce,se+=ce,C.length-=ce;break}C.mode=12;break;case 17:for(;B<14;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(C.nlen=257+(31&N),N>>>=5,B-=5,C.ndist=1+(31&N),N>>>=5,B-=5,C.ncode=4+(15&N),N>>>=4,B-=4,286<C.nlen||30<C.ndist){D.msg="too many length or distance symbols",C.mode=30;break}C.have=0,C.mode=18;case 18:for(;C.have<C.ncode;){for(;B<3;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.lens[he[C.have++]]=7&N,N>>>=3,B-=3}for(;C.have<19;)C.lens[he[C.have++]]=0;if(C.lencode=C.lendyn,C.lenbits=7,W={bits:C.lenbits},K=h(0,C.lens,0,19,C.lencode,0,C.work,W),C.lenbits=W.bits,K){D.msg="invalid code lengths set",C.mode=30;break}C.have=0,C.mode=19;case 19:for(;C.have<C.nlen+C.ndist;){for(;Ae=(j=C.lencode[N&(1<<C.lenbits)-1])>>>16&255,He=65535&j,!((ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(He<16)N>>>=ke,B-=ke,C.lens[C.have++]=He;else{if(He===16){for(U=ke+2;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(N>>>=ke,B-=ke,C.have===0){D.msg="invalid bit length repeat",C.mode=30;break}S=C.lens[C.have-1],ce=3+(3&N),N>>>=2,B-=2}else if(He===17){for(U=ke+3;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}B-=ke,S=0,ce=3+(7&(N>>>=ke)),N>>>=3,B-=3}else{for(U=ke+7;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}B-=ke,S=0,ce=11+(127&(N>>>=ke)),N>>>=7,B-=7}if(C.have+ce>C.nlen+C.ndist){D.msg="invalid bit length repeat",C.mode=30;break}for(;ce--;)C.lens[C.have++]=S}}if(C.mode===30)break;if(C.lens[256]===0){D.msg="invalid code -- missing end-of-block",C.mode=30;break}if(C.lenbits=9,W={bits:C.lenbits},K=h(g,C.lens,0,C.nlen,C.lencode,0,C.work,W),C.lenbits=W.bits,K){D.msg="invalid literal/lengths set",C.mode=30;break}if(C.distbits=6,C.distcode=C.distdyn,W={bits:C.distbits},K=h(y,C.lens,C.nlen,C.ndist,C.distcode,0,C.work,W),C.distbits=W.bits,K){D.msg="invalid distances set",C.mode=30;break}if(C.mode=20,ne===6)break e;case 20:C.mode=21;case 21:if(6<=de&&258<=L){D.next_out=se,D.avail_out=L,D.next_in=Q,D.avail_in=de,C.hold=N,C.bits=B,m(D,re),se=D.next_out,Z=D.output,L=D.avail_out,Q=D.next_in,V=D.input,de=D.avail_in,N=C.hold,B=C.bits,C.mode===12&&(C.back=-1);break}for(C.back=0;Ae=(j=C.lencode[N&(1<<C.lenbits)-1])>>>16&255,He=65535&j,!((ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(Ae&&(240&Ae)==0){for(ve=ke,ze=Ae,je=He;Ae=(j=C.lencode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,He=65535&j,!(ve+(ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}N>>>=ve,B-=ve,C.back+=ve}if(N>>>=ke,B-=ke,C.back+=ke,C.length=He,Ae===0){C.mode=26;break}if(32&Ae){C.back=-1,C.mode=12;break}if(64&Ae){D.msg="invalid literal/length code",C.mode=30;break}C.extra=15&Ae,C.mode=22;case 22:if(C.extra){for(U=C.extra;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.length+=N&(1<<C.extra)-1,N>>>=C.extra,B-=C.extra,C.back+=C.extra}C.was=C.length,C.mode=23;case 23:for(;Ae=(j=C.distcode[N&(1<<C.distbits)-1])>>>16&255,He=65535&j,!((ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if((240&Ae)==0){for(ve=ke,ze=Ae,je=He;Ae=(j=C.distcode[je+((N&(1<<ve+ze)-1)>>ve)])>>>16&255,He=65535&j,!(ve+(ke=j>>>24)<=B);){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}N>>>=ve,B-=ve,C.back+=ve}if(N>>>=ke,B-=ke,C.back+=ke,64&Ae){D.msg="invalid distance code",C.mode=30;break}C.offset=He,C.extra=15&Ae,C.mode=24;case 24:if(C.extra){for(U=C.extra;B<U;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}C.offset+=N&(1<<C.extra)-1,N>>>=C.extra,B-=C.extra,C.back+=C.extra}if(C.offset>C.dmax){D.msg="invalid distance too far back",C.mode=30;break}C.mode=25;case 25:if(L===0)break e;if(ce=re-L,C.offset>ce){if((ce=C.offset-ce)>C.whave&&C.sane){D.msg="invalid distance too far back",C.mode=30;break}we=ce>C.wnext?(ce-=C.wnext,C.wsize-ce):C.wnext-ce,ce>C.length&&(ce=C.length),Te=C.window}else Te=Z,we=se-C.offset,ce=C.length;for(L<ce&&(ce=L),L-=ce,C.length-=ce;Z[se++]=Te[we++],--ce;);C.length===0&&(C.mode=21);break;case 26:if(L===0)break e;Z[se++]=C.length,L--,C.mode=21;break;case 27:if(C.wrap){for(;B<32;){if(de===0)break e;de--,N|=V[Q++]<<B,B+=8}if(re-=L,D.total_out+=re,C.total+=re,re&&(D.adler=C.check=C.flags?f(C.check,Z,re,se-re):c(C.check,Z,re,se-re)),re=L,(C.flags?N:_(N))!==C.check){D.msg="incorrect data check",C.mode=30;break}B=N=0}C.mode=28;case 28:if(C.wrap&&C.flags){for(;B<32;){if(de===0)break e;de--,N+=V[Q++]<<B,B+=8}if(N!==(4294967295&C.total)){D.msg="incorrect length check",C.mode=30;break}B=N=0}C.mode=29;case 29:K=1;break e;case 30:K=-3;break e;case 31:return-4;case 32:default:return b}return D.next_out=se,D.avail_out=L,D.next_in=Q,D.avail_in=de,C.hold=N,C.bits=B,(C.wsize||re!==D.avail_out&&C.mode<30&&(C.mode<27||ne!==4))&&ie(D,D.output,D.next_out,re-D.avail_out)?(C.mode=31,-4):(z-=D.avail_in,re-=D.avail_out,D.total_in+=z,D.total_out+=re,C.total+=re,C.wrap&&re&&(D.adler=C.check=C.flags?f(C.check,Z,re,D.next_out-re):c(C.check,Z,re,D.next_out-re)),D.data_type=C.bits+(C.last?64:0)+(C.mode===12?128:0)+(C.mode===20||C.mode===15?256:0),(z==0&&re===0||ne===4)&&K===v&&(K=-5),K)},u.inflateEnd=function(D){if(!D||!D.state)return b;var ne=D.state;return ne.window&&(ne.window=null),D.state=null,v},u.inflateGetHeader=function(D,ne){var C;return D&&D.state?(2&(C=D.state).wrap)==0?b:((C.head=ne).done=!1,v):b},u.inflateSetDictionary=function(D,ne){var C,V=ne.length;return D&&D.state?(C=D.state).wrap!==0&&C.mode!==11?b:C.mode===11&&c(1,ne,V,0)!==C.check?-3:ie(D,ne,V,V)?(C.mode=31,-4):(C.havedict=1,v):b},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(i,o,u){var s=i("../utils/common"),c=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];o.exports=function(g,y,v,b,w,E,T,_){var A,k,q,H,M,I,Y,F,$,ie=_.bits,D=0,ne=0,C=0,V=0,Z=0,Q=0,se=0,de=0,L=0,N=0,B=null,z=0,re=new s.Buf16(16),ce=new s.Buf16(16),we=null,Te=0;for(D=0;D<=15;D++)re[D]=0;for(ne=0;ne<b;ne++)re[y[v+ne]]++;for(Z=ie,V=15;1<=V&&re[V]===0;V--);if(V<Z&&(Z=V),V===0)return w[E++]=20971520,w[E++]=20971520,_.bits=1,0;for(C=1;C<V&&re[C]===0;C++);for(Z<C&&(Z=C),D=de=1;D<=15;D++)if(de<<=1,(de-=re[D])<0)return-1;if(0<de&&(g===0||V!==1))return-1;for(ce[1]=0,D=1;D<15;D++)ce[D+1]=ce[D]+re[D];for(ne=0;ne<b;ne++)y[v+ne]!==0&&(T[ce[y[v+ne]]++]=ne);if(I=g===0?(B=we=T,19):g===1?(B=c,z-=257,we=f,Te-=257,256):(B=m,we=h,-1),D=C,M=E,se=ne=N=0,q=-1,H=(L=1<<(Q=Z))-1,g===1&&852<L||g===2&&592<L)return 1;for(;;){for(Y=D-se,$=T[ne]<I?(F=0,T[ne]):T[ne]>I?(F=we[Te+T[ne]],B[z+T[ne]]):(F=96,0),A=1<<D-se,C=k=1<<Q;w[M+(N>>se)+(k-=A)]=Y<<24|F<<16|$|0,k!==0;);for(A=1<<D-1;N&A;)A>>=1;if(A!==0?(N&=A-1,N+=A):N=0,ne++,--re[D]==0){if(D===V)break;D=y[v+T[ne]]}if(Z<D&&(N&H)!==q){for(se===0&&(se=Z),M+=C,de=1<<(Q=D-se);Q+se<V&&!((de-=re[Q+se])<=0);)Q++,de<<=1;if(L+=1<<Q,g===1&&852<L||g===2&&592<L)return 1;w[q=N&H]=Z<<24|Q<<16|M-E|0}}return N!==0&&(w[M+N]=D-se<<24|4194304|0),_.bits=Z,0}},{"../utils/common":41}],51:[function(i,o,u){o.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(i,o,u){var s=i("../utils/common"),c=0,f=1;function m(j){for(var X=j.length;0<=--X;)j[X]=0}var h=0,g=29,y=256,v=y+1+g,b=30,w=19,E=2*v+1,T=15,_=16,A=7,k=256,q=16,H=17,M=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ie=new Array(2*(v+2));m(ie);var D=new Array(2*b);m(D);var ne=new Array(512);m(ne);var C=new Array(256);m(C);var V=new Array(g);m(V);var Z,Q,se,de=new Array(b);function L(j,X,he,pe,le){this.static_tree=j,this.extra_bits=X,this.extra_base=he,this.elems=pe,this.max_length=le,this.has_stree=j&&j.length}function N(j,X){this.dyn_tree=j,this.max_code=0,this.stat_desc=X}function B(j){return j<256?ne[j]:ne[256+(j>>>7)]}function z(j,X){j.pending_buf[j.pending++]=255&X,j.pending_buf[j.pending++]=X>>>8&255}function re(j,X,he){j.bi_valid>_-he?(j.bi_buf|=X<<j.bi_valid&65535,z(j,j.bi_buf),j.bi_buf=X>>_-j.bi_valid,j.bi_valid+=he-_):(j.bi_buf|=X<<j.bi_valid&65535,j.bi_valid+=he)}function ce(j,X,he){re(j,he[2*X],he[2*X+1])}function we(j,X){for(var he=0;he|=1&j,j>>>=1,he<<=1,0<--X;);return he>>>1}function Te(j,X,he){var pe,le,Ee=new Array(T+1),_e=0;for(pe=1;pe<=T;pe++)Ee[pe]=_e=_e+he[pe-1]<<1;for(le=0;le<=X;le++){var Se=j[2*le+1];Se!==0&&(j[2*le]=we(Ee[Se]++,Se))}}function ke(j){var X;for(X=0;X<v;X++)j.dyn_ltree[2*X]=0;for(X=0;X<b;X++)j.dyn_dtree[2*X]=0;for(X=0;X<w;X++)j.bl_tree[2*X]=0;j.dyn_ltree[2*k]=1,j.opt_len=j.static_len=0,j.last_lit=j.matches=0}function Ae(j){8<j.bi_valid?z(j,j.bi_buf):0<j.bi_valid&&(j.pending_buf[j.pending++]=j.bi_buf),j.bi_buf=0,j.bi_valid=0}function He(j,X,he,pe){var le=2*X,Ee=2*he;return j[le]<j[Ee]||j[le]===j[Ee]&&pe[X]<=pe[he]}function ve(j,X,he){for(var pe=j.heap[he],le=he<<1;le<=j.heap_len&&(le<j.heap_len&&He(X,j.heap[le+1],j.heap[le],j.depth)&&le++,!He(X,pe,j.heap[le],j.depth));)j.heap[he]=j.heap[le],he=le,le<<=1;j.heap[he]=pe}function ze(j,X,he){var pe,le,Ee,_e,Se=0;if(j.last_lit!==0)for(;pe=j.pending_buf[j.d_buf+2*Se]<<8|j.pending_buf[j.d_buf+2*Se+1],le=j.pending_buf[j.l_buf+Se],Se++,pe===0?ce(j,le,X):(ce(j,(Ee=C[le])+y+1,X),(_e=I[Ee])!==0&&re(j,le-=V[Ee],_e),ce(j,Ee=B(--pe),he),(_e=Y[Ee])!==0&&re(j,pe-=de[Ee],_e)),Se<j.last_lit;);ce(j,k,X)}function je(j,X){var he,pe,le,Ee=X.dyn_tree,_e=X.stat_desc.static_tree,Se=X.stat_desc.has_stree,te=X.stat_desc.elems,be=-1;for(j.heap_len=0,j.heap_max=E,he=0;he<te;he++)Ee[2*he]!==0?(j.heap[++j.heap_len]=be=he,j.depth[he]=0):Ee[2*he+1]=0;for(;j.heap_len<2;)Ee[2*(le=j.heap[++j.heap_len]=be<2?++be:0)]=1,j.depth[le]=0,j.opt_len--,Se&&(j.static_len-=_e[2*le+1]);for(X.max_code=be,he=j.heap_len>>1;1<=he;he--)ve(j,Ee,he);for(le=te;he=j.heap[1],j.heap[1]=j.heap[j.heap_len--],ve(j,Ee,1),pe=j.heap[1],j.heap[--j.heap_max]=he,j.heap[--j.heap_max]=pe,Ee[2*le]=Ee[2*he]+Ee[2*pe],j.depth[le]=(j.depth[he]>=j.depth[pe]?j.depth[he]:j.depth[pe])+1,Ee[2*he+1]=Ee[2*pe+1]=le,j.heap[1]=le++,ve(j,Ee,1),2<=j.heap_len;);j.heap[--j.heap_max]=j.heap[1],(function(Ce,Ie){var Je,pt,qt,Xe,gt,Ot,Ze=Ie.dyn_tree,Cn=Ie.max_code,nn=Ie.stat_desc.static_tree,zu=Ie.stat_desc.has_stree,xi=Ie.stat_desc.extra_bits,Xr=Ie.stat_desc.extra_base,jn=Ie.stat_desc.max_length,hn=0;for(Xe=0;Xe<=T;Xe++)Ce.bl_count[Xe]=0;for(Ze[2*Ce.heap[Ce.heap_max]+1]=0,Je=Ce.heap_max+1;Je<E;Je++)jn<(Xe=Ze[2*Ze[2*(pt=Ce.heap[Je])+1]+1]+1)&&(Xe=jn,hn++),Ze[2*pt+1]=Xe,Cn<pt||(Ce.bl_count[Xe]++,gt=0,Xr<=pt&&(gt=xi[pt-Xr]),Ot=Ze[2*pt],Ce.opt_len+=Ot*(Xe+gt),zu&&(Ce.static_len+=Ot*(nn[2*pt+1]+gt)));if(hn!==0){do{for(Xe=jn-1;Ce.bl_count[Xe]===0;)Xe--;Ce.bl_count[Xe]--,Ce.bl_count[Xe+1]+=2,Ce.bl_count[jn]--,hn-=2}while(0<hn);for(Xe=jn;Xe!==0;Xe--)for(pt=Ce.bl_count[Xe];pt!==0;)Cn<(qt=Ce.heap[--Je])||(Ze[2*qt+1]!==Xe&&(Ce.opt_len+=(Xe-Ze[2*qt+1])*Ze[2*qt],Ze[2*qt+1]=Xe),pt--)}})(j,X),Te(Ee,be,j.bl_count)}function S(j,X,he){var pe,le,Ee=-1,_e=X[1],Se=0,te=7,be=4;for(_e===0&&(te=138,be=3),X[2*(he+1)+1]=65535,pe=0;pe<=he;pe++)le=_e,_e=X[2*(pe+1)+1],++Se<te&&le===_e||(Se<be?j.bl_tree[2*le]+=Se:le!==0?(le!==Ee&&j.bl_tree[2*le]++,j.bl_tree[2*q]++):Se<=10?j.bl_tree[2*H]++:j.bl_tree[2*M]++,Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4))}function K(j,X,he){var pe,le,Ee=-1,_e=X[1],Se=0,te=7,be=4;for(_e===0&&(te=138,be=3),pe=0;pe<=he;pe++)if(le=_e,_e=X[2*(pe+1)+1],!(++Se<te&&le===_e)){if(Se<be)for(;ce(j,le,j.bl_tree),--Se!=0;);else le!==0?(le!==Ee&&(ce(j,le,j.bl_tree),Se--),ce(j,q,j.bl_tree),re(j,Se-3,2)):Se<=10?(ce(j,H,j.bl_tree),re(j,Se-3,3)):(ce(j,M,j.bl_tree),re(j,Se-11,7));Ee=le,be=(Se=0)===_e?(te=138,3):le===_e?(te=6,3):(te=7,4)}}m(de);var W=!1;function U(j,X,he,pe){re(j,(h<<1)+(pe?1:0),3),(function(le,Ee,_e,Se){Ae(le),z(le,_e),z(le,~_e),s.arraySet(le.pending_buf,le.window,Ee,_e,le.pending),le.pending+=_e})(j,X,he)}u._tr_init=function(j){W||((function(){var X,he,pe,le,Ee,_e=new Array(T+1);for(le=pe=0;le<g-1;le++)for(V[le]=pe,X=0;X<1<<I[le];X++)C[pe++]=le;for(C[pe-1]=le,le=Ee=0;le<16;le++)for(de[le]=Ee,X=0;X<1<<Y[le];X++)ne[Ee++]=le;for(Ee>>=7;le<b;le++)for(de[le]=Ee<<7,X=0;X<1<<Y[le]-7;X++)ne[256+Ee++]=le;for(he=0;he<=T;he++)_e[he]=0;for(X=0;X<=143;)ie[2*X+1]=8,X++,_e[8]++;for(;X<=255;)ie[2*X+1]=9,X++,_e[9]++;for(;X<=279;)ie[2*X+1]=7,X++,_e[7]++;for(;X<=287;)ie[2*X+1]=8,X++,_e[8]++;for(Te(ie,v+1,_e),X=0;X<b;X++)D[2*X+1]=5,D[2*X]=we(X,5);Z=new L(ie,I,y+1,v,T),Q=new L(D,Y,0,b,T),se=new L(new Array(0),F,0,w,A)})(),W=!0),j.l_desc=new N(j.dyn_ltree,Z),j.d_desc=new N(j.dyn_dtree,Q),j.bl_desc=new N(j.bl_tree,se),j.bi_buf=0,j.bi_valid=0,ke(j)},u._tr_stored_block=U,u._tr_flush_block=function(j,X,he,pe){var le,Ee,_e=0;0<j.level?(j.strm.data_type===2&&(j.strm.data_type=(function(Se){var te,be=4093624447;for(te=0;te<=31;te++,be>>>=1)if(1&be&&Se.dyn_ltree[2*te]!==0)return c;if(Se.dyn_ltree[18]!==0||Se.dyn_ltree[20]!==0||Se.dyn_ltree[26]!==0)return f;for(te=32;te<y;te++)if(Se.dyn_ltree[2*te]!==0)return f;return c})(j)),je(j,j.l_desc),je(j,j.d_desc),_e=(function(Se){var te;for(S(Se,Se.dyn_ltree,Se.l_desc.max_code),S(Se,Se.dyn_dtree,Se.d_desc.max_code),je(Se,Se.bl_desc),te=w-1;3<=te&&Se.bl_tree[2*$[te]+1]===0;te--);return Se.opt_len+=3*(te+1)+5+5+4,te})(j),le=j.opt_len+3+7>>>3,(Ee=j.static_len+3+7>>>3)<=le&&(le=Ee)):le=Ee=he+5,he+4<=le&&X!==-1?U(j,X,he,pe):j.strategy===4||Ee===le?(re(j,2+(pe?1:0),3),ze(j,ie,D)):(re(j,4+(pe?1:0),3),(function(Se,te,be,Ce){var Ie;for(re(Se,te-257,5),re(Se,be-1,5),re(Se,Ce-4,4),Ie=0;Ie<Ce;Ie++)re(Se,Se.bl_tree[2*$[Ie]+1],3);K(Se,Se.dyn_ltree,te-1),K(Se,Se.dyn_dtree,be-1)})(j,j.l_desc.max_code+1,j.d_desc.max_code+1,_e+1),ze(j,j.dyn_ltree,j.dyn_dtree)),ke(j),pe&&Ae(j)},u._tr_tally=function(j,X,he){return j.pending_buf[j.d_buf+2*j.last_lit]=X>>>8&255,j.pending_buf[j.d_buf+2*j.last_lit+1]=255&X,j.pending_buf[j.l_buf+j.last_lit]=255&he,j.last_lit++,X===0?j.dyn_ltree[2*he]++:(j.matches++,X--,j.dyn_ltree[2*(C[he]+y+1)]++,j.dyn_dtree[2*B(X)]++),j.last_lit===j.lit_bufsize-1},u._tr_align=function(j){re(j,2,3),ce(j,k,ie),(function(X){X.bi_valid===16?(z(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):8<=X.bi_valid&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)})(j)}},{"../utils/common":41}],53:[function(i,o,u){o.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(i,o,u){(function(s){(function(c,f){if(!c.setImmediate){var m,h,g,y,v=1,b={},w=!1,E=c.document,T=Object.getPrototypeOf&&Object.getPrototypeOf(c);T=T&&T.setTimeout?T:c,m={}.toString.call(c.process)==="[object process]"?function(q){process.nextTick(function(){A(q)})}:(function(){if(c.postMessage&&!c.importScripts){var q=!0,H=c.onmessage;return c.onmessage=function(){q=!1},c.postMessage("","*"),c.onmessage=H,q}})()?(y="setImmediate$"+Math.random()+"$",c.addEventListener?c.addEventListener("message",k,!1):c.attachEvent("onmessage",k),function(q){c.postMessage(y+q,"*")}):c.MessageChannel?((g=new MessageChannel).port1.onmessage=function(q){A(q.data)},function(q){g.port2.postMessage(q)}):E&&"onreadystatechange"in E.createElement("script")?(h=E.documentElement,function(q){var H=E.createElement("script");H.onreadystatechange=function(){A(q),H.onreadystatechange=null,h.removeChild(H),H=null},h.appendChild(H)}):function(q){setTimeout(A,0,q)},T.setImmediate=function(q){typeof q!="function"&&(q=new Function(""+q));for(var H=new Array(arguments.length-1),M=0;M<H.length;M++)H[M]=arguments[M+1];var I={callback:q,args:H};return b[v]=I,m(v),v++},T.clearImmediate=_}function _(q){delete b[q]}function A(q){if(w)setTimeout(A,0,q);else{var H=b[q];if(H){w=!0;try{(function(M){var I=M.callback,Y=M.args;switch(Y.length){case 0:I();break;case 1:I(Y[0]);break;case 2:I(Y[0],Y[1]);break;case 3:I(Y[0],Y[1],Y[2]);break;default:I.apply(f,Y)}})(H)}finally{_(q),w=!1}}}}function k(q){q.source===c&&typeof q.data=="string"&&q.data.indexOf(y)===0&&A(+q.data.slice(y.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Rl<"u"?Rl:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(qs)),qs.exports}var Lh;function qS(){if(Lh)return Fr;Lh=1;var n=Fr&&Fr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.Filemanager=void 0;const l=n(HS()),i=Rn();class o{pendingFiles=[];pendingMessage="";pendingFormat="";setFilesForUpload(s,c){this.pendingFiles.length>0&&this.clearPendingFilesState();const f=s.filter(m=>this.validateFileType(m));if(f.length===0)throw new i.FileError("No valid files provided",{context:{stage:"setFilesForUpload"}});this.pendingFiles=f,c&&c.trim()&&(this.pendingMessage=c),this.pendingFormat=f.length>1?"zip":f?.[0]?.type?.split("/")?.[1]||"unknown"}getPendingFileState(){return{files:this.pendingFiles,message:this.pendingMessage||"",format:this.pendingFormat||""}}async uploadFilesToPresignedUrl(s){let c=0;const f=s.filter(m=>m&&m.trim());try{if(f.length===0)throw new i.FileError("No valid presigned URLs provided",{context:{stage:"uploadFilesToPresignedUrl"}});let m,h;if(this.shouldZipFiles()){const g=await this.zipFiles(),y=this.getUploadFileName();m=this.blobToFile(g,y),h="application/zip"}else m=this.pendingFiles?.[0],h=m.type;for(let g=0;g<f.length;g++){const y=f[g],v=await fetch(y,{method:"PUT",body:m,headers:{"Content-Type":h,"x-ms-blob-type":"BlockBlob"}});if(!v.ok)throw new i.FileError(`Failed to upload ${m.name} to URL ${g+1}: ${v.status} ${v.statusText}`,{context:{stage:"uploadFilesToPresignedUrl",status:v.status,url:y}});c++}return f[0]}catch(m){if(c>0)return f[0];throw(0,i.normalizeError)(m,i.FileError,"Failed to upload files to presigned URL",{context:{stage:"uploadFilesToPresignedUrl"}})}}async zipFiles(){const s=new l.default;return this.pendingFiles.forEach(f=>{s.file(f.name,f)}),await s.generateAsync({type:"blob"})}blobToFile(s,c){return new File([s],c,{type:s.type})}shouldZipFiles(){return this.pendingFiles.length>1}getUploadFileName(){return this.shouldZipFiles()?`uploaded_files_${Date.now()}.zip`:this.pendingFiles[0]?.name||"file"}validateFileType(s){return["application/pdf","image/jpeg","image/png","image/jpg","image/tiff","text/plain","text/markdown","image/heif","image/heic","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(s.type)}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormat=""}}return Fr.Filemanager=o,Fr}var wn={},Ih;function Pl(){if(Ih)return wn;Ih=1,Object.defineProperty(wn,"__esModule",{value:!0}),wn.SYNAPSE_REALTIME_RESERVED_EVENTS=wn.SYNAPSE_REALTIME_ERROR_CODES=wn.SYNAPSE_REALTIME_EVENTS=wn.SYNAPSE_MESSAGE_TYPES=void 0;const n=Hs();return wn.SYNAPSE_MESSAGE_TYPES=n.SOCKET_CONTENT_TYPES,wn.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",INLINE_TEXT:"inline_text",TOOL_START:"tool_start",TOOL_END:"tool_end"},wn.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"},wn.SYNAPSE_REALTIME_RESERVED_EVENTS={SESSION_EXPIRED:"session_expired"},wn}var Ca={},Bh;function PS(){if(Bh)return Ca;Bh=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.AudioManager=void 0;const n=Rn();class l{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,u){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 s=["audio/mp3","audio/ogg;codecs=opus","audio/mp4","audio/ogg","audio/wav"].filter(c=>MediaRecorder.isTypeSupported(c));if(s.length===0)throw new n.RecordingError("No supported audio formats found in this browser",{context:{requestedTypes:s},hint:"Verify codec support or adjust the requested MIME types.",displayMessage:"Microphone access is unavailable."});if(this.config.mimeType=s[0],await this.checkCurrentPermissionState(),this.onAudioData=o,this.onAudioError=u??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(s){throw this.toRecordingError(s,"Failed to start audio recording",{stage:"start"})}}async processAudioChunk(o){try{const u=await this.blobToBase64(o),s=Date.now();if(!this.onAudioData)return;const c={audio:u,format:this.config.mimeType,duration:this.recordingStartTime>0?s-this.recordingStartTime:0,timestamp:this.recordingStartTime>0?this.recordingStartTime:s};this.onAudioData(c)}catch(u){this.handleError(u,{stage:"process_audio_chunk"})}}toRecordingError(o,u,s){if(o instanceof n.RecordingError)return o;if(o instanceof n.SynapseError)return new n.RecordingError(o.message,{cause:o,context:{...o.context,...s},hint:o.hint});const c=o instanceof Error&&o.message?o.message:u;return new n.RecordingError(c,{cause:o,context:s})}handleError(o,u){const s=this.toRecordingError(o,"Unexpected recording error",u);if(this.onAudioError)try{this.onAudioError(s)}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(u=>this.handleError(u,{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((u,s)=>{const c=new FileReader;c.onload=()=>{if(typeof c.result=="string"){const f=c.result.split(",")[1];u(f)}else s(new n.RecordingError("Failed to convert blob to base64",{context:{stage:"blob_to_base64"}}))},c.onerror=()=>s(new n.RecordingError("FileReader error while converting audio chunk to base64",{cause:c.error??void 0,context:{stage:"blob_to_base64"}})),c.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 Ca.AudioManager=l,Ca}var Uh;function Hh(){if(Uh)return wa;Uh=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.MessageManager=void 0;const n=Hs(),l=qS(),i=Pl(),o=PS(),u=Rn();let s=class{connection=null;callbacks=null;fileManager=null;audioManager=null;constructor(f,m){this.connection=f||null,this.callbacks=m||null}handleFileUploadProcess({files:f,message:m,url:h}){this.fileManager||(this.fileManager=new l.Filemanager);let g;if(f&&f.length>0)this.fileManager.setFilesForUpload(f,m),g={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.FILE,_id:Date.now().toString(),ts:Date.now(),data:{extension:this.fileManager.getPendingFileState().format}};else if(h){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:{url:h,...y&&{text:y}}},this.fileManager?.clearPendingFilesState()}return g}sendSocketMessage({message:f,files:m,audio:h,url:g,tool_declined:y,tool_id:v,initial_prompts:b}){const w=this.assertConnection("sendSocketChatMessage");let E;if(m&&m.length>0||g&&g.trim()!==""?E=this.handleFileUploadProcess({files:m,message:f,url:g}):f?E={ev:n.SOCKET_EVENTS.CHAT,ct:n.SOCKET_CONTENT_TYPES.TEXT,_id:Date.now().toString(),ts:Date.now(),data:{text:f,...y&&{tool_declined:y},...v&&{tool_id:v},...b&&{initial_prompts:b}}}:h&&h?.audio&&h?.format&&(E={ev:n.SOCKET_EVENTS.STREAM,ct:n.SOCKET_CONTENT_TYPES.AUDIO,_id:Date.now().toString(),ts:Date.now(),data:{audio:h?.audio,format:h?.format}}),!E){const T=new u.MessageError("No message to send",{context:{stage:"sendSocketChatMessage"}});throw this.emitError(T),T}w.sendMessage(E)}handleIncomingSocketChatMessage(f){const m=this.assertConnection("handleIncomingSocketChatMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.FILE:{f?.data?.urls&&f.data.urls?.length>0&&this.fileManager?.uploadFilesToPresignedUrl(f.data.urls).then(()=>{this.sendSocketMessage({url:f.data.urls?.[0]})}).catch(h=>{const g=this.toFileError(h,"Failed to upload files to presigned URL",{stage:"handleIncomingSocketChatMessage",urls:f.data?.urls?.length});this.emitError(g)});break}case n.SOCKET_CONTENT_TYPES.TEXT:if(f.data.text&&f.data.text.trim()===""&&f._id){const h={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,h)}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const h={data:{...f.data},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,h)}break;case n.SOCKET_CONTENT_TYPES.INLINE_TEXT:if(f?.data?.text){const h={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,h)}break}}handleIncomingSocketStreamMessage(f){const m=this.assertConnection("handleIncomingSocketStreamMessage");switch(f.ct){case n.SOCKET_CONTENT_TYPES.TEXT:if(f?.data?.progress_msg){const v={data:{text:f.data.progress_msg},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,v);return}if(f?.data?.text){const v={data:{text:f.data.text},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,v)}break;case n.SOCKET_CONTENT_TYPES.TIPS:if(f?.data?.tips){const v={data:{tips:f.data.tips},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.TIPS_MESSAGE,v);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_CALL:if(f?.data?.tool_id&&f._id){const v={data:{...f.data},messageId:f._id,timestamp:f.ts};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,v);return}break;case n.SOCKET_CONTENT_TYPES.TOOL_START:const h={data:f?.data,messageId:f._id||Date.now().toString()};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_START,h);break;case n.SOCKET_CONTENT_TYPES.TOOL_END:const g={data:f?.data,messageId:f._id||Date.now().toString()};m.emit(i.SYNAPSE_REALTIME_EVENTS.TOOL_END,g);break;default:const y=new u.MessageError(`Unsupported content type ${f?.ct}`,{context:{stage:"handleIncomingSocketStreamMessage",contentType:f.ct}});throw this.emitError(y),y}}handleDisconnect(f){this.connection?.emit?.(i.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,f)}handleIncomingSocketEndOfStreamMessage(f){this.assertConnection("handleIncomingSocketEndOfStreamMessage").emit(i.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM)}handleIncomingSocketErrorMessage(f){const m=this.assertConnection("handleIncomingSocketErrorMessage");switch(f.code){case i.SYNAPSE_REALTIME_ERROR_CODES.SESSION_EXPIRED:m.emit(i.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED);break;default:const h=new u.MessageError(f.msg||"Socket error received",{context:{stage:"handleIncomingSocketErrorMessage",errorCode:f.code}});m.emit(i.SYNAPSE_REALTIME_EVENTS.ERROR,h),this.emitError(h)}}sendSocketAuthMessage(f){const m=this.assertConnection("sendSocketAuthMessage"),h={ev:n.SOCKET_EVENTS.AUTH,_id:Date.now().toString(),ts:Date.now(),data:{token:f}};m.sendMessage(h)}sendSocketPingMessage(){const f=this.assertConnection("sendSocketPingMessage"),m={ev:n.SOCKET_EVENTS.PING,_id:Date.now().toString(),ts:Date.now()};f.sendMessage(m)}async startRecording({onChunks:f,onError:m}){if(!f){const h=new u.RecordingError("onChunks is required",{context:{stage:"startRecording"},hint:"onChunks is required"});throw this.emitError(h),h}this.assertConnection("startRecording"),this.audioManager||(this.audioManager=new o.AudioManager);try{await this.audioManager.start(f,h=>{const g=this.toRecordingError(h,"Failed to start audio recording",{stage:"startRecording"});m?.(g),this.emitError(g)})}catch(h){const g=this.toRecordingError(h,"Failed to start audio recording",{stage:"startRecording"});throw m?.(g),this.emitError(g),g}}endRecordingWithSocket(){if(!this.audioManager){const f=new u.RecordingError("Audio manager not set. Call startRecording() first.",{context:{stage:"stopRecording"}});throw this.emitError(f),f}try{this.audioManager.stop()}catch(f){const m=this.toRecordingError(f,"Failed to stop audio recording",{stage:"stopRecording"});throw this.emitError(m),m}}sendSocketPongMessage(){const f=this.assertConnection("sendSocketPongMessage"),m={ev:n.SOCKET_EVENTS.PONG,_id:Date.now().toString(),ts:Date.now()};f.sendMessage(m)}handleConnectionEstablished(){this.connection?.handleConnected(),this.connection?.emit(i.SYNAPSE_REALTIME_EVENTS.CONNECTED)}cleanupMessageServerState(){this.fileManager&&(this.fileManager.clearPendingFilesState(),this.fileManager=null),this.audioManager&&(this.audioManager.destroy(),this.audioManager=null)}emitError(f){this.callbacks?.onError?.(f)}toFileError(f,m,h,g){return(0,u.normalizeError)(f,u.FileError,m,{context:h,hint:g})}toRecordingError(f,m,h,g){return(0,u.normalizeError)(f,u.RecordingError,m,{context:h,hint:g})}assertConnection(f){if(!this.connection){const m=new u.ConnectionError("Connection not set. Please ensure the connection is established before calling this method.",{context:{stage:f}});throw this.emitError(m),m}return this.connection}};return wa.MessageManager=s,wa}var Ta={},qh;function Ph(){if(qh)return Ta;qh=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.ErrorUtils=void 0;const n=Rn();class l{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 l.isNetworkError(o)?"Unable to connect to the server. Please check your internet connection.":l.isTimeoutError(o)?"Request timed out. Please try again.":l.isAuthError(o)?"Authentication failed. Please log in again.":l.isServerError(o)?"Server error occurred. Please try again later.":l.isAPIError(o)||o instanceof Error?o.message:"An unexpected error occurred."}static getErrorDetails(o){return l.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 Ta.ErrorUtils=l,Ta}var Fh;function FS(){if(Fh)return pa;Fh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.SynapseSDK=void 0;const n=Sh(),l=US(),i=Mh(),o=Hh(),u=Pl(),s=Ph(),c=Rn(),f=Hs();class m{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,l.getConfig)(this.config?.environment).BASE_API_URL;this.resourceManager=new i.ResourceManager({agentId:this.config.agentId,serverUrl:y})}async startSession(g){try{const y=await this.manageSession(g);return await this.initializeConnection(y),this.setupEventHandlers(),y}catch(y){const v=s.ErrorUtils.getUserFriendlyMessage(y),b=s.ErrorUtils.getErrorDetails(y),w=this.toSessionError(y,v||"Failed to start session",{stage:"startSession",details:b},"Check network connectivity or refresh credentials before retrying.");throw this.emitError(w),w}}async sendMessage({message:g,files:y,audio:v,tool_declined:b,tool_id:w,initial_prompts:E}){if(!this.connection){const T=new c.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(T),T}switch(this.connectionType){case n.ConnectionType.SOCKET:this.messageManager.sendSocketMessage({message:g,files:y,audio:v,...b&&{tool_declined:b},...w&&{tool_id:w},...E?.length&&{initial_prompts:E}});break;default:const T=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendChatMessage",connectionType:this.connectionType}});throw this.emitError(T),T}}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 c.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 v=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(v),v}if(!this.sessionConfig?.session_id){const v=new c.SessionError("Session ID not found",{context:{stage:"callTool"},hint:"Call startSession() before attempting to call tool."});throw this.emitError(v),v}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 c.APIError(b.err.msg,500,b.err);return b}catch(b){if(b instanceof c.APIError&&b?.status===401)return await this.handleSessionExpiry(),await this.callTool(g,y);throw b}default:const v=new c.ConnectionError("Unsupported connection type",{context:{stage:"callTool",connectionType:this.connectionType}});throw this.emitError(v),v}}async startRecording({onChunks:g,onError:y}){if(!this.connection){const v=new c.ConnectionError("Connection not established. Session may not be initialized.",{context:{stage:"sendAudio"},hint:"Call startSession() before attempting to send audio."});throw this.emitError(v),v}switch(this.connectionType){case n.ConnectionType.SOCKET:try{await this.messageManager.startRecording({onChunks:g,onError:y})}catch(b){throw b}break;default:const v=new c.ConnectionError("Unsupported connection type",{context:{stage:"sendAudio",connectionType:this.connectionType}});throw this.emitError(v),v}}endRecording(){if(!this.connection){const g=new c.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 c.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,v,b){return(0,c.normalizeError)(g,c.SessionError,y,{context:v,hint:b})}async initializeConnection(g){if(this.connection&&(this.connection.close(),this.connection=null),!g.session_id||!g.session_token)throw new c.SessionError("Session ID or token not found",{context:{stage:"initializeConnection"},hint:"Ensure the session API returns both identifiers."});this.sessionConfig=g;const y=(0,l.getConfig)(this.config?.environment).WEBSOCKET_URL,v=(this.config.connectionType==="socket",n.ConnectionType.SOCKET);this.connection=await n.ConnectionFactory.createConnection(v,{serverUrl: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 c.APIError){const v=y.status;if(v===404||v===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(v){if(v instanceof c.APIError){this.emitError(v);const b=v.status;if(b===404||b===500)return this.createNewSession()}throw this.toSessionError(v,"Failed to refresh session",{stage:"refreshSession",sessionId:g})}}async createNewSession(){return await this.resourceManager.createSession(this.config.userId||Date.now().toString())}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(u.SYNAPSE_REALTIME_RESERVED_EVENTS.SESSION_EXPIRED,()=>{this.handleSessionExpiry()});break;default:throw new c.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(u.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 c.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 f.SOCKET_EVENTS.CHAT:this.messageManager.handleIncomingSocketChatMessage(g);break;case f.SOCKET_EVENTS.CONNECTION_ESTABLISHED:this.messageManager.handleConnectionEstablished();break;case f.SOCKET_EVENTS.STREAM:this.messageManager.handleIncomingSocketStreamMessage(g);break;case f.SOCKET_EVENTS.END_OF_STREAM:this.messageManager.handleIncomingSocketEndOfStreamMessage(g);break;case f.SOCKET_EVENTS.PING:this.messageManager.sendSocketPongMessage();break;case f.SOCKET_EVENTS.PONG:this.messageManager.sendSocketPingMessage();break;case f.SOCKET_EVENTS.SYNC:break;case f.SOCKET_EVENTS.ERROR:this.messageManager.handleIncomingSocketErrorMessage(g);break;default:const y=new c.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 c.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 c.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,v,b){return(0,c.normalizeError)(g,c.ConnectionError,y,{context:v,hint:b})}}return pa.SynapseSDK=m,pa}var Ps={},Yh;function YS(){return Yh||(Yh=1,Object.defineProperty(Ps,"__esModule",{value:!0})),Ps}var Aa={},Vh;function VS(){return Vh||(Vh=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.USER_FEEDBACK=void 0,Aa.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Aa}var Fs={},Gh;function GS(){return Gh||(Gh=1,Object.defineProperty(Fs,"__esModule",{value:!0})),Fs}var ka={},Xh;function XS(){return Xh||(Xh=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.ErrorType=void 0,ka.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"}),ka}var Ys={},Zh;function ZS(){return Zh||(Zh=1,Object.defineProperty(Ys,"__esModule",{value:!0})),Ys}var Kh;function KS(){return Kh||(Kh=1,(function(n){var l=Hr&&Hr.__createBinding||(Object.create?(function(T,_,A,k){k===void 0&&(k=A);var q=Object.getOwnPropertyDescriptor(_,A);(!q||("get"in q?!_.__esModule:q.writable||q.configurable))&&(q={enumerable:!0,get:function(){return _[A]}}),Object.defineProperty(T,k,q)}):(function(T,_,A,k){k===void 0&&(k=A),T[k]=_[A]})),i=Hr&&Hr.__exportStar||function(T,_){for(var A in T)A!=="default"&&!Object.prototype.hasOwnProperty.call(_,A)&&l(_,T,A)};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=FS();Object.defineProperty(n,"SynapseSDK",{enumerable:!0,get:function(){return o.SynapseSDK}});var u=ph();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return u.BaseConnection}});var s=bh();Object.defineProperty(n,"WebSocketConnection",{enumerable:!0,get:function(){return s.WebSocketConnection}});var c=Sh();Object.defineProperty(n,"ConnectionFactory",{enumerable:!0,get:function(){return c.ConnectionFactory}}),Object.defineProperty(n,"ConnectionType",{enumerable:!0,get:function(){return c.ConnectionType}}),i(Is(),n);var f=Mh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return f.ResourceManager}}),i(YS(),n);var m=Ah();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return m.Session}}),i(VS(),n);var h=Oh();Object.defineProperty(n,"ToolCall",{enumerable:!0,get:function(){return h.ToolCall}}),i(Nh(),n);var g=Hh();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return g.MessageManager}}),i(Pl(),n),i(GS(),n);var y=_h();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return y.HttpClient}});var v=Rn();Object.defineProperty(n,"SynapseError",{enumerable:!0,get:function(){return v.SynapseError}}),Object.defineProperty(n,"APIError",{enumerable:!0,get:function(){return v.APIError}}),Object.defineProperty(n,"APIUserAbortError",{enumerable:!0,get:function(){return v.APIUserAbortError}}),Object.defineProperty(n,"APIConnectionTimeoutError",{enumerable:!0,get:function(){return v.APIConnectionTimeoutError}}),Object.defineProperty(n,"BadRequestError",{enumerable:!0,get:function(){return v.BadRequestError}}),Object.defineProperty(n,"UnauthorizedError",{enumerable:!0,get:function(){return v.UnauthorizedError}}),Object.defineProperty(n,"PermissionDeniedError",{enumerable:!0,get:function(){return v.PermissionDeniedError}}),Object.defineProperty(n,"NotFoundError",{enumerable:!0,get:function(){return v.NotFoundError}}),Object.defineProperty(n,"MethodNotAllowedError",{enumerable:!0,get:function(){return v.MethodNotAllowedError}}),Object.defineProperty(n,"RateLimitError",{enumerable:!0,get:function(){return v.RateLimitError}}),Object.defineProperty(n,"InternalServerError",{enumerable:!0,get:function(){return v.InternalServerError}}),Object.defineProperty(n,"SynapseErrorCode",{enumerable:!0,get:function(){return v.SynapseErrorCode}});var b=XS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var w=Ph();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return w.ErrorUtils}}),i(ZS(),n);var E=Pl();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return E.SYNAPSE_MESSAGE_TYPES}})})(Hr)),Hr}var Ge=KS();const Qh=n=>{let l;const i=new Set,o=(h,g)=>{const y=typeof h=="function"?h(l):h;if(!Object.is(y,l)){const v=l;l=g??(typeof y!="object"||y===null)?y:Object.assign({},l,y),i.forEach(b=>b(l,v))}},u=()=>l,f={setState:o,getState:u,getInitialState:()=>m,subscribe:h=>(i.add(h),()=>i.delete(h))},m=l=n(o,u,f);return f},QS=(n=>n?Qh(n):Qh),JS=n=>n;function WS(n,l=JS){const i=sa.useSyncExternalStore(n.subscribe,sa.useCallback(()=>l(n.getState()),[n,l]),sa.useCallback(()=>l(n.getInitialState()),[n,l]));return sa.useDebugValue(i),i}const $S=n=>{const l=QS(n),i=o=>WS(l,o);return Object.assign(i,l),i},e1=(n=>$S);function Jh(n,l){let i;try{i=n()}catch{return}return{getItem:u=>{var s;const c=m=>m===null?null:JSON.parse(m,void 0),f=(s=i.getItem(u))!=null?s:null;return f instanceof Promise?f.then(c):c(f)},setItem:(u,s)=>i.setItem(u,JSON.stringify(s,void 0)),removeItem:u=>i.removeItem(u)}}const Vs=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(o){return Vs(o)(i)},catch(o){return this}}}catch(i){return{then(o){return this},catch(o){return Vs(o)(i)}}}},t1=(n,l)=>(i,o,u)=>{let s={storage:Jh(()=>localStorage),partialize:E=>E,version:0,merge:(E,T)=>({...T,...E}),...l},c=!1;const f=new Set,m=new Set;let h=s.storage;if(!h)return n((...E)=>{i(...E)},o,u);const g=()=>{const E=s.partialize({...o()});return h.setItem(s.name,{state:E,version:s.version})},y=u.setState;u.setState=(E,T)=>(y(E,T),g());const v=n((...E)=>(i(...E),g()),o,u);u.getInitialState=()=>v;let b;const w=()=>{var E,T;if(!h)return;c=!1,f.forEach(A=>{var k;return A((k=o())!=null?k:v)});const _=((T=s.onRehydrateStorage)==null?void 0:T.call(s,(E=o())!=null?E:v))||void 0;return Vs(h.getItem.bind(h))(s.name).then(A=>{if(A)if(typeof A.version=="number"&&A.version!==s.version){if(s.migrate){const k=s.migrate(A.state,A.version);return k instanceof Promise?k.then(q=>[!0,q]):[!0,k]}}else return[!1,A.state];return[!1,void 0]}).then(A=>{var k;const[q,H]=A;if(b=s.merge(H,(k=o())!=null?k:v),i(b,!0),q)return g()}).then(()=>{_?.(b,void 0),b=o(),c=!0,m.forEach(A=>A(b))}).catch(A=>{_?.(void 0,A)})};return u.persist={setOptions:E=>{s={...s,...E},E.storage&&(h=E.storage)},clearStorage:()=>{h?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>w(),hasHydrated:()=>c,onHydrate:E=>(f.add(E),()=>{f.delete(E)}),onFinishHydration:E=>(m.add(E),()=>{m.delete(E)})},s.skipHydration||w(),b||v},On={USER:"user",ASSISTANT:"assistant"};var Ft=(n=>(n.IDLE="idle",n.LISTENING="listening",n.ERROR="error",n.PROCESSING="processing",n.TRANSCRIBING="transcribing",n))(Ft||{});const n1={sessionId:"",sessionToken:"",isStreaming:!1,recordingStatus:Ft.IDLE,isWaitingForResponse:!1,error:null,isTimeoutError:!1,startNewConnection:!1,showRetryButton:!1,chats:{},inlineText:null,isRefreshingSession:!1,ConnectionStatus:Ge.ConnectionStatus.CONNECTING,streamingTimeoutId:null,responseTimeoutId:null,lastStreamingActivity:null,progressMessage:null},Yr=e1()(t1((n,l)=>({sessionId:"",setSessionId:i=>n({sessionId:i}),sessionToken:"",setSessionToken:i=>n({sessionToken:i}),initialMessage:null,setInitialMessage:i=>n({initialMessage:i}),agentId:"",setAgentId:i=>n({agentId:i}),connectionStatus:Ge.ConnectionStatus.CONNECTING,setConnectionStatus:i=>n({connectionStatus:i}),isStreaming:!1,setIsStreaming:i=>n({isStreaming:i}),isWaitingForResponse:!1,setIsWaitingForResponse:i=>n({isWaitingForResponse:i}),progressMessage:null,setProgressMessage:i=>n({progressMessage:i}),recordingStatus:Ft.IDLE,setRecordingStatus:i=>n({recordingStatus:i}),startNewConnection:!1,setStartNewConnection:i=>n({startNewConnection:i}),inlineText:null,setInlineText:i=>n({inlineText:i}),isBotIconAnimating:!1,setIsBotIconAnimating:i=>n({isBotIconAnimating:i}),chats:{},addMessageToSession:(i,o)=>{n(u=>({chats:{...u.chats,[i]:[...u.chats[i]||[],o]}}))},updateMessageInSession:(i,o,u)=>n(s=>({chats:{...s.chats,[i]:(s.chats[i]||[]).map(c=>c.id===o?{...c,...u}:c)}})),getMessagesForSession:i=>l().chats[i]||[],clearMessagesForSession:i=>n(o=>({chats:{...o.chats,[i]:[]}})),clearAllChats:()=>n({chats:{}}),error:null,setError:i=>n({error:i}),clearError:()=>n({error:null,isTimeoutError:!1,showRetryButton:!1,startNewConnection:!1}),showRetryButton:!1,setShowRetryButton:i=>n({showRetryButton:i}),isTimeoutError:!1,setTimeoutError:i=>n({isTimeoutError:i}),clearSession:async()=>{n(n1),await localStorage.removeItem("med-assist-store")},streamingTimeoutId:null,setStreamingTimeoutId:i=>n({streamingTimeoutId:i}),clearStreamingTimeout:()=>{const i=l();i.streamingTimeoutId&&(clearTimeout(i.streamingTimeoutId),n({streamingTimeoutId:null}))},responseTimeoutId:null,setResponseTimeoutId:i=>n({responseTimeoutId:i}),clearResponseTimeout:()=>{const i=l();i.responseTimeoutId&&(clearTimeout(i.responseTimeoutId),n({responseTimeoutId:null}))},lastStreamingActivity:null,setLastStreamingActivity:i=>n({lastStreamingActivity:i})}),{name:"med-assist-store",storage:Jh(()=>localStorage),partialize:n=>({agentId:n.agentId,chats:n.chats,sessionId:n.sessionId,sessionToken:n.sessionToken,initialMessage:n.initialMessage,connectionStatus:n.connectionStatus})}));function r1({onClose:n,title:l,iconUrl:i,startNewConversation:o}){const u=Yr(f=>f.connectionStatus),c=(()=>{switch(u){case Ge.ConnectionStatus.CONNECTED:return{dotColor:"bg-green-500",text:"Connected",textColor:"text-green-600"};case Ge.ConnectionStatus.CONNECTING:return{dotColor:"bg-amber-500",text:"Connecting",textColor:"text-amber-600"};case Ge.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 O.jsx("div",{className:"bg-lavender-100/95 backdrop-blur-md shadow-lg border-b border-lavender-200/60 px-6 py-2",children:O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsxs("div",{className:"relative flex-shrink-0",children:[O.jsx(ha,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:O.jsx(ma,{className:"text-white font-bold text-lg bg-transparent",children:i?O.jsx("img",{src:i,alt:"Bot Icon",className:"w-12 h-12 rounded-full object-cover"}):O.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),O.jsx("div",{className:Ye("absolute bottom-0 right-0 w-3.5 h-3.5 rounded-full border-2 border-white shadow-sm",c.dotColor,u===Ge.ConnectionStatus.CONNECTING&&"animate-pulse")})]}),O.jsxs("div",{className:"flex flex-col",children:[O.jsx("p",{className:"text-lg font-semibold text-slate-900",children:l||"Health Assist"}),O.jsx("div",{className:"flex items-center gap-1.5",children:O.jsx("span",{className:Ye("text-xs font-medium",c.textColor),children:c.text})})]})]}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(kt,{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:O.jsx(vS,{className:"w-8 h-8"})}),O.jsx(kt,{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:O.jsx(Os,{className:"w-8 h-8"})})]})]})})}const i1=P.lazy(()=>Promise.resolve().then(()=>m1));function a1({isOpen:n,onClose:l,iconUrl:i,onStartNewSession:o,children:u,title:s,sessionId:c,chatComposer:f,environment:m}){const[h,g]=P.useState(!1),y=P.useRef(null);P.useEffect(()=>{const w=()=>{const E=window?.innerWidth??0,T=navigator?.userAgent?.toLowerCase()??"",_=E<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(T);g(_)};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]),P.useEffect(()=>{if(!n||!h||!y.current)return;const w=y.current;let E=null,T=null;if(window.visualViewport){const _=()=>{if(w&&window.visualViewport){const q=window.visualViewport.height,H=window.visualViewport.offsetTop;E=requestAnimationFrame(()=>{w.style.transition="none",w.style.top=`${H}px`,w.style.left="0",w.style.right="0",w.style.bottom="auto",w.style.width="100vw",w.style.height=`${q}px`,w.style.maxHeight=`${q}px`,w.style.minHeight=`${q}px`,T&&clearTimeout(T),T=setTimeout(()=>{w.style.transition=""},100)})}},A=()=>{_()},k=()=>{if(w&&window.visualViewport){const q=window.visualViewport.offsetTop;E=requestAnimationFrame(()=>{w.style.transition="none",w.style.top=`${q}px`,setTimeout(()=>{w.style.transition=""},50)})}};return window.visualViewport.addEventListener("resize",A),window.visualViewport.addEventListener("scroll",k),_(),()=>{E&&cancelAnimationFrame(E),T&&clearTimeout(T),window.visualViewport?.removeEventListener("resize",A),window.visualViewport?.removeEventListener("scroll",k)}}else{const _=()=>{w&&(w.style.transition="none",w.style.top="0",w.style.left="0",w.style.right="0",w.style.bottom="auto",w.style.width="100vw",w.style.height="100svh",w.style.maxHeight="100svh",setTimeout(()=>{w.style.transition=""},100))};return window.addEventListener("resize",_),_(),()=>{window.removeEventListener("resize",_)}}},[n,h]),P.useEffect(()=>{if(n){const w=document.body.style.overflow,E=document.body.style.paddingRight,T=document.documentElement.style.overflow,_=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",_>0&&!h&&(document.body.style.paddingRight=`${_}px`),()=>{document.body.style.overflow=w,document.body.style.paddingRight=E,document.documentElement.style.overflow=T}}},[n,h]);const v=Ye("synapse-chat-widget-container","fixed m-0 p-0","box-border",h?"":"transition-all duration-300",h?"w-screen h-[100svh]":"bottom-4 right-4 w-96 h-[600px]","z-[2147483647]",n?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none scale-95"),b=Ye("w-full h-full",h?"bg-white":"bg-white/90 backdrop-blur-2xl","shadow-2xl","flex flex-col","overflow-hidden","border border-white/50 ring-1 ring-white/60",h?"rounded-none":"rounded-3xl");return O.jsxs("div",{ref:y,className:v,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto",...h&&{top:0,left:0,right:0,bottom:0,width:"100vw",maxHeight:"100svh",height:"100svh",minHeight:"100svh",backgroundColor:"white"}},children:[O.jsx("style",{children:`
11
11
  /* Isolate widget from host website styles */
12
12
  .synapse-chat-widget-container,
13
13
  .synapse-chat-widget-container *,
@@ -25,37 +25,33 @@ Error generating stack: `+a.message+`
25
25
  margin: 0 !important;
26
26
  padding: 0 !important;
27
27
  }
28
- /* Ensure rounded corners are applied properly - override any conflicting styles */
29
- .synapse-chat-widget-container > div.rounded-3xl {
30
- border-radius: 1.5rem !important;
31
- }
32
- .synapse-chat-widget-container .rounded-3xl {
33
- border-radius: 1.5rem !important;
34
- }
35
- .synapse-chat-widget-container .rounded-2xl {
36
- border-radius: 1rem !important;
37
- }
38
- .synapse-chat-widget-container .rounded-xl {
39
- border-radius: 0.75rem !important;
40
- }
41
- .synapse-chat-widget-container .rounded-lg {
42
- border-radius: 0.5rem !important;
43
- }
44
- .synapse-chat-widget-container .rounded-full {
45
- border-radius: 9999px !important;
46
- }
47
- `}),F.jsxs(Ml,{className:p,children:[F.jsx(US,{onClose:l,title:u,iconUrl:i,startNewConversation:o}),s]})]})}const Hr={USER:"user",ASSISTANT:"assistant"};function jh(){const[n,l]=K.useState(typeof navigator<"u"?navigator.onLine:!0);return K.useEffect(()=>{const i=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",i),window.addEventListener("offline",o),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",o)}},[]),{isOnline:n}}const LS=({environment:n,userId:l,onInlineText:i})=>{const[o,s]=K.useState([]),[u,c]=K.useState(!1),[d,h]=K.useState(0),[p,y]=K.useState(!1),g=K.useRef(null),{isOnline:v}=jh(),{agentId:b,setSessionId:C,setSessionToken:E,sessionId:T,sessionToken:_,setError:k,setConnectionStatus:O,setShowRetryButton:H,setStartNewConnection:B,setIsStreaming:z,setIsWaitingForResponse:L,isStreaming:P,setRecordingStatus:q,clearSession:le,connectionStatus:ce,addMessageToSession:M,getMessagesForSession:$,updateMessageInSession:w}=Hl();K.useEffect(()=>{v?p?(O(We.ConnectionStatus.CONNECTED),se()):O(We.ConnectionStatus.CONNECTING):O(We.ConnectionStatus.NOT_CONNECTED)},[v,p]),K.useEffect(()=>{if(T){const ge=$(T)||[];s(ge)}},[T]),K.useEffect(()=>{if(y(!1),!b){console.warn("useChat: Agent ID is required but not provided");return}const ge=new We.SynapseSDK({agentId:b,environment:n,userId:l,callbacks:{onError:de=>{console.error("useChat: Error thrown from SDK",de)},onConnectionStatusChange:de=>{O(de),de===We.ConnectionStatus.NOT_CONNECTED?H(!0):de===We.ConnectionStatus.CONNECTED&&se()},onRecordingStatusChange:de=>{q(de)},onSessionRefreshed:de=>{de?.session_id&&de?.session_token&&(C(de.session_id),E(de.session_token))}}});return g.current=ge,y(!0),()=>{y(!1),g.current?.endSession(),g.current=null}},[b,n,l]),K.useEffect(()=>{const ge=o[o.length-1];!ge?.role||!T||(ge?.role===Hr.USER?M(T,ge):!P&&!ge.isStored&&(s(de=>{const Te=[...de];return Te[Te.length-1]={...ge,isStored:!0},Te}),M(T,{...ge,isStored:!0})))},[o,P]),K.useEffect(()=>{const ge=o[o.length-1];return()=>{ge&&!ge?.isStored&&T&&M(T,{...ge,isStored:!0})}},[]);const G=async(ge=!1)=>{try{if(!g.current){console.error("SynapseSDK instance not initialized. Make sure agentId is set."),k({title:"SDK not initialized",description:"Please ensure agentId is configured"}),c(!1);return}c(!0),console.log("useChat: Starting session, forceNewSession:",ge);let de;ge?(console.log("useChat: Creating new session"),await le(),se(),de=await g.current.startSession()):(console.log("useChat: Resuming existing session",{sessionId:T,sessionToken:_}),de=await g.current.startSession({session_id:T||"",session_token:_||""})),console.log("useChat: Session response received",de),de?.session_id&&de?.session_token?(C(de.session_id),E(de.session_token)):console.warn("useChat: Session response missing session_id or session_token",de),D()}catch(de){console.error("useChat: Error starting session",de),k({title:"Error starting session",description:de instanceof Error?de.message:"Please try again later"}),c(!1);return}finally{c(!1)}},V=ce===We.ConnectionStatus.CONNECTED,Z=ge=>V?!0:(console.log("ensureConnected: Connection unavailable",ge),!1),ae=()=>{console.log("called end session"),g.current?.endSession()},se=()=>{h(0),H(!1),B(!1),k(null)},D=()=>{g.current?.on(We.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,ge=>{const de=ge;if(de.data?.text&&de.messageId){P||(L(!1),z(!0));const Te=de.data.text,ke=de.messageId,Me=de.timestamp;s(De=>{const nt=De[De.length-1];if(nt.id===ke&&nt.role===Hr.ASSISTANT){const yt=[...De];return yt[yt.length-1]={...nt,content:nt.content+Te},yt}else return[...De,{id:ke,content:Te,role:Hr.ASSISTANT,timestamp:As(Me??Date.now()),isStored:!1}]})}else console.warn("Condition failed - missing text or messageId",{hasText:!!de.data?.text,hasMessageId:!!de.messageId})}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{console.log("end of stream"),z(!1)}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{se(),O(We.ConnectionStatus.CONNECTED)}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.TOOL_ESCALATION,ge=>{const de=ge;if(!de?.messageId||!de?.data||!de?.data?.type){console.warn("Tool escalation event missing messageId or data",de);return}const Te=de.messageId,ke=de.timestamp??Date.now();s(Me=>{const De=Me[Me.length-1];if(De.id===Te&&De.role===Hr.ASSISTANT){const nt=[...Me],yt={...De,toolEscalationData:{...de.data,isResponded:!1},isResponseFromTool:!0};return nt[Me.length-1]=yt,w(T,Te,yt),nt}else{const nt={id:Te,content:de.data?.text||"",role:Hr.ASSISTANT,toolEscalationData:{...de.data,isResponded:!1},isResponseFromTool:!0,timestamp:As(ke),isStored:!1};return[...Me,nt]}})}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,ge=>{console.log("disconnect details",ge),O(We.ConnectionStatus.NOT_CONNECTED),d<3?(console.log("retry attempt",d),h(de=>de+1),H(!0)):(console.log("set start new connection"),B(!0))}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.ERROR,ge=>{console.error("error",ge)}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,ge=>{console.log("inline text",ge);const de=ge;de?.data?.text&&i&&i?.(de.data.text)})};return{sendMessage:async({message:ge,messageId:de,files:Te})=>{Z("sending a message")&&(Te&&Te.length<0||ge?.trim()===""||(await g.current?.sendMessage({message:ge,messageId:de,files:Te}),ge&&s(ke=>{const Me=[...ke],De=Me.length-1;return De>=0&&Me[De].role===Hr.ASSISTANT&&Me[De].toolEscalationData&&(Me[De]={...Me[De],toolEscalationData:{...Me[De].toolEscalationData,isResponded:!0}}),[...Me,{id:de||Date.now().toString(),content:ge,role:Hr.USER,timestamp:As(Date.now()),isStored:!0}]}),L(!0)))},startSession:G,incomingMessages:o,loading:u,endSession:ae,isReady:p,startRecording:()=>{Z("starting a recording")&&g.current?.startRecording()},stopRecording:()=>{Z("stopping a recording")&&g.current?.endRecording()},handleRetryConnection:async()=>{se(),await G(!1)},handleStartNewConnection:async()=>{se(),await le(),await G(!0)}}},IS=K.lazy(()=>Promise.resolve().then(()=>bw)),HS=K.lazy(()=>Promise.resolve().then(()=>Sw)),qS=K.lazy(()=>Promise.resolve().then(()=>ww)),YS=K.lazy(()=>Promise.resolve().then(()=>Tw).then(n=>({default:n.ConnectionStatus})));function PS({isOpen:n,agentId:l,config:i}){const[o,s]=K.useState(""),[u,c]=K.useState(!1),[d,h]=K.useState(!1),[p,y]=K.useState([]),g=K.useRef(!1),{setAgentId:v,startNewConnection:b,showRetryButton:C,clearError:E,error:T,connectionStatus:_,recordingStatus:k}=Hl(),{incomingMessages:O,loading:H,sendMessage:B,startSession:z,isReady:L,startRecording:P,stopRecording:q,handleRetryConnection:le,handleStartNewConnection:ce}=LS({environment:"production",onInlineText:A=>{console.log("inline text",A),s(j=>j+A)}});K.useEffect(()=>{if(!l){console.error("Agent ID is required");return}v(l),n&&L&&!g.current&&(g.current=!0,console.log("ChatWidget: SDK is ready, starting session"),z(!1))},[n,L,l]);const M=O.length>0,$=_===We.ConnectionStatus.CONNECTED,w=H||!$,G=w||k===We.AudioRecordingStatus.IDLE?null:k===We.AudioRecordingStatus.LISTENING?"Listening...":k===We.AudioRecordingStatus.PROCESSING?"Processing...":k===We.AudioRecordingStatus.TRANSCRIBING?"Transcribing...":null,V=w?"Connecting...":G??"Ask me anything…",Z=async()=>{if(!w&&(o.trim()||u||d)){const A=Date.now().toString();p.length>0?(await B({files:p,message:o.trim(),messageId:A}),y([]),h(!1)):o.trim()&&await B({message:o,messageId:A}),s(""),c(!1),h(!1)}},ae=async A=>{await B({message:A})},se=A=>{y(A),h(!0)},D=async()=>{if(u)await q(),c(!1);else{if(w)return;await P(),c(!0)}};return F.jsx(BS,{isOpen:n,onClose:i.onClose,title:i.title,iconUrl:i.iconUrl,onStartNewSession:()=>z(!0),children:!H&&F.jsx(K.Suspense,{fallback:F.jsx(FS,{}),children:F.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl",children:[F.jsx(Dd,{className:"flex-1 min-h-0",children:F.jsx("div",{className:Je("transition-all duration-300",M?"p-4 space-y-3":"p-6 space-y-6"),children:M?F.jsx(IS,{messages:O,onSendMessage:B,iconUrl:i.iconUrl}):F.jsx(qS,{onTaskClick:ae,disabled:w})})}),F.jsx(YS,{className:"mt-2",onRetry:le,onStartNewSession:ce,showRetryButton:C,startNewConnection:b,clearError:E,error:T,isConnected:$}),F.jsx(HS,{value:o,onChange:s,onSend:Z,onFileChange:se,onRecording:D,isRecording:u,hasAttachment:d,attachmentFiles:p,isDisabled:w,placeholder:V,recordingStatus:k})]})})})}function FS(){return F.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[F.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[F.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),F.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),F.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),F.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function VS({agentId:n,config:l}){const[i,o]=K.useState(!1);K.useEffect(()=>{o(!0)},[]);const s=()=>{o(!1),l?.onClose?.()};return F.jsx(PS,{isOpen:i,agentId:n,config:{...l,environment:l.environment??"production",onClose:s,title:l.title??"Medi Clinic"}})}const Uh=(n,l,i)=>{pb.createRoot(n).render(F.jsx(K.StrictMode,{children:F.jsx(VS,{agentId:l,config:i})}))};typeof window<"u"&&(window.renderMedAssist=Uh);function tT(){}function nT(){}function GS(n,l){const i={};return(n[n.length-1]===""?[...n,""]:n).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const XS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KS={};function Bh(n,l){return(KS.jsx?ZS:XS).test(n)}const QS=/[ \t\n\f\r]/g;function JS(n){return typeof n=="object"?n.type==="text"?Lh(n.value):!1:Lh(n)}function Lh(n){return n.replace(QS,"")===""}class _a{constructor(l,i,o){this.normal=i,this.property=l,o&&(this.space=o)}}_a.prototype.normal={},_a.prototype.property={},_a.prototype.space=void 0;function Ih(n,l){const i={},o={};for(const s of n)Object.assign(i,s.property),Object.assign(o,s.normal);return new _a(i,o,l)}function qs(n){return n.toLowerCase()}class qt{constructor(l,i){this.attribute=i,this.property=l}}qt.prototype.attribute="",qt.prototype.booleanish=!1,qt.prototype.boolean=!1,qt.prototype.commaOrSpaceSeparated=!1,qt.prototype.commaSeparated=!1,qt.prototype.defined=!1,qt.prototype.mustUseProperty=!1,qt.prototype.number=!1,qt.prototype.overloadedBoolean=!1,qt.prototype.property="",qt.prototype.spaceSeparated=!1,qt.prototype.space=void 0;let WS=0;const He=qr(),_t=qr(),Ys=qr(),Ee=qr(),ct=qr(),di=qr(),Jt=qr();function qr(){return 2**++WS}const Ps=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:_t,commaOrSpaceSeparated:Jt,commaSeparated:di,number:Ee,overloadedBoolean:Ys,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Fs=Object.keys(Ps);class Vs extends qt{constructor(l,i,o,s){let u=-1;if(super(l,i),Hh(this,"space",s),typeof o=="number")for(;++u<Fs.length;){const c=Fs[u];Hh(this,Fs[u],(o&Ps[c])===Ps[c])}}}Vs.prototype.defined=!0;function Hh(n,l,i){i&&(n[l]=i)}function hi(n){const l={},i={};for(const[o,s]of Object.entries(n.properties)){const u=new Vs(o,n.transform(n.attributes||{},o),s,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(u.mustUseProperty=!0),l[o]=u,i[qs(o)]=o,i[qs(u.attribute)]=o}return new _a(l,i,n.space)}const qh=hi({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:ct,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:Ee,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:ct,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:_t,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function Yh(n,l){return l in n?n[l]:l}function Ph(n,l){return Yh(n,l.toLowerCase())}const $S=hi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:di,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:ct,autoFocus:He,autoPlay:He,blocking:ct,capture:null,charSet:null,checked:He,cite:null,className:ct,cols:Ee,colSpan:null,content:null,contentEditable:_t,controls:He,controlsList:ct,coords:Ee|di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:Ys,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:ct,height:Ee,hidden:Ys,high:Ee,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:ct,itemRef:ct,itemScope:He,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,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:He,optimum:Ee,pattern:null,ping:ct,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:ct,required:He,reversed:He,rows:Ee,rowSpan:Ee,sandbox:ct,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:_t,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:Ph}),e1=hi({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:Jt,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:ct,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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,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:di,g2:di,glyphName:di,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,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:Ee,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:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yh}),Fh=hi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,l){return"xlink:"+l.slice(5).toLowerCase()}}),Vh=hi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ph}),Gh=hi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),t1={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"},n1=/[A-Z]/g,Xh=/-[a-z]/g,r1=/^data[-\w.:]+$/i;function i1(n,l){const i=qs(l);let o=l,s=qt;if(i in n.normal)return n.property[n.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&r1.test(l)){if(l.charAt(4)==="-"){const u=l.slice(5).replace(Xh,l1);o="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=l.slice(4);if(!Xh.test(u)){let c=u.replace(n1,a1);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}s=Vs}return new s(o,l)}function a1(n){return"-"+n.toLowerCase()}function l1(n){return n.charAt(1).toUpperCase()}const o1=Ih([qh,$S,Fh,Vh,Gh],"html"),Gs=Ih([qh,e1,Fh,Vh,Gh],"svg");function s1(n){return n.join(" ").trim()}var mi={},Xs,Zh;function u1(){if(Zh)return Xs;Zh=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
48
- `,p="/",y="*",g="",v="comment",b="declaration";function C(T,_){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];_=_||{};var k=1,O=1;function H(w){var G=w.match(l);G&&(k+=G.length);var V=w.lastIndexOf(h);O=~V?w.length-V:O+w.length}function B(){var w={line:k,column:O};return function(G){return G.position=new z(w),q(),G}}function z(w){this.start=w,this.end={line:k,column:O},this.source=_.source}z.prototype.content=T;function L(w){var G=new Error(_.source+":"+k+":"+O+": "+w);if(G.reason=w,G.filename=_.source,G.line=k,G.column=O,G.source=T,!_.silent)throw G}function P(w){var G=w.exec(T);if(G){var V=G[0];return H(V),T=T.slice(V.length),G}}function q(){P(i)}function le(w){var G;for(w=w||[];G=ce();)G!==!1&&w.push(G);return w}function ce(){var w=B();if(!(p!=T.charAt(0)||y!=T.charAt(1))){for(var G=2;g!=T.charAt(G)&&(y!=T.charAt(G)||p!=T.charAt(G+1));)++G;if(G+=2,g===T.charAt(G-1))return L("End of comment missing");var V=T.slice(2,G-2);return O+=2,H(V),T=T.slice(G),O+=2,w({type:v,comment:V})}}function M(){var w=B(),G=P(o);if(G){if(ce(),!P(s))return L("property missing ':'");var V=P(u),Z=w({type:b,property:E(G[0].replace(n,g)),value:V?E(V[0].replace(n,g)):g});return P(c),Z}}function $(){var w=[];le(w);for(var G;G=M();)G!==!1&&(w.push(G),le(w));return w}return q(),$()}function E(T){return T?T.replace(d,g):g}return Xs=C,Xs}var Kh;function c1(){if(Kh)return mi;Kh=1;var n=mi&&mi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(mi,"__esModule",{value:!0}),mi.default=i;const l=n(u1());function i(o,s){let u=null;if(!o||typeof o!="string")return u;const c=(0,l.default)(o),d=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:y}=h;d?s(p,y,h):y&&(u=u||{},u[p]=y)}),u}return mi}var xa={},Qh;function f1(){if(Qh)return xa;Qh=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(p){return!p||i.test(p)||n.test(p)},c=function(p,y){return y.toUpperCase()},d=function(p,y){return"".concat(y,"-")},h=function(p,y){return y===void 0&&(y={}),u(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(s,d):p=p.replace(o,d),p.replace(l,c))};return xa.camelCase=h,xa}var wa,Jh;function d1(){if(Jh)return wa;Jh=1;var n=wa&&wa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=n(c1()),i=f1();function o(s,u){var c={};return!s||typeof s!="string"||(0,l.default)(s,function(d,h){d&&h&&(c[(0,i.camelCase)(d,u)]=h)}),c}return o.default=o,wa=o,wa}var h1=d1();const m1=ds(h1),Wh=$h("end"),Zs=$h("start");function $h(n){return l;function l(i){const o=i&&i.position&&i.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 p1(n){const l=Zs(n),i=Wh(n);if(l&&i)return{start:l,end:i}}function Ca(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?em(n.position):"start"in n||"end"in n?em(n):"line"in n||"column"in n?Ks(n):""}function Ks(n){return tm(n&&n.line)+":"+tm(n&&n.column)}function em(n){return Ks(n&&n.start)+"-"+Ks(n&&n.end)}function tm(n){return n&&typeof n=="number"?n:1}class Lt extends Error{constructor(l,i,o){super(),typeof i=="string"&&(o=i,i=void 0);let s="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof l=="string"?s=l:!u.cause&&l&&(c=!0,s=l.message,u.cause=l),!u.ruleId&&!u.source&&typeof o=="string"){const h=o.indexOf(":");h===-1?u.ruleId=o:(u.source=o.slice(0,h),u.ruleId=o.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const d=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=Ca(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Lt.prototype.file="",Lt.prototype.name="",Lt.prototype.reason="",Lt.prototype.message="",Lt.prototype.stack="",Lt.prototype.column=void 0,Lt.prototype.line=void 0,Lt.prototype.ancestors=void 0,Lt.prototype.cause=void 0,Lt.prototype.fatal=void 0,Lt.prototype.place=void 0,Lt.prototype.ruleId=void 0,Lt.prototype.source=void 0;const Qs={}.hasOwnProperty,g1=new Map,y1=/[A-Z]/g,b1=new Set(["table","tbody","thead","tfoot","tr"]),v1=new Set(["td","th"]),nm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function S1(n,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let o;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=A1(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=k1(i,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:o,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Gs:o1,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},u=rm(s,n,void 0);return u&&typeof u!="string"?u:s.create(n,s.Fragment,{children:u||void 0},void 0)}function rm(n,l,i){if(l.type==="element")return E1(n,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return _1(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return w1(n,l,i);if(l.type==="mdxjsEsm")return x1(n,l);if(l.type==="root")return C1(n,l,i);if(l.type==="text")return T1(n,l)}function E1(n,l,i){const o=n.schema;let s=o;l.tagName.toLowerCase()==="svg"&&o.space==="html"&&(s=Gs,n.schema=s),n.ancestors.push(l);const u=am(n,l.tagName,!1),c=R1(n,l);let d=Ws(n,l);return b1.has(l.tagName)&&(d=d.filter(function(h){return typeof h=="string"?!JS(h):!0})),im(n,c,u,l),Js(c,d),n.ancestors.pop(),n.schema=o,n.create(l,u,c,i)}function _1(n,l){if(l.data&&l.data.estree&&n.evaluater){const o=l.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ta(n,l.position)}function x1(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);Ta(n,l.position)}function w1(n,l,i){const o=n.schema;let s=o;l.name==="svg"&&o.space==="html"&&(s=Gs,n.schema=s),n.ancestors.push(l);const u=l.name===null?n.Fragment:am(n,l.name,!0),c=N1(n,l),d=Ws(n,l);return im(n,c,u,l),Js(c,d),n.ancestors.pop(),n.schema=o,n.create(l,u,c,i)}function C1(n,l,i){const o={};return Js(o,Ws(n,l)),n.create(l,n.Fragment,o,i)}function T1(n,l){return l.value}function im(n,l,i,o){typeof i!="string"&&i!==n.Fragment&&n.passNode&&(l.node=o)}function Js(n,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(n.children=i)}}function k1(n,l,i){return o;function o(s,u,c,d){const p=Array.isArray(c.children)?i:l;return d?p(u,c,d):p(u,c)}}function A1(n,l){return i;function i(o,s,u,c){const d=Array.isArray(u.children),h=Zs(o);return l(s,u,c,d,{columnNumber:h?h.column-1:void 0,fileName:n,lineNumber:h?h.line:void 0},void 0)}}function R1(n,l){const i={};let o,s;for(s in l.properties)if(s!=="children"&&Qs.call(l.properties,s)){const u=O1(n,s,l.properties[s]);if(u){const[c,d]=u;n.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&v1.has(l.tagName)?o=d:i[c]=d}}if(o){const u=i.style||(i.style={});u[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return i}function N1(n,l){const i={};for(const o of l.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const u=o.data.estree.body[0];u.type;const c=u.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,n.evaluater.evaluateExpression(d.argument))}else Ta(n,l.position);else{const s=o.name;let u;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const d=o.value.data.estree.body[0];d.type,u=n.evaluater.evaluateExpression(d.expression)}else Ta(n,l.position);else u=o.value===null?!0:o.value;i[s]=u}return i}function Ws(n,l){const i=[];let o=-1;const s=n.passKeys?new Map:g1;for(;++o<l.children.length;){const u=l.children[o];let c;if(n.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const p=s.get(h)||0;c=h+"-"+p,s.set(h,p+1)}}const d=rm(n,u,c);d!==void 0&&i.push(d)}return i}function O1(n,l,i){const o=i1(n.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=o.commaSeparated?GS(i):s1(i)),o.property==="style"){let s=typeof i=="object"?i:z1(n,String(i));return n.stylePropertyNameCase==="css"&&(s=M1(s)),["style",s]}return[n.elementAttributeNameCase==="react"&&o.space?t1[o.property]||o.property:o.attribute,i]}}function z1(n,l){try{return m1(l,{reactCompat:!0})}catch(i){if(n.ignoreInvalidStyle)return{};const o=i,s=new Lt("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=nm+"#cannot-parse-style-attribute",s}}function am(n,l,i){let o;if(!i)o={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let u=-1,c;for(;++u<s.length;){const d=Bh(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}o=c}else o=Bh(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(o.type==="Literal"){const s=o.value;return Qs.call(n.components,s)?n.components[s]:s}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ta(n)}function Ta(n,l){const i=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=nm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function M1(n){const l={};let i;for(i in n)Qs.call(n,i)&&(l[D1(i)]=n[i]);return l}function D1(n){let l=n.replace(y1,j1);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function j1(n){return"-"+n.toLowerCase()}const $s={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"]},U1={};function B1(n,l){const i=U1,o=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return lm(n,o,s)}function lm(n,l,i){if(L1(n)){if("value"in n)return n.type==="html"&&!i?"":n.value;if(l&&"alt"in n&&n.alt)return n.alt;if("children"in n)return om(n.children,l,i)}return Array.isArray(n)?om(n,l,i):""}function om(n,l,i){const o=[];let s=-1;for(;++s<n.length;)o[s]=lm(n[s],l,i);return o.join("")}function L1(n){return!!(n&&typeof n=="object")}const sm=document.createElement("i");function eu(n){const l="&"+n+";";sm.innerHTML=l;const i=sm.textContent;return i.charCodeAt(i.length-1)===59&&n!=="semi"||i===l?!1:i}function Rn(n,l,i,o){const s=n.length;let u=0,c;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,i=i>0?i:0,o.length<1e4)c=Array.from(o),c.unshift(l,i),n.splice(...c);else for(i&&n.splice(l,i);u<o.length;)c=o.slice(u,u+1e4),c.unshift(l,0),n.splice(...c),u+=1e4,l+=1e4}function cn(n,l){return n.length>0?(Rn(n,n.length,0,l),n):l}const um={}.hasOwnProperty;function I1(n){const l={};let i=-1;for(;++i<n.length;)H1(l,n[i]);return l}function H1(n,l){let i;for(i in l){const s=(um.call(n,i)?n[i]:void 0)||(n[i]={}),u=l[i];let c;if(u)for(c in u){um.call(s,c)||(s[c]=[]);const d=u[c];q1(s[c],Array.isArray(d)?d:d?[d]:[])}}}function q1(n,l){let i=-1;const o=[];for(;++i<l.length;)(l[i].add==="after"?n:o).push(l[i]);Rn(n,0,0,o)}function cm(n,l){const i=Number.parseInt(n,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function pi(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=ur(/[A-Za-z]/),Wt=ur(/[\dA-Za-z]/),Y1=ur(/[#-'*+\--9=?A-Z^-~]/);function tu(n){return n!==null&&(n<32||n===127)}const nu=ur(/\d/),P1=ur(/[\dA-Fa-f]/),F1=ur(/[!-/:-@[-`{-~]/);function Be(n){return n!==null&&n<-2}function Yt(n){return n!==null&&(n<0||n===32)}function tt(n){return n===-2||n===-1||n===32}const V1=ur(new RegExp("\\p{P}|\\p{S}","u")),G1=ur(/\s/);function ur(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}function gi(n){const l=[];let i=-1,o=0,s=0;for(;++i<n.length;){const u=n.charCodeAt(i);let c="";if(u===37&&Wt(n.charCodeAt(i+1))&&Wt(n.charCodeAt(i+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const d=n.charCodeAt(i+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),s=1):c="�"}else c=String.fromCharCode(u);c&&(l.push(n.slice(o,i),encodeURIComponent(c)),o=i+s+1,c=""),s&&(i+=s,s=0)}return l.join("")+n.slice(o)}function ft(n,l,i,o){const s=o?o-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return tt(h)?(n.enter(i),d(h)):l(h)}function d(h){return tt(h)&&u++<s?(n.consume(h),d):(n.exit(i),l(h))}}const X1={tokenize:Z1};function Z1(n){const l=n.attempt(this.parser.constructs.contentInitial,o,s);let i;return l;function o(d){if(d===null){n.consume(d);return}return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),ft(n,l,"linePrefix")}function s(d){return n.enter("paragraph"),u(d)}function u(d){const h=n.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=h),i=h,c(d)}function c(d){if(d===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(d);return}return Be(d)?(n.consume(d),n.exit("chunkText"),u):(n.consume(d),c)}}const K1={tokenize:Q1},fm={tokenize:J1};function Q1(n){const l=this,i=[];let o=0,s,u,c;return d;function d(O){if(o<i.length){const H=i[o];return l.containerState=H[1],n.attempt(H[0].continuation,h,p)(O)}return p(O)}function h(O){if(o++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&k();const H=l.events.length;let B=H,z;for(;B--;)if(l.events[B][0]==="exit"&&l.events[B][1].type==="chunkFlow"){z=l.events[B][1].end;break}_(o);let L=H;for(;L<l.events.length;)l.events[L][1].end={...z},L++;return Rn(l.events,B+1,0,l.events.slice(H)),l.events.length=L,p(O)}return d(O)}function p(O){if(o===i.length){if(!s)return v(O);if(s.currentConstruct&&s.currentConstruct.concrete)return C(O);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(fm,y,g)(O)}function y(O){return s&&k(),_(o),v(O)}function g(O){return l.parser.lazy[l.now().line]=o!==i.length,c=l.now().offset,C(O)}function v(O){return l.containerState={},n.attempt(fm,b,C)(O)}function b(O){return o++,i.push([l.currentConstruct,l.containerState]),v(O)}function C(O){if(O===null){s&&k(),_(0),n.consume(O);return}return s=s||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),E(O)}function E(O){if(O===null){T(n.exit("chunkFlow"),!0),_(0),n.consume(O);return}return Be(O)?(n.consume(O),T(n.exit("chunkFlow")),o=0,l.interrupt=void 0,d):(n.consume(O),E)}function T(O,H){const B=l.sliceStream(O);if(H&&B.push(null),O.previous=u,u&&(u.next=O),u=O,s.defineSkip(O.start),s.write(B),l.parser.lazy[O.start.line]){let z=s.events.length;for(;z--;)if(s.events[z][1].start.offset<c&&(!s.events[z][1].end||s.events[z][1].end.offset>c))return;const L=l.events.length;let P=L,q,le;for(;P--;)if(l.events[P][0]==="exit"&&l.events[P][1].type==="chunkFlow"){if(q){le=l.events[P][1].end;break}q=!0}for(_(o),z=L;z<l.events.length;)l.events[z][1].end={...le},z++;Rn(l.events,P+1,0,l.events.slice(L)),l.events.length=z}}function _(O){let H=i.length;for(;H-- >O;){const B=i[H];l.containerState=B[1],B[0].exit.call(l,n)}i.length=O}function k(){s.write([null]),u=void 0,s=void 0,l.containerState._closeFlow=void 0}}function J1(n,l,i){return ft(n,n.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function dm(n){if(n===null||Yt(n)||G1(n))return 1;if(V1(n))return 2}function ru(n,l,i){const o=[];let s=-1;for(;++s<n.length;){const u=n[s].resolveAll;u&&!o.includes(u)&&(l=u(l,i),o.push(u))}return l}const iu={name:"attention",resolveAll:W1,tokenize:$1};function W1(n,l){let i=-1,o,s,u,c,d,h,p,y;for(;++i<n.length;)if(n[i][0]==="enter"&&n[i][1].type==="attentionSequence"&&n[i][1]._close){for(o=i;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&l.sliceSerialize(n[o][1]).charCodeAt(0)===l.sliceSerialize(n[i][1]).charCodeAt(0)){if((n[o][1]._close||n[i][1]._open)&&(n[i][1].end.offset-n[i][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[i][1].end.offset-n[i][1].start.offset)%3))continue;h=n[o][1].end.offset-n[o][1].start.offset>1&&n[i][1].end.offset-n[i][1].start.offset>1?2:1;const g={...n[o][1].end},v={...n[i][1].start};hm(g,-h),hm(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...n[o][1].end}},d={type:h>1?"strongSequence":"emphasisSequence",start:{...n[i][1].start},end:v},u={type:h>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[i][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},n[o][1].end={...c.start},n[i][1].start={...d.end},p=[],n[o][1].end.offset-n[o][1].start.offset&&(p=cn(p,[["enter",n[o][1],l],["exit",n[o][1],l]])),p=cn(p,[["enter",s,l],["enter",c,l],["exit",c,l],["enter",u,l]]),p=cn(p,ru(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),p=cn(p,[["exit",u,l],["enter",d,l],["exit",d,l],["exit",s,l]]),n[i][1].end.offset-n[i][1].start.offset?(y=2,p=cn(p,[["enter",n[i][1],l],["exit",n[i][1],l]])):y=0,Rn(n,o-1,i-o+3,p),i=o+p.length-y-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function $1(n,l){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,s=dm(o);let u;return c;function c(h){return u=h,n.enter("attentionSequence"),d(h)}function d(h){if(h===u)return n.consume(h),d;const p=n.exit("attentionSequence"),y=dm(h),g=!y||y===2&&s||i.includes(h),v=!s||s===2&&y||i.includes(o);return p._open=!!(u===42?g:g&&(s||!v)),p._close=!!(u===42?v:v&&(y||!g)),l(h)}}function hm(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const eE={name:"autolink",tokenize:tE};function tE(n,l,i){let o=0;return s;function s(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),u}function u(b){return Nn(b)?(n.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||Wt(b)?(o=1,d(b)):p(b)}function d(b){return b===58?(n.consume(b),o=0,h):(b===43||b===45||b===46||Wt(b))&&o++<32?(n.consume(b),d):(o=0,p(b))}function h(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):b===null||b===32||b===60||tu(b)?i(b):(n.consume(b),h)}function p(b){return b===64?(n.consume(b),y):Y1(b)?(n.consume(b),p):i(b)}function y(b){return Wt(b)?g(b):i(b)}function g(b){return b===46?(n.consume(b),o=0,y):b===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):v(b)}function v(b){if((b===45||Wt(b))&&o++<63){const C=b===45?v:g;return n.consume(b),C}return i(b)}}const ql={partial:!0,tokenize:nE};function nE(n,l,i){return o;function o(u){return tt(u)?ft(n,s,"linePrefix")(u):s(u)}function s(u){return u===null||Be(u)?l(u):i(u)}}const mm={continuation:{tokenize:iE},exit:aE,name:"blockQuote",tokenize:rE};function rE(n,l,i){const o=this;return s;function s(c){if(c===62){const d=o.containerState;return d.open||(n.enter("blockQuote",{_container:!0}),d.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(c),n.exit("blockQuoteMarker"),u}return i(c)}function u(c){return tt(c)?(n.enter("blockQuotePrefixWhitespace"),n.consume(c),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),l):(n.exit("blockQuotePrefix"),l(c))}}function iE(n,l,i){const o=this;return s;function s(c){return tt(c)?ft(n,u,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return n.attempt(mm,l,i)(c)}}function aE(n){n.exit("blockQuote")}const pm={name:"characterEscape",tokenize:lE};function lE(n,l,i){return o;function o(u){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(u),n.exit("escapeMarker"),s}function s(u){return F1(u)?(n.enter("characterEscapeValue"),n.consume(u),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):i(u)}}const gm={name:"characterReference",tokenize:oE};function oE(n,l,i){const o=this;let s=0,u,c;return d;function d(g){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(g),n.exit("characterReferenceMarker"),h}function h(g){return g===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(g),n.exit("characterReferenceMarkerNumeric"),p):(n.enter("characterReferenceValue"),u=31,c=Wt,y(g))}function p(g){return g===88||g===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(g),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),u=6,c=P1,y):(n.enter("characterReferenceValue"),u=7,c=nu,y(g))}function y(g){if(g===59&&s){const v=n.exit("characterReferenceValue");return c===Wt&&!eu(o.sliceSerialize(v))?i(g):(n.enter("characterReferenceMarker"),n.consume(g),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return c(g)&&s++<u?(n.consume(g),y):i(g)}}const ym={partial:!0,tokenize:uE},bm={concrete:!0,name:"codeFenced",tokenize:sE};function sE(n,l,i){const o=this,s={partial:!0,tokenize:B};let u=0,c=0,d;return h;function h(z){return p(z)}function p(z){const L=o.events[o.events.length-1];return u=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,d=z,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),y(z)}function y(z){return z===d?(c++,n.consume(z),y):c<3?i(z):(n.exit("codeFencedFenceSequence"),tt(z)?ft(n,g,"whitespace")(z):g(z))}function g(z){return z===null||Be(z)?(n.exit("codeFencedFence"),o.interrupt?l(z):n.check(ym,E,H)(z)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(z))}function v(z){return z===null||Be(z)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),g(z)):tt(z)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),ft(n,b,"whitespace")(z)):z===96&&z===d?i(z):(n.consume(z),v)}function b(z){return z===null||Be(z)?g(z):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),C(z))}function C(z){return z===null||Be(z)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),g(z)):z===96&&z===d?i(z):(n.consume(z),C)}function E(z){return n.attempt(s,H,T)(z)}function T(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),_}function _(z){return u>0&&tt(z)?ft(n,k,"linePrefix",u+1)(z):k(z)}function k(z){return z===null||Be(z)?n.check(ym,E,H)(z):(n.enter("codeFlowValue"),O(z))}function O(z){return z===null||Be(z)?(n.exit("codeFlowValue"),k(z)):(n.consume(z),O)}function H(z){return n.exit("codeFenced"),l(z)}function B(z,L,P){let q=0;return le;function le(G){return z.enter("lineEnding"),z.consume(G),z.exit("lineEnding"),ce}function ce(G){return z.enter("codeFencedFence"),tt(G)?ft(z,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):M(G)}function M(G){return G===d?(z.enter("codeFencedFenceSequence"),$(G)):P(G)}function $(G){return G===d?(q++,z.consume(G),$):q>=c?(z.exit("codeFencedFenceSequence"),tt(G)?ft(z,w,"whitespace")(G):w(G)):P(G)}function w(G){return G===null||Be(G)?(z.exit("codeFencedFence"),L(G)):P(G)}}}function uE(n,l,i){const o=this;return s;function s(c){return c===null?i(c):(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u)}function u(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}const au={name:"codeIndented",tokenize:fE},cE={partial:!0,tokenize:dE};function fE(n,l,i){const o=this;return s;function s(p){return n.enter("codeIndented"),ft(n,u,"linePrefix",5)(p)}function u(p){const y=o.events[o.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?h(p):Be(p)?n.attempt(cE,c,h)(p):(n.enter("codeFlowValue"),d(p))}function d(p){return p===null||Be(p)?(n.exit("codeFlowValue"),c(p)):(n.consume(p),d)}function h(p){return n.exit("codeIndented"),l(p)}}function dE(n,l,i){const o=this;return s;function s(c){return o.parser.lazy[o.now().line]?i(c):Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s):ft(n,u,"linePrefix",5)(c)}function u(c){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):Be(c)?s(c):i(c)}}const hE={name:"codeText",previous:pE,resolve:mE,tokenize:gE};function mE(n){let l=n.length-4,i=3,o,s;if((n[i][1].type==="lineEnding"||n[i][1].type==="space")&&(n[l][1].type==="lineEnding"||n[l][1].type==="space")){for(o=i;++o<l;)if(n[o][1].type==="codeTextData"){n[i][1].type="codeTextPadding",n[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(o=i-1,l++;++o<=l;)s===void 0?o!==l&&n[o][1].type!=="lineEnding"&&(s=o):(o===l||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),l-=o-s-2,o=s+2),s=void 0);return n}function pE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function gE(n,l,i){let o=0,s,u;return c;function c(g){return n.enter("codeText"),n.enter("codeTextSequence"),d(g)}function d(g){return g===96?(n.consume(g),o++,d):(n.exit("codeTextSequence"),h(g))}function h(g){return g===null?i(g):g===32?(n.enter("space"),n.consume(g),n.exit("space"),h):g===96?(u=n.enter("codeTextSequence"),s=0,y(g)):Be(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),h):(n.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||Be(g)?(n.exit("codeTextData"),h(g)):(n.consume(g),p)}function y(g){return g===96?(n.consume(g),s++,y):s===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(g)):(u.type="codeTextData",p(g))}}class yE{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const o=i??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(l,o):l>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(l,i,o){const s=i||0;this.setCursor(Math.trunc(l));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return o&&ka(this.left,o),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),ka(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),ka(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);ka(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);ka(this.left,i.reverse())}}}function ka(n,l){let i=0;if(l.length<1e4)n.push(...l);else for(;i<l.length;)n.push(...l.slice(i,i+1e4)),i+=1e4}function vm(n){const l={};let i=-1,o,s,u,c,d,h,p;const y=new yE(n);for(;++i<y.length;){for(;i in l;)i=l[i];if(o=y.get(i),i&&o[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(h=o[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(o[0]==="enter")o[1].contentType&&(Object.assign(l,bE(y,i)),i=l[i],p=!0);else if(o[1]._container){for(u=i,s=void 0;u--;)if(c=y.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(o[1].end={...y.get(s)[1].start},d=y.slice(s,i),d.unshift(o),y.splice(s,i-s+1,d))}}return Rn(n,0,Number.POSITIVE_INFINITY,y.slice(0)),!p}function bE(n,l){const i=n.get(l)[1],o=n.get(l)[2];let s=l-1;const u=[];let c=i._tokenizer;c||(c=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,h=[],p={};let y,g,v=-1,b=i,C=0,E=0;const T=[E];for(;b;){for(;n.get(++s)[1]!==b;);u.push(s),b._tokenizer||(y=o.sliceStream(b),b.next||y.push(null),g&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=i;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(E=v+1,T.push(E),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),v=T.length;v--;){const _=d.slice(T[v],T[v+1]),k=u.pop();h.push([k,k+_.length-1]),n.splice(k,2,_)}for(h.reverse(),v=-1;++v<h.length;)p[C+h[v][0]]=C+h[v][1],C+=h[v][1]-h[v][0]-1;return p}const vE={resolve:EE,tokenize:_E},SE={partial:!0,tokenize:xE};function EE(n){return vm(n),n}function _E(n,l){let i;return o;function o(d){return n.enter("content"),i=n.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?u(d):Be(d)?n.check(SE,c,u)(d):(n.consume(d),s)}function u(d){return n.exit("chunkContent"),n.exit("content"),l(d)}function c(d){return n.consume(d),n.exit("chunkContent"),i.next=n.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function xE(n,l,i){const o=this;return s;function s(c){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),ft(n,u,"linePrefix")}function u(c){if(c===null||Be(c))return i(c);const d=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):n.interrupt(o.parser.constructs.flow,i,l)(c)}}function Sm(n,l,i,o,s,u,c,d,h){const p=h||Number.POSITIVE_INFINITY;let y=0;return g;function g(_){return _===60?(n.enter(o),n.enter(s),n.enter(u),n.consume(_),n.exit(u),v):_===null||_===32||_===41||tu(_)?i(_):(n.enter(o),n.enter(c),n.enter(d),n.enter("chunkString",{contentType:"string"}),E(_))}function v(_){return _===62?(n.enter(u),n.consume(_),n.exit(u),n.exit(s),n.exit(o),l):(n.enter(d),n.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===62?(n.exit("chunkString"),n.exit(d),v(_)):_===null||_===60||Be(_)?i(_):(n.consume(_),_===92?C:b)}function C(_){return _===60||_===62||_===92?(n.consume(_),b):b(_)}function E(_){return!y&&(_===null||_===41||Yt(_))?(n.exit("chunkString"),n.exit(d),n.exit(c),n.exit(o),l(_)):y<p&&_===40?(n.consume(_),y++,E):_===41?(n.consume(_),y--,E):_===null||_===32||_===40||tu(_)?i(_):(n.consume(_),_===92?T:E)}function T(_){return _===40||_===41||_===92?(n.consume(_),E):E(_)}}function Em(n,l,i,o,s,u){const c=this;let d=0,h;return p;function p(b){return n.enter(o),n.enter(s),n.consume(b),n.exit(s),n.enter(u),y}function y(b){return d>999||b===null||b===91||b===93&&!h||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(n.exit(u),n.enter(s),n.consume(b),n.exit(s),n.exit(o),l):Be(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),y):(n.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||Be(b)||d++>999?(n.exit("chunkString"),y(b)):(n.consume(b),h||(h=!tt(b)),b===92?v:g)}function v(b){return b===91||b===92||b===93?(n.consume(b),d++,g):g(b)}}function _m(n,l,i,o,s,u){let c;return d;function d(v){return v===34||v===39||v===40?(n.enter(o),n.enter(s),n.consume(v),n.exit(s),c=v===40?41:v,h):i(v)}function h(v){return v===c?(n.enter(s),n.consume(v),n.exit(s),n.exit(o),l):(n.enter(u),p(v))}function p(v){return v===c?(n.exit(u),h(c)):v===null?i(v):Be(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),ft(n,p,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===c||v===null||Be(v)?(n.exit("chunkString"),p(v)):(n.consume(v),v===92?g:y)}function g(v){return v===c||v===92?(n.consume(v),y):y(v)}}function Aa(n,l){let i;return o;function o(s){return Be(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),i=!0,o):tt(s)?ft(n,o,i?"linePrefix":"lineSuffix")(s):l(s)}}const wE={name:"definition",tokenize:TE},CE={partial:!0,tokenize:kE};function TE(n,l,i){const o=this;let s;return u;function u(b){return n.enter("definition"),c(b)}function c(b){return Em.call(o,n,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return s=pi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),h):i(b)}function h(b){return Yt(b)?Aa(n,p)(b):p(b)}function p(b){return Sm(n,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return n.attempt(CE,g,g)(b)}function g(b){return tt(b)?ft(n,v,"whitespace")(b):v(b)}function v(b){return b===null||Be(b)?(n.exit("definition"),o.parser.defined.push(s),l(b)):i(b)}}function kE(n,l,i){return o;function o(d){return Yt(d)?Aa(n,s)(d):i(d)}function s(d){return _m(n,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return tt(d)?ft(n,c,"whitespace")(d):c(d)}function c(d){return d===null||Be(d)?l(d):i(d)}}const AE={name:"hardBreakEscape",tokenize:RE};function RE(n,l,i){return o;function o(u){return n.enter("hardBreakEscape"),n.consume(u),s}function s(u){return Be(u)?(n.exit("hardBreakEscape"),l(u)):i(u)}}const NE={name:"headingAtx",resolve:OE,tokenize:zE};function OE(n,l){let i=n.length-2,o=3,s,u;return n[o][1].type==="whitespace"&&(o+=2),i-2>o&&n[i][1].type==="whitespace"&&(i-=2),n[i][1].type==="atxHeadingSequence"&&(o===i-1||i-4>o&&n[i-2][1].type==="whitespace")&&(i-=o+1===i?2:4),i>o&&(s={type:"atxHeadingText",start:n[o][1].start,end:n[i][1].end},u={type:"chunkText",start:n[o][1].start,end:n[i][1].end,contentType:"text"},Rn(n,o,i-o+1,[["enter",s,l],["enter",u,l],["exit",u,l],["exit",s,l]])),n}function zE(n,l,i){let o=0;return s;function s(y){return n.enter("atxHeading"),u(y)}function u(y){return n.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&o++<6?(n.consume(y),c):y===null||Yt(y)?(n.exit("atxHeadingSequence"),d(y)):i(y)}function d(y){return y===35?(n.enter("atxHeadingSequence"),h(y)):y===null||Be(y)?(n.exit("atxHeading"),l(y)):tt(y)?ft(n,d,"whitespace")(y):(n.enter("atxHeadingText"),p(y))}function h(y){return y===35?(n.consume(y),h):(n.exit("atxHeadingSequence"),d(y))}function p(y){return y===null||y===35||Yt(y)?(n.exit("atxHeadingText"),d(y)):(n.consume(y),p)}}const ME=["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"],xm=["pre","script","style","textarea"],DE={concrete:!0,name:"htmlFlow",resolveTo:BE,tokenize:LE},jE={partial:!0,tokenize:HE},UE={partial:!0,tokenize:IE};function BE(n){let l=n.length;for(;l--&&!(n[l][0]==="enter"&&n[l][1].type==="htmlFlow"););return l>1&&n[l-2][1].type==="linePrefix"&&(n[l][1].start=n[l-2][1].start,n[l+1][1].start=n[l-2][1].start,n.splice(l-2,2)),n}function LE(n,l,i){const o=this;let s,u,c,d,h;return p;function p(N){return y(N)}function y(N){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(N),g}function g(N){return N===33?(n.consume(N),v):N===47?(n.consume(N),u=!0,E):N===63?(n.consume(N),s=3,o.interrupt?l:D):Nn(N)?(n.consume(N),c=String.fromCharCode(N),T):i(N)}function v(N){return N===45?(n.consume(N),s=2,b):N===91?(n.consume(N),s=5,d=0,C):Nn(N)?(n.consume(N),s=4,o.interrupt?l:D):i(N)}function b(N){return N===45?(n.consume(N),o.interrupt?l:D):i(N)}function C(N){const ne="CDATA[";return N===ne.charCodeAt(d++)?(n.consume(N),d===ne.length?o.interrupt?l:M:C):i(N)}function E(N){return Nn(N)?(n.consume(N),c=String.fromCharCode(N),T):i(N)}function T(N){if(N===null||N===47||N===62||Yt(N)){const ne=N===47,fe=c.toLowerCase();return!ne&&!u&&xm.includes(fe)?(s=1,o.interrupt?l(N):M(N)):ME.includes(c.toLowerCase())?(s=6,ne?(n.consume(N),_):o.interrupt?l(N):M(N)):(s=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(N):u?k(N):O(N))}return N===45||Wt(N)?(n.consume(N),c+=String.fromCharCode(N),T):i(N)}function _(N){return N===62?(n.consume(N),o.interrupt?l:M):i(N)}function k(N){return tt(N)?(n.consume(N),k):le(N)}function O(N){return N===47?(n.consume(N),le):N===58||N===95||Nn(N)?(n.consume(N),H):tt(N)?(n.consume(N),O):le(N)}function H(N){return N===45||N===46||N===58||N===95||Wt(N)?(n.consume(N),H):B(N)}function B(N){return N===61?(n.consume(N),z):tt(N)?(n.consume(N),B):O(N)}function z(N){return N===null||N===60||N===61||N===62||N===96?i(N):N===34||N===39?(n.consume(N),h=N,L):tt(N)?(n.consume(N),z):P(N)}function L(N){return N===h?(n.consume(N),h=null,q):N===null||Be(N)?i(N):(n.consume(N),L)}function P(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Yt(N)?B(N):(n.consume(N),P)}function q(N){return N===47||N===62||tt(N)?O(N):i(N)}function le(N){return N===62?(n.consume(N),ce):i(N)}function ce(N){return N===null||Be(N)?M(N):tt(N)?(n.consume(N),ce):i(N)}function M(N){return N===45&&s===2?(n.consume(N),V):N===60&&s===1?(n.consume(N),Z):N===62&&s===4?(n.consume(N),A):N===63&&s===3?(n.consume(N),D):N===93&&s===5?(n.consume(N),se):Be(N)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(jE,j,$)(N)):N===null||Be(N)?(n.exit("htmlFlowData"),$(N)):(n.consume(N),M)}function $(N){return n.check(UE,w,j)(N)}function w(N){return n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),G}function G(N){return N===null||Be(N)?$(N):(n.enter("htmlFlowData"),M(N))}function V(N){return N===45?(n.consume(N),D):M(N)}function Z(N){return N===47?(n.consume(N),c="",ae):M(N)}function ae(N){if(N===62){const ne=c.toLowerCase();return xm.includes(ne)?(n.consume(N),A):M(N)}return Nn(N)&&c.length<8?(n.consume(N),c+=String.fromCharCode(N),ae):M(N)}function se(N){return N===93?(n.consume(N),D):M(N)}function D(N){return N===62?(n.consume(N),A):N===45&&s===2?(n.consume(N),D):M(N)}function A(N){return N===null||Be(N)?(n.exit("htmlFlowData"),j(N)):(n.consume(N),A)}function j(N){return n.exit("htmlFlow"),l(N)}}function IE(n,l,i){const o=this;return s;function s(c){return Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):i(c)}function u(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}function HE(n,l,i){return o;function o(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(ql,l,i)}}const qE={name:"htmlText",tokenize:YE};function YE(n,l,i){const o=this;let s,u,c;return d;function d(D){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(D),h}function h(D){return D===33?(n.consume(D),p):D===47?(n.consume(D),B):D===63?(n.consume(D),O):Nn(D)?(n.consume(D),P):i(D)}function p(D){return D===45?(n.consume(D),y):D===91?(n.consume(D),u=0,C):Nn(D)?(n.consume(D),k):i(D)}function y(D){return D===45?(n.consume(D),b):i(D)}function g(D){return D===null?i(D):D===45?(n.consume(D),v):Be(D)?(c=g,Z(D)):(n.consume(D),g)}function v(D){return D===45?(n.consume(D),b):g(D)}function b(D){return D===62?V(D):D===45?v(D):g(D)}function C(D){const A="CDATA[";return D===A.charCodeAt(u++)?(n.consume(D),u===A.length?E:C):i(D)}function E(D){return D===null?i(D):D===93?(n.consume(D),T):Be(D)?(c=E,Z(D)):(n.consume(D),E)}function T(D){return D===93?(n.consume(D),_):E(D)}function _(D){return D===62?V(D):D===93?(n.consume(D),_):E(D)}function k(D){return D===null||D===62?V(D):Be(D)?(c=k,Z(D)):(n.consume(D),k)}function O(D){return D===null?i(D):D===63?(n.consume(D),H):Be(D)?(c=O,Z(D)):(n.consume(D),O)}function H(D){return D===62?V(D):O(D)}function B(D){return Nn(D)?(n.consume(D),z):i(D)}function z(D){return D===45||Wt(D)?(n.consume(D),z):L(D)}function L(D){return Be(D)?(c=L,Z(D)):tt(D)?(n.consume(D),L):V(D)}function P(D){return D===45||Wt(D)?(n.consume(D),P):D===47||D===62||Yt(D)?q(D):i(D)}function q(D){return D===47?(n.consume(D),V):D===58||D===95||Nn(D)?(n.consume(D),le):Be(D)?(c=q,Z(D)):tt(D)?(n.consume(D),q):V(D)}function le(D){return D===45||D===46||D===58||D===95||Wt(D)?(n.consume(D),le):ce(D)}function ce(D){return D===61?(n.consume(D),M):Be(D)?(c=ce,Z(D)):tt(D)?(n.consume(D),ce):q(D)}function M(D){return D===null||D===60||D===61||D===62||D===96?i(D):D===34||D===39?(n.consume(D),s=D,$):Be(D)?(c=M,Z(D)):tt(D)?(n.consume(D),M):(n.consume(D),w)}function $(D){return D===s?(n.consume(D),s=void 0,G):D===null?i(D):Be(D)?(c=$,Z(D)):(n.consume(D),$)}function w(D){return D===null||D===34||D===39||D===60||D===61||D===96?i(D):D===47||D===62||Yt(D)?q(D):(n.consume(D),w)}function G(D){return D===47||D===62||Yt(D)?q(D):i(D)}function V(D){return D===62?(n.consume(D),n.exit("htmlTextData"),n.exit("htmlText"),l):i(D)}function Z(D){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),ae}function ae(D){return tt(D)?ft(n,se,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):se(D)}function se(D){return n.enter("htmlTextData"),c(D)}}const lu={name:"labelEnd",resolveAll:GE,resolveTo:XE,tokenize:ZE},PE={tokenize:KE},FE={tokenize:QE},VE={tokenize:JE};function GE(n){let l=-1;const i=[];for(;++l<n.length;){const o=n[l][1];if(i.push(n[l]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const s=o.type==="labelImage"?4:2;o.type="data",l+=s}}return n.length!==i.length&&Rn(n,0,n.length,i),n}function XE(n,l){let i=n.length,o=0,s,u,c,d;for(;i--;)if(s=n[i][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;n[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(n[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=i,s.type!=="labelLink")){o=2;break}}else s.type==="labelEnd"&&(c=i);const h={type:n[u][1].type==="labelLink"?"link":"image",start:{...n[u][1].start},end:{...n[n.length-1][1].end}},p={type:"label",start:{...n[u][1].start},end:{...n[c][1].end}},y={type:"labelText",start:{...n[u+o+2][1].end},end:{...n[c-2][1].start}};return d=[["enter",h,l],["enter",p,l]],d=cn(d,n.slice(u+1,u+o+3)),d=cn(d,[["enter",y,l]]),d=cn(d,ru(l.parser.constructs.insideSpan.null,n.slice(u+o+4,c-3),l)),d=cn(d,[["exit",y,l],n[c-2],n[c-1],["exit",p,l]]),d=cn(d,n.slice(c+1)),d=cn(d,[["exit",h,l]]),Rn(n,u,n.length,d),n}function ZE(n,l,i){const o=this;let s=o.events.length,u,c;for(;s--;)if((o.events[s][1].type==="labelImage"||o.events[s][1].type==="labelLink")&&!o.events[s][1]._balanced){u=o.events[s][1];break}return d;function d(v){return u?u._inactive?g(v):(c=o.parser.defined.includes(pi(o.sliceSerialize({start:u.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(v),n.exit("labelMarker"),n.exit("labelEnd"),h):i(v)}function h(v){return v===40?n.attempt(PE,y,c?y:g)(v):v===91?n.attempt(FE,y,c?p:g)(v):c?y(v):g(v)}function p(v){return n.attempt(VE,y,g)(v)}function y(v){return l(v)}function g(v){return u._balanced=!0,i(v)}}function KE(n,l,i){return o;function o(g){return n.enter("resource"),n.enter("resourceMarker"),n.consume(g),n.exit("resourceMarker"),s}function s(g){return Yt(g)?Aa(n,u)(g):u(g)}function u(g){return g===41?y(g):Sm(n,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Yt(g)?Aa(n,h)(g):y(g)}function d(g){return i(g)}function h(g){return g===34||g===39||g===40?_m(n,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function p(g){return Yt(g)?Aa(n,y)(g):y(g)}function y(g){return g===41?(n.enter("resourceMarker"),n.consume(g),n.exit("resourceMarker"),n.exit("resource"),l):i(g)}}function QE(n,l,i){const o=this;return s;function s(d){return Em.call(o,n,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return o.parser.defined.includes(pi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?l(d):i(d)}function c(d){return i(d)}}function JE(n,l,i){return o;function o(u){return n.enter("reference"),n.enter("referenceMarker"),n.consume(u),n.exit("referenceMarker"),s}function s(u){return u===93?(n.enter("referenceMarker"),n.consume(u),n.exit("referenceMarker"),n.exit("reference"),l):i(u)}}const WE={name:"labelStartImage",resolveAll:lu.resolveAll,tokenize:$E};function $E(n,l,i){const o=this;return s;function s(d){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(d),n.exit("labelImageMarker"),u}function u(d){return d===91?(n.enter("labelMarker"),n.consume(d),n.exit("labelMarker"),n.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(d):l(d)}}const e_={name:"labelStartLink",resolveAll:lu.resolveAll,tokenize:t_};function t_(n,l,i){const o=this;return s;function s(c){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(c),n.exit("labelMarker"),n.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(c):l(c)}}const ou={name:"lineEnding",tokenize:n_};function n_(n,l){return i;function i(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),ft(n,l,"linePrefix")}}const Yl={name:"thematicBreak",tokenize:r_};function r_(n,l,i){let o=0,s;return u;function u(p){return n.enter("thematicBreak"),c(p)}function c(p){return s=p,d(p)}function d(p){return p===s?(n.enter("thematicBreakSequence"),h(p)):o>=3&&(p===null||Be(p))?(n.exit("thematicBreak"),l(p)):i(p)}function h(p){return p===s?(n.consume(p),o++,h):(n.exit("thematicBreakSequence"),tt(p)?ft(n,d,"whitespace")(p):d(p))}}const Pt={continuation:{tokenize:o_},exit:u_,name:"list",tokenize:l_},i_={partial:!0,tokenize:c_},a_={partial:!0,tokenize:s_};function l_(n,l,i){const o=this,s=o.events[o.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(b){const C=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:nu(b)){if(o.containerState.type||(o.containerState.type=C,n.enter(C,{_container:!0})),C==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(Yl,i,p)(b):p(b);if(!o.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),h(b)}return i(b)}function h(b){return nu(b)&&++c<10?(n.consume(b),h):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),p(b)):i(b)}function p(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,n.check(ql,o.interrupt?i:y,n.attempt(i_,v,g))}function y(b){return o.containerState.initialBlankLine=!0,u++,v(b)}function g(b){return tt(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return o.containerState.size=u+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(b)}}function o_(n,l,i){const o=this;return o.containerState._closeFlow=void 0,n.check(ql,s,u);function s(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,ft(n,l,"listItemIndent",o.containerState.size+1)(d)}function u(d){return o.containerState.furtherBlankLines||!tt(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(a_,l,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,ft(n,n.attempt(Pt,l,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function s_(n,l,i){const o=this;return ft(n,s,"listItemIndent",o.containerState.size+1);function s(u){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?l(u):i(u)}}function u_(n){n.exit(this.containerState.type)}function c_(n,l,i){const o=this;return ft(n,s,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=o.events[o.events.length-1];return!tt(u)&&c&&c[1].type==="listItemPrefixWhitespace"?l(u):i(u)}}const wm={name:"setextUnderline",resolveTo:f_,tokenize:d_};function f_(n,l){let i=n.length,o,s,u;for(;i--;)if(n[i][0]==="enter"){if(n[i][1].type==="content"){o=i;break}n[i][1].type==="paragraph"&&(s=i)}else n[i][1].type==="content"&&n.splice(i,1),!u&&n[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[s][1].type="setextHeadingText",u?(n.splice(s,0,["enter",c,l]),n.splice(u+1,0,["exit",n[o][1],l]),n[o][1].end={...n[u][1].end}):n[o][1]=c,n.push(["exit",c,l]),n}function d_(n,l,i){const o=this;let s;return u;function u(p){let y=o.events.length,g;for(;y--;)if(o.events[y][1].type!=="lineEnding"&&o.events[y][1].type!=="linePrefix"&&o.events[y][1].type!=="content"){g=o.events[y][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||g)?(n.enter("setextHeadingLine"),s=p,c(p)):i(p)}function c(p){return n.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===s?(n.consume(p),d):(n.exit("setextHeadingLineSequence"),tt(p)?ft(n,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Be(p)?(n.exit("setextHeadingLine"),l(p)):i(p)}}const h_={tokenize:m_};function m_(n){const l=this,i=n.attempt(ql,o,n.attempt(this.parser.constructs.flowInitial,s,ft(n,n.attempt(this.parser.constructs.flow,s,n.attempt(vE,s)),"linePrefix")));return i;function o(u){if(u===null){n.consume(u);return}return n.enter("lineEndingBlank"),n.consume(u),n.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function s(u){if(u===null){n.consume(u);return}return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),l.currentConstruct=void 0,i}}const p_={resolveAll:Tm()},g_=Cm("string"),y_=Cm("text");function Cm(n){return{resolveAll:Tm(n==="text"?b_:void 0),tokenize:l};function l(i){const o=this,s=this.parser.constructs[n],u=i.attempt(s,c,d);return c;function c(y){return p(y)?u(y):d(y)}function d(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),h}function h(y){return p(y)?(i.exit("data"),u(y)):(i.consume(y),h)}function p(y){if(y===null)return!0;const g=s[y];let v=-1;if(g)for(;++v<g.length;){const b=g[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function Tm(n){return l;function l(i,o){let s=-1,u;for(;++s<=i.length;)u===void 0?i[s]&&i[s][1].type==="data"&&(u=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==u+2&&(i[u][1].end=i[s-1][1].end,i.splice(u+2,s-u-2),s=u+2),u=void 0);return n?n(i,o):i}}function b_(n,l){let i=0;for(;++i<=n.length;)if((i===n.length||n[i][1].type==="lineEnding")&&n[i-1][1].type==="data"){const o=n[i-1][1],s=l.sliceStream(o);let u=s.length,c=-1,d=0,h;for(;u--;){const p=s[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)h=!0,d++;else if(p!==-1){u++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(d=0),d){const p={type:i===n.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:o.start._bufferIndex+c,_index:o.start._index+u,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...p.start},o.start.offset===o.end.offset?Object.assign(o,p):(n.splice(i,0,["enter",p,l],["exit",p,l]),i+=2)}i++}return n}const v_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:wE},disable:{null:[]},document:{42:Pt,43:Pt,45:Pt,48:Pt,49:Pt,50:Pt,51:Pt,52:Pt,53:Pt,54:Pt,55:Pt,56:Pt,57:Pt,62:mm},flow:{35:NE,42:Yl,45:[wm,Yl],60:DE,61:wm,95:Yl,96:bm,126:bm},flowInitial:{[-2]:au,[-1]:au,32:au},insideSpan:{null:[iu,p_]},string:{38:gm,92:pm},text:{[-5]:ou,[-4]:ou,[-3]:ou,33:WE,38:gm,42:iu,60:[eE,qE],91:e_,92:[AE,pm],93:lu,95:iu,96:hE}},Symbol.toStringTag,{value:"Module"}));function S_(n,l,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},u=[];let c=[],d=[];const h={attempt:L(B),check:L(z),consume:k,enter:O,exit:H,interrupt:L(z,{interrupt:!0})},p={code:null,containerState:{},defineSkip:E,events:[],now:C,parser:n,previous:null,sliceSerialize:v,sliceStream:b,write:g};let y=l.tokenize.call(p,h);return l.resolveAll&&u.push(l),p;function g(ce){return c=cn(c,ce),T(),c[c.length-1]!==null?[]:(P(l,0),p.events=ru(u,p.events,p),p.events)}function v(ce,M){return __(b(ce),M)}function b(ce){return E_(c,ce)}function C(){const{_bufferIndex:ce,_index:M,line:$,column:w,offset:G}=o;return{_bufferIndex:ce,_index:M,line:$,column:w,offset:G}}function E(ce){s[ce.line]=ce.column,le()}function T(){let ce;for(;o._index<c.length;){const M=c[o._index];if(typeof M=="string")for(ce=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ce&&o._bufferIndex<M.length;)_(M.charCodeAt(o._bufferIndex));else _(M)}}function _(ce){y=y(ce)}function k(ce){Be(ce)?(o.line++,o.column=1,o.offset+=ce===-3?2:1,le()):ce!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),p.previous=ce}function O(ce,M){const $=M||{};return $.type=ce,$.start=C(),p.events.push(["enter",$,p]),d.push($),$}function H(ce){const M=d.pop();return M.end=C(),p.events.push(["exit",M,p]),M}function B(ce,M){P(ce,M.from)}function z(ce,M){M.restore()}function L(ce,M){return $;function $(w,G,V){let Z,ae,se,D;return Array.isArray(w)?j(w):"tokenize"in w?j([w]):A(w);function A(ge){return de;function de(Te){const ke=Te!==null&&ge[Te],Me=Te!==null&&ge.null,De=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return j(De)(Te)}}function j(ge){return Z=ge,ae=0,ge.length===0?V:N(ge[ae])}function N(ge){return de;function de(Te){return D=q(),se=ge,ge.partial||(p.currentConstruct=ge),ge.name&&p.parser.constructs.disable.null.includes(ge.name)?fe():ge.tokenize.call(M?Object.assign(Object.create(p),M):p,h,ne,fe)(Te)}}function ne(ge){return ce(se,D),G}function fe(ge){return D.restore(),++ae<Z.length?N(Z[ae]):V}}}function P(ce,M){ce.resolveAll&&!u.includes(ce)&&u.push(ce),ce.resolve&&Rn(p.events,M,p.events.length-M,ce.resolve(p.events.slice(M),p)),ce.resolveTo&&(p.events=ce.resolveTo(p.events,p))}function q(){const ce=C(),M=p.previous,$=p.currentConstruct,w=p.events.length,G=Array.from(d);return{from:w,restore:V};function V(){o=ce,p.previous=M,p.currentConstruct=$,p.events.length=w,d=G,le()}}function le(){o.line in s&&o.column<2&&(o.column=s[o.line],o.offset+=s[o.line]-1)}}function E_(n,l){const i=l.start._index,o=l.start._bufferIndex,s=l.end._index,u=l.end._bufferIndex;let c;if(i===s)c=[n[i].slice(o,u)];else{if(c=n.slice(i,s),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}u>0&&c.push(n[s].slice(0,u))}return c}function __(n,l){let i=-1;const o=[];let s;for(;++i<n.length;){const u=n[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
28
+ /* Handle mobile keyboard viewport adjustments */
29
+ @supports (height: 100svh) {
30
+ .synapse-chat-widget-container {
31
+ /* Use visual viewport height when keyboard appears */
32
+ max-height: 100svh;
33
+ }
34
+ }
35
+ /* Prevent viewport jumping on mobile */
36
+ @media (max-width: 768px) {
37
+ .synapse-chat-widget-container {
38
+ /* Use safe area insets for better mobile support */
39
+ height: 100svh;
40
+ max-height: 100svh;
41
+ }
42
+ }
43
+ `}),O.jsxs(da,{className:b,children:[O.jsx("div",{className:"flex-shrink-0 sticky top-0 z-50",children:O.jsx(r1,{onClose:l,title:s,iconUrl:i,startNewConversation:o})}),O.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:u}),f&&O.jsxs("div",{className:"flex-shrink-0 sticky bottom-0 z-50",children:[O.jsx(P.Suspense,{fallback:null,children:O.jsx(i1,{value:f.value,onChange:f.onChange,onSend:f.onSend,onFileChange:f.onFileChange,onRecording:f.onRecording,isRecording:f.isRecording,hasAttachment:f.hasAttachment,attachmentFiles:f.attachmentFiles,isDisabled:f.isDisabled,isMobile:h,placeholder:f.placeholder,recordingStatus:f.recordingStatus})}),c&&m==="development"&&O.jsx("div",{className:"px-6 flex justify-center items-center",children:O.jsxs("p",{className:"text-[8px] text-gray-600 font-mono opacity-50",children:["Session ID: ",c]})})]})]})]})}function Wh(){const[n,l]=P.useState(typeof navigator<"u"?navigator.onLine:!0);return P.useEffect(()=>{const i=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",i),window.addEventListener("offline",o),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",o)}},[]),{isOnline:n}}const l1=({environment:n,userId:l,onInlineText:i})=>{const[o,u]=P.useState([]),[s,c]=P.useState(!1),[f,m]=P.useState(0),[h,g]=P.useState(!1),[y,v]=P.useState([]),b=P.useRef(null),w=P.useRef(null),{isOnline:E}=Wh(),{agentId:T,setSessionId:_,setSessionToken:A,sessionId:k,sessionToken:q,setError:H,setConnectionStatus:M,setShowRetryButton:I,setStartNewConnection:Y,setIsStreaming:F,setIsWaitingForResponse:$,isStreaming:ie,initialMessage:D,isWaitingForResponse:ne,setProgressMessage:C,setRecordingStatus:V,clearSession:Z,addMessageToSession:Q,getMessagesForSession:se,updateMessageInSession:de,setInitialMessage:L}=Yr();P.useEffect(()=>{E?h?B()&&(M(Ge.ConnectionStatus.CONNECTED),re()):M(Ge.ConnectionStatus.CONNECTING):M(Ge.ConnectionStatus.NOT_CONNECTED)},[E,h]),P.useEffect(()=>{if(k){const S=se(k)||[];u(S),v([])}},[k]),P.useEffect(()=>{if(g(!1),!T)return;const S=new Ge.SynapseSDK({agentId:T,environment:n,userId:l,callbacks:{onError:K=>{if(K instanceof Ge.SynapseError)switch(K.code){case Ge.SynapseErrorCode.SESSION:M(Ge.ConnectionStatus.NOT_CONNECTED),I(!0);break;case Ge.SynapseErrorCode.RECORDING:H({title:"Recording failed",description:K?.displayMessage||"Please try again later"});break;default:H({title:"Something went wrong",description:"Please try again later"}),I(!0);break}},onSessionRefreshed:K=>{K?.session_id&&K?.session_token&&(_(K.session_id),A(K.session_token))}}});return b.current=S,g(!0),()=>{g(!1),b.current?.endSession(),b.current=null,w.current&&(clearTimeout(w.current),w.current=null)}},[T,n,l]),P.useEffect(()=>{const S=o[o.length-1];!S?.role||!k||(S?.role===On.USER?Q(k,S):!ie&&!S.isStored&&(u(K=>{const W=[...K];return W[W.length-1]={...S,isStored:!0},W}),Q(k,{...S,isStored:!0})))},[o,ie]),P.useEffect(()=>{const S=o[o.length-1];return()=>{S&&!S?.isStored&&k&&Q(k,{...S,isStored:!0})}},[]),P.useEffect(()=>(w.current&&(clearTimeout(w.current),w.current=null),ne&&!ie?w.current=setTimeout(()=>{$(!1),w.current=null},3e4):ie&&w.current&&(clearTimeout(w.current),w.current=null),()=>{w.current&&(clearTimeout(w.current),w.current=null)}),[ne,ie,$]);const N=async(S=!1)=>{try{if(!b.current){H({title:"SDK not initialized",description:"Please ensure agentId is configured"}),c(!1);return}c(!0);let K;S?(await Z(),re(),K=await b.current.startSession()):K=await b.current.startSession({session_id:k||"",session_token:q||""}),K?.session_id&&K?.session_token&&(_(K.session_id),A(K.session_token),K?.initial_message?.text&&K?.initial_message?.suggestions?.length&&L(K.initial_message)),ce()}catch{H({title:"Something Went wrong!",description:"Please try again later."}),c(!1);return}finally{c(!1)}},B=()=>b.current?.isConnected()??!1,z=()=>{b.current?.endSession()},re=()=>{m(0),I(!1),Y(!1),H(null)},ce=()=>{b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,S=>{const K=S;if(K.data?.text&&K.messageId){ie||($(!1),F(!0));const W=K.data.text,U=K.messageId,j=K.timestamp;u(X=>{const he=X[X.length-1];if(he&&he.id===U&&he.role===On.ASSISTANT){const pe=[...X];return pe[pe.length-1]={...he,content:he.content+W},pe}else return[...X,{id:U,content:W,role:On.ASSISTANT,timestamp:fa(j??Date.now()),isStored:!1}]})}}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{F(!1),C(null)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{re(),M(Ge.ConnectionStatus.CONNECTED)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,S=>{const K=S;if(!K?.messageId||!K?.data||!K?.data?.details?.component)return;const W=K.messageId,U=K.timestamp??Date.now();u(j=>{const X=j[j.length-1];if(X.id===W&&X.role===On.ASSISTANT){const he=[...j],pe={...X,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0};return he[j.length-1]=pe,de(k,W,pe),he}else{const he={id:W,content:K.data?.text||"",role:On.ASSISTANT,toolEscalationData:{...K.data,isResponded:!1},isResponseFromTool:!0,timestamp:fa(U),isStored:!1};return[...j,he]}})}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,S=>{M(Ge.ConnectionStatus.NOT_CONNECTED),f<2?(m(K=>K+1),I(!0)):Y(!0)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.ERROR,S=>{I(!0)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,S=>{const K=S;K?.data?.text&&i&&(V(Ft.IDLE),i?.(K.data.text)),F(!1),$(!1),C(null)}),b.current?.on(Ge.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,S=>{const K=S;K.data?.text&&($(!1),C(K.data.text))})},we=async({message:S,messageId:K,files:W,audio:U,toolCalled:j})=>{if(!B()||W&&W.length<0&&S?.trim()===""&&!U?.audio)return;H(null);const X=o.length==2&&y.length==2?y:null;if(S||W&&W.length>0||U?.audio){const he=o.length-1,pe=he>=0?o[he]:null,le=pe?pe?.isResponseFromTool||pe.role===On.ASSISTANT&&pe.toolEscalationData:null;await b.current?.sendMessage({message:S,files:W,audio:U,...X&&{initial_prompts:X},...le&&!j?{tool_declined:!0,tool_id:pe?.toolEscalationData?.tool_id||""}:{}}),u(Ee=>{const _e=[...Ee],Se=_e.length-1;return le&&Se>=0&&_e[Se].toolEscalationData&&(_e[Se]={..._e[Se],toolEscalationData:{..._e[Se].toolEscalationData,tool_id:null,isResponded:!0}},de(k,_e[he].id||Date.now().toString(),_e[he])),[..._e,{id:K||Date.now().toString(),content:S||"",files:W||[],role:On.USER,timestamp:fa(Date.now()),isStored:!0}]}),$(!0)}};return{sendMessage:we,startSession:N,incomingMessages:o,loading:s,endSession:z,isReady:h,startRecording:async()=>{if(!B())throw new Error("Not connected to the server");try{await b.current?.startRecording({onChunks:async S=>{V(Ft.PROCESSING),await we({audio:S}),V(Ft.TRANSCRIBING)},onError(S){V(Ft.IDLE)}}),V(Ft.LISTENING)}catch(S){throw V(Ft.IDLE),S}},stopRecording:()=>{B()&&b.current?.endRecording()},handleRetry:async()=>{if(!B())re(),await N(!1);else{const S=o[o.length-1];S&&S.role===On.USER&&b.current?.sendMessage({message:S.content,files:S.files||[],messageId:S.id})}},isValidFile:S=>{const K=S.type.toLowerCase(),U=S.name.toLowerCase().split(".").pop()||"";return K&&["application/pdf","image/jpeg","image/jpg","image/png","image/heic","image/heif","application/vnd.openxmlformats-officedocument.wordprocessingml.document","image/tiff","text/plain","text/markdown"].some(X=>K.includes(X))?!0:!K||K===""?["pdf","jpg","jpeg","png","heic","docx","tiff","txt","md"].includes(U):!1},handleStartNewConnection:async()=>{re(),await Z(),await N(!0)},callTool:async(S,K)=>{try{if(!B())throw new Error("Not connected to the server");const W=await b.current?.callTool(S,K);if(!W)throw new Error("Failed to call tool");return W}catch(W){throw W}},handleInitialTaskClick:async S=>{if(!D?.suggestions.length||!S)return;const K=D.suggestions.find(W=>W.value===S);if(!K||!K.response){await we({message:S});return}u(W=>[...W,{id:Date.now().toString(),content:S,role:On.USER,timestamp:fa(Date.now()),isStored:!0}]),$(!0),await Jv(1e3),$(!1),u(W=>[...W,{id:Date.now().toString(),content:K.response||"Please try again",role:On.ASSISTANT,timestamp:fa(Date.now()),isStored:!1}]),v([{role:"user",text:S},{role:"assistant",text:K.response}])}}},o1=P.lazy(()=>Promise.resolve().then(()=>Gw)),s1=P.lazy(()=>Promise.resolve().then(()=>Kw)),u1=P.lazy(()=>Promise.resolve().then(()=>Jw).then(n=>({default:n.ConnectionStatus})));function c1({isOpen:n,agentId:l,config:i}){const[o,u]=P.useState(""),[s,c]=P.useState(!1),[f,m]=P.useState(!1),[h,g]=P.useState([]),y=P.useRef(!1),v=P.useRef(null),b=P.useRef(null),[w,E]=P.useState(!1),T=P.useRef(0),{setAgentId:_,startNewConnection:A,showRetryButton:k,clearError:q,error:H,connectionStatus:M,recordingStatus:I,isWaitingForResponse:Y,isStreaming:F,setError:$,initialMessage:ie,sessionId:D}=Yr(),{incomingMessages:ne,loading:C,sendMessage:V,startSession:Z,isReady:Q,startRecording:se,stopRecording:de,handleRetry:L,handleStartNewConnection:N,isValidFile:B,callTool:z,handleInitialTaskClick:re}=l1({environment:"production",onInlineText:j=>{u(X=>X+j)}});P.useEffect(()=>{l&&(_(l),n&&Q&&!y.current&&(y.current=!0,Z(!1)))},[n,Q,l]);const ce=()=>v.current?.querySelector("[data-radix-scroll-area-viewport]")||null,we=()=>{const j=ce();j&&(j.scrollTo({top:j.scrollHeight,behavior:"smooth"}),E(!1))},Te=()=>{const j=ce();return j?j.scrollHeight-j.scrollTop-j.clientHeight<50:!0};P.useEffect(()=>{ne.length>T.current&&(setTimeout(()=>{we()},100),T.current=ne.length)},[ne.length]),P.useEffect(()=>{const j=ce();if(!j)return;const X=()=>{E(!Te())},he=()=>{X()},pe=new MutationObserver(()=>{X()});return pe.observe(j,{childList:!0,subtree:!0}),j.addEventListener("scroll",he),X(),()=>{pe.disconnect(),j.removeEventListener("scroll",he)}},[ne.length]);const ke=ne.length>0,Ae=M===Ge.ConnectionStatus.CONNECTED,He=C||!Ae||Y||F,ve=C||!Ae,ze=P.useMemo(()=>I===Ft.IDLE?null:I===Ft.LISTENING?"Listening...":I===Ft.PROCESSING?"Processing...":I===Ft.TRANSCRIBING?"Transcribing...":null,[I]),je=ve?"Connecting...":ze||(Y||F?"Please wait for the response...":"Ask me anything…"),S=async()=>{if(!He&&(o.trim()||s||f)){const j=Date.now().toString();h.length>0?(await V({files:h,message:o.trim(),messageId:j}),g([]),m(!1)):o.trim()&&await V({message:o,messageId:j}),u(""),c(!1),m(!1),setTimeout(()=>{we()},100)}},K=async j=>{j&&await re(j)},W=j=>{if(j&&j.length>0){const X=j.filter(he=>B(he)?!0:($({title:`File type not supported: ${he.name}`,description:"Only PDF, images (JPG, JPEG, PNG, HEIC), documents (DOCX, TIFF), and text files (TXT, MD) are allowed."}),!1));if(X?.length>0)j=X;else return}g(X=>(m((X?.length??0)+(j?.length??0)>0),[...X,...j]))},U=async()=>{if(s)await de(),c(!1);else{if(He)return;try{await se(),c(!0)}catch{}}};return O.jsx(a1,{isOpen:n,onClose:i.onClose,title:i.title,iconUrl:i.iconUrl,onStartNewSession:()=>Z(!0),sessionId:D,environment:i.environment,chatComposer:{value:o,onChange:u,onSend:S,onFileChange:W,onRecording:U,isRecording:s,hasAttachment:f,attachmentFiles:h,isDisabled:He,placeholder:je,recordingStatus:I},children:!C&&O.jsx(P.Suspense,{fallback:O.jsx(f1,{}),children:O.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl relative",children:[O.jsx(Ud,{ref:v,className:"flex-1 min-h-0",children:O.jsxs("div",{className:Ye("transition-all duration-300",ke?"p-4 space-y-3":"p-6 space-y-6"),children:[!ke&&ie?.text?O.jsx(s1,{tasks:ie.suggestions,initialPrompt:ie.text,onTaskClick:K,disabled:He}):O.jsx(o1,{messages:ne,onSendMessage:V,iconUrl:i.iconUrl,callTool:z}),O.jsx("div",{ref:b})]})}),w&&O.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:O.jsx(kt,{onClick:we,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:O.jsx(Rs,{className:"w-5 h-5 text-slate-700"})})}),O.jsx(u1,{className:"mt-2",onRetry:L,onStartNewSession:N,showRetryButton:k,startNewConnection:A,clearError:q,error:H,isConnected:Ae})]})})})}function f1(){return O.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[O.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[O.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),O.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),O.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),O.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function d1({agentId:n,config:l}){const[i,o]=P.useState(!1);P.useEffect(()=>{o(!0)},[]);const u=()=>{o(!1),l?.onClose?.()};return O.jsx(c1,{isOpen:i,agentId:n,config:{...l,environment:l.environment??"production",onClose:u,title:l.title??"Medi Clinic"}})}const $h=(n,l,i)=>{Lb.createRoot(n).render(O.jsx(P.StrictMode,{children:O.jsx(d1,{agentId:l,config:i||{}})}))};typeof window<"u"&&(window.renderMedAssist=$h);const em=P.forwardRef(({className:n,...l},i)=>O.jsx("textarea",{className:Ye("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:i,...l}));em.displayName="Textarea";function h1({value:n,onChange:l,onSend:i,onFileChange:o,onRecording:u,isRecording:s,hasAttachment:c,attachmentFiles:f,isDisabled:m,placeholder:h,isMobile:g,recordingStatus:y}){const v=P.useRef(null),b=P.useRef(null),w=n.trim().length>0||c,E=(m||y!==Ft.IDLE)&&!s,T=Ye("rounded-full transition-all duration-200 ",s?"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)]":E?"text-lavender-300 cursor-not-allowed shadow-none":"text-lavender-600 hover:bg-gray-100"),_=M=>{const I=Array.from(M.target.files||[]);I.length>0&&o(I)},A=()=>{m||v.current?.click()},k=M=>{M.key==="Enter"&&!M.shiftKey&&w&&!m&&(M.preventDefault(),i())},q=M=>{M.style.height="auto",M.style.overflow="hidden";const I=M.scrollHeight,Y=40,F=120,$=Math.max(Y,Math.min(I,F));M.style.height=$+"px",I>F?M.style.overflow="auto":M.style.overflow="hidden"},H=M=>{q(M.currentTarget)};return P.useEffect(()=>{b.current&&q(b.current)},[n]),P.useEffect(()=>{!m&&!g&&b.current?.focus()},[m]),O.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl px-4 py-2",children:[O.jsx("input",{ref:v,type:"file",multiple:!0,accept:"image/jpeg, image/png, image/jpg, image/tiff, application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown, image/heif, image/heic",className:"hidden",onChange:_,disabled:m,title:"Attach file","aria-label":"Attach file"}),O.jsxs("div",{className:Ye("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",s||c?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",m&&"opacity-60"),children:[c&&f.length>0&&O.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[f.length," file(s)"]}),O.jsx(em,{ref:b,onInput:H,placeholder:h,value:n,onChange:M=>l(M.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:k,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"}),O.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:A,disabled:m,className:`rounded-full transition-all ${c?"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:O.jsx(ES,{className:"w-5 h-5"})}),s?O.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,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:O.jsx(_S,{className:"w-4 h-4"})}):O.jsx(kt,{type:"button",variant:"ghost",size:"icon",onClick:u,disabled:E,className:T,title:"Start recording",children:O.jsx(SS,{className:"w-5 h-5"})}),w&&!m&&O.jsx(kt,{type:"button",size:"icon",onClick:i,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:O.jsx(xS,{className:"w-4 h-4"})})]})]})}const m1=Object.freeze(Object.defineProperty({__proto__:null,default:h1},Symbol.toStringTag,{value:"Module"}));function zT(){}function MT(){}function p1(n,l){const i={};return(n[n.length-1]===""?[...n,""]:n).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const g1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,y1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,b1={};function tm(n,l){return(b1.jsx?y1:g1).test(n)}const v1=/[ \t\n\f\r]/g;function S1(n){return typeof n=="object"?n.type==="text"?nm(n.value):!1:nm(n)}function nm(n){return n.replace(v1,"")===""}class Na{constructor(l,i,o){this.normal=i,this.property=l,o&&(this.space=o)}}Na.prototype.normal={},Na.prototype.property={},Na.prototype.space=void 0;function rm(n,l){const i={},o={};for(const u of n)Object.assign(i,u.property),Object.assign(o,u.normal);return new Na(i,o,l)}function Gs(n){return n.toLowerCase()}class Yt{constructor(l,i){this.attribute=i,this.property=l}}Yt.prototype.attribute="",Yt.prototype.booleanish=!1,Yt.prototype.boolean=!1,Yt.prototype.commaOrSpaceSeparated=!1,Yt.prototype.commaSeparated=!1,Yt.prototype.defined=!1,Yt.prototype.mustUseProperty=!1,Yt.prototype.number=!1,Yt.prototype.overloadedBoolean=!1,Yt.prototype.property="",Yt.prototype.spaceSeparated=!1,Yt.prototype.space=void 0;let E1=0;const Pe=Vr(),xt=Vr(),Xs=Vr(),xe=Vr(),ft=Vr(),gi=Vr(),en=Vr();function Vr(){return 2**++E1}const Zs=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:xt,commaOrSpaceSeparated:en,commaSeparated:gi,number:xe,overloadedBoolean:Xs,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Ks=Object.keys(Zs);class Qs extends Yt{constructor(l,i,o,u){let s=-1;if(super(l,i),im(this,"space",u),typeof o=="number")for(;++s<Ks.length;){const c=Ks[s];im(this,Ks[s],(o&Zs[c])===Zs[c])}}}Qs.prototype.defined=!0;function im(n,l,i){i&&(n[l]=i)}function yi(n){const l={},i={};for(const[o,u]of Object.entries(n.properties)){const s=new Qs(o,n.transform(n.attributes||{},o),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),l[o]=s,i[Gs(o)]=o,i[Gs(s.attribute)]=o}return new Na(l,i,n.space)}const am=yi({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:ft,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:xe,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:ft,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:xt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function lm(n,l){return l in n?n[l]:l}function om(n,l){return lm(n,l.toLowerCase())}const x1=yi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gi,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:ft,autoFocus:Pe,autoPlay:Pe,blocking:ft,capture:null,charSet:null,checked:Pe,cite:null,className:ft,cols:xe,colSpan:null,content:null,contentEditable:xt,controls:Pe,controlsList:ft,coords:xe|gi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Xs,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:ft,height:xe,hidden:Xs,high:xe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:ft,itemRef:ft,itemScope:Pe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,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:Pe,optimum:xe,pattern:null,ping:ft,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:ft,required:Pe,reversed:Pe,rows:xe,rowSpan:xe,sandbox:ft,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:xt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:om}),_1=yi({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:en,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:ft,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:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,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:gi,g2:gi,glyphName:gi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:en,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,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:xe,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:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:en,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:en,rev:en,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:en,requiredFeatures:en,requiredFonts:en,requiredFormats:en,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:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:en,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:en,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:en,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lm}),sm=yi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,l){return"xlink:"+l.slice(5).toLowerCase()}}),um=yi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:om}),cm=yi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),w1={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"},C1=/[A-Z]/g,fm=/-[a-z]/g,T1=/^data[-\w.:]+$/i;function A1(n,l){const i=Gs(l);let o=l,u=Yt;if(i in n.normal)return n.property[n.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&T1.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(fm,N1);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!fm.test(s)){let c=s.replace(C1,k1);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=Qs}return new u(o,l)}function k1(n){return"-"+n.toLowerCase()}function N1(n){return n.charAt(1).toUpperCase()}const R1=rm([am,x1,sm,um,cm],"html"),Js=rm([am,_1,sm,um,cm],"svg");function O1(n){return n.join(" ").trim()}var bi={},Ws,dm;function z1(){if(dm)return Ws;dm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
44
+ `,h="/",g="*",y="",v="comment",b="declaration";function w(T,_){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];_=_||{};var A=1,k=1;function q(C){var V=C.match(l);V&&(A+=V.length);var Z=C.lastIndexOf(m);k=~Z?C.length-Z:k+C.length}function H(){var C={line:A,column:k};return function(V){return V.position=new M(C),F(),V}}function M(C){this.start=C,this.end={line:A,column:k},this.source=_.source}M.prototype.content=T;function I(C){var V=new Error(_.source+":"+A+":"+k+": "+C);if(V.reason=C,V.filename=_.source,V.line=A,V.column=k,V.source=T,!_.silent)throw V}function Y(C){var V=C.exec(T);if(V){var Z=V[0];return q(Z),T=T.slice(Z.length),V}}function F(){Y(i)}function $(C){var V;for(C=C||[];V=ie();)V!==!1&&C.push(V);return C}function ie(){var C=H();if(!(h!=T.charAt(0)||g!=T.charAt(1))){for(var V=2;y!=T.charAt(V)&&(g!=T.charAt(V)||h!=T.charAt(V+1));)++V;if(V+=2,y===T.charAt(V-1))return I("End of comment missing");var Z=T.slice(2,V-2);return k+=2,q(Z),T=T.slice(V),k+=2,C({type:v,comment:Z})}}function D(){var C=H(),V=Y(o);if(V){if(ie(),!Y(u))return I("property missing ':'");var Z=Y(s),Q=C({type:b,property:E(V[0].replace(n,y)),value:Z?E(Z[0].replace(n,y)):y});return Y(c),Q}}function ne(){var C=[];$(C);for(var V;V=D();)V!==!1&&(C.push(V),$(C));return C}return F(),ne()}function E(T){return T?T.replace(f,y):y}return Ws=w,Ws}var hm;function M1(){if(hm)return bi;hm=1;var n=bi&&bi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.default=i;const l=n(z1());function i(o,u){let s=null;if(!o||typeof o!="string")return s;const c=(0,l.default)(o),f=typeof u=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:g}=m;f?u(h,g,m):g&&(s=s||{},s[h]=g)}),s}return bi}var Ra={},mm;function D1(){if(mm)return Ra;mm=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(h){return!h||i.test(h)||n.test(h)},c=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},m=function(h,g){return g===void 0&&(g={}),s(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(u,f):h=h.replace(o,f),h.replace(l,c))};return Ra.camelCase=m,Ra}var Oa,pm;function j1(){if(pm)return Oa;pm=1;var n=Oa&&Oa.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=n(M1()),i=D1();function o(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(f,m){f&&m&&(c[(0,i.camelCase)(f,s)]=m)}),c}return o.default=o,Oa=o,Oa}var L1=j1();const I1=ms(L1),gm=ym("end"),$s=ym("start");function ym(n){return l;function l(i){const o=i&&i.position&&i.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 B1(n){const l=$s(n),i=gm(n);if(l&&i)return{start:l,end:i}}function za(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?bm(n.position):"start"in n||"end"in n?bm(n):"line"in n||"column"in n?eu(n):""}function eu(n){return vm(n&&n.line)+":"+vm(n&&n.column)}function bm(n){return eu(n&&n.start)+"-"+eu(n&&n.end)}function vm(n){return n&&typeof n=="number"?n:1}class Ht extends Error{constructor(l,i,o){super(),typeof i=="string"&&(o=i,i=void 0);let u="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof l=="string"?u=l:!s.cause&&l&&(c=!0,u=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof o=="string"){const m=o.indexOf(":");m===-1?s.ruleId=o:(s.source=o.slice(0,m),s.ruleId=o.slice(m+1))}if(!s.place&&s.ancestors&&s.ancestors){const m=s.ancestors[s.ancestors.length-1];m&&(s.place=m.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=f?f.line:void 0,this.name=za(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ht.prototype.file="",Ht.prototype.name="",Ht.prototype.reason="",Ht.prototype.message="",Ht.prototype.stack="",Ht.prototype.column=void 0,Ht.prototype.line=void 0,Ht.prototype.ancestors=void 0,Ht.prototype.cause=void 0,Ht.prototype.fatal=void 0,Ht.prototype.place=void 0,Ht.prototype.ruleId=void 0,Ht.prototype.source=void 0;const tu={}.hasOwnProperty,U1=new Map,H1=/[A-Z]/g,q1=new Set(["table","tbody","thead","tfoot","tr"]),P1=new Set(["td","th"]),Sm="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function F1(n,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let o;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=J1(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=Q1(i,l.jsx,l.jsxs)}const u={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:o,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Js:R1,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=Em(u,n,void 0);return s&&typeof s!="string"?s:u.create(n,u.Fragment,{children:s||void 0},void 0)}function Em(n,l,i){if(l.type==="element")return Y1(n,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return V1(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return X1(n,l,i);if(l.type==="mdxjsEsm")return G1(n,l);if(l.type==="root")return Z1(n,l,i);if(l.type==="text")return K1(n,l)}function Y1(n,l,i){const o=n.schema;let u=o;l.tagName.toLowerCase()==="svg"&&o.space==="html"&&(u=Js,n.schema=u),n.ancestors.push(l);const s=_m(n,l.tagName,!1),c=W1(n,l);let f=ru(n,l);return q1.has(l.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!S1(m):!0})),xm(n,c,s,l),nu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function V1(n,l){if(l.data&&l.data.estree&&n.evaluater){const o=l.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}Ma(n,l.position)}function G1(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);Ma(n,l.position)}function X1(n,l,i){const o=n.schema;let u=o;l.name==="svg"&&o.space==="html"&&(u=Js,n.schema=u),n.ancestors.push(l);const s=l.name===null?n.Fragment:_m(n,l.name,!0),c=$1(n,l),f=ru(n,l);return xm(n,c,s,l),nu(c,f),n.ancestors.pop(),n.schema=o,n.create(l,s,c,i)}function Z1(n,l,i){const o={};return nu(o,ru(n,l)),n.create(l,n.Fragment,o,i)}function K1(n,l){return l.value}function xm(n,l,i,o){typeof i!="string"&&i!==n.Fragment&&n.passNode&&(l.node=o)}function nu(n,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(n.children=i)}}function Q1(n,l,i){return o;function o(u,s,c,f){const h=Array.isArray(c.children)?i:l;return f?h(s,c,f):h(s,c)}}function J1(n,l){return i;function i(o,u,s,c){const f=Array.isArray(s.children),m=$s(o);return l(u,s,c,f,{columnNumber:m?m.column-1:void 0,fileName:n,lineNumber:m?m.line:void 0},void 0)}}function W1(n,l){const i={};let o,u;for(u in l.properties)if(u!=="children"&&tu.call(l.properties,u)){const s=eE(n,u,l.properties[u]);if(s){const[c,f]=s;n.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&P1.has(l.tagName)?o=f:i[c]=f}}if(o){const s=i.style||(i.style={});s[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return i}function $1(n,l){const i={};for(const o of l.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const s=o.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,n.evaluater.evaluateExpression(f.argument))}else Ma(n,l.position);else{const u=o.name;let s;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const f=o.value.data.estree.body[0];f.type,s=n.evaluater.evaluateExpression(f.expression)}else Ma(n,l.position);else s=o.value===null?!0:o.value;i[u]=s}return i}function ru(n,l){const i=[];let o=-1;const u=n.passKeys?new Map:U1;for(;++o<l.children.length;){const s=l.children[o];let c;if(n.passKeys){const m=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(m){const h=u.get(m)||0;c=m+"-"+h,u.set(m,h+1)}}const f=Em(n,s,c);f!==void 0&&i.push(f)}return i}function eE(n,l,i){const o=A1(n.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=o.commaSeparated?p1(i):O1(i)),o.property==="style"){let u=typeof i=="object"?i:tE(n,String(i));return n.stylePropertyNameCase==="css"&&(u=nE(u)),["style",u]}return[n.elementAttributeNameCase==="react"&&o.space?w1[o.property]||o.property:o.attribute,i]}}function tE(n,l){try{return I1(l,{reactCompat:!0})}catch(i){if(n.ignoreInvalidStyle)return{};const o=i,u=new Ht("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=n.filePath||void 0,u.url=Sm+"#cannot-parse-style-attribute",u}}function _m(n,l,i){let o;if(!i)o={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let s=-1,c;for(;++s<u.length;){const f=tm(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}o=c}else o=tm(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(o.type==="Literal"){const u=o.value;return tu.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ma(n)}function Ma(n,l){const i=new Ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=Sm+"#cannot-handle-mdx-estrees-without-createevaluater",i}function nE(n){const l={};let i;for(i in n)tu.call(n,i)&&(l[rE(i)]=n[i]);return l}function rE(n){let l=n.replace(H1,iE);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function iE(n){return"-"+n.toLowerCase()}const iu={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"]},aE={};function lE(n,l){const i=aE,o=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return wm(n,o,u)}function wm(n,l,i){if(oE(n)){if("value"in n)return n.type==="html"&&!i?"":n.value;if(l&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Cm(n.children,l,i)}return Array.isArray(n)?Cm(n,l,i):""}function Cm(n,l,i){const o=[];let u=-1;for(;++u<n.length;)o[u]=wm(n[u],l,i);return o.join("")}function oE(n){return!!(n&&typeof n=="object")}const Tm=document.createElement("i");function au(n){const l="&"+n+";";Tm.innerHTML=l;const i=Tm.textContent;return i.charCodeAt(i.length-1)===59&&n!=="semi"||i===l?!1:i}function zn(n,l,i,o){const u=n.length;let s=0,c;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,i=i>0?i:0,o.length<1e4)c=Array.from(o),c.unshift(l,i),n.splice(...c);else for(i&&n.splice(l,i);s<o.length;)c=o.slice(s,s+1e4),c.unshift(l,0),n.splice(...c),s+=1e4,l+=1e4}function dn(n,l){return n.length>0?(zn(n,n.length,0,l),n):l}const Am={}.hasOwnProperty;function sE(n){const l={};let i=-1;for(;++i<n.length;)uE(l,n[i]);return l}function uE(n,l){let i;for(i in l){const u=(Am.call(n,i)?n[i]:void 0)||(n[i]={}),s=l[i];let c;if(s)for(c in s){Am.call(u,c)||(u[c]=[]);const f=s[c];cE(u[c],Array.isArray(f)?f:f?[f]:[])}}}function cE(n,l){let i=-1;const o=[];for(;++i<l.length;)(l[i].add==="after"?n:o).push(l[i]);zn(n,0,0,o)}function km(n,l){const i=Number.parseInt(n,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function vi(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=dr(/[A-Za-z]/),tn=dr(/[\dA-Za-z]/),fE=dr(/[#-'*+\--9=?A-Z^-~]/);function lu(n){return n!==null&&(n<32||n===127)}const ou=dr(/\d/),dE=dr(/[\dA-Fa-f]/),hE=dr(/[!-/:-@[-`{-~]/);function Be(n){return n!==null&&n<-2}function Vt(n){return n!==null&&(n<0||n===32)}function rt(n){return n===-2||n===-1||n===32}const mE=dr(new RegExp("\\p{P}|\\p{S}","u")),pE=dr(/\s/);function dr(n){return l;function l(i){return i!==null&&i>-1&&n.test(String.fromCharCode(i))}}function Si(n){const l=[];let i=-1,o=0,u=0;for(;++i<n.length;){const s=n.charCodeAt(i);let c="";if(s===37&&tn(n.charCodeAt(i+1))&&tn(n.charCodeAt(i+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=n.charCodeAt(i+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),u=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(n.slice(o,i),encodeURIComponent(c)),o=i+u+1,c=""),u&&(i+=u,u=0)}return l.join("")+n.slice(o)}function dt(n,l,i,o){const u=o?o-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(m){return rt(m)?(n.enter(i),f(m)):l(m)}function f(m){return rt(m)&&s++<u?(n.consume(m),f):(n.exit(i),l(m))}}const gE={tokenize:yE};function yE(n){const l=n.attempt(this.parser.constructs.contentInitial,o,u);let i;return l;function o(f){if(f===null){n.consume(f);return}return n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),dt(n,l,"linePrefix")}function u(f){return n.enter("paragraph"),s(f)}function s(f){const m=n.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,c(f)}function c(f){if(f===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(f);return}return Be(f)?(n.consume(f),n.exit("chunkText"),s):(n.consume(f),c)}}const bE={tokenize:vE},Nm={tokenize:SE};function vE(n){const l=this,i=[];let o=0,u,s,c;return f;function f(k){if(o<i.length){const q=i[o];return l.containerState=q[1],n.attempt(q[0].continuation,m,h)(k)}return h(k)}function m(k){if(o++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&A();const q=l.events.length;let H=q,M;for(;H--;)if(l.events[H][0]==="exit"&&l.events[H][1].type==="chunkFlow"){M=l.events[H][1].end;break}_(o);let I=q;for(;I<l.events.length;)l.events[I][1].end={...M},I++;return zn(l.events,H+1,0,l.events.slice(q)),l.events.length=I,h(k)}return f(k)}function h(k){if(o===i.length){if(!u)return v(k);if(u.currentConstruct&&u.currentConstruct.concrete)return w(k);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(Nm,g,y)(k)}function g(k){return u&&A(),_(o),v(k)}function y(k){return l.parser.lazy[l.now().line]=o!==i.length,c=l.now().offset,w(k)}function v(k){return l.containerState={},n.attempt(Nm,b,w)(k)}function b(k){return o++,i.push([l.currentConstruct,l.containerState]),v(k)}function w(k){if(k===null){u&&A(),_(0),n.consume(k);return}return u=u||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),E(k)}function E(k){if(k===null){T(n.exit("chunkFlow"),!0),_(0),n.consume(k);return}return Be(k)?(n.consume(k),T(n.exit("chunkFlow")),o=0,l.interrupt=void 0,f):(n.consume(k),E)}function T(k,q){const H=l.sliceStream(k);if(q&&H.push(null),k.previous=s,s&&(s.next=k),s=k,u.defineSkip(k.start),u.write(H),l.parser.lazy[k.start.line]){let M=u.events.length;for(;M--;)if(u.events[M][1].start.offset<c&&(!u.events[M][1].end||u.events[M][1].end.offset>c))return;const I=l.events.length;let Y=I,F,$;for(;Y--;)if(l.events[Y][0]==="exit"&&l.events[Y][1].type==="chunkFlow"){if(F){$=l.events[Y][1].end;break}F=!0}for(_(o),M=I;M<l.events.length;)l.events[M][1].end={...$},M++;zn(l.events,Y+1,0,l.events.slice(I)),l.events.length=M}}function _(k){let q=i.length;for(;q-- >k;){const H=i[q];l.containerState=H[1],H[0].exit.call(l,n)}i.length=k}function A(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function SE(n,l,i){return dt(n,n.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rm(n){if(n===null||Vt(n)||pE(n))return 1;if(mE(n))return 2}function su(n,l,i){const o=[];let u=-1;for(;++u<n.length;){const s=n[u].resolveAll;s&&!o.includes(s)&&(l=s(l,i),o.push(s))}return l}const uu={name:"attention",resolveAll:EE,tokenize:xE};function EE(n,l){let i=-1,o,u,s,c,f,m,h,g;for(;++i<n.length;)if(n[i][0]==="enter"&&n[i][1].type==="attentionSequence"&&n[i][1]._close){for(o=i;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&l.sliceSerialize(n[o][1]).charCodeAt(0)===l.sliceSerialize(n[i][1]).charCodeAt(0)){if((n[o][1]._close||n[i][1]._open)&&(n[i][1].end.offset-n[i][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[i][1].end.offset-n[i][1].start.offset)%3))continue;m=n[o][1].end.offset-n[o][1].start.offset>1&&n[i][1].end.offset-n[i][1].start.offset>1?2:1;const y={...n[o][1].end},v={...n[i][1].start};Om(y,-m),Om(v,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...n[o][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...n[i][1].start},end:v},s={type:m>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[i][1].start}},u={type:m>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},n[o][1].end={...c.start},n[i][1].start={...f.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=dn(h,[["enter",n[o][1],l],["exit",n[o][1],l]])),h=dn(h,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),h=dn(h,su(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),h=dn(h,[["exit",s,l],["enter",f,l],["exit",f,l],["exit",u,l]]),n[i][1].end.offset-n[i][1].start.offset?(g=2,h=dn(h,[["enter",n[i][1],l],["exit",n[i][1],l]])):g=0,zn(n,o-1,i-o+3,h),i=o+h.length-g-2;break}}for(i=-1;++i<n.length;)n[i][1].type==="attentionSequence"&&(n[i][1].type="data");return n}function xE(n,l){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,u=Rm(o);let s;return c;function c(m){return s=m,n.enter("attentionSequence"),f(m)}function f(m){if(m===s)return n.consume(m),f;const h=n.exit("attentionSequence"),g=Rm(m),y=!g||g===2&&u||i.includes(m),v=!u||u===2&&g||i.includes(o);return h._open=!!(s===42?y:y&&(u||!v)),h._close=!!(s===42?v:v&&(g||!y)),l(m)}}function Om(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const _E={name:"autolink",tokenize:wE};function wE(n,l,i){let o=0;return u;function u(b){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(b){return Mn(b)?(n.consume(b),c):b===64?i(b):h(b)}function c(b){return b===43||b===45||b===46||tn(b)?(o=1,f(b)):h(b)}function f(b){return b===58?(n.consume(b),o=0,m):(b===43||b===45||b===46||tn(b))&&o++<32?(n.consume(b),f):(o=0,h(b))}function m(b){return b===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(b),n.exit("autolinkMarker"),n.exit("autolink"),l):b===null||b===32||b===60||lu(b)?i(b):(n.consume(b),m)}function h(b){return b===64?(n.consume(b),g):fE(b)?(n.consume(b),h):i(b)}function g(b){return tn(b)?y(b):i(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"),l):v(b)}function v(b){if((b===45||tn(b))&&o++<63){const w=b===45?v:y;return n.consume(b),w}return i(b)}}const Fl={partial:!0,tokenize:CE};function CE(n,l,i){return o;function o(s){return rt(s)?dt(n,u,"linePrefix")(s):u(s)}function u(s){return s===null||Be(s)?l(s):i(s)}}const zm={continuation:{tokenize:AE},exit:kE,name:"blockQuote",tokenize:TE};function TE(n,l,i){const o=this;return u;function u(c){if(c===62){const f=o.containerState;return f.open||(n.enter("blockQuote",{_container:!0}),f.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(c),n.exit("blockQuoteMarker"),s}return i(c)}function s(c){return rt(c)?(n.enter("blockQuotePrefixWhitespace"),n.consume(c),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),l):(n.exit("blockQuotePrefix"),l(c))}}function AE(n,l,i){const o=this;return u;function u(c){return rt(c)?dt(n,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return n.attempt(zm,l,i)(c)}}function kE(n){n.exit("blockQuote")}const Mm={name:"characterEscape",tokenize:NE};function NE(n,l,i){return o;function o(s){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(s),n.exit("escapeMarker"),u}function u(s){return hE(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):i(s)}}const Dm={name:"characterReference",tokenize:RE};function RE(n,l,i){const o=this;let u=0,s,c;return f;function f(y){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),m}function m(y){return y===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(y),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),s=31,c=tn,g(y))}function h(y){return y===88||y===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(y),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,c=dE,g):(n.enter("characterReferenceValue"),s=7,c=ou,g(y))}function g(y){if(y===59&&u){const v=n.exit("characterReferenceValue");return c===tn&&!au(o.sliceSerialize(v))?i(y):(n.enter("characterReferenceMarker"),n.consume(y),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return c(y)&&u++<s?(n.consume(y),g):i(y)}}const jm={partial:!0,tokenize:zE},Lm={concrete:!0,name:"codeFenced",tokenize:OE};function OE(n,l,i){const o=this,u={partial:!0,tokenize:H};let s=0,c=0,f;return m;function m(M){return h(M)}function h(M){const I=o.events[o.events.length-1];return s=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=M,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),g(M)}function g(M){return M===f?(c++,n.consume(M),g):c<3?i(M):(n.exit("codeFencedFenceSequence"),rt(M)?dt(n,y,"whitespace")(M):y(M))}function y(M){return M===null||Be(M)?(n.exit("codeFencedFence"),o.interrupt?l(M):n.check(jm,E,q)(M)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||Be(M)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),y(M)):rt(M)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),dt(n,b,"whitespace")(M)):M===96&&M===f?i(M):(n.consume(M),v)}function b(M){return M===null||Be(M)?y(M):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),w(M))}function w(M){return M===null||Be(M)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),y(M)):M===96&&M===f?i(M):(n.consume(M),w)}function E(M){return n.attempt(u,q,T)(M)}function T(M){return n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),_}function _(M){return s>0&&rt(M)?dt(n,A,"linePrefix",s+1)(M):A(M)}function A(M){return M===null||Be(M)?n.check(jm,E,q)(M):(n.enter("codeFlowValue"),k(M))}function k(M){return M===null||Be(M)?(n.exit("codeFlowValue"),A(M)):(n.consume(M),k)}function q(M){return n.exit("codeFenced"),l(M)}function H(M,I,Y){let F=0;return $;function $(V){return M.enter("lineEnding"),M.consume(V),M.exit("lineEnding"),ie}function ie(V){return M.enter("codeFencedFence"),rt(V)?dt(M,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):D(V)}function D(V){return V===f?(M.enter("codeFencedFenceSequence"),ne(V)):Y(V)}function ne(V){return V===f?(F++,M.consume(V),ne):F>=c?(M.exit("codeFencedFenceSequence"),rt(V)?dt(M,C,"whitespace")(V):C(V)):Y(V)}function C(V){return V===null||Be(V)?(M.exit("codeFencedFence"),I(V)):Y(V)}}}function zE(n,l,i){const o=this;return u;function u(c){return c===null?i(c):(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s)}function s(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}const cu={name:"codeIndented",tokenize:DE},ME={partial:!0,tokenize:jE};function DE(n,l,i){const o=this;return u;function u(h){return n.enter("codeIndented"),dt(n,s,"linePrefix",5)(h)}function s(h){const g=o.events[o.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?m(h):Be(h)?n.attempt(ME,c,m)(h):(n.enter("codeFlowValue"),f(h))}function f(h){return h===null||Be(h)?(n.exit("codeFlowValue"),c(h)):(n.consume(h),f)}function m(h){return n.exit("codeIndented"),l(h)}}function jE(n,l,i){const o=this;return u;function u(c){return o.parser.lazy[o.now().line]?i(c):Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):dt(n,s,"linePrefix",5)(c)}function s(c){const f=o.events[o.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):Be(c)?u(c):i(c)}}const LE={name:"codeText",previous:BE,resolve:IE,tokenize:UE};function IE(n){let l=n.length-4,i=3,o,u;if((n[i][1].type==="lineEnding"||n[i][1].type==="space")&&(n[l][1].type==="lineEnding"||n[l][1].type==="space")){for(o=i;++o<l;)if(n[o][1].type==="codeTextData"){n[i][1].type="codeTextPadding",n[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(o=i-1,l++;++o<=l;)u===void 0?o!==l&&n[o][1].type!=="lineEnding"&&(u=o):(o===l||n[o][1].type==="lineEnding")&&(n[u][1].type="codeTextData",o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),l-=o-u-2,o=u+2),u=void 0);return n}function BE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UE(n,l,i){let o=0,u,s;return c;function c(y){return n.enter("codeText"),n.enter("codeTextSequence"),f(y)}function f(y){return y===96?(n.consume(y),o++,f):(n.exit("codeTextSequence"),m(y))}function m(y){return y===null?i(y):y===32?(n.enter("space"),n.consume(y),n.exit("space"),m):y===96?(s=n.enter("codeTextSequence"),u=0,g(y)):Be(y)?(n.enter("lineEnding"),n.consume(y),n.exit("lineEnding"),m):(n.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Be(y)?(n.exit("codeTextData"),m(y)):(n.consume(y),h)}function g(y){return y===96?(n.consume(y),u++,g):u===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(y)):(s.type="codeTextData",h(y))}}class HE{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const o=i??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(l,o):l>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(l,i,o){const u=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return o&&Da(this.left,o),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Da(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Da(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);Da(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Da(this.left,i.reverse())}}}function Da(n,l){let i=0;if(l.length<1e4)n.push(...l);else for(;i<l.length;)n.push(...l.slice(i,i+1e4)),i+=1e4}function Im(n){const l={};let i=-1,o,u,s,c,f,m,h;const g=new HE(n);for(;++i<g.length;){for(;i in l;)i=l[i];if(o=g.get(i),i&&o[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(m=o[1]._tokenizer.events,s=0,s<m.length&&m[s][1].type==="lineEndingBlank"&&(s+=2),s<m.length&&m[s][1].type==="content"))for(;++s<m.length&&m[s][1].type!=="content";)m[s][1].type==="chunkText"&&(m[s][1]._isInFirstContentOfListItem=!0,s++);if(o[0]==="enter")o[1].contentType&&(Object.assign(l,qE(g,i)),i=l[i],h=!0);else if(o[1]._container){for(s=i,u=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(o[1].end={...g.get(u)[1].start},f=g.slice(u,i),f.unshift(o),g.splice(u,i-u+1,f))}}return zn(n,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function qE(n,l){const i=n.get(l)[1],o=n.get(l)[2];let u=l-1;const s=[];let c=i._tokenizer;c||(c=o.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],h={};let g,y,v=-1,b=i,w=0,E=0;const T=[E];for(;b;){for(;n.get(++u)[1]!==b;);s.push(u),b._tokenizer||(g=o.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(E=v+1,T.push(E),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):T.pop(),v=T.length;v--;){const _=f.slice(T[v],T[v+1]),A=s.pop();m.push([A,A+_.length-1]),n.splice(A,2,_)}for(m.reverse(),v=-1;++v<m.length;)h[w+m[v][0]]=w+m[v][1],w+=m[v][1]-m[v][0]-1;return h}const PE={resolve:YE,tokenize:VE},FE={partial:!0,tokenize:GE};function YE(n){return Im(n),n}function VE(n,l){let i;return o;function o(f){return n.enter("content"),i=n.enter("chunkContent",{contentType:"content"}),u(f)}function u(f){return f===null?s(f):Be(f)?n.check(FE,c,s)(f):(n.consume(f),u)}function s(f){return n.exit("chunkContent"),n.exit("content"),l(f)}function c(f){return n.consume(f),n.exit("chunkContent"),i.next=n.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,u}}function GE(n,l,i){const o=this;return u;function u(c){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),dt(n,s,"linePrefix")}function s(c){if(c===null||Be(c))return i(c);const f=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(c):n.interrupt(o.parser.constructs.flow,i,l)(c)}}function Bm(n,l,i,o,u,s,c,f,m){const h=m||Number.POSITIVE_INFINITY;let g=0;return y;function y(_){return _===60?(n.enter(o),n.enter(u),n.enter(s),n.consume(_),n.exit(s),v):_===null||_===32||_===41||lu(_)?i(_):(n.enter(o),n.enter(c),n.enter(f),n.enter("chunkString",{contentType:"string"}),E(_))}function v(_){return _===62?(n.enter(s),n.consume(_),n.exit(s),n.exit(u),n.exit(o),l):(n.enter(f),n.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===62?(n.exit("chunkString"),n.exit(f),v(_)):_===null||_===60||Be(_)?i(_):(n.consume(_),_===92?w:b)}function w(_){return _===60||_===62||_===92?(n.consume(_),b):b(_)}function E(_){return!g&&(_===null||_===41||Vt(_))?(n.exit("chunkString"),n.exit(f),n.exit(c),n.exit(o),l(_)):g<h&&_===40?(n.consume(_),g++,E):_===41?(n.consume(_),g--,E):_===null||_===32||_===40||lu(_)?i(_):(n.consume(_),_===92?T:E)}function T(_){return _===40||_===41||_===92?(n.consume(_),E):E(_)}}function Um(n,l,i,o,u,s){const c=this;let f=0,m;return h;function h(b){return n.enter(o),n.enter(u),n.consume(b),n.exit(u),n.enter(s),g}function g(b){return f>999||b===null||b===91||b===93&&!m||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(n.exit(s),n.enter(u),n.consume(b),n.exit(u),n.exit(o),l):Be(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||Be(b)||f++>999?(n.exit("chunkString"),g(b)):(n.consume(b),m||(m=!rt(b)),b===92?v:y)}function v(b){return b===91||b===92||b===93?(n.consume(b),f++,y):y(b)}}function Hm(n,l,i,o,u,s){let c;return f;function f(v){return v===34||v===39||v===40?(n.enter(o),n.enter(u),n.consume(v),n.exit(u),c=v===40?41:v,m):i(v)}function m(v){return v===c?(n.enter(u),n.consume(v),n.exit(u),n.exit(o),l):(n.enter(s),h(v))}function h(v){return v===c?(n.exit(s),m(c)):v===null?i(v):Be(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),dt(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===c||v===null||Be(v)?(n.exit("chunkString"),h(v)):(n.consume(v),v===92?y:g)}function y(v){return v===c||v===92?(n.consume(v),g):g(v)}}function ja(n,l){let i;return o;function o(u){return Be(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),i=!0,o):rt(u)?dt(n,o,i?"linePrefix":"lineSuffix")(u):l(u)}}const XE={name:"definition",tokenize:KE},ZE={partial:!0,tokenize:QE};function KE(n,l,i){const o=this;let u;return s;function s(b){return n.enter("definition"),c(b)}function c(b){return Um.call(o,n,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return u=vi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(n.enter("definitionMarker"),n.consume(b),n.exit("definitionMarker"),m):i(b)}function m(b){return Vt(b)?ja(n,h)(b):h(b)}function h(b){return Bm(n,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return n.attempt(ZE,y,y)(b)}function y(b){return rt(b)?dt(n,v,"whitespace")(b):v(b)}function v(b){return b===null||Be(b)?(n.exit("definition"),o.parser.defined.push(u),l(b)):i(b)}}function QE(n,l,i){return o;function o(f){return Vt(f)?ja(n,u)(f):i(f)}function u(f){return Hm(n,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return rt(f)?dt(n,c,"whitespace")(f):c(f)}function c(f){return f===null||Be(f)?l(f):i(f)}}const JE={name:"hardBreakEscape",tokenize:WE};function WE(n,l,i){return o;function o(s){return n.enter("hardBreakEscape"),n.consume(s),u}function u(s){return Be(s)?(n.exit("hardBreakEscape"),l(s)):i(s)}}const $E={name:"headingAtx",resolve:ex,tokenize:tx};function ex(n,l){let i=n.length-2,o=3,u,s;return n[o][1].type==="whitespace"&&(o+=2),i-2>o&&n[i][1].type==="whitespace"&&(i-=2),n[i][1].type==="atxHeadingSequence"&&(o===i-1||i-4>o&&n[i-2][1].type==="whitespace")&&(i-=o+1===i?2:4),i>o&&(u={type:"atxHeadingText",start:n[o][1].start,end:n[i][1].end},s={type:"chunkText",start:n[o][1].start,end:n[i][1].end,contentType:"text"},zn(n,o,i-o+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),n}function tx(n,l,i){let o=0;return u;function u(g){return n.enter("atxHeading"),s(g)}function s(g){return n.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&o++<6?(n.consume(g),c):g===null||Vt(g)?(n.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(n.enter("atxHeadingSequence"),m(g)):g===null||Be(g)?(n.exit("atxHeading"),l(g)):rt(g)?dt(n,f,"whitespace")(g):(n.enter("atxHeadingText"),h(g))}function m(g){return g===35?(n.consume(g),m):(n.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||Vt(g)?(n.exit("atxHeadingText"),f(g)):(n.consume(g),h)}}const nx=["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"],qm=["pre","script","style","textarea"],rx={concrete:!0,name:"htmlFlow",resolveTo:lx,tokenize:ox},ix={partial:!0,tokenize:ux},ax={partial:!0,tokenize:sx};function lx(n){let l=n.length;for(;l--&&!(n[l][0]==="enter"&&n[l][1].type==="htmlFlow"););return l>1&&n[l-2][1].type==="linePrefix"&&(n[l][1].start=n[l-2][1].start,n[l+1][1].start=n[l-2][1].start,n.splice(l-2,2)),n}function ox(n,l,i){const o=this;let u,s,c,f,m;return h;function h(z){return g(z)}function g(z){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(z),y}function y(z){return z===33?(n.consume(z),v):z===47?(n.consume(z),s=!0,E):z===63?(n.consume(z),u=3,o.interrupt?l:L):Mn(z)?(n.consume(z),c=String.fromCharCode(z),T):i(z)}function v(z){return z===45?(n.consume(z),u=2,b):z===91?(n.consume(z),u=5,f=0,w):Mn(z)?(n.consume(z),u=4,o.interrupt?l:L):i(z)}function b(z){return z===45?(n.consume(z),o.interrupt?l:L):i(z)}function w(z){const re="CDATA[";return z===re.charCodeAt(f++)?(n.consume(z),f===re.length?o.interrupt?l:D:w):i(z)}function E(z){return Mn(z)?(n.consume(z),c=String.fromCharCode(z),T):i(z)}function T(z){if(z===null||z===47||z===62||Vt(z)){const re=z===47,ce=c.toLowerCase();return!re&&!s&&qm.includes(ce)?(u=1,o.interrupt?l(z):D(z)):nx.includes(c.toLowerCase())?(u=6,re?(n.consume(z),_):o.interrupt?l(z):D(z)):(u=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(z):s?A(z):k(z))}return z===45||tn(z)?(n.consume(z),c+=String.fromCharCode(z),T):i(z)}function _(z){return z===62?(n.consume(z),o.interrupt?l:D):i(z)}function A(z){return rt(z)?(n.consume(z),A):$(z)}function k(z){return z===47?(n.consume(z),$):z===58||z===95||Mn(z)?(n.consume(z),q):rt(z)?(n.consume(z),k):$(z)}function q(z){return z===45||z===46||z===58||z===95||tn(z)?(n.consume(z),q):H(z)}function H(z){return z===61?(n.consume(z),M):rt(z)?(n.consume(z),H):k(z)}function M(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(n.consume(z),m=z,I):rt(z)?(n.consume(z),M):Y(z)}function I(z){return z===m?(n.consume(z),m=null,F):z===null||Be(z)?i(z):(n.consume(z),I)}function Y(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Vt(z)?H(z):(n.consume(z),Y)}function F(z){return z===47||z===62||rt(z)?k(z):i(z)}function $(z){return z===62?(n.consume(z),ie):i(z)}function ie(z){return z===null||Be(z)?D(z):rt(z)?(n.consume(z),ie):i(z)}function D(z){return z===45&&u===2?(n.consume(z),Z):z===60&&u===1?(n.consume(z),Q):z===62&&u===4?(n.consume(z),N):z===63&&u===3?(n.consume(z),L):z===93&&u===5?(n.consume(z),de):Be(z)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(ix,B,ne)(z)):z===null||Be(z)?(n.exit("htmlFlowData"),ne(z)):(n.consume(z),D)}function ne(z){return n.check(ax,C,B)(z)}function C(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),V}function V(z){return z===null||Be(z)?ne(z):(n.enter("htmlFlowData"),D(z))}function Z(z){return z===45?(n.consume(z),L):D(z)}function Q(z){return z===47?(n.consume(z),c="",se):D(z)}function se(z){if(z===62){const re=c.toLowerCase();return qm.includes(re)?(n.consume(z),N):D(z)}return Mn(z)&&c.length<8?(n.consume(z),c+=String.fromCharCode(z),se):D(z)}function de(z){return z===93?(n.consume(z),L):D(z)}function L(z){return z===62?(n.consume(z),N):z===45&&u===2?(n.consume(z),L):D(z)}function N(z){return z===null||Be(z)?(n.exit("htmlFlowData"),B(z)):(n.consume(z),N)}function B(z){return n.exit("htmlFlow"),l(z)}}function sx(n,l,i){const o=this;return u;function u(c){return Be(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),s):i(c)}function s(c){return o.parser.lazy[o.now().line]?i(c):l(c)}}function ux(n,l,i){return o;function o(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Fl,l,i)}}const cx={name:"htmlText",tokenize:fx};function fx(n,l,i){const o=this;let u,s,c;return f;function f(L){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(L),m}function m(L){return L===33?(n.consume(L),h):L===47?(n.consume(L),H):L===63?(n.consume(L),k):Mn(L)?(n.consume(L),Y):i(L)}function h(L){return L===45?(n.consume(L),g):L===91?(n.consume(L),s=0,w):Mn(L)?(n.consume(L),A):i(L)}function g(L){return L===45?(n.consume(L),b):i(L)}function y(L){return L===null?i(L):L===45?(n.consume(L),v):Be(L)?(c=y,Q(L)):(n.consume(L),y)}function v(L){return L===45?(n.consume(L),b):y(L)}function b(L){return L===62?Z(L):L===45?v(L):y(L)}function w(L){const N="CDATA[";return L===N.charCodeAt(s++)?(n.consume(L),s===N.length?E:w):i(L)}function E(L){return L===null?i(L):L===93?(n.consume(L),T):Be(L)?(c=E,Q(L)):(n.consume(L),E)}function T(L){return L===93?(n.consume(L),_):E(L)}function _(L){return L===62?Z(L):L===93?(n.consume(L),_):E(L)}function A(L){return L===null||L===62?Z(L):Be(L)?(c=A,Q(L)):(n.consume(L),A)}function k(L){return L===null?i(L):L===63?(n.consume(L),q):Be(L)?(c=k,Q(L)):(n.consume(L),k)}function q(L){return L===62?Z(L):k(L)}function H(L){return Mn(L)?(n.consume(L),M):i(L)}function M(L){return L===45||tn(L)?(n.consume(L),M):I(L)}function I(L){return Be(L)?(c=I,Q(L)):rt(L)?(n.consume(L),I):Z(L)}function Y(L){return L===45||tn(L)?(n.consume(L),Y):L===47||L===62||Vt(L)?F(L):i(L)}function F(L){return L===47?(n.consume(L),Z):L===58||L===95||Mn(L)?(n.consume(L),$):Be(L)?(c=F,Q(L)):rt(L)?(n.consume(L),F):Z(L)}function $(L){return L===45||L===46||L===58||L===95||tn(L)?(n.consume(L),$):ie(L)}function ie(L){return L===61?(n.consume(L),D):Be(L)?(c=ie,Q(L)):rt(L)?(n.consume(L),ie):F(L)}function D(L){return L===null||L===60||L===61||L===62||L===96?i(L):L===34||L===39?(n.consume(L),u=L,ne):Be(L)?(c=D,Q(L)):rt(L)?(n.consume(L),D):(n.consume(L),C)}function ne(L){return L===u?(n.consume(L),u=void 0,V):L===null?i(L):Be(L)?(c=ne,Q(L)):(n.consume(L),ne)}function C(L){return L===null||L===34||L===39||L===60||L===61||L===96?i(L):L===47||L===62||Vt(L)?F(L):(n.consume(L),C)}function V(L){return L===47||L===62||Vt(L)?F(L):i(L)}function Z(L){return L===62?(n.consume(L),n.exit("htmlTextData"),n.exit("htmlText"),l):i(L)}function Q(L){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(L),n.exit("lineEnding"),se}function se(L){return rt(L)?dt(n,de,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):de(L)}function de(L){return n.enter("htmlTextData"),c(L)}}const fu={name:"labelEnd",resolveAll:px,resolveTo:gx,tokenize:yx},dx={tokenize:bx},hx={tokenize:vx},mx={tokenize:Sx};function px(n){let l=-1;const i=[];for(;++l<n.length;){const o=n[l][1];if(i.push(n[l]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const u=o.type==="labelImage"?4:2;o.type="data",l+=u}}return n.length!==i.length&&zn(n,0,n.length,i),n}function gx(n,l){let i=n.length,o=0,u,s,c,f;for(;i--;)if(u=n[i][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;n[i][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(n[i][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=i,u.type!=="labelLink")){o=2;break}}else u.type==="labelEnd"&&(c=i);const m={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[s][1].start},end:{...n[c][1].end}},g={type:"labelText",start:{...n[s+o+2][1].end},end:{...n[c-2][1].start}};return f=[["enter",m,l],["enter",h,l]],f=dn(f,n.slice(s+1,s+o+3)),f=dn(f,[["enter",g,l]]),f=dn(f,su(l.parser.constructs.insideSpan.null,n.slice(s+o+4,c-3),l)),f=dn(f,[["exit",g,l],n[c-2],n[c-1],["exit",h,l]]),f=dn(f,n.slice(c+1)),f=dn(f,[["exit",m,l]]),zn(n,s,n.length,f),n}function yx(n,l,i){const o=this;let u=o.events.length,s,c;for(;u--;)if((o.events[u][1].type==="labelImage"||o.events[u][1].type==="labelLink")&&!o.events[u][1]._balanced){s=o.events[u][1];break}return f;function f(v){return s?s._inactive?y(v):(c=o.parser.defined.includes(vi(o.sliceSerialize({start:s.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(v),n.exit("labelMarker"),n.exit("labelEnd"),m):i(v)}function m(v){return v===40?n.attempt(dx,g,c?g:y)(v):v===91?n.attempt(hx,g,c?h:y)(v):c?g(v):y(v)}function h(v){return n.attempt(mx,g,y)(v)}function g(v){return l(v)}function y(v){return s._balanced=!0,i(v)}}function bx(n,l,i){return o;function o(y){return n.enter("resource"),n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),u}function u(y){return Vt(y)?ja(n,s)(y):s(y)}function s(y){return y===41?g(y):Bm(n,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Vt(y)?ja(n,m)(y):g(y)}function f(y){return i(y)}function m(y){return y===34||y===39||y===40?Hm(n,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return Vt(y)?ja(n,g)(y):g(y)}function g(y){return y===41?(n.enter("resourceMarker"),n.consume(y),n.exit("resourceMarker"),n.exit("resource"),l):i(y)}}function vx(n,l,i){const o=this;return u;function u(f){return Um.call(o,n,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return o.parser.defined.includes(vi(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?l(f):i(f)}function c(f){return i(f)}}function Sx(n,l,i){return o;function o(s){return n.enter("reference"),n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),u}function u(s){return s===93?(n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),n.exit("reference"),l):i(s)}}const Ex={name:"labelStartImage",resolveAll:fu.resolveAll,tokenize:xx};function xx(n,l,i){const o=this;return u;function u(f){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(f),n.exit("labelImageMarker"),s}function s(f){return f===91?(n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(f):l(f)}}const _x={name:"labelStartLink",resolveAll:fu.resolveAll,tokenize:wx};function wx(n,l,i){const o=this;return u;function u(c){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(c),n.exit("labelMarker"),n.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(c):l(c)}}const du={name:"lineEnding",tokenize:Cx};function Cx(n,l){return i;function i(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),dt(n,l,"linePrefix")}}const Yl={name:"thematicBreak",tokenize:Tx};function Tx(n,l,i){let o=0,u;return s;function s(h){return n.enter("thematicBreak"),c(h)}function c(h){return u=h,f(h)}function f(h){return h===u?(n.enter("thematicBreakSequence"),m(h)):o>=3&&(h===null||Be(h))?(n.exit("thematicBreak"),l(h)):i(h)}function m(h){return h===u?(n.consume(h),o++,m):(n.exit("thematicBreakSequence"),rt(h)?dt(n,f,"whitespace")(h):f(h))}}const Gt={continuation:{tokenize:Rx},exit:zx,name:"list",tokenize:Nx},Ax={partial:!0,tokenize:Mx},kx={partial:!0,tokenize:Ox};function Nx(n,l,i){const o=this,u=o.events[o.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return f;function f(b){const w=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:ou(b)){if(o.containerState.type||(o.containerState.type=w,n.enter(w,{_container:!0})),w==="listUnordered")return n.enter("listItemPrefix"),b===42||b===45?n.check(Yl,i,h)(b):h(b);if(!o.interrupt||b===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),m(b)}return i(b)}function m(b){return ou(b)&&++c<10?(n.consume(b),m):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.containerState.marker:b===41||b===46)?(n.exit("listItemValue"),h(b)):i(b)}function h(b){return n.enter("listItemMarker"),n.consume(b),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||b,n.check(Fl,o.interrupt?i:g,n.attempt(Ax,v,y))}function g(b){return o.containerState.initialBlankLine=!0,s++,v(b)}function y(b){return rt(b)?(n.enter("listItemPrefixWhitespace"),n.consume(b),n.exit("listItemPrefixWhitespace"),v):i(b)}function v(b){return o.containerState.size=s+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(b)}}function Rx(n,l,i){const o=this;return o.containerState._closeFlow=void 0,n.check(Fl,u,s);function u(f){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,dt(n,l,"listItemIndent",o.containerState.size+1)(f)}function s(f){return o.containerState.furtherBlankLines||!rt(f)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(f)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(kx,l,c)(f))}function c(f){return o.containerState._closeFlow=!0,o.interrupt=void 0,dt(n,n.attempt(Gt,l,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Ox(n,l,i){const o=this;return dt(n,u,"listItemIndent",o.containerState.size+1);function u(s){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?l(s):i(s)}}function zx(n){n.exit(this.containerState.type)}function Mx(n,l,i){const o=this;return dt(n,u,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=o.events[o.events.length-1];return!rt(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const Pm={name:"setextUnderline",resolveTo:Dx,tokenize:jx};function Dx(n,l){let i=n.length,o,u,s;for(;i--;)if(n[i][0]==="enter"){if(n[i][1].type==="content"){o=i;break}n[i][1].type==="paragraph"&&(u=i)}else n[i][1].type==="content"&&n.splice(i,1),!s&&n[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[u][1].type="setextHeadingText",s?(n.splice(u,0,["enter",c,l]),n.splice(s+1,0,["exit",n[o][1],l]),n[o][1].end={...n[s][1].end}):n[o][1]=c,n.push(["exit",c,l]),n}function jx(n,l,i){const o=this;let u;return s;function s(h){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"),u=h,c(h)):i(h)}function c(h){return n.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===u?(n.consume(h),f):(n.exit("setextHeadingLineSequence"),rt(h)?dt(n,m,"lineSuffix")(h):m(h))}function m(h){return h===null||Be(h)?(n.exit("setextHeadingLine"),l(h)):i(h)}}const Lx={tokenize:Ix};function Ix(n){const l=this,i=n.attempt(Fl,o,n.attempt(this.parser.constructs.flowInitial,u,dt(n,n.attempt(this.parser.constructs.flow,u,n.attempt(PE,u)),"linePrefix")));return i;function o(s){if(s===null){n.consume(s);return}return n.enter("lineEndingBlank"),n.consume(s),n.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function u(s){if(s===null){n.consume(s);return}return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),l.currentConstruct=void 0,i}}const Bx={resolveAll:Ym()},Ux=Fm("string"),Hx=Fm("text");function Fm(n){return{resolveAll:Ym(n==="text"?qx:void 0),tokenize:l};function l(i){const o=this,u=this.parser.constructs[n],s=i.attempt(u,c,f);return c;function c(g){return h(g)?s(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),m}function m(g){return h(g)?(i.exit("data"),s(g)):(i.consume(g),m)}function h(g){if(g===null)return!0;const y=u[g];let v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function Ym(n){return l;function l(i,o){let u=-1,s;for(;++u<=i.length;)s===void 0?i[u]&&i[u][1].type==="data"&&(s=u,u++):(!i[u]||i[u][1].type!=="data")&&(u!==s+2&&(i[s][1].end=i[u-1][1].end,i.splice(s+2,u-s-2),u=s+2),s=void 0);return n?n(i,o):i}}function qx(n,l){let i=0;for(;++i<=n.length;)if((i===n.length||n[i][1].type==="lineEnding")&&n[i-1][1].type==="data"){const o=n[i-1][1],u=l.sliceStream(o);let s=u.length,c=-1,f=0,m;for(;s--;){const h=u[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)m=!0,f++;else if(h!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(f=0),f){const h={type:i===n.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:o.start._bufferIndex+c,_index:o.start._index+s,line:o.end.line,column:o.end.column-f,offset:o.end.offset-f},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(i,0,["enter",h,l],["exit",h,l]),i+=2)}i++}return n}const Px=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:XE},disable:{null:[]},document:{42:Gt,43:Gt,45:Gt,48:Gt,49:Gt,50:Gt,51:Gt,52:Gt,53:Gt,54:Gt,55:Gt,56:Gt,57:Gt,62:zm},flow:{35:$E,42:Yl,45:[Pm,Yl],60:rx,61:Pm,95:Yl,96:Lm,126:Lm},flowInitial:{[-2]:cu,[-1]:cu,32:cu},insideSpan:{null:[uu,Bx]},string:{38:Dm,92:Mm},text:{[-5]:du,[-4]:du,[-3]:du,33:Ex,38:Dm,42:uu,60:[_E,cx],91:_x,92:[JE,Mm],93:fu,95:uu,96:LE}},Symbol.toStringTag,{value:"Module"}));function Fx(n,l,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const u={},s=[];let c=[],f=[];const m={attempt:I(H),check:I(M),consume:A,enter:k,exit:q,interrupt:I(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:w,parser:n,previous:null,sliceSerialize:v,sliceStream:b,write:y};let g=l.tokenize.call(h,m);return l.resolveAll&&s.push(l),h;function y(ie){return c=dn(c,ie),T(),c[c.length-1]!==null?[]:(Y(l,0),h.events=su(s,h.events,h),h.events)}function v(ie,D){return Vx(b(ie),D)}function b(ie){return Yx(c,ie)}function w(){const{_bufferIndex:ie,_index:D,line:ne,column:C,offset:V}=o;return{_bufferIndex:ie,_index:D,line:ne,column:C,offset:V}}function E(ie){u[ie.line]=ie.column,$()}function T(){let ie;for(;o._index<c.length;){const D=c[o._index];if(typeof D=="string")for(ie=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ie&&o._bufferIndex<D.length;)_(D.charCodeAt(o._bufferIndex));else _(D)}}function _(ie){g=g(ie)}function A(ie){Be(ie)?(o.line++,o.column=1,o.offset+=ie===-3?2:1,$()):ie!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=ie}function k(ie,D){const ne=D||{};return ne.type=ie,ne.start=w(),h.events.push(["enter",ne,h]),f.push(ne),ne}function q(ie){const D=f.pop();return D.end=w(),h.events.push(["exit",D,h]),D}function H(ie,D){Y(ie,D.from)}function M(ie,D){D.restore()}function I(ie,D){return ne;function ne(C,V,Z){let Q,se,de,L;return Array.isArray(C)?B(C):"tokenize"in C?B([C]):N(C);function N(we){return Te;function Te(ke){const Ae=ke!==null&&we[ke],He=ke!==null&&we.null,ve=[...Array.isArray(Ae)?Ae:Ae?[Ae]:[],...Array.isArray(He)?He:He?[He]:[]];return B(ve)(ke)}}function B(we){return Q=we,se=0,we.length===0?Z:z(we[se])}function z(we){return Te;function Te(ke){return L=F(),de=we,we.partial||(h.currentConstruct=we),we.name&&h.parser.constructs.disable.null.includes(we.name)?ce():we.tokenize.call(D?Object.assign(Object.create(h),D):h,m,re,ce)(ke)}}function re(we){return ie(de,L),V}function ce(we){return L.restore(),++se<Q.length?z(Q[se]):Z}}}function Y(ie,D){ie.resolveAll&&!s.includes(ie)&&s.push(ie),ie.resolve&&zn(h.events,D,h.events.length-D,ie.resolve(h.events.slice(D),h)),ie.resolveTo&&(h.events=ie.resolveTo(h.events,h))}function F(){const ie=w(),D=h.previous,ne=h.currentConstruct,C=h.events.length,V=Array.from(f);return{from:C,restore:Z};function Z(){o=ie,h.previous=D,h.currentConstruct=ne,h.events.length=C,f=V,$()}}function $(){o.line in u&&o.column<2&&(o.column=u[o.line],o.offset+=u[o.line]-1)}}function Yx(n,l){const i=l.start._index,o=l.start._bufferIndex,u=l.end._index,s=l.end._bufferIndex;let c;if(i===u)c=[n[i].slice(o,s)];else{if(c=n.slice(i,u),o>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(o):c.shift()}s>0&&c.push(n[u].slice(0,s))}return c}function Vx(n,l){let i=-1;const o=[];let u;for(;++i<n.length;){const s=n[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
49
45
  `;break}case-3:{c=`\r
50
- `;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,o.push(c)}return o.join("")}function x_(n){const o={constructs:I1([v_,...(n||{}).extensions||[]]),content:s(X1),defined:[],document:s(K1),flow:s(h_),lazy:{},string:s(g_),text:s(y_)};return o;function s(u){return c;function c(d){return S_(o,u,d)}}}function w_(n){for(;!vm(n););return n}const km=/[\0\t\n\r]/g;function C_(){let n=1,l="",i=!0,o;return s;function s(u,c,d){const h=[];let p,y,g,v,b;for(u=l+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),g=0,l="",i&&(u.charCodeAt(0)===65279&&g++,i=void 0);g<u.length;){if(km.lastIndex=g,p=km.exec(u),v=p&&p.index!==void 0?p.index:u.length,b=u.charCodeAt(v),!p){l=u.slice(g);break}if(b===10&&g===v&&o)h.push(-3),o=void 0;else switch(o&&(h.push(-5),o=void 0),g<v&&(h.push(u.slice(g,v)),n+=v-g),b){case 0:{h.push(65533),n++;break}case 9:{for(y=Math.ceil(n/4)*4,h.push(-2);n++<y;)h.push(-1);break}case 10:{h.push(-4),n=1;break}default:o=!0,n=1}g=v+1}return d&&(o&&h.push(-5),l&&h.push(l),h.push(null)),h}}const T_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function k_(n){return n.replace(T_,A_)}function A_(n,l,i){if(l)return l;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),u=s===120||s===88;return cm(i.slice(u?2:1),u?16:10)}return eu(i)||n}const Am={}.hasOwnProperty;function R_(n,l,i){return typeof l!="string"&&(i=l,l=void 0),N_(i)(w_(x_(i).document().write(C_()(n,l,!0))))}function N_(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Q),autolinkProtocol:q,autolinkEmail:q,atxHeading:u(me),blockQuote:u(Me),characterEscape:q,characterReference:q,codeFenced:u(De),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(De,c),codeText:u(nt,c),codeTextData:q,data:q,codeFlowValue:q,definition:u(yt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(x),hardBreakEscape:u(ue),hardBreakTrailing:u(ue),htmlFlow:u(I,c),htmlFlowData:q,htmlText:u(I,c),htmlTextData:q,image:u(U),label:c,link:u(Q),listItem:u(Se),listItemValue:v,listOrdered:u(be,g),listUnordered:u(be),paragraph:u(re),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(me),strong:u(_e),thematicBreak:u(xe)},exit:{atxHeading:h(),atxHeadingSequence:B,autolink:h(),autolinkEmail:ke,autolinkProtocol:Te,blockQuote:h(),characterEscapeValue:le,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ge,characterReference:de,codeFenced:h(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:C,codeFlowValue:le,codeIndented:h(_),codeText:h(G),codeTextData:le,data:le,definition:h(),definitionDestinationString:H,definitionLabelString:k,definitionTitleString:O,emphasis:h(),hardBreakEscape:h(M),hardBreakTrailing:h(M),htmlFlow:h($),htmlFlowData:le,htmlText:h(w),htmlTextData:le,image:h(Z),label:se,labelText:ae,lineEnding:ce,link:h(V),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:D,resourceTitleString:A,resource:j,setextHeading:h(P),setextHeadingLineSequence:L,setextHeadingText:z,strong:h(),thematicBreak:h()}};Rm(l,(n||{}).mdastExtensions||[]);const i={};return o;function o(W){let ve={type:"root",children:[]};const we={stack:[ve],tokenStack:[],config:l,enter:d,exit:p,buffer:c,resume:y,data:i},Ue=[];let Xe=-1;for(;++Xe<W.length;)if(W[Xe][1].type==="listOrdered"||W[Xe][1].type==="listUnordered")if(W[Xe][0]==="enter")Ue.push(Xe);else{const mt=Ue.pop();Xe=s(W,mt,Xe)}for(Xe=-1;++Xe<W.length;){const mt=l[W[Xe][0]];Am.call(mt,W[Xe][1].type)&&mt[W[Xe][1].type].call(Object.assign({sliceSerialize:W[Xe][2].sliceSerialize},we),W[Xe][1])}if(we.tokenStack.length>0){const mt=we.tokenStack[we.tokenStack.length-1];(mt[1]||Nm).call(we,void 0,mt[0])}for(ve.position={start:cr(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:cr(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<l.transforms.length;)ve=l.transforms[Xe](ve)||ve;return ve}function s(W,ve,we){let Ue=ve-1,Xe=-1,mt=!1,It,Pe,pt,Rt;for(;++Ue<=we;){const Fe=W[Ue];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?Xe++:Xe--,Rt=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(It&&!Rt&&!Xe&&!pt&&(pt=Ue),Rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Rt=void 0}if(!Xe&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||Xe===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(It){let xn=Ue;for(Pe=void 0;xn--;){const $t=W[xn];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;Pe&&(W[Pe][1].type="lineEndingBlank",mt=!0),$t[1].type="lineEnding",Pe=xn}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}pt&&(!Pe||pt<Pe)&&(It._spread=!0),It.end=Object.assign({},Pe?W[Pe][1].start:Fe[1].end),W.splice(Pe||Ue,0,["exit",It,Fe[2]]),Ue++,we++}if(Fe[1].type==="listItemPrefix"){const xn={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};It=xn,W.splice(Ue,0,["enter",xn,Fe[2]]),Ue++,we++,pt=void 0,Rt=!0}}}return W[ve][1]._spread=mt,we}function u(W,ve){return we;function we(Ue){d.call(this,W(Ue),Ue),ve&&ve.call(this,Ue)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(W,ve,we){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([ve,we||void 0]),W.position={start:cr(ve.start),end:void 0}}function h(W){return ve;function ve(we){W&&W.call(this,we),p.call(this,we)}}function p(W,ve){const we=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==W.type&&(ve?ve.call(this,W,Ue[0]):(Ue[1]||Nm).call(this,W,Ue[0]));else throw new Error("Cannot close `"+W.type+"` ("+Ca({start:W.start,end:W.end})+"): it’s not open");we.position.end=cr(W.end)}function y(){return B1(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(W){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function b(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=W}function C(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=W}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.value=W.replace(/(\r?\n|\r)$/g,"")}function k(W){const ve=this.resume(),we=this.stack[this.stack.length-1];we.label=ve,we.identifier=pi(this.sliceSerialize(W)).toLowerCase()}function O(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.title=W}function H(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.url=W}function B(W){const ve=this.stack[this.stack.length-1];if(!ve.depth){const we=this.sliceSerialize(W).length;ve.depth=we}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function L(W){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function q(W){const we=this.stack[this.stack.length-1].children;let Ue=we[we.length-1];(!Ue||Ue.type!=="text")&&(Ue=Ce(),Ue.position={start:cr(W.start),end:void 0},we.push(Ue)),this.stack.push(Ue)}function le(W){const ve=this.stack.pop();ve.value+=this.sliceSerialize(W),ve.position.end=cr(W.end)}function ce(W){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ve.children[ve.children.length-1];we.position.end=cr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ve.type)&&(q.call(this,W),le.call(this,W))}function M(){this.data.atHardBreak=!0}function $(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.value=W}function w(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.value=W}function G(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.value=W}function V(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ve,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function Z(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=ve,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function ae(W){const ve=this.sliceSerialize(W),we=this.stack[this.stack.length-2];we.label=k_(ve),we.identifier=pi(ve).toLowerCase()}function se(){const W=this.stack[this.stack.length-1],ve=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Ue=W.children;we.children=Ue}else we.alt=ve}function D(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.url=W}function A(){const W=this.resume(),ve=this.stack[this.stack.length-1];ve.title=W}function j(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ne(W){const ve=this.resume(),we=this.stack[this.stack.length-1];we.label=ve,we.identifier=pi(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function fe(W){this.data.characterReferenceType=W.type}function ge(W){const ve=this.sliceSerialize(W),we=this.data.characterReferenceType;let Ue;we?(Ue=cm(ve,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=eu(ve);const Xe=this.stack[this.stack.length-1];Xe.value+=Ue}function de(W){const ve=this.stack.pop();ve.position.end=cr(W.end)}function Te(W){le.call(this,W);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(W)}function ke(W){le.call(this,W);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(W)}function Me(){return{type:"blockquote",children:[]}}function De(){return{type:"code",lang:null,meta:null,value:""}}function nt(){return{type:"inlineCode",value:""}}function yt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function x(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function ue(){return{type:"break"}}function I(){return{type:"html",value:""}}function U(){return{type:"image",title:null,url:"",alt:null}}function Q(){return{type:"link",title:null,url:"",children:[]}}function be(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function Se(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function re(){return{type:"paragraph",children:[]}}function _e(){return{type:"strong",children:[]}}function Ce(){return{type:"text",value:""}}function xe(){return{type:"thematicBreak"}}}function cr(n){return{line:n.line,column:n.column,offset:n.offset}}function Rm(n,l){let i=-1;for(;++i<l.length;){const o=l[i];Array.isArray(o)?Rm(n,o):O_(n,o)}}function O_(n,l){let i;for(i in l)if(Am.call(l,i))switch(i){case"canContainEols":{const o=l[i];o&&n[i].push(...o);break}case"transforms":{const o=l[i];o&&n[i].push(...o);break}case"enter":case"exit":{const o=l[i];o&&Object.assign(n[i],o);break}}}function Nm(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+Ca({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+Ca({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+Ca({start:l.start,end:l.end})+") is still open")}function z_(n){const l=this;l.parser=i;function i(o){return R_(o,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function M_(n,l){const i={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(l),!0)};return n.patch(l,i),n.applyData(l,i)}function D_(n,l){const i={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,i),[n.applyData(l,i),{type:"text",value:`
51
- `}]}function j_(n,l){const i=l.value?l.value+`
52
- `:"",o={};l.lang&&(o.className=["language-"+l.lang]);let s={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return l.meta&&(s.data={meta:l.meta}),n.patch(l,s),s=n.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},n.patch(l,s),s}function U_(n,l){const i={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function B_(n,l){const i={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function L_(n,l){const i=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(l.identifier).toUpperCase(),s=gi(o.toLowerCase()),u=n.footnoteOrder.indexOf(o);let c,d=n.footnoteCounts.get(o);d===void 0?(d=0,n.footnoteOrder.push(o),c=n.footnoteOrder.length):c=u+1,d+=1,n.footnoteCounts.set(o,d);const h={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};n.patch(l,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return n.patch(l,p),n.applyData(l,p)}function I_(n,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function H_(n,l){if(n.options.allowDangerousHtml){const i={type:"raw",value:l.value};return n.patch(l,i),n.applyData(l,i)}}function Om(n,l){const i=l.referenceType;let o="]";if(i==="collapsed"?o+="[]":i==="full"&&(o+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+o}];const s=n.all(l),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=o:s.push({type:"text",value:o}),s}function q_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Om(n,l);const s={src:gi(o.url||""),alt:l.alt};o.title!==null&&o.title!==void 0&&(s.title=o.title);const u={type:"element",tagName:"img",properties:s,children:[]};return n.patch(l,u),n.applyData(l,u)}function Y_(n,l){const i={src:gi(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const o={type:"element",tagName:"img",properties:i,children:[]};return n.patch(l,o),n.applyData(l,o)}function P_(n,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};n.patch(l,i);const o={type:"element",tagName:"code",properties:{},children:[i]};return n.patch(l,o),n.applyData(l,o)}function F_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Om(n,l);const s={href:gi(o.url||"")};o.title!==null&&o.title!==void 0&&(s.title=o.title);const u={type:"element",tagName:"a",properties:s,children:n.all(l)};return n.patch(l,u),n.applyData(l,u)}function V_(n,l){const i={href:gi(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const o={type:"element",tagName:"a",properties:i,children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function G_(n,l,i){const o=n.all(l),s=i?X_(i):zm(l),u={},c=[];if(typeof l.checked=="boolean"){const y=o[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},o.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let d=-1;for(;++d<o.length;){const y=o[d];(s||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
53
- `}),y.type==="element"&&y.tagName==="p"&&!s?c.push(...y.children):c.push(y)}const h=o[o.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
54
- `});const p={type:"element",tagName:"li",properties:u,children:c};return n.patch(l,p),n.applyData(l,p)}function X_(n){let l=!1;if(n.type==="list"){l=n.spread||!1;const i=n.children;let o=-1;for(;!l&&++o<i.length;)l=zm(i[o])}return l}function zm(n){const l=n.spread;return l??n.children.length>1}function Z_(n,l){const i={},o=n.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++s<o.length;){const c=o[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:n.wrap(o,!0)};return n.patch(l,u),n.applyData(l,u)}function K_(n,l){const i={type:"element",tagName:"p",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function Q_(n,l){const i={type:"root",children:n.wrap(n.all(l))};return n.patch(l,i),n.applyData(l,i)}function J_(n,l){const i={type:"element",tagName:"strong",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function W_(n,l){const i=n.all(l),o=i.shift(),s=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(l.children[0],c),s.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:n.wrap(i,!0)},d=Zs(l.children[1]),h=Wh(l.children[l.children.length-1]);d&&h&&(c.position={start:d,end:h}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(l,u),n.applyData(l,u)}function $_(n,l,i){const o=i?i.children:void 0,u=(o?o.indexOf(l):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,d=c?c.length:l.children.length;let h=-1;const p=[];for(;++h<d;){const g=l.children[h],v={},b=c?c[h]:void 0;b&&(v.align=b);let C={type:"element",tagName:u,properties:v,children:[]};g&&(C.children=n.all(g),n.patch(g,C),C=n.applyData(g,C)),p.push(C)}const y={type:"element",tagName:"tr",properties:{},children:n.wrap(p,!0)};return n.patch(l,y),n.applyData(l,y)}function ex(n,l){const i={type:"element",tagName:"td",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}const Mm=9,Dm=32;function tx(n){const l=String(n),i=/\r?\n|\r/g;let o=i.exec(l),s=0;const u=[];for(;o;)u.push(jm(l.slice(s,o.index),s>0,!0),o[0]),s=o.index+o[0].length,o=i.exec(l);return u.push(jm(l.slice(s),s>0,!1)),u.join("")}function jm(n,l,i){let o=0,s=n.length;if(l){let u=n.codePointAt(o);for(;u===Mm||u===Dm;)o++,u=n.codePointAt(o)}if(i){let u=n.codePointAt(s-1);for(;u===Mm||u===Dm;)s--,u=n.codePointAt(s-1)}return s>o?n.slice(o,s):""}function nx(n,l){const i={type:"text",value:tx(String(l.value))};return n.patch(l,i),n.applyData(l,i)}function rx(n,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(l,i),n.applyData(l,i)}const ix={blockquote:M_,break:D_,code:j_,delete:U_,emphasis:B_,footnoteReference:L_,heading:I_,html:H_,imageReference:q_,image:Y_,inlineCode:P_,linkReference:F_,link:V_,listItem:G_,list:Z_,paragraph:K_,root:Q_,strong:J_,table:W_,tableCell:ex,tableRow:$_,text:nx,thematicBreak:rx,toml:Pl,yaml:Pl,definition:Pl,footnoteDefinition:Pl};function Pl(){}const Um=-1,Fl=0,Ra=1,Vl=2,su=3,uu=4,cu=5,fu=6,Bm=7,Lm=8,Im=typeof self=="object"?self:globalThis,ax=(n,l)=>{const i=(s,u)=>(n.set(u,s),s),o=s=>{if(n.has(s))return n.get(s);const[u,c]=l[s];switch(u){case Fl:case Um:return i(c,s);case Ra:{const d=i([],s);for(const h of c)d.push(o(h));return d}case Vl:{const d=i({},s);for(const[h,p]of c)d[o(h)]=o(p);return d}case su:return i(new Date(c),s);case uu:{const{source:d,flags:h}=c;return i(new RegExp(d,h),s)}case cu:{const d=i(new Map,s);for(const[h,p]of c)d.set(o(h),o(p));return d}case fu:{const d=i(new Set,s);for(const h of c)d.add(o(h));return d}case Bm:{const{name:d,message:h}=c;return i(new Im[d](h),s)}case Lm:return i(BigInt(c),s);case"BigInt":return i(Object(BigInt(c)),s);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(new Im[u](c),s)};return o},Hm=n=>ax(new Map,n)(0),yi="",{toString:lx}={},{keys:ox}=Object,Na=n=>{const l=typeof n;if(l!=="object"||!n)return[Fl,l];const i=lx.call(n).slice(8,-1);switch(i){case"Array":return[Ra,yi];case"Object":return[Vl,yi];case"Date":return[su,yi];case"RegExp":return[uu,yi];case"Map":return[cu,yi];case"Set":return[fu,yi];case"DataView":return[Ra,i]}return i.includes("Array")?[Ra,i]:i.includes("Error")?[Bm,i]:[Vl,i]},Gl=([n,l])=>n===Fl&&(l==="function"||l==="symbol"),sx=(n,l,i,o)=>{const s=(c,d)=>{const h=o.push(c)-1;return i.set(d,h),h},u=c=>{if(i.has(c))return i.get(c);let[d,h]=Na(c);switch(d){case Fl:{let y=c;switch(h){case"bigint":d=Lm,y=c.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+h);y=null;break;case"undefined":return s([Um],c)}return s([d,y],c)}case Ra:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),s([h,[...v]],c)}const y=[],g=s([d,y],c);for(const v of c)y.push(u(v));return g}case Vl:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(l&&"toJSON"in c)return u(c.toJSON());const y=[],g=s([d,y],c);for(const v of ox(c))(n||!Gl(Na(c[v])))&&y.push([u(v),u(c[v])]);return g}case su:return s([d,c.toISOString()],c);case uu:{const{source:y,flags:g}=c;return s([d,{source:y,flags:g}],c)}case cu:{const y=[],g=s([d,y],c);for(const[v,b]of c)(n||!(Gl(Na(v))||Gl(Na(b))))&&y.push([u(v),u(b)]);return g}case fu:{const y=[],g=s([d,y],c);for(const v of c)(n||!Gl(Na(v)))&&y.push(u(v));return g}}const{message:p}=c;return s([d,{name:h,message:p}],c)};return u},qm=(n,{json:l,lossy:i}={})=>{const o=[];return sx(!(l||i),!!l,new Map,o)(n),o},Xl=typeof structuredClone=="function"?(n,l)=>l&&("json"in l||"lossy"in l)?Hm(qm(n,l)):structuredClone(n):(n,l)=>Hm(qm(n,l));function ux(n,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function cx(n,l){return"Back to reference "+(n+1)+(l>1?"-"+l:"")}function fx(n){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",i=n.options.footnoteBackContent||ux,o=n.options.footnoteBackLabel||cx,s=n.options.footnoteLabel||"Footnotes",u=n.options.footnoteLabelTagName||"h2",c=n.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let h=-1;for(;++h<n.footnoteOrder.length;){const p=n.footnoteById.get(n.footnoteOrder[h]);if(!p)continue;const y=n.all(p),g=String(p.identifier).toUpperCase(),v=gi(g.toLowerCase());let b=0;const C=[],E=n.footnoteCounts.get(g);for(;E!==void 0&&++b<=E;){C.length>0&&C.push({type:"text",value:" "});let k=typeof i=="string"?i:i(h,b);typeof k=="string"&&(k={type:"text",value:k}),C.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(h,b),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const T=y[y.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const k=T.children[T.children.length-1];k&&k.type==="text"?k.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...C)}else y.push(...C);const _={type:"element",tagName:"li",properties:{id:l+"fn-"+v},children:n.wrap(y,!0)};n.patch(p,_),d.push(_)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Xl(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
55
- `},{type:"element",tagName:"ol",properties:{},children:n.wrap(d,!0)},{type:"text",value:`
56
- `}]}}const Ym=(function(n){if(n==null)return px;if(typeof n=="function")return Zl(n);if(typeof n=="object")return Array.isArray(n)?dx(n):hx(n);if(typeof n=="string")return mx(n);throw new Error("Expected function, string, or object as test")});function dx(n){const l=[];let i=-1;for(;++i<n.length;)l[i]=Ym(n[i]);return Zl(o);function o(...s){let u=-1;for(;++u<l.length;)if(l[u].apply(this,s))return!0;return!1}}function hx(n){const l=n;return Zl(i);function i(o){const s=o;let u;for(u in n)if(s[u]!==l[u])return!1;return!0}}function mx(n){return Zl(l);function l(i){return i&&i.type===n}}function Zl(n){return l;function l(i,o,s){return!!(gx(i)&&n.call(this,i,typeof o=="number"?o:void 0,s||void 0))}}function px(){return!0}function gx(n){return n!==null&&typeof n=="object"&&"type"in n}function dT(n){return n}const Pm=[],yx=!0,Fm=!1,bx="skip";function vx(n,l,i,o){let s;typeof l=="function"&&typeof i!="function"?(o=i,i=l):s=l;const u=Ym(s),c=o?-1:1;d(n,void 0,[])();function d(h,p,y){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=Pm,C,E,T;if((!l||u(h,p,y[y.length-1]||void 0))&&(b=Sx(i(h,y)),b[0]===Fm))return b;if("children"in h&&h.children){const _=h;if(_.children&&b[0]!==bx)for(E=(o?_.children.length:-1)+c,T=y.concat(_);E>-1&&E<_.children.length;){const k=_.children[E];if(C=d(k,E,T)(),C[0]===Fm)return C;E=typeof C[1]=="number"?C[1]:E+c}}return b}}}function Sx(n){return Array.isArray(n)?n:typeof n=="number"?[yx,n]:n==null?Pm:[n]}function Vm(n,l,i,o){let s,u,c;typeof l=="function"&&typeof i!="function"?(u=void 0,c=l,s=i):(u=l,c=i,s=o),vx(n,u,d,s);function d(h,p){const y=p[p.length-1],g=y?y.children.indexOf(h):void 0;return c(h,g,y)}}const du={}.hasOwnProperty,Ex={};function _x(n,l){const i=l||Ex,o=new Map,s=new Map,u=new Map,c={...ix,...i.handlers},d={all:p,applyData:wx,definitionById:o,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:i,patch:xx,wrap:Tx};return Vm(n,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?o:s,v=String(y.identifier).toUpperCase();g.has(v)||g.set(v,y)}}),d;function h(y,g){const v=y.type,b=d.handlers[v];if(du.call(d.handlers,v)&&b)return b(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in y){const{children:E,...T}=y,_=Xl(T);return _.children=d.all(y),_}return Xl(y)}return(d.options.unknownHandler||Cx)(d,y,g)}function p(y){const g=[];if("children"in y){const v=y.children;let b=-1;for(;++b<v.length;){const C=d.one(v[b],y);if(C){if(b&&v[b-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Gm(C.value)),!Array.isArray(C)&&C.type==="element")){const E=C.children[0];E&&E.type==="text"&&(E.value=Gm(E.value))}Array.isArray(C)?g.push(...C):g.push(C)}}}return g}}function xx(n,l){n.position&&(l.position=p1(n))}function wx(n,l){let i=l;if(n&&n.data){const o=n.data.hName,s=n.data.hChildren,u=n.data.hProperties;if(typeof o=="string")if(i.type==="element")i.tagName=o;else{const c="children"in i?i.children:[i];i={type:"element",tagName:o,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,Xl(u)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function Cx(n,l){const i=l.data||{},o="value"in l&&!(du.call(i,"hProperties")||du.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function Tx(n,l){const i=[];let o=-1;for(l&&i.push({type:"text",value:`
46
+ `;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,o.push(c)}return o.join("")}function Gx(n){const o={constructs:sE([Px,...(n||{}).extensions||[]]),content:u(gE),defined:[],document:u(bE),flow:u(Lx),lazy:{},string:u(Ux),text:u(Hx)};return o;function u(s){return c;function c(f){return Fx(o,s,f)}}}function Xx(n){for(;!Im(n););return n}const Vm=/[\0\t\n\r]/g;function Zx(){let n=1,l="",i=!0,o;return u;function u(s,c,f){const m=[];let h,g,y,v,b;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,l="",i&&(s.charCodeAt(0)===65279&&y++,i=void 0);y<s.length;){if(Vm.lastIndex=y,h=Vm.exec(s),v=h&&h.index!==void 0?h.index:s.length,b=s.charCodeAt(v),!h){l=s.slice(y);break}if(b===10&&y===v&&o)m.push(-3),o=void 0;else switch(o&&(m.push(-5),o=void 0),y<v&&(m.push(s.slice(y,v)),n+=v-y),b){case 0:{m.push(65533),n++;break}case 9:{for(g=Math.ceil(n/4)*4,m.push(-2);n++<g;)m.push(-1);break}case 10:{m.push(-4),n=1;break}default:o=!0,n=1}y=v+1}return f&&(o&&m.push(-5),l&&m.push(l),m.push(null)),m}}const Kx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qx(n){return n.replace(Kx,Jx)}function Jx(n,l,i){if(l)return l;if(i.charCodeAt(0)===35){const u=i.charCodeAt(1),s=u===120||u===88;return km(i.slice(s?2:1),s?16:10)}return au(i)||n}const Gm={}.hasOwnProperty;function Wx(n,l,i){return typeof l!="string"&&(i=l,l=void 0),$x(i)(Xx(Gx(i).document().write(Zx()(n,l,!0))))}function $x(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(X),autolinkProtocol:F,autolinkEmail:F,atxHeading:s(K),blockQuote:s(He),characterEscape:F,characterReference:F,codeFenced:s(ve),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(ve,c),codeText:s(ze,c),codeTextData:F,data:F,codeFlowValue:F,definition:s(je),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(S),hardBreakEscape:s(W),hardBreakTrailing:s(W),htmlFlow:s(U,c),htmlFlowData:F,htmlText:s(U,c),htmlTextData:F,image:s(j),label:c,link:s(X),listItem:s(pe),listItemValue:v,listOrdered:s(he,y),listUnordered:s(he),paragraph:s(le),reference:z,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(K),strong:s(Ee),thematicBreak:s(Se)},exit:{atxHeading:m(),atxHeadingSequence:H,autolink:m(),autolinkEmail:Ae,autolinkProtocol:ke,blockQuote:m(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:we,characterReference:Te,codeFenced:m(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:$,codeIndented:m(_),codeText:m(V),codeTextData:$,data:$,definition:m(),definitionDestinationString:q,definitionLabelString:A,definitionTitleString:k,emphasis:m(),hardBreakEscape:m(D),hardBreakTrailing:m(D),htmlFlow:m(ne),htmlFlowData:$,htmlText:m(C),htmlTextData:$,image:m(Q),label:de,labelText:se,lineEnding:ie,link:m(Z),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:re,resourceDestinationString:L,resourceTitleString:N,resource:B,setextHeading:m(Y),setextHeadingLineSequence:I,setextHeadingText:M,strong:m(),thematicBreak:m()}};Xm(l,(n||{}).mdastExtensions||[]);const i={};return o;function o(te){let be={type:"root",children:[]};const Ce={stack:[be],tokenStack:[],config:l,enter:f,exit:h,buffer:c,resume:g,data:i},Ie=[];let Je=-1;for(;++Je<te.length;)if(te[Je][1].type==="listOrdered"||te[Je][1].type==="listUnordered")if(te[Je][0]==="enter")Ie.push(Je);else{const pt=Ie.pop();Je=u(te,pt,Je)}for(Je=-1;++Je<te.length;){const pt=l[te[Je][0]];Gm.call(pt,te[Je][1].type)&&pt[te[Je][1].type].call(Object.assign({sliceSerialize:te[Je][2].sliceSerialize},Ce),te[Je][1])}if(Ce.tokenStack.length>0){const pt=Ce.tokenStack[Ce.tokenStack.length-1];(pt[1]||Zm).call(Ce,void 0,pt[0])}for(be.position={start:hr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:hr(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<l.transforms.length;)be=l.transforms[Je](be)||be;return be}function u(te,be,Ce){let Ie=be-1,Je=-1,pt=!1,qt,Xe,gt,Ot;for(;++Ie<=Ce;){const Ze=te[Ie];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Je++:Je--,Ot=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(qt&&!Ot&&!Je&&!gt&&(gt=Ie),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Je&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Je===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(qt){let Cn=Ie;for(Xe=void 0;Cn--;){const nn=te[Cn];if(nn[1].type==="lineEnding"||nn[1].type==="lineEndingBlank"){if(nn[0]==="exit")continue;Xe&&(te[Xe][1].type="lineEndingBlank",pt=!0),nn[1].type="lineEnding",Xe=Cn}else if(!(nn[1].type==="linePrefix"||nn[1].type==="blockQuotePrefix"||nn[1].type==="blockQuotePrefixWhitespace"||nn[1].type==="blockQuoteMarker"||nn[1].type==="listItemIndent"))break}gt&&(!Xe||gt<Xe)&&(qt._spread=!0),qt.end=Object.assign({},Xe?te[Xe][1].start:Ze[1].end),te.splice(Xe||Ie,0,["exit",qt,Ze[2]]),Ie++,Ce++}if(Ze[1].type==="listItemPrefix"){const Cn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};qt=Cn,te.splice(Ie,0,["enter",Cn,Ze[2]]),Ie++,Ce++,gt=void 0,Ot=!0}}}return te[be][1]._spread=pt,Ce}function s(te,be){return Ce;function Ce(Ie){f.call(this,te(Ie),Ie),be&&be.call(this,Ie)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(te,be,Ce){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([be,Ce||void 0]),te.position={start:hr(be.start),end:void 0}}function m(te){return be;function be(Ce){te&&te.call(this,Ce),h.call(this,Ce)}}function h(te,be){const Ce=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==te.type&&(be?be.call(this,te,Ie[0]):(Ie[1]||Zm).call(this,te,Ie[0]));else throw new Error("Cannot close `"+te.type+"` ("+za({start:te.start,end:te.end})+"): it’s not open");Ce.position.end=hr(te.end)}function g(){return lE(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(te){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function b(){const te=this.resume(),be=this.stack[this.stack.length-1];be.lang=te}function w(){const te=this.resume(),be=this.stack[this.stack.length-1];be.meta=te}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te.replace(/(\r?\n|\r)$/g,"")}function A(te){const be=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=be,Ce.identifier=vi(this.sliceSerialize(te)).toLowerCase()}function k(){const te=this.resume(),be=this.stack[this.stack.length-1];be.title=te}function q(){const te=this.resume(),be=this.stack[this.stack.length-1];be.url=te}function H(te){const be=this.stack[this.stack.length-1];if(!be.depth){const Ce=this.sliceSerialize(te).length;be.depth=Ce}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function I(te){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function F(te){const Ce=this.stack[this.stack.length-1].children;let Ie=Ce[Ce.length-1];(!Ie||Ie.type!=="text")&&(Ie=_e(),Ie.position={start:hr(te.start),end:void 0},Ce.push(Ie)),this.stack.push(Ie)}function $(te){const be=this.stack.pop();be.value+=this.sliceSerialize(te),be.position.end=hr(te.end)}function ie(te){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=be.children[be.children.length-1];Ce.position.end=hr(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(be.type)&&(F.call(this,te),$.call(this,te))}function D(){this.data.atHardBreak=!0}function ne(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function C(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function V(){const te=this.resume(),be=this.stack[this.stack.length-1];be.value=te}function Z(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=be,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Q(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=be,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function se(te){const be=this.sliceSerialize(te),Ce=this.stack[this.stack.length-2];Ce.label=Qx(be),Ce.identifier=vi(be).toLowerCase()}function de(){const te=this.stack[this.stack.length-1],be=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ie=te.children;Ce.children=Ie}else Ce.alt=be}function L(){const te=this.resume(),be=this.stack[this.stack.length-1];be.url=te}function N(){const te=this.resume(),be=this.stack[this.stack.length-1];be.title=te}function B(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function re(te){const be=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=be,Ce.identifier=vi(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ce(te){this.data.characterReferenceType=te.type}function we(te){const be=this.sliceSerialize(te),Ce=this.data.characterReferenceType;let Ie;Ce?(Ie=km(be,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=au(be);const Je=this.stack[this.stack.length-1];Je.value+=Ie}function Te(te){const be=this.stack.pop();be.position.end=hr(te.end)}function ke(te){$.call(this,te);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(te)}function Ae(te){$.call(this,te);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(te)}function He(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function ze(){return{type:"inlineCode",value:""}}function je(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function S(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function W(){return{type:"break"}}function U(){return{type:"html",value:""}}function j(){return{type:"image",title:null,url:"",alt:null}}function X(){return{type:"link",title:null,url:"",children:[]}}function he(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function pe(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function le(){return{type:"paragraph",children:[]}}function Ee(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function Se(){return{type:"thematicBreak"}}}function hr(n){return{line:n.line,column:n.column,offset:n.offset}}function Xm(n,l){let i=-1;for(;++i<l.length;){const o=l[i];Array.isArray(o)?Xm(n,o):e_(n,o)}}function e_(n,l){let i;for(i in l)if(Gm.call(l,i))switch(i){case"canContainEols":{const o=l[i];o&&n[i].push(...o);break}case"transforms":{const o=l[i];o&&n[i].push(...o);break}case"enter":case"exit":{const o=l[i];o&&Object.assign(n[i],o);break}}}function Zm(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+za({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+za({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+za({start:l.start,end:l.end})+") is still open")}function t_(n){const l=this;l.parser=i;function i(o){return Wx(o,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function n_(n,l){const i={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(l),!0)};return n.patch(l,i),n.applyData(l,i)}function r_(n,l){const i={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,i),[n.applyData(l,i),{type:"text",value:`
47
+ `}]}function i_(n,l){const i=l.value?l.value+`
48
+ `:"",o={};l.lang&&(o.className=["language-"+l.lang]);let u={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return l.meta&&(u.data={meta:l.meta}),n.patch(l,u),u=n.applyData(l,u),u={type:"element",tagName:"pre",properties:{},children:[u]},n.patch(l,u),u}function a_(n,l){const i={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function l_(n,l){const i={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function o_(n,l){const i=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(l.identifier).toUpperCase(),u=Si(o.toLowerCase()),s=n.footnoteOrder.indexOf(o);let c,f=n.footnoteCounts.get(o);f===void 0?(f=0,n.footnoteOrder.push(o),c=n.footnoteOrder.length):c=s+1,f+=1,n.footnoteCounts.set(o,f);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+u,id:i+"fnref-"+u+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};n.patch(l,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return n.patch(l,h),n.applyData(l,h)}function s_(n,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function u_(n,l){if(n.options.allowDangerousHtml){const i={type:"raw",value:l.value};return n.patch(l,i),n.applyData(l,i)}}function Km(n,l){const i=l.referenceType;let o="]";if(i==="collapsed"?o+="[]":i==="full"&&(o+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+o}];const u=n.all(l),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const c=u[u.length-1];return c&&c.type==="text"?c.value+=o:u.push({type:"text",value:o}),u}function c_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Km(n,l);const u={src:Si(o.url||""),alt:l.alt};o.title!==null&&o.title!==void 0&&(u.title=o.title);const s={type:"element",tagName:"img",properties:u,children:[]};return n.patch(l,s),n.applyData(l,s)}function f_(n,l){const i={src:Si(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const o={type:"element",tagName:"img",properties:i,children:[]};return n.patch(l,o),n.applyData(l,o)}function d_(n,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};n.patch(l,i);const o={type:"element",tagName:"code",properties:{},children:[i]};return n.patch(l,o),n.applyData(l,o)}function h_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Km(n,l);const u={href:Si(o.url||"")};o.title!==null&&o.title!==void 0&&(u.title=o.title);const s={type:"element",tagName:"a",properties:u,children:n.all(l)};return n.patch(l,s),n.applyData(l,s)}function m_(n,l){const i={href:Si(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const o={type:"element",tagName:"a",properties:i,children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function p_(n,l,i){const o=n.all(l),u=i?g_(i):Qm(l),s={},c=[];if(typeof l.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:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<o.length;){const g=o[f];(u||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
49
+ `}),g.type==="element"&&g.tagName==="p"&&!u?c.push(...g.children):c.push(g)}const m=o[o.length-1];m&&(u||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
50
+ `});const h={type:"element",tagName:"li",properties:s,children:c};return n.patch(l,h),n.applyData(l,h)}function g_(n){let l=!1;if(n.type==="list"){l=n.spread||!1;const i=n.children;let o=-1;for(;!l&&++o<i.length;)l=Qm(i[o])}return l}function Qm(n){const l=n.spread;return l??n.children.length>1}function y_(n,l){const i={},o=n.all(l);let u=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++u<o.length;){const c=o[u];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:n.wrap(o,!0)};return n.patch(l,s),n.applyData(l,s)}function b_(n,l){const i={type:"element",tagName:"p",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function v_(n,l){const i={type:"root",children:n.wrap(n.all(l))};return n.patch(l,i),n.applyData(l,i)}function S_(n,l){const i={type:"element",tagName:"strong",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}function E_(n,l){const i=n.all(l),o=i.shift(),u=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(l.children[0],c),u.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:n.wrap(i,!0)},f=$s(l.children[1]),m=gm(l.children[l.children.length-1]);f&&m&&(c.position={start:f,end:m}),u.push(c)}const s={type:"element",tagName:"table",properties:{},children:n.wrap(u,!0)};return n.patch(l,s),n.applyData(l,s)}function x_(n,l,i){const o=i?i.children:void 0,s=(o?o.indexOf(l):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:l.children.length;let m=-1;const h=[];for(;++m<f;){const y=l.children[m],v={},b=c?c[m]:void 0;b&&(v.align=b);let w={type:"element",tagName:s,properties:v,children:[]};y&&(w.children=n.all(y),n.patch(y,w),w=n.applyData(y,w)),h.push(w)}const g={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(l,g),n.applyData(l,g)}function __(n,l){const i={type:"element",tagName:"td",properties:{},children:n.all(l)};return n.patch(l,i),n.applyData(l,i)}const Jm=9,Wm=32;function w_(n){const l=String(n),i=/\r?\n|\r/g;let o=i.exec(l),u=0;const s=[];for(;o;)s.push($m(l.slice(u,o.index),u>0,!0),o[0]),u=o.index+o[0].length,o=i.exec(l);return s.push($m(l.slice(u),u>0,!1)),s.join("")}function $m(n,l,i){let o=0,u=n.length;if(l){let s=n.codePointAt(o);for(;s===Jm||s===Wm;)o++,s=n.codePointAt(o)}if(i){let s=n.codePointAt(u-1);for(;s===Jm||s===Wm;)u--,s=n.codePointAt(u-1)}return u>o?n.slice(o,u):""}function C_(n,l){const i={type:"text",value:w_(String(l.value))};return n.patch(l,i),n.applyData(l,i)}function T_(n,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(l,i),n.applyData(l,i)}const A_={blockquote:n_,break:r_,code:i_,delete:a_,emphasis:l_,footnoteReference:o_,heading:s_,html:u_,imageReference:c_,image:f_,inlineCode:d_,linkReference:h_,link:m_,listItem:p_,list:y_,paragraph:b_,root:v_,strong:S_,table:E_,tableCell:__,tableRow:x_,text:C_,thematicBreak:T_,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const ep=-1,Gl=0,La=1,Xl=2,hu=3,mu=4,pu=5,gu=6,tp=7,np=8,rp=typeof self=="object"?self:globalThis,k_=(n,l)=>{const i=(u,s)=>(n.set(s,u),u),o=u=>{if(n.has(u))return n.get(u);const[s,c]=l[u];switch(s){case Gl:case ep:return i(c,u);case La:{const f=i([],u);for(const m of c)f.push(o(m));return f}case Xl:{const f=i({},u);for(const[m,h]of c)f[o(m)]=o(h);return f}case hu:return i(new Date(c),u);case mu:{const{source:f,flags:m}=c;return i(new RegExp(f,m),u)}case pu:{const f=i(new Map,u);for(const[m,h]of c)f.set(o(m),o(h));return f}case gu:{const f=i(new Set,u);for(const m of c)f.add(o(m));return f}case tp:{const{name:f,message:m}=c;return i(new rp[f](m),u)}case np:return i(BigInt(c),u);case"BigInt":return i(Object(BigInt(c)),u);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new rp[s](c),u)};return o},ip=n=>k_(new Map,n)(0),Ei="",{toString:N_}={},{keys:R_}=Object,Ia=n=>{const l=typeof n;if(l!=="object"||!n)return[Gl,l];const i=N_.call(n).slice(8,-1);switch(i){case"Array":return[La,Ei];case"Object":return[Xl,Ei];case"Date":return[hu,Ei];case"RegExp":return[mu,Ei];case"Map":return[pu,Ei];case"Set":return[gu,Ei];case"DataView":return[La,i]}return i.includes("Array")?[La,i]:i.includes("Error")?[tp,i]:[Xl,i]},Zl=([n,l])=>n===Gl&&(l==="function"||l==="symbol"),O_=(n,l,i,o)=>{const u=(c,f)=>{const m=o.push(c)-1;return i.set(f,m),m},s=c=>{if(i.has(c))return i.get(c);let[f,m]=Ia(c);switch(f){case Gl:{let g=c;switch(m){case"bigint":f=np,g=c.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return u([ep],c)}return u([f,g],c)}case La:{if(m){let v=c;return m==="DataView"?v=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(v=new Uint8Array(c)),u([m,[...v]],c)}const g=[],y=u([f,g],c);for(const v of c)g.push(s(v));return y}case Xl:{if(m)switch(m){case"BigInt":return u([m,c.toString()],c);case"Boolean":case"Number":case"String":return u([m,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const g=[],y=u([f,g],c);for(const v of R_(c))(n||!Zl(Ia(c[v])))&&g.push([s(v),s(c[v])]);return y}case hu:return u([f,c.toISOString()],c);case mu:{const{source:g,flags:y}=c;return u([f,{source:g,flags:y}],c)}case pu:{const g=[],y=u([f,g],c);for(const[v,b]of c)(n||!(Zl(Ia(v))||Zl(Ia(b))))&&g.push([s(v),s(b)]);return y}case gu:{const g=[],y=u([f,g],c);for(const v of c)(n||!Zl(Ia(v)))&&g.push(s(v));return y}}const{message:h}=c;return u([f,{name:m,message:h}],c)};return s},ap=(n,{json:l,lossy:i}={})=>{const o=[];return O_(!(l||i),!!l,new Map,o)(n),o},Kl=typeof structuredClone=="function"?(n,l)=>l&&("json"in l||"lossy"in l)?ip(ap(n,l)):structuredClone(n):(n,l)=>ip(ap(n,l));function z_(n,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function M_(n,l){return"Back to reference "+(n+1)+(l>1?"-"+l:"")}function D_(n){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",i=n.options.footnoteBackContent||z_,o=n.options.footnoteBackLabel||M_,u=n.options.footnoteLabel||"Footnotes",s=n.options.footnoteLabelTagName||"h2",c=n.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[m]);if(!h)continue;const g=n.all(h),y=String(h.identifier).toUpperCase(),v=Si(y.toLowerCase());let b=0;const w=[],E=n.footnoteCounts.get(y);for(;E!==void 0&&++b<=E;){w.length>0&&w.push({type:"text",value:" "});let A=typeof i=="string"?i:i(m,b);typeof A=="string"&&(A={type:"text",value:A}),w.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(m,b),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const T=g[g.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const A=T.children[T.children.length-1];A&&A.type==="text"?A.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...w)}else g.push(...w);const _={type:"element",tagName:"li",properties:{id:l+"fn-"+v},children:n.wrap(g,!0)};n.patch(h,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Kl(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
51
+ `},{type:"element",tagName:"ol",properties:{},children:n.wrap(f,!0)},{type:"text",value:`
52
+ `}]}}const lp=(function(n){if(n==null)return B_;if(typeof n=="function")return Ql(n);if(typeof n=="object")return Array.isArray(n)?j_(n):L_(n);if(typeof n=="string")return I_(n);throw new Error("Expected function, string, or object as test")});function j_(n){const l=[];let i=-1;for(;++i<n.length;)l[i]=lp(n[i]);return Ql(o);function o(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function L_(n){const l=n;return Ql(i);function i(o){const u=o;let s;for(s in n)if(u[s]!==l[s])return!1;return!0}}function I_(n){return Ql(l);function l(i){return i&&i.type===n}}function Ql(n){return l;function l(i,o,u){return!!(U_(i)&&n.call(this,i,typeof o=="number"?o:void 0,u||void 0))}}function B_(){return!0}function U_(n){return n!==null&&typeof n=="object"&&"type"in n}function FT(n){return n}const op=[],H_=!0,sp=!1,q_="skip";function P_(n,l,i,o){let u;typeof l=="function"&&typeof i!="function"?(o=i,i=l):u=l;const s=lp(u),c=o?-1:1;f(n,void 0,[])();function f(m,h,g){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=op,w,E,T;if((!l||s(m,h,g[g.length-1]||void 0))&&(b=F_(i(m,g)),b[0]===sp))return b;if("children"in m&&m.children){const _=m;if(_.children&&b[0]!==q_)for(E=(o?_.children.length:-1)+c,T=g.concat(_);E>-1&&E<_.children.length;){const A=_.children[E];if(w=f(A,E,T)(),w[0]===sp)return w;E=typeof w[1]=="number"?w[1]:E+c}}return b}}}function F_(n){return Array.isArray(n)?n:typeof n=="number"?[H_,n]:n==null?op:[n]}function up(n,l,i,o){let u,s,c;typeof l=="function"&&typeof i!="function"?(s=void 0,c=l,u=i):(s=l,c=i,u=o),P_(n,s,f,u);function f(m,h){const g=h[h.length-1],y=g?g.children.indexOf(m):void 0;return c(m,y,g)}}const yu={}.hasOwnProperty,Y_={};function V_(n,l){const i=l||Y_,o=new Map,u=new Map,s=new Map,c={...A_,...i.handlers},f={all:h,applyData:X_,definitionById:o,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:m,options:i,patch:G_,wrap:K_};return up(n,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?o:u,v=String(g.identifier).toUpperCase();y.has(v)||y.set(v,g)}}),f;function m(g,y){const v=g.type,b=f.handlers[v];if(yu.call(f.handlers,v)&&b)return b(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in g){const{children:E,...T}=g,_=Kl(T);return _.children=f.all(g),_}return Kl(g)}return(f.options.unknownHandler||Z_)(f,g,y)}function h(g){const y=[];if("children"in g){const v=g.children;let b=-1;for(;++b<v.length;){const w=f.one(v[b],g);if(w){if(b&&v[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=cp(w.value)),!Array.isArray(w)&&w.type==="element")){const E=w.children[0];E&&E.type==="text"&&(E.value=cp(E.value))}Array.isArray(w)?y.push(...w):y.push(w)}}}return y}}function G_(n,l){n.position&&(l.position=B1(n))}function X_(n,l){let i=l;if(n&&n.data){const o=n.data.hName,u=n.data.hChildren,s=n.data.hProperties;if(typeof o=="string")if(i.type==="element")i.tagName=o;else{const c="children"in i?i.children:[i];i={type:"element",tagName:o,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Kl(s)),"children"in i&&i.children&&u!==null&&u!==void 0&&(i.children=u)}return i}function Z_(n,l){const i=l.data||{},o="value"in l&&!(yu.call(i,"hProperties")||yu.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function K_(n,l){const i=[];let o=-1;for(l&&i.push({type:"text",value:`
57
53
  `});++o<n.length;)o&&i.push({type:"text",value:`
58
54
  `}),i.push(n[o]);return l&&n.length>0&&i.push({type:"text",value:`
59
- `}),i}function Gm(n){let l=0,i=n.charCodeAt(l);for(;i===9||i===32;)l++,i=n.charCodeAt(l);return n.slice(l)}function Xm(n,l){const i=_x(n,l),o=i.one(n,void 0),s=fx(i),u=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
60
- `},s),u}function kx(n,l){return n&&"run"in n?async function(i,o){const s=Xm(i,{file:o,...l});await n.run(s,o)}:function(i,o){return Xm(i,{file:o,...n||l})}}function Zm(n){if(n)throw n}var hu,Km;function Ax(){if(Km)return hu;Km=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):l.call(p)==="[object Array]"},u=function(p){if(!p||l.call(p)!=="[object Object]")return!1;var y=n.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&n.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!y&&!g)return!1;var v;for(v in p);return typeof v>"u"||n.call(p,v)},c=function(p,y){i&&y.name==="__proto__"?i(p,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):p[y.name]=y.newValue},d=function(p,y){if(y==="__proto__")if(n.call(p,y)){if(o)return o(p,y).value}else return;return p[y]};return hu=function h(){var p,y,g,v,b,C,E=arguments[0],T=1,_=arguments.length,k=!1;for(typeof E=="boolean"&&(k=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<_;++T)if(p=arguments[T],p!=null)for(y in p)g=d(E,y),v=d(p,y),E!==v&&(k&&v&&(u(v)||(b=s(v)))?(b?(b=!1,C=g&&s(g)?g:[]):C=g&&u(g)?g:{},c(E,{name:y,newValue:h(k,C,v)})):typeof v<"u"&&c(E,{name:y,newValue:v}));return E},hu}var Rx=Ax();const mu=ds(Rx);function pu(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function Nx(){const n=[],l={run:i,use:o};return l;function i(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(h,...p){const y=n[++u];let g=-1;if(h){c(h);return}for(;++g<s.length;)(p[g]===null||p[g]===void 0)&&(p[g]=s[g]);s=p,y?Ox(y,d)(...p):c(null,...p)}}function o(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return n.push(s),l}}function Ox(n,l){let i;return o;function o(...c){const d=n.length>c.length;let h;d&&c.push(s);try{h=n.apply(this,c)}catch(p){const y=p;if(d&&i)throw y;return s(y)}d||(h&&h.then&&typeof h.then=="function"?h.then(u,s):h instanceof Error?s(h):u(h))}function s(c,...d){i||(i=!0,l(c,...d))}function u(c){s(null,c)}}const On={basename:zx,dirname:Mx,extname:Dx,join:jx,sep:"/"};function zx(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Oa(n);let i=0,o=-1,s=n.length,u;if(l===void 0||l.length===0||l.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(u){i=s+1;break}}else o<0&&(u=!0,o=s+1);return o<0?"":n.slice(i,o)}if(l===n)return"";let c=-1,d=l.length-1;for(;s--;)if(n.codePointAt(s)===47){if(u){i=s+1;break}}else c<0&&(u=!0,c=s+1),d>-1&&(n.codePointAt(s)===l.codePointAt(d--)?d<0&&(o=s):(d=-1,o=c));return i===o?o=c:o<0&&(o=n.length),n.slice(i,o)}function Mx(n){if(Oa(n),n.length===0)return".";let l=-1,i=n.length,o;for(;--i;)if(n.codePointAt(i)===47){if(o){l=i;break}}else o||(o=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function Dx(n){Oa(n);let l=n.length,i=-1,o=0,s=-1,u=0,c;for(;l--;){const d=n.codePointAt(l);if(d===47){if(c){o=l+1;break}continue}i<0&&(c=!0,i=l+1),d===46?s<0?s=l:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||i<0||u===0||u===1&&s===i-1&&s===o+1?"":n.slice(s,i)}function jx(...n){let l=-1,i;for(;++l<n.length;)Oa(n[l]),n[l]&&(i=i===void 0?n[l]:i+"/"+n[l]);return i===void 0?".":Ux(i)}function Ux(n){Oa(n);const l=n.codePointAt(0)===47;let i=Bx(n,!l);return i.length===0&&!l&&(i="."),i.length>0&&n.codePointAt(n.length-1)===47&&(i+="/"),l?"/"+i:i}function Bx(n,l){let i="",o=0,s=-1,u=0,c=-1,d,h;for(;++c<=n.length;){if(c<n.length)d=n.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(i.length<2||o!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(h=i.lastIndexOf("/"),h!==i.length-1){h<0?(i="",o=0):(i=i.slice(0,h),o=i.length-1-i.lastIndexOf("/")),s=c,u=0;continue}}else if(i.length>0){i="",o=0,s=c,u=0;continue}}l&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+n.slice(s+1,c):i=n.slice(s+1,c),o=c-s-1;s=c,u=0}else d===46&&u>-1?u++:u=-1}return i}function Oa(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const Lx={cwd:Ix};function Ix(){return"/"}function gu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Hx(n){if(typeof n=="string")n=new URL(n);else if(!gu(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return qx(n)}function qx(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 l=n.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const o=l.codePointAt(i+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(l)}const yu=["history","path","basename","stem","extname","dirname"];class Qm{constructor(l){let i;l?gu(l)?i={path:l}:typeof l=="string"||Yx(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":Lx.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<yu.length;){const u=yu[o];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let s;for(s in i)yu.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?On.basename(this.path):void 0}set basename(l){vu(l,"basename"),bu(l,"basename"),this.path=On.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?On.dirname(this.path):void 0}set dirname(l){Jm(this.basename,"dirname"),this.path=On.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?On.extname(this.path):void 0}set extname(l){if(bu(l,"extname"),Jm(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=On.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){gu(l)&&(l=Hx(l)),vu(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?On.basename(this.path,this.extname):void 0}set stem(l){vu(l,"stem"),bu(l,"stem"),this.path=On.join(this.dirname||"",l+(this.extname||""))}fail(l,i,o){const s=this.message(l,i,o);throw s.fatal=!0,s}info(l,i,o){const s=this.message(l,i,o);return s.fatal=void 0,s}message(l,i,o){const s=new Lt(l,i,o);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function bu(n,l){if(n&&n.includes(On.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+On.sep+"`")}function vu(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function Jm(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function Yx(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Px=(function(n){const o=this.constructor.prototype,s=o[n],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,o),u}),Fx={}.hasOwnProperty;class Su extends Px{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=Nx()}copy(){const l=new Su;let i=-1;for(;++i<this.attachers.length;){const o=this.attachers[i];l.use(...o)}return l.data(mu(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(xu("data",this.frozen),this.namespace[l]=i,this):Fx.call(this.namespace,l)&&this.namespace[l]||void 0:l?(xu("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const s=i.call(l,...o);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Kl(l),o=this.parser||this.Parser;return Eu("parse",o),o(String(i),i)}process(l,i){const o=this;return this.freeze(),Eu("process",this.parser||this.Parser),_u("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(u,c){const d=Kl(l),h=o.parse(d);o.run(h,d,function(y,g,v){if(y||!g||!v)return p(y);const b=g,C=o.stringify(b,v);Xx(C)?v.value=C:v.result=C,p(y,v)});function p(y,g){y||!g?c(y):u?u(g):i(void 0,g)}}}processSync(l){let i=!1,o;return this.freeze(),Eu("processSync",this.parser||this.Parser),_u("processSync",this.compiler||this.Compiler),this.process(l,s),$m("processSync","process",i),o;function s(u,c){i=!0,Zm(u),o=c}}run(l,i,o){Wm(l),this.freeze();const s=this.transformers;return!o&&typeof i=="function"&&(o=i,i=void 0),o?u(void 0,o):new Promise(u);function u(c,d){const h=Kl(i);s.run(l,h,p);function p(y,g,v){const b=g||l;y?d(y):c?c(b):o(void 0,b,v)}}}runSync(l,i){let o=!1,s;return this.run(l,i,u),$m("runSync","run",o),s;function u(c,d){Zm(c),s=d,o=!0}}stringify(l,i){this.freeze();const o=Kl(i),s=this.compiler||this.Compiler;return _u("stringify",s),Wm(l),s(l,o)}use(l,...i){const o=this.attachers,s=this.namespace;if(xu("use",this.frozen),l!=null)if(typeof l=="function")h(l,i);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function u(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[y,...g]=p;h(y,g)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(p.plugins),p.settings&&(s.settings=mu(!0,s.settings,p.settings))}function d(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const g=p[y];u(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,y){let g=-1,v=-1;for(;++g<o.length;)if(o[g][0]===p){v=g;break}if(v===-1)o.push([p,...y]);else if(y.length>0){let[b,...C]=y;const E=o[v][1];pu(E)&&pu(b)&&(b=mu(!0,E,b)),o[v]=[p,b,...C]}}}}const Vx=new Su().freeze();function Eu(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function _u(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function xu(n,l){if(l)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Wm(n){if(!pu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function $m(n,l,i){if(!i)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Kl(n){return Gx(n)?n:new Qm(n)}function Gx(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Xx(n){return typeof n=="string"||Zx(n)}function Zx(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Kx="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ep=[],tp={allowDangerousHtml:!0},Qx=/^(https?|ircs?|mailto|xmpp)$/i,Jx=[{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 Wx(n){const l=$x(n),i=ew(n);return tw(l.runSync(l.parse(i),i),n)}function $x(n){const l=n.rehypePlugins||ep,i=n.remarkPlugins||ep,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...tp}:tp;return Vx().use(z_).use(i).use(kx,o).use(l)}function ew(n){const l=n.children||"",i=new Qm;return typeof l=="string"&&(i.value=l),i}function tw(n,l){const i=l.allowedElements,o=l.allowElement,s=l.components,u=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,h=l.urlTransform||nw;for(const y of Jx)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+Kx+y.id,void 0);return Vm(n,p),S1(n,{Fragment:F.Fragment,components:s,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function p(y,g,v){if(y.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in $s)if(Object.hasOwn($s,b)&&Object.hasOwn(y.properties,b)){const C=y.properties[b],E=$s[b];(E===null||E.includes(y.tagName))&&(y.properties[b]=h(String(C||""),b,y))}}if(y.type==="element"){let b=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!b&&o&&typeof g=="number"&&(b=!o(y,g,v)),b&&v&&typeof g=="number")return d&&y.children?v.children.splice(g,1,...y.children):v.children.splice(g,1),g}}}function nw(n){const l=n.indexOf(":"),i=n.indexOf("?"),o=n.indexOf("#"),s=n.indexOf("/");return l===-1||s!==-1&&l>s||i!==-1&&l>i||o!==-1&&l>o||Qx.test(n.slice(0,l))?n:""}function rw({text:n,maxWidth:l="200px",className:i="",icon:o,onClick:s,disabled:u=!1}){const[c,d]=K.useState(!1),h=K.useRef(null),p=K.useRef(null);return K.useEffect(()=>{const y=()=>{if(h.current&&p.current){const g=h.current.offsetWidth,v=p.current.scrollWidth;d(v>g)}};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[n,l]),F.jsxs("div",{ref:h,onClick:u?void 0:s,className:Je("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",i,u?"opacity-50 cursor-not-allowed":""),style:{maxWidth:l},title:n,children:[o&&F.jsx("span",{className:"text-lavender-500",children:o}),F.jsxs("div",{className:"pill-marquee-wrapper",children:[F.jsx("span",{ref:p,className:Je("block whitespace-nowrap",c?"pill-marquee":""),children:n}),c&&F.jsx("span",{"aria-hidden":!0,className:"pill-marquee block whitespace-nowrap",children:n})]})]})}var iw=Vf[" useInsertionEffect ".trim().toString()]||lr;function aw({prop:n,defaultProp:l,onChange:i=()=>{},caller:o}){const[s,u,c]=lw({defaultProp:l,onChange:i}),d=n!==void 0,h=d?n:s;{const y=K.useRef(n!==void 0);K.useEffect(()=>{const g=y.current;g!==d&&console.warn(`${o} is changing from ${g?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=d},[d,o])}const p=K.useCallback(y=>{if(d){const g=ow(y)?y(n):y;g!==n&&c.current?.(g)}else u(y)},[d,n,u,c]);return[h,p]}function lw({defaultProp:n,onChange:l}){const[i,o]=K.useState(n),s=K.useRef(i),u=K.useRef(l);return iw(()=>{u.current=l},[l]),K.useEffect(()=>{s.current!==i&&(u.current?.(i),s.current=i)},[i,s]),[i,o,u]}function ow(n){return typeof n=="function"}function sw(n){const l=K.useRef({value:n,previous:n});return K.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function uw(n){const[l,i]=K.useState(void 0);return lr(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let c,d;if("borderBoxSize"in u){const h=u.borderBoxSize,p=Array.isArray(h)?h[0]:h;c=p.inlineSize,d=p.blockSize}else c=n.offsetWidth,d=n.offsetHeight;i({width:c,height:d})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else i(void 0)},[n]),l}var Ql="Checkbox",[cw]=ed(Ql),[fw,wu]=cw(Ql);function dw(n){const{__scopeCheckbox:l,checked:i,children:o,defaultChecked:s,disabled:u,form:c,name:d,onCheckedChange:h,required:p,value:y="on",internal_do_not_use_render:g}=n,[v,b]=aw({prop:i,defaultProp:s??!1,onChange:h,caller:Ql}),[C,E]=K.useState(null),[T,_]=K.useState(null),k=K.useRef(!1),O=C?!!c||!!C.closest("form"):!0,H={checked:v,disabled:u,setChecked:b,control:C,setControl:E,name:d,form:c,value:y,hasConsumerStoppedPropagationRef:k,required:p,defaultChecked:fr(s)?!1:s,isFormControl:O,bubbleInput:T,setBubbleInput:_};return F.jsx(fw,{scope:l,...H,children:hw(g)?g(H):o})}var np="CheckboxTrigger",rp=K.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},s)=>{const{control:u,value:c,disabled:d,checked:h,required:p,setControl:y,setChecked:g,hasConsumerStoppedPropagationRef:v,isFormControl:b,bubbleInput:C}=wu(np,n),E=Bn(s,y),T=K.useRef(h);return K.useEffect(()=>{const _=u?.form;if(_){const k=()=>g(T.current);return _.addEventListener("reset",k),()=>_.removeEventListener("reset",k)}},[u,g]),F.jsx(ar.button,{type:"button",role:"checkbox","aria-checked":fr(h)?"mixed":h,"aria-required":p,"data-state":sp(h),"data-disabled":d?"":void 0,disabled:d,value:c,...o,ref:E,onKeyDown:Ln(l,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:Ln(i,_=>{g(k=>fr(k)?!0:!k),C&&b&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});rp.displayName=np;var Cu=K.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:s,defaultChecked:u,required:c,disabled:d,value:h,onCheckedChange:p,form:y,...g}=n;return F.jsx(dw,{__scopeCheckbox:i,checked:s,defaultChecked:u,disabled:d,required:c,onCheckedChange:p,name:o,form:y,value:h,internal_do_not_use_render:({isFormControl:v})=>F.jsxs(F.Fragment,{children:[F.jsx(rp,{...g,ref:l,__scopeCheckbox:i}),v&&F.jsx(op,{__scopeCheckbox:i})]})})});Cu.displayName=Ql;var ip="CheckboxIndicator",ap=K.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...s}=n,u=wu(ip,i);return F.jsx(oi,{present:o||fr(u.checked)||u.checked===!0,children:F.jsx(ar.span,{"data-state":sp(u.checked),"data-disabled":u.disabled?"":void 0,...s,ref:l,style:{pointerEvents:"none",...n.style}})})});ap.displayName=ip;var lp="CheckboxBubbleInput",op=K.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:s,checked:u,defaultChecked:c,required:d,disabled:h,name:p,value:y,form:g,bubbleInput:v,setBubbleInput:b}=wu(lp,n),C=Bn(i,b),E=sw(u),T=uw(o);K.useEffect(()=>{const k=v;if(!k)return;const O=window.HTMLInputElement.prototype,B=Object.getOwnPropertyDescriptor(O,"checked").set,z=!s.current;if(E!==u&&B){const L=new Event("click",{bubbles:z});k.indeterminate=fr(u),B.call(k,fr(u)?!1:u),k.dispatchEvent(L)}},[v,E,u,s]);const _=K.useRef(fr(u)?!1:u);return F.jsx(ar.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??_.current,required:d,disabled:h,name:p,value:y,form:g,...l,tabIndex:-1,ref:C,style:{...l.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});op.displayName=lp;function hw(n){return typeof n=="function"}function fr(n){return n==="indeterminate"}function sp(n){return fr(n)?"indeterminate":n?"checked":"unchecked"}const Tu=K.forwardRef(({className:n,...l},i)=>F.jsx(Cu,{ref:i,className:Je("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),...l,children:F.jsx(ap,{className:Je("grid place-content-center text-current"),children:F.jsx(Yv,{className:"h-4 w-4"})})}));Tu.displayName=Cu.displayName;var Yr=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(Yr||{});function mw({options:n,selectedValues:l,onSelectionChange:i,additionalOption:o,className:s,required:u=!0,maxSelections:c,error:d,disabled:h}){const p=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"}:void 0,y=_=>p?_.filter(k=>k!==p.value):_,g=_=>p?(console.log("additionalOption",o,"none_of_the_above"),o==="none_of_the_above"?(console.log("extraOption.value",p.value),_?[p.value]:[]):o==="all_of_the_above"?_?[...n.map(k=>k.value),p.value]:y(l):_?[...l,p.value]:y(l)):l,v=(_,k)=>{const O=p?y(l):l;return k?c&&O.length>=c?null:[...O,_]:O.filter(H=>H!==_)},b=_=>!(u&&_.length===0&&l.length===1),C=(_,k)=>{const H=p&&_===p.value?g(k):v(_,k);H!==null&&b(H)&&(console.log("newSelection",H),i(H))},E=!u||l.length>0,T=p?l.filter(_=>_!==p.value).length:l.length;return F.jsxs("div",{className:Je("bg-gray-50","rounded-lg","p-4","border border-gray-200",s),children:[F.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const k=h||c&&T>=c&&!l.includes(_.value);return F.jsxs("div",{className:"flex items-center space-x-3",children:[F.jsx(Tu,{id:_.id,checked:!!l.includes(_.value),disabled:!!k,onCheckedChange:O=>C(_.value,!!O),className:"mt-0.5 border border-muted-foreground"}),F.jsx("label",{htmlFor:_.id,className:Je("text-sm font-medium leading-none cursor-pointer",k?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:_.label})]},_.id)}),p&&F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"border-t border-gray-300 my-3"}),F.jsxs("div",{className:"flex items-center space-x-3",children:[F.jsx(Tu,{id:p.id,checked:l.includes(p.value),onCheckedChange:_=>C(p.value,_),className:"mt-0.5 border border-muted-foreground"}),F.jsx("label",{htmlFor:p.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:p.label})]})]})]}),d&&F.jsx("p",{className:"text-sm text-red-500 mt-3",children:d}),u&&!E&&F.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&F.jsx("p",{className:"text-sm text-blue-600 mt-3",children:c===1?"You can select only 1 option":`Maximum ${c} selections allowed`})]})}function pw({role:n,content:l,timestamp:i,iconUrl:o,toolEscalationData:s,onSendMessage:u}){const c=n==="user",[d,h]=K.useState([]),p=()=>s?.choices?Array.isArray(s.choices)?s.choices.map((C,E)=>({id:`option-${E}`,label:C,value:C})):Object.keys(s.choices).map((C,E)=>({id:`option-${E}`,label:C,value:C})):[],y=async C=>{console.log("Pill clicked:",C);const E=Date.now().toString();await u({message:C,messageId:E})},g=C=>{h(C),console.log("Multi-select changed:",C)},v=()=>{if(!s?.additional_option)return;const C=s.additional_option;if(typeof C=="string"&&(C===Yr.NOTA||C===Yr.AOTA))return C;if(typeof C=="object"&&C!==null){if(C.NOTA===Yr.NOTA)return Yr.NOTA;if(C.AOTA===Yr.AOTA)return Yr.AOTA}},b=async()=>{if(d.length>0){const C=d.join(", "),E=Date.now().toString();await u({message:C,messageId:E})}};return F.jsx("div",{className:Je("flex",c?"justify-end":"justify-start"),children:F.jsxs("div",{className:Je("flex gap-3",c?"flex-row-reverse":"flex-row",s?.type===We.SYNAPSE_MESSAGE_TYPES.MULTI?"max-w-md":"max-w-xs"),children:[!c&&F.jsx(jl,{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:F.jsx(Ul,{className:"bg-transparent text-white text-xs font-bold",children:o?F.jsx("img",{src:o,alt:"Bot Icon",className:"w-4 h-4"}):F.jsx(Ld,{className:"w-4 h-4"})})}),F.jsxs(Ml,{className:Je("px-4 py-2 rounded-2xl shadow-none",c?"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",s?.type===We.SYNAPSE_MESSAGE_TYPES.MULTI&&"w-full"),children:[l&&F.jsx("div",{className:"text-sm markdown-content mb-3",children:F.jsx(Wx,{children:l})}),s?.type===We.SYNAPSE_MESSAGE_TYPES.PILL&&s?.choices&&F.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:s.choices.map((C,E)=>F.jsx(rw,{disabled:s?.isResponded,text:C,onClick:()=>y(C),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},E))}),s?.type===We.SYNAPSE_MESSAGE_TYPES.MULTI&&s?.choices&&F.jsxs("div",{className:"mt-3 space-y-3",children:[F.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),F.jsx(mw,{options:p(),selectedValues:d,onSelectionChange:g,additionalOption:v(),disabled:s?.isResponded}),F.jsx(Hn,{onClick:b,disabled:d.length===0||s?.isResponded,className:Je("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"})]}),i&&F.jsx("p",{className:Je("text-xs mt-2 text-right","text-slate-500"),children:i})]})]})})}function gw({messages:n,onSendMessage:l,iconUrl:i}){const o=Hl(s=>s.isWaitingForResponse);return F.jsxs(F.Fragment,{children:[n&&n.length>0&&F.jsx(F.Fragment,{children:n.map(s=>F.jsx("div",{className:"animate-slideUp",children:F.jsx(pw,{role:s.role,content:s.content,iconUrl:i,toolEscalationData:s.toolEscalationData,timestamp:s.timestamp,onSendMessage:l})},s.id))}),o&&F.jsx(yw,{iconUrl:i})]})}function yw({iconUrl:n}){return F.jsx("div",{className:"animate-slideUp",children:F.jsx("div",{className:"flex justify-start",children:F.jsxs("div",{className:"flex gap-3",children:[F.jsx(jl,{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:F.jsx(Ul,{className:"bg-transparent text-white text-xs font-bold",children:n?F.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4"}):F.jsx(Ld,{className:"w-4 h-4"})})}),F.jsx(Ml,{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:F.jsx("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[0,1,2].map(l=>F.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${l*150}ms`}},l))})})]})})})}const bw=Object.freeze(Object.defineProperty({__proto__:null,default:gw},Symbol.toStringTag,{value:"Module"})),up=K.forwardRef(({className:n,type:l,...i},o)=>F.jsx("input",{type:l,className:Je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:o,...i}));up.displayName="Input";function vw({value:n,onChange:l,onSend:i,onFileChange:o,onRecording:s,isRecording:u,hasAttachment:c,attachmentFiles:d,isDisabled:h,placeholder:p,recordingStatus:y}){const g=K.useRef(null),v=n.trim().length>0||c,b=(h||y!==We.AudioRecordingStatus.IDLE)&&!u,C=Je("rounded-full transition-all duration-200 ",u?"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)]":b?"text-lavender-300 cursor-not-allowed shadow-none":"text-lavender-600 hover:bg-gray-100"),E=k=>{const O=Array.from(k.target.files||[]);O.length>0&&o(O)},T=()=>{h||g.current?.click()},_=k=>{k.key==="Enter"&&v&&!h&&i()};return F.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl p-4",children:[F.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:E}),F.jsxs("div",{className:Je("flex items-center gap-2 bg-white/70 backdrop-blur rounded-lg px-4 py-2 shadow-md focus-within:border-lavender-100/50 focus-within:ring-2 focus-within:ring-lavender-400/50 transition-all",u||c?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",h&&"opacity-60"),children:[c&&d.length>0&&F.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[d.length," file(s)"]}),F.jsx(up,{placeholder:p,value:n,onChange:k=>l(k.target.value),onKeyPress:_,disabled:h,className:"flex-1 border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder-gray-400 bg-transparent disabled:cursor-not-allowed"}),F.jsx(Hn,{type:"button",variant:"ghost",size:"icon",onClick:T,disabled:h,className:`rounded-full transition-all ${c?"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:F.jsx(Vv,{className:"w-5 h-5"})}),u?F.jsx(Hn,{type:"button",variant:"ghost",size:"icon",onClick:s,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:F.jsx(Kv,{className:"w-4 h-4"})}):F.jsx(Hn,{type:"button",variant:"ghost",size:"icon",onClick:s,disabled:b,className:C,title:"Start recording",children:F.jsx(Fv,{className:"w-5 h-5"})}),v&&!h&&F.jsx(Hn,{type:"button",size:"icon",onClick:i,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:F.jsx(Zv,{className:"w-4 h-4"})})]})]})}const Sw=Object.freeze(Object.defineProperty({__proto__:null,default:vw},Symbol.toStringTag,{value:"Module"})),Ew=[{id:1,icon:Xv,title:"I am not feeling well today",description:"I need to know what is wrong with me."},{id:2,icon:qv,title:"Which specialist should I see for my condition?",description:"I need to know which specialist should I see for my condition."},{id:3,icon:Gv,title:"I have an emergency",description:"I need to talk to a doctor immediately."},{id:4,icon:Hv,title:"What is the normal range for blood pressure?",description:"I need to know the normal range for blood pressure."}];function _w({onTaskClick:n,disabled:l}){return F.jsx("div",{className:"grid grid-cols-2 gap-3",children:Ew.map(i=>{const o=i.icon;return F.jsx(Hn,{type:"button",variant:"ghost",disabled:l,onClick:()=>n(i.title),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:F.jsxs("div",{className:"flex items-start justify-between gap-3",children:[F.jsx(o,{className:"w-5 h-5 mt-1 text-slate-900 group-hover:text-lavender-600"}),F.jsx("h3",{className:"font-semibold text-sm text-slate-900 text-wrap group-hover:text-lavender-600 transition-colors",children:i.title})]})},i.id)})})}function xw({onTaskClick:n,disabled:l}){return F.jsxs(F.Fragment,{children:[F.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:F.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"How can I assist you today?"})}),F.jsx(_w,{onTaskClick:n,disabled:l})]})}const ww=Object.freeze(Object.defineProperty({__proto__:null,default:xw},Symbol.toStringTag,{value:"Module"}));function Cw({className:n="",onRetry:l,onStartNewSession:i,showRetryButton:o,startNewConnection:s,clearError:u,error:c,isConnected:d}){const{isOnline:h}=jh(),[p,y]=K.useState(!0);if(K.useEffect(()=>{if(!s&&!o&&!!c){y(!0);const b=setTimeout(()=>y(!1),5e3);return()=>clearTimeout(b)}y(!0)},[c,s,o]),s)return F.jsx("div",{className:Je("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:F.jsxs("div",{className:"flex items-center gap-3",children:[F.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:F.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),F.jsxs("div",{className:"flex-1",children:[F.jsx("div",{className:"text-[#333333] font-semibold text-sm",children:c?.title??"Something went wrong"}),F.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),F.jsxs("button",{onClick:()=>{u(),i?.()},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:[F.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),F.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})});if(o)return F.jsx("div",{className:Je("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:F.jsxs("div",{className:"flex items-center gap-3",children:[F.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:F.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),F.jsxs("div",{className:"flex-1",children:[F.jsx("div",{className:"text-[#333333] font-semibold text-sm",children:c?.title??"Failed to connect"}),F.jsx("div",{className:"text-[#666666] text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),F.jsxs("button",{onClick:()=>{u(),l?.()},className:"px-4 py-2 bg-[#3B71F7] text-white text-sm font-semibold rounded-lg hover:bg-[#2E5CD9] transition-colors flex items-center gap-2 flex-shrink-0",children:[F.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F.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"]})]})});if(d&&h&&!c?.title)return null;const g=!s&&!o;return F.jsx("div",{className:Je("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",g&&!p?"opacity-0":"opacity-100",n),children:F.jsxs("div",{className:"flex items-center gap-3",children:[F.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:F.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),F.jsxs("div",{className:"flex-1",children:[F.jsx("div",{className:"text-[#333333] font-semibold text-sm",children:h?c?.title||"Connecting...":"No internet connection"}),F.jsx("div",{className:"text-[#666666] text-xs mt-1",children:h?c?.description??"Please wait while we try to connect":"Please check your internet connection"})]}),!d&&F.jsx("div",{className:"flex-shrink-0",children:F.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const Tw=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:Cw},Symbol.toStringTag,{value:"Module"}));return fs.renderMedAssist=Uh,Object.defineProperty(fs,Symbol.toStringTag,{value:"Module"}),fs})({});
55
+ `}),i}function cp(n){let l=0,i=n.charCodeAt(l);for(;i===9||i===32;)l++,i=n.charCodeAt(l);return n.slice(l)}function fp(n,l){const i=V_(n,l),o=i.one(n,void 0),u=D_(i),s=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
56
+ `},u),s}function Q_(n,l){return n&&"run"in n?async function(i,o){const u=fp(i,{file:o,...l});await n.run(u,o)}:function(i,o){return fp(i,{file:o,...n||l})}}function dp(n){if(n)throw n}var bu,hp;function J_(){if(hp)return bu;hp=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):l.call(h)==="[object Array]"},s=function(h){if(!h||l.call(h)!=="[object Object]")return!1;var g=n.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var v;for(v in h);return typeof v>"u"||n.call(h,v)},c=function(h,g){i&&g.name==="__proto__"?i(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(n.call(h,g)){if(o)return o(h,g).value}else return;return h[g]};return bu=function m(){var h,g,y,v,b,w,E=arguments[0],T=1,_=arguments.length,A=!1;for(typeof E=="boolean"&&(A=E,E=arguments[1]||{},T=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});T<_;++T)if(h=arguments[T],h!=null)for(g in h)y=f(E,g),v=f(h,g),E!==v&&(A&&v&&(s(v)||(b=u(v)))?(b?(b=!1,w=y&&u(y)?y:[]):w=y&&s(y)?y:{},c(E,{name:g,newValue:m(A,w,v)})):typeof v<"u"&&c(E,{name:g,newValue:v}));return E},bu}var W_=J_();const vu=ms(W_);function Su(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function $_(){const n=[],l={run:i,use:o};return l;function i(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...u);function f(m,...h){const g=n[++s];let y=-1;if(m){c(m);return}for(;++y<u.length;)(h[y]===null||h[y]===void 0)&&(h[y]=u[y]);u=h,g?ew(g,f)(...h):c(null,...h)}}function o(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),l}}function ew(n,l){let i;return o;function o(...c){const f=n.length>c.length;let m;f&&c.push(u);try{m=n.apply(this,c)}catch(h){const g=h;if(f&&i)throw g;return u(g)}f||(m&&m.then&&typeof m.then=="function"?m.then(s,u):m instanceof Error?u(m):s(m))}function u(c,...f){i||(i=!0,l(c,...f))}function s(c){u(null,c)}}const Dn={basename:tw,dirname:nw,extname:rw,join:iw,sep:"/"};function tw(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Ba(n);let i=0,o=-1,u=n.length,s;if(l===void 0||l.length===0||l.length>n.length){for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else o<0&&(s=!0,o=u+1);return o<0?"":n.slice(i,o)}if(l===n)return"";let c=-1,f=l.length-1;for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else c<0&&(s=!0,c=u+1),f>-1&&(n.codePointAt(u)===l.codePointAt(f--)?f<0&&(o=u):(f=-1,o=c));return i===o?o=c:o<0&&(o=n.length),n.slice(i,o)}function nw(n){if(Ba(n),n.length===0)return".";let l=-1,i=n.length,o;for(;--i;)if(n.codePointAt(i)===47){if(o){l=i;break}}else o||(o=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function rw(n){Ba(n);let l=n.length,i=-1,o=0,u=-1,s=0,c;for(;l--;){const f=n.codePointAt(l);if(f===47){if(c){o=l+1;break}continue}i<0&&(c=!0,i=l+1),f===46?u<0?u=l:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||i<0||s===0||s===1&&u===i-1&&u===o+1?"":n.slice(u,i)}function iw(...n){let l=-1,i;for(;++l<n.length;)Ba(n[l]),n[l]&&(i=i===void 0?n[l]:i+"/"+n[l]);return i===void 0?".":aw(i)}function aw(n){Ba(n);const l=n.codePointAt(0)===47;let i=lw(n,!l);return i.length===0&&!l&&(i="."),i.length>0&&n.codePointAt(n.length-1)===47&&(i+="/"),l?"/"+i:i}function lw(n,l){let i="",o=0,u=-1,s=0,c=-1,f,m;for(;++c<=n.length;){if(c<n.length)f=n.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(u===c-1||s===1))if(u!==c-1&&s===2){if(i.length<2||o!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",o=0):(i=i.slice(0,m),o=i.length-1-i.lastIndexOf("/")),u=c,s=0;continue}}else if(i.length>0){i="",o=0,u=c,s=0;continue}}l&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+n.slice(u+1,c):i=n.slice(u+1,c),o=c-u-1;u=c,s=0}else f===46&&s>-1?s++:s=-1}return i}function Ba(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const ow={cwd:sw};function sw(){return"/"}function Eu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function uw(n){if(typeof n=="string")n=new URL(n);else if(!Eu(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return cw(n)}function cw(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 l=n.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const o=l.codePointAt(i+2);if(o===70||o===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const xu=["history","path","basename","stem","extname","dirname"];class mp{constructor(l){let i;l?Eu(l)?i={path:l}:typeof l=="string"||fw(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":ow.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<xu.length;){const s=xu[o];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let u;for(u in i)xu.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(l){wu(l,"basename"),_u(l,"basename"),this.path=Dn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(l){pp(this.basename,"dirname"),this.path=Dn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(l){if(_u(l,"extname"),pp(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Eu(l)&&(l=uw(l)),wu(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(l){wu(l,"stem"),_u(l,"stem"),this.path=Dn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,o){const u=this.message(l,i,o);throw u.fatal=!0,u}info(l,i,o){const u=this.message(l,i,o);return u.fatal=void 0,u}message(l,i,o){const u=new Ht(l,i,o);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function _u(n,l){if(n&&n.includes(Dn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Dn.sep+"`")}function wu(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function pp(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function fw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const dw=(function(n){const o=this.constructor.prototype,u=o[n],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,o),s}),hw={}.hasOwnProperty;class Cu extends dw{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=$_()}copy(){const l=new Cu;let i=-1;for(;++i<this.attachers.length;){const o=this.attachers[i];l.use(...o)}return l.data(vu(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ku("data",this.frozen),this.namespace[l]=i,this):hw.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ku("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const u=i.call(l,...o);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Jl(l),o=this.parser||this.Parser;return Tu("parse",o),o(String(i),i)}process(l,i){const o=this;return this.freeze(),Tu("process",this.parser||this.Parser),Au("process",this.compiler||this.Compiler),i?u(void 0,i):new Promise(u);function u(s,c){const f=Jl(l),m=o.parse(f);o.run(m,f,function(g,y,v){if(g||!y||!v)return h(g);const b=y,w=o.stringify(b,v);gw(w)?v.value=w:v.result=w,h(g,v)});function h(g,y){g||!y?c(g):s?s(y):i(void 0,y)}}}processSync(l){let i=!1,o;return this.freeze(),Tu("processSync",this.parser||this.Parser),Au("processSync",this.compiler||this.Compiler),this.process(l,u),yp("processSync","process",i),o;function u(s,c){i=!0,dp(s),o=c}}run(l,i,o){gp(l),this.freeze();const u=this.transformers;return!o&&typeof i=="function"&&(o=i,i=void 0),o?s(void 0,o):new Promise(s);function s(c,f){const m=Jl(i);u.run(l,m,h);function h(g,y,v){const b=y||l;g?f(g):c?c(b):o(void 0,b,v)}}}runSync(l,i){let o=!1,u;return this.run(l,i,s),yp("runSync","run",o),u;function s(c,f){dp(c),u=f,o=!0}}stringify(l,i){this.freeze();const o=Jl(i),u=this.compiler||this.Compiler;return Au("stringify",u),gp(l),u(l,o)}use(l,...i){const o=this.attachers,u=this.namespace;if(ku("use",this.frozen),l!=null)if(typeof l=="function")m(l,i);else if(typeof l=="object")Array.isArray(l)?f(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;m(g,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(u.settings=vu(!0,u.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,g){let y=-1,v=-1;for(;++y<o.length;)if(o[y][0]===h){v=y;break}if(v===-1)o.push([h,...g]);else if(g.length>0){let[b,...w]=g;const E=o[v][1];Su(E)&&Su(b)&&(b=vu(!0,E,b)),o[v]=[h,b,...w]}}}}const mw=new Cu().freeze();function Tu(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Au(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function ku(n,l){if(l)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gp(n){if(!Su(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function yp(n,l,i){if(!i)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Jl(n){return pw(n)?n:new mp(n)}function pw(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function gw(n){return typeof n=="string"||yw(n)}function yw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const bw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",bp=[],vp={allowDangerousHtml:!0},vw=/^(https?|ircs?|mailto|xmpp)$/i,Sw=[{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 Ew(n){const l=xw(n),i=_w(n);return ww(l.runSync(l.parse(i),i),n)}function xw(n){const l=n.rehypePlugins||bp,i=n.remarkPlugins||bp,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...vp}:vp;return mw().use(t_).use(i).use(Q_,o).use(l)}function _w(n){const l=n.children||"",i=new mp;return typeof l=="string"&&(i.value=l),i}function ww(n,l){const i=l.allowedElements,o=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,f=l.unwrapDisallowed,m=l.urlTransform||Cw;for(const g of Sw)Object.hasOwn(l,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+bw+g.id,void 0);return up(n,h),F1(n,{Fragment:O.Fragment,components:u,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function h(g,y,v){if(g.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in iu)if(Object.hasOwn(iu,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],E=iu[b];(E===null||E.includes(g.tagName))&&(g.properties[b]=m(String(w||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!b&&o&&typeof y=="number"&&(b=!o(g,y,v)),b&&v&&typeof y=="number")return f&&g.children?v.children.splice(y,1,...g.children):v.children.splice(y,1),y}}}function Cw(n){const l=n.indexOf(":"),i=n.indexOf("?"),o=n.indexOf("#"),u=n.indexOf("/");return l===-1||u!==-1&&l>u||i!==-1&&l>i||o!==-1&&l>o||vw.test(n.slice(0,l))?n:""}function Tw({text:n,maxWidth:l="200px",className:i="",icon:o,onClick:u,disabled:s=!1}){const[c,f]=P.useState(!1),m=P.useRef(null),h=P.useRef(null);return P.useEffect(()=>{const g=()=>{if(m.current&&h.current){const y=m.current.offsetWidth,v=h.current.scrollWidth;f(v>y)}};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[n,l]),n?O.jsxs("div",{ref:m,onClick:s?void 0:u,className:Ye("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",i,s?"opacity-50 cursor-not-allowed":""),style:{maxWidth:l},title:n,children:[o&&O.jsx("span",{className:"text-lavender-500",children:o}),O.jsx("div",{className:"pill-marquee-wrapper",children:O.jsx("span",{ref:h,className:Ye("block whitespace-normal",c?"pill-marquee":""),children:n})})]}):null}var Aw=Qf[" useInsertionEffect ".trim().toString()]||ur;function kw({prop:n,defaultProp:l,onChange:i=()=>{},caller:o}){const[u,s,c]=Nw({defaultProp:l,onChange:i}),f=n!==void 0,m=f?n:u;{const g=P.useRef(n!==void 0);P.useEffect(()=>{const y=g.current;if(y!==f){const v=y?"controlled":"uncontrolled",b=f?"controlled":"uncontrolled"}g.current=f},[f,o])}const h=P.useCallback(g=>{if(f){const y=Rw(g)?g(n):g;y!==n&&c.current?.(y)}else s(g)},[f,n,s,c]);return[m,h]}function Nw({defaultProp:n,onChange:l}){const[i,o]=P.useState(n),u=P.useRef(i),s=P.useRef(l);return Aw(()=>{s.current=l},[l]),P.useEffect(()=>{u.current!==i&&(s.current?.(i),u.current=i)},[i,u]),[i,o,s]}function Rw(n){return typeof n=="function"}function Ow(n){const l=P.useRef({value:n,previous:n});return P.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function zw(n){const[l,i]=P.useState(void 0);return ur(()=>{if(n){i({width:n.offsetWidth,height:n.offsetHeight});const o=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const s=u[0];let c,f;if("borderBoxSize"in s){const m=s.borderBoxSize,h=Array.isArray(m)?m[0]:m;c=h.inlineSize,f=h.blockSize}else c=n.offsetWidth,f=n.offsetHeight;i({width:c,height:f})});return o.observe(n,{box:"border-box"}),()=>o.unobserve(n)}else i(void 0)},[n]),l}var Wl="Checkbox",[Mw]=ad(Wl),[Dw,Nu]=Mw(Wl);function jw(n){const{__scopeCheckbox:l,checked:i,children:o,defaultChecked:u,disabled:s,form:c,name:f,onCheckedChange:m,required:h,value:g="on",internal_do_not_use_render:y}=n,[v,b]=kw({prop:i,defaultProp:u??!1,onChange:m,caller:Wl}),[w,E]=P.useState(null),[T,_]=P.useState(null),A=P.useRef(!1),k=w?!!c||!!w.closest("form"):!0,q={checked:v,disabled:s,setChecked:b,control:w,setControl:E,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:mr(u)?!1:u,isFormControl:k,bubbleInput:T,setBubbleInput:_};return O.jsx(Dw,{scope:l,...q,children:Lw(y)?y(q):o})}var Sp="CheckboxTrigger",Ep=P.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},u)=>{const{control:s,value:c,disabled:f,checked:m,required:h,setControl:g,setChecked:y,hasConsumerStoppedPropagationRef:v,isFormControl:b,bubbleInput:w}=Nu(Sp,n),E=Hn(u,g),T=P.useRef(m);return P.useEffect(()=>{const _=s?.form;if(_){const A=()=>y(T.current);return _.addEventListener("reset",A),()=>_.removeEventListener("reset",A)}},[s,y]),O.jsx(sr.button,{type:"button",role:"checkbox","aria-checked":mr(m)?"mixed":m,"aria-required":h,"data-state":Tp(m),"data-disabled":f?"":void 0,disabled:f,value:c,...o,ref:E,onKeyDown:qn(l,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:qn(i,_=>{y(A=>mr(A)?!0:!A),w&&b&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});Ep.displayName=Sp;var Ru=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:u,defaultChecked:s,required:c,disabled:f,value:m,onCheckedChange:h,form:g,...y}=n;return O.jsx(jw,{__scopeCheckbox:i,checked:u,defaultChecked:s,disabled:f,required:c,onCheckedChange:h,name:o,form:g,value:m,internal_do_not_use_render:({isFormControl:v})=>O.jsxs(O.Fragment,{children:[O.jsx(Ep,{...y,ref:l,__scopeCheckbox:i}),v&&O.jsx(Cp,{__scopeCheckbox:i})]})})});Ru.displayName=Wl;var xp="CheckboxIndicator",_p=P.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...u}=n,s=Nu(xp,i);return O.jsx(fi,{present:o||mr(s.checked)||s.checked===!0,children:O.jsx(sr.span,{"data-state":Tp(s.checked),"data-disabled":s.disabled?"":void 0,...u,ref:l,style:{pointerEvents:"none",...n.style}})})});_p.displayName=xp;var wp="CheckboxBubbleInput",Cp=P.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:u,checked:s,defaultChecked:c,required:f,disabled:m,name:h,value:g,form:y,bubbleInput:v,setBubbleInput:b}=Nu(wp,n),w=Hn(i,b),E=Ow(s),T=zw(o);P.useEffect(()=>{const A=v;if(!A)return;const k=window.HTMLInputElement.prototype,H=Object.getOwnPropertyDescriptor(k,"checked").set,M=!u.current;if(E!==s&&H){const I=new Event("click",{bubbles:M});A.indeterminate=mr(s),H.call(A,mr(s)?!1:s),A.dispatchEvent(I)}},[v,E,s,u]);const _=P.useRef(mr(s)?!1:s);return O.jsx(sr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??_.current,required:f,disabled:m,name:h,value:g,form:y,...l,tabIndex:-1,ref:w,style:{...l.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Cp.displayName=wp;function Lw(n){return typeof n=="function"}function mr(n){return n==="indeterminate"}function Tp(n){return mr(n)?"indeterminate":n?"checked":"unchecked"}const Ou=P.forwardRef(({className:n,...l},i)=>O.jsx(Ru,{ref:i,className:Ye("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),...l,children:O.jsx(_p,{className:Ye("grid place-content-center text-current"),children:O.jsx(Kd,{className:"h-4 w-4"})})}));Ou.displayName=Ru.displayName;var Gr=(n=>(n.NOTA="none_of_the_above",n.AOTA="all_of_the_above",n))(Gr||{});function Iw({options:n,selectedValues:l,onSelectionChange:i,additionalOption:o,className:u,required:s=!0,maxSelections:c,error:f,disabled:m}){const h=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"}:{id:"extra-None of the above",label:"None of the above",value:"None of the above"},g=_=>h?_.filter(A=>A!==h.value):_,y=_=>h?o==="none_of_the_above"?_?[h.value]:[]:o==="all_of_the_above"?_?[...n.map(A=>A.value),h.value]:g(l):_?[...l,h.value]:g(l):l,v=(_,A)=>{const k=h?g(l):l;return A?c&&k.length>=c?null:[...k,_]:k.filter(q=>q!==_)},b=_=>!(s&&_.length===0&&l.length===1),w=(_,A)=>{const q=h&&_===h.value?y(A):v(_,A);q!==null&&b(q)&&i(q)},E=!s||l.length>0,T=h?l.filter(_=>_!==h.value).length:l.length;return n.length?O.jsxs("div",{className:Ye("bg-gray-50","rounded-lg","p-4","border border-gray-200",u),children:[O.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const A=m||c&&T>=c&&!l.includes(_.value);return O.jsxs("div",{className:"flex items-center space-x-3",children:[O.jsx(Ou,{id:_.id,checked:!!l.includes(_.value),disabled:!!A,onCheckedChange:k=>w(_.value,!!k),className:"mt-0.5 border border-muted-foreground"}),O.jsx("label",{htmlFor:_.id,className:Ye("text-sm font-medium leading-none cursor-pointer",A?"text-muted-foreground cursor-not-allowed":"text-secondary-foreground"),children:_.label})]},_.id)}),h&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"border-t border-gray-300 my-3"}),O.jsxs("div",{className:"flex items-center space-x-3",children:[O.jsx(Ou,{id:h.id,checked:l.includes(h.value),onCheckedChange:_=>w(h.value,_),className:"mt-0.5 border border-muted-foreground"}),O.jsx("label",{htmlFor:h.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:h.label})]})]})]}),f&&O.jsx("p",{className:"text-sm text-red-500 mt-3",children:f}),s&&!E&&O.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&O.jsx("p",{className:"text-sm text-blue-600 mt-3",children:c===1?"You can select only 1 option":`Maximum ${c} selections allowed`})]}):null}function Ap({file:n,onRemove:l,isPreview:i=!0,className:o=""}){const[u,s]=P.useState(!1),[c,f]=P.useState(""),m=n?.type?.startsWith("image/")??!1,h=n?.type==="application/pdf";P.useEffect(()=>{if(m){const v=URL.createObjectURL(n);return f(v),()=>URL.revokeObjectURL(v)}},[n,m]),P.useEffect(()=>{s(!1)},[n]);const g=()=>m?"text-green-600":"text-gray-600",y=v=>{if(v===0)return"0 B";const b=1024,w=["B","KB","MB","GB"],E=Math.floor(Math.log(v)/Math.log(b));return`${(v/Math.pow(b,E)).toFixed(1)} ${w[E]}`.toLowerCase()};return!m||u?O.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 ${i?"hover:bg-neutral-50":""} ${o}`,children:[O.jsx("div",{className:`flex-shrink-0 ${g()}`,children:O.jsx(yS,{className:"h-5 w-5"})}),O.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[n?.name&&O.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:n.name}),n?.size&&O.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:y(n.size)})]}),i&&l&&O.jsx("button",{onClick:l,"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:O.jsx(Os,{className:"h-4 w-4"})})]}):O.jsxs("div",{className:`relative group flex-shrink-0 ${o}`,children:[O.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${i?"hover:bg-neutral-100 cursor-pointer":""}`,children:c&&O.jsx("img",{src:c,alt:n.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),i&&l&&O.jsx("button",{onClick:l,"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:O.jsx(Os,{className:"h-3 w-3 text-black"})})]})}function Bw({files:n,onRemoveFile:l,isPreview:i=!0,className:o=""}){if(n.length===0)return null;const u=n.filter(c=>c.type?.startsWith("image/")),s=n.filter(c=>!c.type?.startsWith("image/"));return O.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${o}`,children:[s.map(c=>{const f=n.indexOf(c);return O.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)}),u.length>0&&O.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:u.map(c=>{const f=n.indexOf(c);return O.jsx(Ap,{file:c,onRemove:l?()=>l(f):void 0,isPreview:i},`${c.name}-${c.size}-${f}`)})})]})}function Uw({value:n,onValueChange:l,placeholder:i="Select an option",className:o,triggerClassName:u,contentClassName:s,disabled:c=!1,options:f=[],size:m="default"}){const[h,g]=P.useState(!1),y=P.useRef(null),v=P.useRef(null),b=f.find(T=>T.value===n);P.useEffect(()=>{const T=_=>{h&&_.key==="Escape"&&(g(!1),v.current?.focus())};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[h]);const w=T=>{l?.(T),g(!1),v.current?.focus()},E=()=>{c||g(!h)};return O.jsxs("div",{className:Ye("relative w-full",o),children:[O.jsxs("button",{ref:v,type:"button",onClick:E,disabled:c,className:Ye('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',m==="default"?"min-h-9":"min-h-8",u),"aria-expanded":h,"aria-haspopup":"listbox",children:[O.jsx("span",{className:Ye("flex-1 text-left min-w-0 overflow-hidden break-words line-clamp-2",!b&&"text-muted-foreground"),children:b?b.label:i}),O.jsx(Rs,{className:Ye("size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",h&&"rotate-180")})]}),h&&O.jsx("div",{ref:y,className:Ye("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",s),role:"listbox",children:O.jsx("div",{className:"p-1",children:f.length===0?O.jsx("div",{className:"px-3 py-2 text-sm text-muted-foreground text-center",children:"No options available"}):f.map(T=>{const _=T.value===n;return O.jsxs("div",{onClick:()=>w(T.value),className:Ye("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",c&&"pointer-events-none opacity-50 cursor-not-allowed"),role:"option","aria-selected":_,tabIndex:c?-1:0,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),c||w(T.value))},children:[O.jsx("span",{className:"flex-1 text-left min-w-0 break-words line-clamp-2",children:T.label}),_&&O.jsx("span",{className:"absolute right-3 flex size-4 items-center justify-center shrink-0 pointer-events-none",children:O.jsx(Kd,{className:"size-4 text-foreground"})})]},T.value)})})})]})}const Hw=n=>n?n.split(" ").map(l=>l[0]).slice(0,2).join("").toUpperCase():"DR",kp=n=>{const l=n.toLocaleDateString(void 0,{weekday:"short"}).toUpperCase(),i=n.toLocaleDateString(void 0,{day:"2-digit"});return{weekday:l,dayNum:i}},Np=n=>[...n].sort((l,i)=>new Date(l.date).getTime()-new Date(i.date).getTime()),Rp=(n,l)=>(n?.[l]?.slots_details?.length??0)>0;function qw({doctor:n,availability:l,callbacks:i,onBook:o,disabled:u=!1,getAvailabilityDatesForAppointment:s,getAvailableSlotsForAppointment:c}){const[f,m]=P.useState(!1),[h,g]=P.useState(0),[y,v]=P.useState(null),[b,w]=P.useState(0),[E,T]=P.useState(()=>n.hospitals[0]||null),[_,A]=P.useState(!0),[k,q]=P.useState(!1),[H,M]=P.useState(null),[I,Y]=P.useState(!1),[F,$]=P.useState(null),ie=Yr(ve=>ve.sessionId),D=E?.hospital_id,ne=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES],C=!!i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS],V=P.useMemo(()=>{if(!D)return l||null;const ve=H?.[D],ze=l?.[D];return ve?{...l||{},[D]:ve}:ze?l:l||null},[H,l,D]),Z=P.useCallback(async()=>{if(!(!n.doctor_id||!ie||!D)){A(!0),$(null);try{const ve=await s({doctor_id:n.doctor_id,hospital_id:D,region_id:E?.region_id||""}),ze=ve?.available_dates?.length&&ve?.available_dates?.map(X=>({date:X,slots:[]}))||[],je=l?.[D]?.slots_details||[],S=H?.[D]?.slots_details||[],K=new Map;je.forEach(X=>{K.set(X.date,X)}),S.forEach(X=>{K.set(X.date,X)});const U=[...Array.from(K.values())];ze.forEach(X=>{K.has(X.date)||U.push(X)});const j=Np(U);M(X=>({...X||{},[D]:{slots_details:j}}))}catch{$("Failed to load availability dates")}finally{A(!1)}}},[n.doctor_id,ie,D,E?.region_id,s,l,H]);P.useEffect(()=>{if(!D)return;const ve=Rp(H,D),ze=Rp(l??null,D);Y(!1),g(0),w(0),v(null),$(null),!ve&&!ze&&ne&&ie?Z():A(!1)},[D]);const Q=P.useMemo(()=>{if(!D)return new Date;const ve=V?.[D]?.slots_details;if(!ve?.length)return new Date;const ze=ve[0];return ze?new Date(ze.date):new Date},[V,D]),se=P.useCallback(async ve=>{if(!(!n.doctor_id||!D||!E?.region_id||!ie)){q(!0);try{const ze=await c(ve,{doctor_id:n.doctor_id,hospital_id:D,region_id:E.region_id});if(!ze?.slots?.length)return;M(je=>{if(!je||!je?.[D]?.slots_details?.length)return{...je||{},[D]:{slots_details:[{date:ve,slots:ze.slots}]}};const S=je[D].slots_details.map(U=>U.date===ve?{...U,slots:ze.slots}:U),W=je[D].slots_details.some(U=>U.date===ve)?S:[...S,{date:ve,slots:ze.slots}];return{...je,[D]:{slots_details:Np(W)}}})}catch{$("Failed to load slots")}finally{q(!1)}}},[n.doctor_id,D,E?.region_id,ie,c]);P.useEffect(()=>{if(!D||I||_)return;const ve=V?.[D],ze=ve?.slots_details||[];if(D&&ze.length>0&&!I){let je=0;const S=ve?.selected_date||l?.[D]?.selected_date;if(S){const W=ze.findIndex(U=>U.date===S);W>=0&&(je=W)}else{const W=l?.[D]?.slots_details||[],U=ze.findIndex(j=>{const X=W.find(he=>he.date===j.date);return X?.slots&&X.slots.length>0});U>=0&&(je=U)}g(je),w(Math.floor(je/3)*3);const K=ze[je];K&&(!K?.slots||K.slots.length===0)&&C&&ie&&se(K.date)}},[V,D,l,I,_]);const de=P.useMemo(()=>{const ve=D?V?.[D]?.slots_details:null;if(ve?.length){const je=Math.max(0,Math.floor(b/3)*3),S=Math.min(ve.length,je+3);return ve.slice(je,S).map(K=>{const W=new Date(K.date),{weekday:U,dayNum:j}=kp(W);return{weekday:U,dayNum:j,date:K.date,hasAvailability:!0,fullDate:W,hasSlots:!!(K.slots&&K.slots.length>0)}})}const ze=new Date(Q);return ze.setDate(ze.getDate()+b),Array.from({length:3},(je,S)=>{const K=new Date(ze);K.setDate(ze.getDate()+S);const{weekday:W,dayNum:U}=kp(K),j=K.toISOString().split("T")[0];return{weekday:W,dayNum:U,date:j,hasAvailability:!1,fullDate:K,hasSlots:!1}})},[Q,b,V,D]),L=P.useMemo(()=>(D?V?.[D]?.slots_details:null)?.[h]||null,[V,D,h]),N=P.useMemo(()=>Hw(n.name),[n.name]),B=P.useCallback(()=>{Y(!0),w(ve=>Math.max(0,ve-3)),v(null)},[]),z=P.useCallback(()=>{Y(!0);const ve=D?V?.[D]?.slots_details:null,ze=ve?.length?Math.max(0,ve.length-3):0;w(je=>Math.min(ze,je+3)),v(null)},[D,V]),re=P.useCallback(ve=>{Y(!0);const ze=D?V?.[D]?.slots_details:null,je=ze?.findIndex(K=>K.date===ve)??-1;je>=0&&g(je),v(null);const S=ze?.find(K=>K.date===ve);C&&(!S?.slots||S.slots.length===0)&&n.doctor_id&&D&&E?.region_id&&ie&&se(ve)},[D,V,C,n.doctor_id,E?.region_id]),ce=P.useMemo(()=>b>0,[b]),we=P.useMemo(()=>{const ve=D?V?.[D]?.slots_details:null;if(!ve||ve.length===0)return!1;const ze=Math.max(0,ve.length-3);return b<ze},[b,V,D]),Te=P.useCallback(()=>{o&&L&&y&&o({date:L.date,time:y,doctorData:{doctor:n,hospital_id:D||"",region_id:E?.region_id||""}})},[o,L,y,n,D,E?.region_id]),ke=P.useMemo(()=>n.hospitals.map(ve=>({value:ve.hospital_id,label:ve.name})),[n.hospitals]),Ae=P.useCallback(ve=>{v(ve)},[]),He=P.useCallback(ve=>{const ze=n.hospitals.find(je=>je.hospital_id===ve);ze&&T(ze)},[n.hospitals]);return O.jsxs(da,{className:"max-w-md rounded-xl border-lavender-200 shadow-md p-0 bg-white overflow-hidden","aria-label":"Appointment card",children:[O.jsx(Jd,{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:O.jsxs("div",{className:"flex items-center gap-3",children:[n.profile_pic&&O.jsxs(ha,{className:"h-12 w-12 ring-2 ring-lavender-200",children:[O.jsx(fh,{src:n.profile_pic,alt:`${n.name} profile photo`,crossOrigin:"anonymous"}),O.jsx(ma,{className:"bg-lavender-100 text-lavender-700",children:N})]}),O.jsxs("div",{className:"min-w-0",children:[O.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[O.jsx("h3",{className:" text-base font-bold text-slate-900",children:n.name}),n.profile_link?O.jsx("a",{href:n.profile_link,target:"_blank",rel:"noreferrer",className:"text-xs font-semibold text-lavender-600 hover:text-lavender-700 hover:underline",children:"View profile"}):null]}),O.jsxs("p",{className:"mt-0.5 text-sm text-slate-600",children:[n.specialty,n.experience&&O.jsxs(O.Fragment,{children:[" • ",n.experience]})]})]})]})}),O.jsxs(Wd,{className:"px-4 py-2",children:[O.jsxs("div",{className:"grid gap-2 border-b border-lavender-100 pb-3",children:[n?.timings&&O.jsxs("div",{className:"flex items-start gap-2 text-sm text-slate-900",children:[O.jsx(gS,{className:"h-4 w-4 text-lavender-600 mt-0.5 flex-shrink-0","aria-hidden":!0}),O.jsx("span",{className:"text-slate-600 text-xs",children:n?.timings})]}),n.languages?O.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[O.jsx(bS,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),O.jsx("span",{className:"text-slate-600",children:n.languages})]}):null,n?.hospitals&&n.hospitals?.length>1?E&&E.name&&O.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[O.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),O.jsx(Uw,{options:ke,placeholder:"Select Hospital",disabled:u,onValueChange:He,value:E?.hospital_id||""})]}):E&&E.name&&O.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-900",children:[O.jsx(Zd,{className:"h-4 w-4 text-lavender-600","aria-hidden":!0}),O.jsx("span",{className:"text-slate-600",children:E.name})]})]}),E?.hospital_id&&V?.[E?.hospital_id]?.slots_details?.length||i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES]||_?O.jsx(kt,{type:"button",variant:"outline","aria-expanded":f,"aria-controls":"ap-slots",onClick:()=>m(ve=>!ve),disabled:_,className:"mt-3 w-full border-lavender-500 text-lavender-600 hover:bg-lavender-50 hover:border-lavender-600 disabled:opacity-50",children:_?O.jsxs(O.Fragment,{children:[O.jsx(Qd,{className:"h-4 w-4 mr-2 animate-spin"}),"Loading availability..."]}):O.jsxs(O.Fragment,{children:[O.jsx("span",{className:"mr-1",children:f?"Hide slots":"Show available slots"}),O.jsx(Rs,{className:`h-4 w-4 transition-transform ${f?"rotate-180":""}`,"aria-hidden":!0})]})}):O.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:O.jsx("span",{className:"text-sm text-slate-600 font-medium",children:"No details available"})}),f&&E?.hospital_id&&V?.[E?.hospital_id]?.slots_details?.length&&O.jsx("div",{id:"ap-slots",role:"region","aria-label":"Available slots",className:"pt-3",children:V?.[E?.hospital_id??""]?.slots_details?.length?O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"flex items-center gap-2 px-0.5",children:[O.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:B,"aria-label":"Previous 3 days",disabled:u||!ce,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:O.jsx(mS,{className:"h-4 w-4"})}),O.jsx("div",{className:"flex-1 grid grid-cols-3 gap-1 min-w-0",children:de.map((ve,ze)=>{const je=L?.date===ve.date,S=!ve.hasAvailability;return O.jsxs(kt,{type:"button",variant:"outline",onClick:()=>!S&&re(ve.date),disabled:S||u,"aria-current":je?"date":void 0,className:["flex flex-col items-center justify-center h-12 rounded-lg border-2 p-2 gap-0.5 min-w-0 transition-all",je?"border-lavender-500 ring-2 ring-lavender-200 bg-lavender-50 shadow-sm":S?"border-slate-200 bg-slate-50 text-slate-300 cursor-not-allowed":"border-slate-200 bg-white hover:bg-lavender-50 hover:border-lavender-300"].join(" "),children:[O.jsx("span",{className:["text-[10px] tracking-wide w-full text-center font-medium",je?"text-lavender-700":S?"text-slate-300":"text-slate-600"].join(" "),children:ve.weekday}),O.jsx("span",{className:["text-xs font-bold w-full text-center",je?"text-lavender-700":S?"text-slate-300":"text-slate-900"].join(" "),children:ve.dayNum})]},`${ve.date}-${ze}`)})}),O.jsx(kt,{type:"button",variant:"outline",size:"icon",onClick:z,"aria-label":"Next 3 days",disabled:u||!we,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:O.jsx(pS,{className:"h-4 w-4"})})]}),O.jsx("div",{className:"px-0.5 py-3",children:k?O.jsxs("div",{className:"flex items-center justify-center py-4",children:[O.jsx(Qd,{className:"h-4 w-4 animate-spin text-lavender-600 mr-2"}),O.jsx("span",{className:"text-sm text-slate-600",children:"Loading slots..."})]}):L?.slots?.length?O.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:L.slots.map((ve,ze)=>{const je=y===ve;return O.jsxs(kt,{type:"button",variant:"outline",onClick:()=>Ae(ve),"aria-pressed":je,disabled:u,className:["inline-flex h-9 items-center justify-center gap-2 rounded-lg px-3 text-xs font-semibold transition-all",je?"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"].join(" "),children:[O.jsx(hS,{className:`h-3.5 w-3.5 flex-shrink-0${je?"text-white":"text-lavender-600"}`}),O.jsx("span",{className:"truncate",children:ve})]},ve||`slot-${ze}`)})}):O.jsx("p",{className:"px-1 text-sm text-slate-600",children:"No slots available for this day."})}),O.jsx("div",{className:"px-0.5 pb-1.5",children:O.jsxs(kt,{type:"button",onClick:Te,disabled:!y||u,"aria-disabled":!y,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",O.jsx(dS,{className:"h-4 w-4"})]})})]}):O.jsx("div",{className:"px-1 pb-2 pt-1",children:O.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})}),f&&!V?.[E?.hospital_id??""]?.slots_details?.length&&O.jsx("div",{className:"px-1 pb-2 pt-1",children:O.jsx("p",{className:"text-sm text-slate-600",children:F||"No availability provided."})})]})]})}function Pw({callTool:n,doctorDetails:l,callbacks:i,onBook:o,disabled:u=!1}){const[s,c]=P.useState([]),[f,m]=P.useState(!1),[h,g]=P.useState(0),[y,v]=P.useState(null),b=Yr(M=>M.sessionId),w=l.doctor_ids||[],E=w.length,T=Math.min(3,E),_=E-T;P.useEffect(()=>{if(w.length===0||!b)return;(async()=>{m(!0),v(null);try{const Y=w.slice(0,T).map(ie=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ie})),F=await Promise.allSettled(Y),$=[];F.forEach((ie,D)=>{ie.status==="fulfilled"&&$.push(ie.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{m(!1)}})()},[w,b,T]);const A=async()=>{if(!(h>=E||!b)){m(!0),v(null);try{const I=w.slice(h).map($=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:$})),Y=await Promise.allSettled(I),F=[];Y.forEach(($,ie)=>{$.status==="fulfilled"&&F.push($.value)}),c($=>[...$,...F]),g($=>$+F.length)}catch{v("Failed to load more doctor details. Please try again.")}finally{m(!1)}}},k=M=>{o&&o(M)},q=async M=>{const I=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_DATES].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_DATES;return await n(I,{doctor_id:M.doctor_id,hospital_id:M.hospital_id,region_id:M.region_id})},H=async(M,I)=>{const Y=i?.[Ge.SYNAPSE_TOOL_CALLBACK_NAME.AVAILABILITY_SLOTS].tool_name||Ge.SYNAPSE_TOOL_NAME.AVAILABILITY_SLOTS;return await n(Y,{appointment_date:M,doctor_id:I.doctor_id,hospital_id:I.hospital_id,region_id:I.region_id})};return f&&s.length===0?O.jsx("div",{className:"flex items-center justify-center py-8",children:O.jsxs("div",{className:"text-center",children:[O.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[var(--color-primary)] mx-auto mb-3"}),O.jsx("p",{className:"text-sm text-gray-500",children:"Loading doctor details..."})]})}):y&&s.length===0?O.jsx("div",{className:"flex items-center justify-center py-8",children:O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-sm text-red-500 mb-2",children:y}),O.jsx(kt,{variant:"outline",size:"sm",onClick:()=>{v(null),w.length>0&&b&&(async()=>{m(!0);try{const Y=w.slice(0,T).map(ie=>n(Ge.SYNAPSE_TOOL_NAME.DOCTOR_DETAILS,{doctor_id:ie})),F=await Promise.allSettled(Y),$=[];F.forEach((ie,D)=>{ie.status==="fulfilled"&&$.push(ie.value)}),c($),g($.length)}catch{v("Failed to load doctor details. Please try again.")}finally{m(!1)}})()},children:"Retry"})]})}):s.length===0?O.jsx("div",{className:"flex items-center justify-center py-2",children:O.jsx("p",{className:"text-sm text-gray-500",children:"No doctor details available."})}):O.jsxs("div",{className:"space-y-4",children:[O.jsx("div",{className:"space-y-4",children:s.map((M,I)=>M?.doctor_id&&O.jsx(qw,{doctor:M,availability:l.availability,callbacks:i,onBook:k,disabled:u,getAvailabilityDatesForAppointment:q,getAvailableSlotsForAppointment:H},`${I}`))}),h<E&&O.jsx("div",{className:"flex justify-center",children:O.jsx(kt,{variant:"outline",onClick:A,disabled:f,className:"px-6 py-2",children:f?O.jsxs(O.Fragment,{children:[O.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 (${_} more)`})}),y&&s.length>0&&O.jsxs("div",{className:"text-center",children:[O.jsx("p",{className:"text-sm text-red-500 mb-2",children:y}),O.jsx(kt,{variant:"outline",size:"sm",onClick:A,disabled:f,children:"Retry loading more"})]})]})}function Fw({role:n,content:l,timestamp:i,iconUrl:o,files:u,isLastMessage:s,progressMessage:c,toolEscalationData:f,callTool:m,onSendMessage:h}){const g=n==="user",[y,v]=P.useState([]),b=async k=>{const q=Date.now().toString();await h({message:k,messageId:q,toolCalled:!0})},w=async k=>{await h({message:`I want to book an appointment for ${k.doctorData?.doctor?.name||"the doctor"} on ${k.date} for ${k.time}`,toolCalled:!0})},E=k=>{v(k)},T=()=>{if(!f?.details?.input?.additional_option)return;const k=f.details?.input?.additional_option;if(typeof k=="string"&&(k===Gr.NOTA||k===Gr.AOTA))return k;if(typeof k=="object"&&k!==null){if(k.NOTA===Gr.NOTA)return Gr.NOTA;if(k.AOTA===Gr.AOTA)return Gr.AOTA}},_=()=>{const k=f?.details?.input?.options;return k?Array.isArray(k)?k.map((q,H)=>({id:`option-${H}`,label:q.label,value:q.value})):Object.keys(k).map((q,H)=>({id:`option-${H}`,label:q,value:q})):[]},A=async()=>{if(y.length>0){const k=y.join(", "),q=Date.now().toString();await h({message:k,messageId:q,toolCalled:!0})}};return O.jsx("div",{className:Ye("flex",g?"justify-end":"justify-start"),children:O.jsxs("div",{className:Ye("flex gap-3",g?"flex-row-reverse":"flex-row",f?.details?.component===Ge.SYNAPSE_COMPONENTS.MULTI?"max-w-md":g?"max-w-[60%]":"max-w-xs"),children:[!g&&O.jsx(ha,{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:O.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:o?O.jsx("img",{src:o,alt:"Bot Icon",className:"w-full h-full"}):O.jsx(Xd,{className:"w-full h-full"})})}),O.jsxs(da,{className:Ye("px-4 py-2 rounded-2xl shadow-none break-words overflow-wrap-anywhere whitespace-pre-wrap",g?"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",f&&"w-full"),children:[c&&!g&&s&&O.jsx("p",{className:"text-sm font-medium text-slate-500 pb-2",children:c}),l&&O.jsx("div",{className:"text-sm markdown-content mb-3",children:O.jsx(Ew,{children:l})}),u&&u.length>0&&O.jsx("div",{className:"mt-2",children:O.jsx(Bw,{files:u,isPreview:!1,className:""})}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.PILL&&f?.details?.input?.options&&O.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:f.details?.input?.options.map((k,q)=>O.jsx(Tw,{disabled:f?.isResponded,text:k?.label||"",onClick:()=>b(k?.value||""),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},q))}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.MULTI&&f?.details?.input?.options&&O.jsxs("div",{className:"mt-3 space-y-3 break-words overflow-wrap-anywhere whitespace-pre-wrap",children:[O.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),O.jsx(Iw,{options:_(),selectedValues:y,onSelectionChange:E,additionalOption:T(),disabled:f?.isResponded}),O.jsx(kt,{onClick:A,disabled:y.length===0||f?.isResponded,className:Ye("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"})]}),f?.details?.component===Ge.SYNAPSE_COMPONENTS.DOCTOR_CARD&&f?.details?.input?.doctor_details&&m?O.jsx("div",{className:"mt-3",children:O.jsx(Pw,{doctorDetails:f?.details?.input?.doctor_details,callTool:m,callbacks:f?.details?._meta?.callbacks,onBook:w,disabled:f?.isResponded})}):null,c&&!g&&s&&O.jsx("p",{className:"text-sm font-medium text-teal-600",children:c}),i&&O.jsx("p",{className:Ye("text-xs mt-2 text-right","text-slate-500"),children:i})]})]})})}function Yw({messages:n,onSendMessage:l,iconUrl:i,callTool:o}){const u=Yr(c=>c.isWaitingForResponse),s=Yr(c=>c.progressMessage);return O.jsxs(O.Fragment,{children:[(n&&n.length>0||s)&&O.jsx(O.Fragment,{children:n.map((c,f)=>O.jsx("div",{className:"animate-slideUp scroll-mt-[80px]",id:f===n.length-1?"last-message":void 0,children:O.jsx(Fw,{role:c.role,content:c.content,files:c.files||[],iconUrl:i,toolEscalationData:c.toolEscalationData,timestamp:c.timestamp,onSendMessage:l,isLastMessage:f===n.length-1,progressMessage:s,callTool:o})},c.id))}),u&&O.jsx(Vw,{iconUrl:i})]})}function Vw({iconUrl:n}){return O.jsx("div",{className:"animate-slideUp",children:O.jsx("div",{className:"flex justify-start",children:O.jsxs("div",{className:"flex gap-3",children:[O.jsx(ha,{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:O.jsx(ma,{className:"bg-transparent text-white text-xs font-bold",children:n?O.jsx("img",{src:n,alt:"Bot Icon",className:"w-4 h-4",loading:"lazy"}):O.jsx(Xd,{className:"w-4 h-4"})})}),O.jsx(da,{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:O.jsx("div",{className:"flex items-center gap-1.5","aria-label":"Bot is typing",children:[0,1,2].map(l=>O.jsx("span",{className:"w-2 h-2 rounded-full bg-slate-400 animate-pulse",style:{animationDelay:`${l*150}ms`}},l))})})]})})})}const Gw=Object.freeze(Object.defineProperty({__proto__:null,default:Yw},Symbol.toStringTag,{value:"Module"}));function Xw({onTaskClick:n,disabled:l,tasks:i}){return i?.length?O.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map(o=>O.jsx(kt,{type:"button",variant:"ghost",disabled:l,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:O.jsx("div",{className:"flex items-start justify-between gap-3",children:O.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 Zw({initialPrompt:n,tasks:l,onTaskClick:i,disabled:o}){return O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:O.jsx("h1",{className:"text-xl-minus font-semibold text-slate-900",children:n||"How can I assist you today?"})}),O.jsx(Xw,{onTaskClick:i,disabled:o,tasks:l})]})}const Kw=Object.freeze(Object.defineProperty({__proto__:null,default:Zw},Symbol.toStringTag,{value:"Module"}));function Qw({className:n="",onRetry:l,onStartNewSession:i,showRetryButton:o,startNewConnection:u,clearError:s,error:c,isConnected:f}){const{isOnline:m}=Wh(),[h,g]=P.useState(!0);return P.useEffect(()=>{if(!u&&!o&&!!c){g(!0);const b=setTimeout(()=>g(!1),5e3);return()=>clearTimeout(b)}g(!0)},[c,u,o]),u?O.jsx("div",{className:Ye("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:O.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),O.jsxs("div",{className:"flex-1",children:[O.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Something went wrong"}),O.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),O.jsxs("button",{onClick:()=>{s(),i?.()},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:[O.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),O.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})}):o?O.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:O.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),O.jsxs("div",{className:"flex-1",children:[O.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:c?.title??"Failed to connect"}),O.jsx("div",{className:"text-slate-500 text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),O.jsxs("button",{onClick:()=>{s(),l?.()},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:[O.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O.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"]})]})}):f&&m&&!c?.title||!u&&!o&&!h?null:O.jsx("div",{className:Ye("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FDD835] rounded-lg transition-opacity duration-500",n),children:O.jsxs("div",{className:"flex items-center gap-3",children:[O.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:O.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),O.jsxs("div",{className:"flex-1",children:[O.jsx("div",{className:"text-slate-700 font-semibold text-sm",children:m?c?.title||"Connecting...":"No internet connection"}),O.jsx("div",{className:"text-slate-500 text-xs mt-1",children:m?c?.description??"Please wait while we try to connect":"Please check your internet connection"})]}),!f&&O.jsx("div",{className:"flex-shrink-0",children:O.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const Jw=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:Qw},Symbol.toStringTag,{value:"Module"}));return hs.renderMedAssist=$h,Object.defineProperty(hs,Symbol.toStringTag,{value:"Module"}),hs})({});
61
57
  //# sourceMappingURL=medassist-widget.js.map