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

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(os){"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 xl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ss(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var us={exports:{}},ra={};var qf;function lb(){if(qf)return ra;qf=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 d in u)d!=="key"&&(s[d]=u[d])}else s=u;return u=s.ref,{$$typeof:n,type:o,key:c,ref:u!==void 0?u:null,props:s}}return ra.Fragment=l,ra.jsx=i,ra.jsxs=i,ra}var Yf;function ob(){return Yf||(Yf=1,us.exports=lb()),us.exports}var V=ob(),cs={exports:{}},Le={};var Pf;function sb(){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"),u=Symbol.for("react.profiler"),s=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(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,T={};function _(R,j,A){this.props=R,this.context=j,this.refs=T,this.updater=A||C}_.prototype.isReactComponent={},_.prototype.setState=function(R,j){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,j,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function k(){}k.prototype=_.prototype;function O(R,j,A){this.props=R,this.context=j,this.refs=T,this.updater=A||C}var H=O.prototype=new k;H.constructor=O,E(H,_.prototype),H.isPureReactComponent=!0;var L=Array.isArray;function z(){}var B={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function q(R,j,A){var ne=A.ref;return{$$typeof:n,type:R,key:j,ref:ne!==void 0?ne:null,props:A}}function oe(R,j){return q(R.type,j,R.props)}function ce(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function D(R){var j={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(A){return j[A]})}var ee=/\/+/g;function w(R,j){return typeof R=="object"&&R!==null&&R.key!=null?D(""+R.key):j.toString(36)}function G(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(z,z):(R.status="pending",R.then(function(j){R.status==="pending"&&(R.status="fulfilled",R.value=j)},function(j){R.status==="pending"&&(R.status="rejected",R.reason=j)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function F(R,j,A,ne,$){var de=typeof R;(de==="undefined"||de==="boolean")&&(R=null);var _e=!1;if(R===null)_e=!0;else switch(de){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(R.$$typeof){case n:case l:_e=!0;break;case y:return _e=R._init,F(_e(R._payload),j,A,ne,$)}}if(_e)return $=$(R),_e=ne===""?"."+w(R,0):ne,L($)?(A="",_e!=null&&(A=_e.replace(ee,"$&/")+"/"),F($,j,A,"",function(Me){return Me})):$!=null&&(ce($)&&($=oe($,A+($.key==null||R&&R.key===$.key?"":(""+$.key).replace(ee,"$&/")+"/")+_e)),j.push($)),1;_e=0;var ke=ne===""?".":ne+":";if(L(R))for(var Te=0;Te<R.length;Te++)ne=R[Te],de=ke+w(ne,Te),_e+=F(ne,j,A,de,$);else if(Te=b(R),typeof Te=="function")for(R=Te.call(R),Te=0;!(ne=R.next()).done;)ne=ne.value,de=ke+w(ne,Te++),_e+=F(ne,j,A,de,$);else if(de==="object"){if(typeof R.then=="function")return F(G(R),j,A,ne,$);throw j=String(R),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return _e}function Z(R,j,A){if(R==null)return R;var ne=[],$=0;return F(R,ne,"","",function(de){return j.call(A,de,$++)}),ne}function ie(R){if(R._status===-1){var j=R._result;j=j(),j.then(function(A){(R._status===0||R._status===-1)&&(R._status=1,R._result=A)},function(A){(R._status===0||R._status===-1)&&(R._status=2,R._result=A)}),R._status===-1&&(R._status=0,R._result=j)}if(R._status===1)return R._result.default;throw R._result}var fe=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},M={map:Z,forEach:function(R,j,A){Z(R,function(){j.apply(this,arguments)},A)},count:function(R){var j=0;return Z(R,function(){j++}),j},toArray:function(R){return Z(R,function(j){return j})||[]},only:function(R){if(!ce(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Le.Activity=g,Le.Children=M,Le.Component=_,Le.Fragment=i,Le.Profiler=u,Le.PureComponent=O,Le.StrictMode=o,Le.Suspense=h,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Le.__COMPILER_RUNTIME={__proto__:null,c:function(R){return B.H.useMemoCache(R)}},Le.cache=function(R){return function(){return R.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(R,j,A){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ne=E({},R.props),$=R.key;if(j!=null)for(de in j.key!==void 0&&($=""+j.key),j)!P.call(j,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&j.ref===void 0||(ne[de]=j[de]);var de=arguments.length-2;if(de===1)ne.children=A;else if(1<de){for(var _e=Array(de),ke=0;ke<de;ke++)_e[ke]=arguments[ke+2];ne.children=_e}return q(R.type,$,ne)},Le.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:s,_context:R},R},Le.createElement=function(R,j,A){var ne,$={},de=null;if(j!=null)for(ne in j.key!==void 0&&(de=""+j.key),j)P.call(j,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&($[ne]=j[ne]);var _e=arguments.length-2;if(_e===1)$.children=A;else if(1<_e){for(var ke=Array(_e),Te=0;Te<_e;Te++)ke[Te]=arguments[Te+2];$.children=ke}if(R&&R.defaultProps)for(ne in _e=R.defaultProps,_e)$[ne]===void 0&&($[ne]=_e[ne]);return q(R,de,$)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(R){return{$$typeof:d,render:R}},Le.isValidElement=ce,Le.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:ie}},Le.memo=function(R,j){return{$$typeof:p,type:R,compare:j===void 0?null:j}},Le.startTransition=function(R){var j=B.T,A={};B.T=A;try{var ne=R(),$=B.S;$!==null&&$(A,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(z,fe)}catch(de){fe(de)}finally{j!==null&&A.types!==null&&(j.types=A.types),B.T=j}},Le.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Le.use=function(R){return B.H.use(R)},Le.useActionState=function(R,j,A){return B.H.useActionState(R,j,A)},Le.useCallback=function(R,j){return B.H.useCallback(R,j)},Le.useContext=function(R){return B.H.useContext(R)},Le.useDebugValue=function(){},Le.useDeferredValue=function(R,j){return B.H.useDeferredValue(R,j)},Le.useEffect=function(R,j){return B.H.useEffect(R,j)},Le.useEffectEvent=function(R){return B.H.useEffectEvent(R)},Le.useId=function(){return B.H.useId()},Le.useImperativeHandle=function(R,j,A){return B.H.useImperativeHandle(R,j,A)},Le.useInsertionEffect=function(R,j){return B.H.useInsertionEffect(R,j)},Le.useLayoutEffect=function(R,j){return B.H.useLayoutEffect(R,j)},Le.useMemo=function(R,j){return B.H.useMemo(R,j)},Le.useOptimistic=function(R,j){return B.H.useOptimistic(R,j)},Le.useReducer=function(R,j,A){return B.H.useReducer(R,j,A)},Le.useRef=function(R){return B.H.useRef(R)},Le.useState=function(R){return B.H.useState(R)},Le.useSyncExternalStore=function(R,j,A){return B.H.useSyncExternalStore(R,j,A)},Le.useTransition=function(){return B.H.useTransition()},Le.version="19.2.0",Le}var Ff;function wl(){return Ff||(Ff=1,cs.exports=sb()),cs.exports}var K=wl();const ia=ss(K),Vf=ab({__proto__:null,default:ia},[K]);var fs={exports:{}},aa={},ds={exports:{}},hs={};var Gf;function ub(){return Gf||(Gf=1,(function(n){function l(F,Z){var ie=F.length;F.push(Z);e:for(;0<ie;){var fe=ie-1>>>1,M=F[fe];if(0<u(M,Z))F[fe]=Z,F[ie]=M,ie=fe;else break e}}function i(F){return F.length===0?null:F[0]}function o(F){if(F.length===0)return null;var Z=F[0],ie=F.pop();if(ie!==Z){F[0]=ie;e:for(var fe=0,M=F.length,R=M>>>1;fe<R;){var j=2*(fe+1)-1,A=F[j],ne=j+1,$=F[ne];if(0>u(A,ie))ne<M&&0>u($,A)?(F[fe]=$,F[ne]=ie,fe=ne):(F[fe]=A,F[j]=ie,fe=j);else if(ne<M&&0>u($,ie))F[fe]=$,F[ne]=ie,fe=ne;else break e}}return Z}function u(F,Z){var ie=F.sortIndex-Z.sortIndex;return ie!==0?ie:F.id-Z.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,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(F){for(var Z=i(p);Z!==null;){if(Z.callback===null)o(p);else if(Z.startTime<=F)o(p),Z.sortIndex=Z.expirationTime,l(h,Z);else break;Z=i(p)}}function L(F){if(E=!1,H(F),!C)if(i(h)!==null)C=!0,z||(z=!0,D());else{var Z=i(p);Z!==null&&G(L,Z.startTime-F)}}var z=!1,B=-1,P=5,q=-1;function oe(){return T?!0:!(n.unstable_now()-q<P)}function ce(){if(T=!1,z){var F=n.unstable_now();q=F;var Z=!0;try{e:{C=!1,E&&(E=!1,k(B),B=-1),b=!0;var ie=v;try{t:{for(H(F),g=i(h);g!==null&&!(g.expirationTime>F&&oe());){var fe=g.callback;if(typeof fe=="function"){g.callback=null,v=g.priorityLevel;var M=fe(g.expirationTime<=F);if(F=n.unstable_now(),typeof M=="function"){g.callback=M,H(F),Z=!0;break t}g===i(h)&&o(h),H(F)}else o(h);g=i(h)}if(g!==null)Z=!0;else{var R=i(p);R!==null&&G(L,R.startTime-F),Z=!1}}break e}finally{g=null,v=ie,b=!1}Z=void 0}}finally{Z?D():z=!1}}}var D;if(typeof O=="function")D=function(){O(ce)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,w=ee.port2;ee.port1.onmessage=ce,D=function(){w.postMessage(null)}}else D=function(){_(ce,0)};function G(F,Z){B=_(function(){F(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(F){F.callback=null},n.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<F?Math.floor(1e3/F):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(F){switch(v){case 1:case 2:case 3:var Z=3;break;default:Z=v}var ie=v;v=Z;try{return F()}finally{v=ie}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(F,Z){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ie=v;v=F;try{return Z()}finally{v=ie}},n.unstable_scheduleCallback=function(F,Z,ie){var fe=n.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?fe+ie:fe):ie=fe,F){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=ie+M,F={id:y++,callback:Z,priorityLevel:F,startTime:ie,expirationTime:M,sortIndex:-1},ie>fe?(F.sortIndex=ie,l(p,F),i(h)===null&&F===i(p)&&(E?(k(B),B=-1):E=!0,G(L,ie-fe))):(F.sortIndex=M,l(h,F),C||b||(C=!0,z||(z=!0,D()))),F},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(F){var Z=v;return function(){var ie=v;v=Z;try{return F.apply(this,arguments)}finally{v=ie}}}})(hs)),hs}var Xf;function cb(){return Xf||(Xf=1,ds.exports=ub()),ds.exports}var ms={exports:{}},Ut={};var Zf;function fb(){if(Zf)return Ut;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},u=Symbol.for("react.portal");function s(h,p,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,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 Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Ut.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 s(h,p,null,y)},Ut.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()}},Ut.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))},Ut.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Ut.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})}},Ut.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)},Ut.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})}},Ut.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)},Ut.requestFormReset=function(h){o.d.r(h)},Ut.unstable_batchedUpdates=function(h,p){return h(p)},Ut.useFormState=function(h,p,y){return c.H.useFormState(h,p,y)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.0",Ut}var Kf;function Qf(){if(Kf)return ms.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(),ms.exports=fb(),ms.exports}var Jf;function db(){if(Jf)return aa;Jf=1;var n=cb(),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 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 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(s(e)!==e)throw Error(o(188))}function p(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 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,N=f.child;N;){if(N===r){S=!0,r=f,a=m;break}if(N===a){S=!0,a=f,r=m;break}N=N.sibling}if(!S){for(N=m.child;N;){if(N===r){S=!0,r=m,a=f;break}if(N===a){S=!0,a=m,r=f;break}N=N.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"),L=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),ce=Symbol.iterator;function D(e){return e===null||typeof e!="object"?null:(e=ce&&e[ce]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Symbol.for("react.client.reference");function w(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?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 L: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 B: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,F=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,ie={pending:!1,data:null,method:null,action:null},fe=[],M=-1;function R(e){return{current:e}}function j(e){0>M||(e.current=fe[M],fe[M]=null,M--)}function A(e,t){M++,fe[M]=e.current,e.current=t}var ne=R(null),$=R(null),de=R(null),_e=R(null);function ke(e,t){switch(A(de,t),A($,e),A(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?A0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=A0(t),e=R0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(ne),A(ne,e)}function Te(){j(ne),j($),j(de)}function Me(e){e.memoizedState!==null&&A(_e,e);var t=ne.current,r=R0(t,e.type);t!==r&&(A($,e),A(ne,r))}function Be(e){$.current===e&&(j(ne),j($)),_e.current===e&&(j(_e),vl._currentValue=ie)}var at,Lt;function x(e){if(at===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);at=t&&t[1]||"",Lt=-1<r.stack.indexOf(`
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(`
2
2
  at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+at+e+Lt}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 ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(se){var le=se}Reflect.construct(e,[],ge)}else{try{ge.call()}catch(se){le=se}e.call(ge.prototype)}}else{try{throw Error()}catch(se){le=se}(ge=e())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(se){if(se&&le&&typeof se.stack=="string")return[se.stack,le.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],N=m[1];if(S&&N){var Y=S.split(`
4
- `),re=N.split(`
5
- `);for(f=a=0;a<Y.length&&!Y[a].includes("DetermineComponentFrameRoot");)a++;for(;f<re.length&&!re[f].includes("DetermineComponentFrameRoot");)f++;if(a===Y.length||f===re.length)for(a=Y.length-1,f=re.length-1;1<=a&&0<=f&&Y[a]!==re[f];)f--;for(;1<=a&&0<=f;a--,f--)if(Y[a]!==re[f]){if(a!==1||f!==1)do if(a--,f--,0>f||Y[a]!==re[f]){var he=`
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
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`
7
7
  Error generating stack: `+a.message+`
8
- `+a.stack}}var Q=Object.prototype.hasOwnProperty,ye=n.unstable_scheduleCallback,ve=n.unstable_cancelCallback,ae=n.unstable_shouldYield,Ee=n.unstable_requestPaint,Ce=n.unstable_now,xe=n.unstable_getCurrentPriorityLevel,W=n.unstable_ImmediatePriority,be=n.unstable_UserBlockingPriority,we=n.unstable_NormalPriority,je=n.unstable_LowPriority,Xe=n.unstable_IdlePriority,mt=n.log,It=n.unstable_setDisableYieldValue,Pe=null,pt=null;function At(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,Mn=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 Xl(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 N=a&134217727;return N!==0?(a=N&~m,a!==0?f=fn(a):(S&=N,S!==0?f=fn(S):r||(r=N&~e,r!==0&&(f=fn(r))))):(N=a&~m,N!==0?f=fn(N):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 Tw(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 up(){var e=Mn;return Mn<<=1,(Mn&62914560)===0&&(Mn=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 kw(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 N=e.entanglements,Y=e.expirationTimes,re=e.hiddenUpdates;for(r=S&~r;0<r;){var he=31-Fe(r),ge=1<<he;N[he]=0,Y[he]=-1;var le=re[he];if(le!==null)for(re[he]=null,he=0;he<le.length;he++){var se=le[he];se!==null&&(se.lane&=-536870913)}r&=~ge}a!==0&&cp(e,a,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(S&~t))}function cp(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 fp(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 dp(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 hp(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:W0(e.type))}function mp(e,t){var r=Z.p;try{return Z.p=e,t()}finally{Z.p=r}}var dr=Math.random().toString(36).slice(2),Ot="__reactFiber$"+dr,Ft="__reactProps$"+dr,vi="__reactContainer$"+dr,Ou="__reactEvents$"+dr,Aw="__reactListeners$"+dr,Rw="__reactHandles$"+dr,pp="__reactResources$"+dr,Da="__reactMarker$"+dr;function zu(e){delete e[Ot],delete e[Ft],delete e[Ou],delete e[Aw],delete e[Rw]}function Si(e){var t=e[Ot];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vi]||r[Ot]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=U0(e);e!==null;){if(r=e[Ot])return r;e=U0(e)}return t}e=r,r=e.parentNode}return null}function Ei(e){if(e=e[Ot]||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[pp];return t||(t=e[pp]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Da]=!0}var gp=new Set,yp={};function Fr(e,t){xi(e,t),xi(e+"Capture",t)}function xi(e,t){for(yp[e]=t,e=0;e<t.length;e++)gp.add(t[e])}var Nw=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]*$"),bp={},vp={};function Ow(e){return Q.call(vp,e)?!0:Q.call(bp,e)?!1:Nw.test(e)?vp[e]=!0:(bp[e]=!0,!1)}function Zl(e,t,r){if(Ow(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 Kl(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 Sp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zw(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=Sp(e)?"checked":"value";e._valueTracker=zw(e,t,""+e[t])}}function Ep(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),a="";return e&&(a=Sp(e)?e.checked?"true":"false":e.value),e=a,e!==r?(t.setValue(e),!0):!1}function Ql(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 Mw=/[\n"\\]/g;function hn(e){return e.replace(Mw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Du(e,t,r,a,f,m,S,N){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"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+dn(N):e.removeAttribute("name")}function _p(e,t,r,a,f,m,S,N){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,N||t===e.value||(e.value=t),e.defaultValue=t}a=a??f,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=N?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"&&Ql(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 xp(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 wp(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 Dw=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 Cp(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||Dw.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Tp(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&&Cp(e,f,a)}else for(var m in t)t.hasOwnProperty(m)&&Cp(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 jw=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"]]),Uw=/^[\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 Jl(e){return Uw.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 kp(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&&Ep(a)}break e;case"textarea":xp(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&wi(e,!!r.multiple,t,!1)}}}var Iu=!1;function Ap(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)&&(Io(),Ti&&(t=Ti,e=ki,ki=Ti=null,kp(t),e)))for(t=0;t<e.length;t++)kp(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,Wl=null;function Rp(){if(Wl)return Wl;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 Wl=f.slice(e,1<a?1-a:void 0)}function $l(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 eo(){return!0}function Np(){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 N in e)e.hasOwnProperty(N)&&(r=e[N],this[N]=r?r(m):m[N]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?eo:Np,this.isPropagationStopped=Np,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=eo)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=eo)},persist:function(){},isPersistent:eo}),t}var Vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},to=Vt(Vr),La=g({},Vr,{view:0,detail:0}),Bw=Vt(La),Yu,Pu,Ia,no=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}}),Op=Vt(no),Lw=g({},no,{dataTransfer:0}),Iw=Vt(Lw),Hw=g({},La,{relatedTarget:0}),Fu=Vt(Hw),qw=g({},Vr,{animationName:0,elapsedTime:0,pseudoElement:0}),Yw=Vt(qw),Pw=g({},Vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fw=Vt(Pw),Vw=g({},Vr,{data:0}),zp=Vt(Vw),Gw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xw={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"},Zw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zw[e])?!!t[e]:!1}function Vu(){return Kw}var Qw=g({},La,{key:function(e){if(e.key){var t=Gw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$l(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xw[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"?$l(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$l(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jw=Vt(Qw),Ww=g({},no,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mp=Vt(Ww),$w=g({},La,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vu}),e2=Vt($w),t2=g({},Vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),n2=Vt(t2),r2=g({},no,{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}),i2=Vt(r2),a2=g({},Vr,{newState:0,oldState:0}),l2=Vt(a2),o2=[9,13,27,32],Gu=Pn&&"CompositionEvent"in window,Ha=null;Pn&&"documentMode"in document&&(Ha=document.documentMode);var s2=Pn&&"TextEvent"in window&&!Ha,Dp=Pn&&(!Gu||Ha&&8<Ha&&11>=Ha),jp=" ",Up=!1;function Bp(e,t){switch(e){case"keyup":return o2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ai=!1;function u2(e,t){switch(e){case"compositionend":return Lp(t);case"keypress":return t.which!==32?null:(Up=!0,jp);case"textInput":return e=t.data,e===jp&&Up?null:e;default:return null}}function c2(e,t){if(Ai)return e==="compositionend"||!Gu&&Bp(e,t)?(e=Rp(),Wl=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 Dp&&t.locale!=="ko"?null:t.data;default:return null}}var f2={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 Ip(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!f2[e.type]:t==="textarea"}function Hp(e,t,r,a){Ti?ki?ki.push(a):ki=[a]:Ti=a,t=Go(t,"onChange"),0<t.length&&(r=new to("onChange","change",null,r,a),e.push({event:r,listeners:t}))}var qa=null,Ya=null;function d2(e){_0(e,0)}function ro(e){var t=ja(e);if(Ep(t))return e}function qp(e,t){if(e==="change")return t}var Yp=!1;if(Pn){var Xu;if(Pn){var Zu="oninput"in document;if(!Zu){var Pp=document.createElement("div");Pp.setAttribute("oninput","return;"),Zu=typeof Pp.oninput=="function"}Xu=Zu}else Xu=!1;Yp=Xu&&(!document.documentMode||9<document.documentMode)}function Fp(){qa&&(qa.detachEvent("onpropertychange",Vp),Ya=qa=null)}function Vp(e){if(e.propertyName==="value"&&ro(Ya)){var t=[];Hp(t,Ya,e,Lu(e)),Ap(d2,t)}}function h2(e,t,r){e==="focusin"?(Fp(),qa=t,Ya=r,qa.attachEvent("onpropertychange",Vp)):e==="focusout"&&Fp()}function m2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ro(Ya)}function p2(e,t){if(e==="click")return ro(t)}function g2(e,t){if(e==="input"||e==="change")return ro(t)}function y2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:y2;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 Gp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xp(e,t){var r=Gp(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=Gp(r)}}function Zp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ql(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=Ql(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 b2=Pn&&"documentMode"in document&&11>=document.documentMode,Ri=null,Qu=null,Fa=null,Ju=!1;function Qp(e,t,r){var a=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ju||Ri==null||Ri!==Ql(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=Go(Qu,"onSelect"),0<a.length&&(t=new to("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={},Jp={};Pn&&(Jp=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 Jp)return Wu[e]=t[r];return e}var Wp=Xr("animationend"),$p=Xr("animationiteration"),eg=Xr("animationstart"),v2=Xr("transitionrun"),S2=Xr("transitionstart"),E2=Xr("transitioncancel"),tg=Xr("transitionend"),ng=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){ng.set(e,t),Fr(t,[e])}var io=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 ao(){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&&rg(r,f,m)}}function lo(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 lo(e,t,r,a),oo(e)}function Zr(e,t){return lo(e,null,null,t),oo(e)}function rg(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 oo(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 _2(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 _2(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 ig(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 so(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=kC(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 L:return e=tn(13,r,t,f),e.elementType=L,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 B: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 ag(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 lg=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var r=lg.get(e);return r!==void 0?r:(t={value:e,source:t,stack:U(t)},lg.set(e,t),t)}return{value:e,source:t,stack:U(t)}}var Mi=[],Di=0,uo=null,Va=0,gn=[],yn=0,mr=null,Dn=1,jn="";function Vn(e,t){Mi[Di++]=Va,Mi[Di++]=uo,uo=e,Va=t}function og(e,t,r){gn[yn++]=Dn,gn[yn++]=jn,gn[yn++]=mr,mr=e;var a=Dn;e=jn;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,Dn=1<<32-Fe(t)+f|r<<f|a,jn=m+e}else Dn=1<<m|r<<f|a,jn=e}function ac(e){e.return!==null&&(Vn(e,1),og(e,1,0))}function lc(e){for(;e===uo;)uo=Mi[--Di],Mi[Di]=null,Va=Mi[--Di],Mi[Di]=null;for(;e===mr;)mr=gn[--yn],gn[yn]=null,jn=gn[--yn],gn[yn]=null,Dn=gn[--yn],gn[yn]=null}function sg(e,t){gn[yn++]=Dn,gn[yn++]=jn,gn[yn++]=mr,Dn=t.id,jn=t.overflow,mr=e}var zt=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 ug(e){var t=e.stateNode,r=e.type,a=e.memoizedProps;switch(t[Ot]=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),_p(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),wp(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||T0(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 cg(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:zt=zt.return}}function ji(e){if(e!==zt)return!1;if(!Qe)return cg(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),cg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));dt=j0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));dt=j0(e)}else t===27?(t=dt,Nr(e.type)?(e=Of,Of=null,dt=e):dt=t):dt=zt?Sn(e.stateNode.nextSibling):null;return!0}function Qr(){dt=zt=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=R(null),Jr=null,Gn=null;function yr(e,t,r){A(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 N=m;m=f;for(var Y=0;Y<t.length;Y++)if(N.context===t[Y]){m.lanes|=r,N=m.alternate,N!==null&&(N.lanes|=r),cc(m.return,r,e),a||(S=null);break e}m=N.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 N=f.type;en(f.pendingProps.value,S.value)||(e!==null?e.push(N):e=[N])}}else if(f===_e.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 co(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 Mt(e){return fg(Jr,e)}function fo(e,t){return Jr===null&&Wr(e),fg(e,t)}function fg(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 x2=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()})}},w2=n.unstable_scheduleCallback,C2=n.unstable_NormalPriority,_t={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dc(){return{controller:new x2,data:new Map,refCount:0}}function Xa(e){e.refCount--,e.refCount===0&&w2(C2,function(){e.controller.abort()})}var Za=null,hc=0,Bi=0,Li=null;function T2(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(dg,dg),t}function dg(){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 k2(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 hg=F.S;F.S=function(e,t){Qy=Ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&T2(e,t),hg!==null&&hg(e,t)};var $r=R(null);function mc(){var e=$r.current;return e!==null?e:ut.pooledCache}function ho(e,t){t===null?A($r,$r.current):A($r,t.pool)}function mg(){var e=mc();return e===null?null:{parent:_t._currentValue,pool:e}}var Ii=Error(o(460)),pc=Error(o(474)),mo=Error(o(542)),po={then:function(){}};function pg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gg(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,bg(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,bg(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 yg(){if(ti===null)throw Error(o(459));var e=ti;return ti=null,e}function bg(e){if(e===Ii||e===mo)throw Error(o(483))}var Hi=null,Ka=0;function go(e){var t=Ka;return Ka+=1,Hi===null&&(Hi=[]),gg(Hi,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yo(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 vg(e){function t(J,X){if(e){var te=J.deletions;te===null?(J.deletions=[X],J.flags|=16):te.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,te){return J.index=te,e?(te=J.alternate,te!==null?(te=te.index,te<X?(J.flags|=67108866,X):te):(J.flags|=67108866,X)):(J.flags|=1048576,X)}function S(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function N(J,X,te,pe){return X===null||X.tag!==6?(X=rc(te,J.mode,pe),X.return=J,X):(X=f(X,te),X.return=J,X)}function Y(J,X,te,pe){var ze=te.type;return ze===E?he(J,X,te.props.children,pe,te.key):X!==null&&(X.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===P&&ei(ze)===X.type)?(X=f(X,te.props),Qa(X,te),X.return=J,X):(X=so(te.type,te.key,te.props,null,J.mode,pe),Qa(X,te),X.return=J,X)}function re(J,X,te,pe){return X===null||X.tag!==4||X.stateNode.containerInfo!==te.containerInfo||X.stateNode.implementation!==te.implementation?(X=ic(te,J.mode,pe),X.return=J,X):(X=f(X,te.children||[]),X.return=J,X)}function he(J,X,te,pe,ze){return X===null||X.tag!==7?(X=Kr(te,J.mode,pe,ze),X.return=J,X):(X=f(X,te),X.return=J,X)}function ge(J,X,te){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=rc(""+X,J.mode,te),X.return=J,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return te=so(X.type,X.key,X.props,null,J.mode,te),Qa(te,X),te.return=J,te;case C:return X=ic(X,J.mode,te),X.return=J,X;case P:return X=ei(X),ge(J,X,te)}if(G(X)||D(X))return X=Kr(X,J.mode,te,null),X.return=J,X;if(typeof X.then=="function")return ge(J,go(X),te);if(X.$$typeof===O)return ge(J,fo(J,X),te);yo(J,X)}return null}function le(J,X,te,pe){var ze=X!==null?X.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return ze!==null?null:N(J,X,""+te,pe);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case b:return te.key===ze?Y(J,X,te,pe):null;case C:return te.key===ze?re(J,X,te,pe):null;case P:return te=ei(te),le(J,X,te,pe)}if(G(te)||D(te))return ze!==null?null:he(J,X,te,pe,null);if(typeof te.then=="function")return le(J,X,go(te),pe);if(te.$$typeof===O)return le(J,X,fo(J,te),pe);yo(J,te)}return null}function se(J,X,te,pe,ze){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return J=J.get(te)||null,N(X,J,""+pe,ze);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return J=J.get(pe.key===null?te:pe.key)||null,Y(X,J,pe,ze);case C:return J=J.get(pe.key===null?te:pe.key)||null,re(X,J,pe,ze);case P:return pe=ei(pe),se(J,X,te,pe,ze)}if(G(pe)||D(pe))return J=J.get(te)||null,he(X,J,pe,ze,null);if(typeof pe.then=="function")return se(J,X,te,go(pe),ze);if(pe.$$typeof===O)return se(J,X,te,fo(X,pe),ze);yo(X,pe)}return null}function Ae(J,X,te,pe){for(var ze=null,$e=null,Oe=X,qe=X=0,Ke=null;Oe!==null&&qe<te.length;qe++){Oe.index>qe?(Ke=Oe,Oe=null):Ke=Oe.sibling;var et=le(J,Oe,te[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===te.length)return r(J,Oe),Qe&&Vn(J,qe),ze;if(Oe===null){for(;qe<te.length;qe++)Oe=ge(J,te[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<te.length;qe++)Ke=se(Oe,J,qe,te[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 De(J,X,te,pe){if(te==null)throw Error(o(151));for(var ze=null,$e=null,Oe=X,qe=X=0,Ke=null,et=te.next();Oe!==null&&!et.done;qe++,et=te.next()){Oe.index>qe?(Ke=Oe,Oe=null):Ke=Oe.sibling;var jr=le(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=te.next())et=ge(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=te.next())et=se(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(LC){return t(J,LC)}),Qe&&Vn(J,qe),ze}function st(J,X,te,pe){if(typeof te=="object"&&te!==null&&te.type===E&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case b:e:{for(var ze=te.key;X!==null;){if(X.key===ze){if(ze=te.type,ze===E){if(X.tag===7){r(J,X.sibling),pe=f(X,te.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,te.props),Qa(pe,te),pe.return=J,J=pe;break e}r(J,X);break}else t(J,X);X=X.sibling}te.type===E?(pe=Kr(te.props.children,J.mode,pe,te.key),pe.return=J,J=pe):(pe=so(te.type,te.key,te.props,null,J.mode,pe),Qa(pe,te),pe.return=J,J=pe)}return S(J);case C:e:{for(ze=te.key;X!==null;){if(X.key===ze)if(X.tag===4&&X.stateNode.containerInfo===te.containerInfo&&X.stateNode.implementation===te.implementation){r(J,X.sibling),pe=f(X,te.children||[]),pe.return=J,J=pe;break e}else{r(J,X);break}else t(J,X);X=X.sibling}pe=ic(te,J.mode,pe),pe.return=J,J=pe}return S(J);case P:return te=ei(te),st(J,X,te,pe)}if(G(te))return Ae(J,X,te,pe);if(D(te)){if(ze=D(te),typeof ze!="function")throw Error(o(150));return te=ze.call(te),De(J,X,te,pe)}if(typeof te.then=="function")return st(J,X,go(te),pe);if(te.$$typeof===O)return st(J,X,fo(J,te),pe);yo(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,X!==null&&X.tag===6?(r(J,X.sibling),pe=f(X,te),pe.return=J,J=pe):(r(J,X),pe=rc(te,J.mode,pe),pe.return=J,J=pe),S(J)):r(J,X)}return function(J,X,te,pe){try{Ka=0;var ze=st(J,X,te,pe);return Hi=null,ze}catch(Oe){if(Oe===Ii||Oe===mo)throw Oe;var $e=tn(29,Oe,null,J.mode);return $e.lanes=pe,$e.return=J,$e}finally{}}}var ni=vg(!0),Sg=vg(!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,(nt&2)!==0){var f=a.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),a.pending=t,t=oo(e),rg(e,null,r),t}return lo(e,a,t,r),oo(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,fp(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,N=f.shared.pending;if(N!==null){f.shared.pending=null;var Y=N,re=Y.next;Y.next=null,S===null?m=re:S.next=re,S=Y;var he=e.alternate;he!==null&&(he=he.updateQueue,N=he.lastBaseUpdate,N!==S&&(N===null?he.firstBaseUpdate=re:N.next=re,he.lastBaseUpdate=Y))}if(m!==null){var ge=f.baseState;S=0,he=re=Y=null,N=m;do{var le=N.lane&-536870913,se=le!==N.lane;if(se?(Ze&le)===le:(a&le)===le){le!==0&&le===Bi&&(vc=!0),he!==null&&(he=he.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Ae=e,De=N;le=t;var st=r;switch(De.tag){case 1:if(Ae=De.payload,typeof Ae=="function"){ge=Ae.call(st,ge,le);break e}ge=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=De.payload,le=typeof Ae=="function"?Ae.call(st,ge,le):Ae,le==null)break e;ge=g({},ge,le);break e;case 2:br=!0}}le=N.callback,le!==null&&(e.flags|=64,se&&(e.flags|=8192),se=f.callbacks,se===null?f.callbacks=[le]:se.push(le))}else se={lane:le,tag:N.tag,payload:N.payload,callback:N.callback,next:null},he===null?(re=he=se,Y=ge):he=he.next=se,S|=le;if(N=N.next,N===null){if(N=f.shared.pending,N===null)break;se=N,N=se.next,se.next=null,f.lastBaseUpdate=se,f.shared.pending=null}}while(!0);he===null&&(Y=ge),f.baseState=Y,f.firstBaseUpdate=re,f.lastBaseUpdate=he,m===null&&(f.shared.lanes=0),Cr|=S,e.lanes=S,e.memoizedState=ge}}function Eg(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function _g(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Eg(r[e],t)}var qi=R(null),bo=R(0);function xg(e,t){e=nr,A(bo,e),A(qi,t),nr=e|t.baseLanes}function Sc(){A(bo,nr),A(qi,qi.current)}function Ec(){nr=bo.current,j(qi),j(bo)}var nn=R(null),vn=null;function Er(e){var t=e.alternate;A(vt,vt.current&1),A(nn,e),vn===null&&(t===null||qi.current!==null||t.memoizedState!==null)&&(vn=e)}function _c(e){A(vt,vt.current),A(nn,e),vn===null&&(vn=e)}function wg(e){e.tag===22?(A(vt,vt.current),A(nn,e),vn===null&&(vn=e)):_r()}function _r(){A(vt,vt.current),A(nn,nn.current)}function rn(e){j(nn),vn===e&&(vn=null),j(vt)}var vt=R(0);function vo(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,xt=null,So=!1,Yi=!1,ri=!1,Eo=0,el=0,Pi=null,A2=0;function yt(){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,F.H=e===null||e.memoizedState===null?oy:Ic,ri=!1,m=r(a,f),ri=!1,Yi&&(m=Tg(t,r,a,f)),Cg(e),m}function Cg(e){F.H=rl;var t=lt!==null&&lt.next!==null;if(Zn=0,xt=lt=Ie=null,So=!1,el=0,Pi=null,t)throw Error(o(300));e===null||wt||(e=e.dependencies,e!==null&&co(e)&&(wt=!0))}function Tg(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,xt=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)}F.H=sy,m=t(r,a)}while(Yi);return m}function R2(){var e=F.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=Eo!==0;return Eo=0,e}function Tc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function kc(e){if(So){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}So=!1}Zn=0,xt=lt=Ie=null,Yi=!1,el=Eo=0,Pi=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?Ie.memoizedState=xt=e:xt=xt.next=e,xt}function St(){if(lt===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=xt===null?Ie.memoizedState:xt.next;if(t!==null)xt=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},xt===null?Ie.memoizedState=xt=e:xt=xt.next=e}return xt}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function tl(e){var t=el;return el+=1,Pi===null&&(Pi=[]),e=gg(Pi,e,t),t=Ie,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?oy:Ic),e}function xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return tl(e);if(e.$$typeof===O)return Mt(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=_o(),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]=oe;return t.index++,r}function Kn(e,t){return typeof t=="function"?t(e):t}function wo(e){var t=St();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 N=S=null,Y=null,re=t,he=!1;do{var ge=re.lane&-536870913;if(ge!==re.lane?(Ze&ge)===ge:(Zn&ge)===ge){var le=re.revertLane;if(le===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),ge===Bi&&(he=!0);else if((Zn&le)===le){re=re.next,le===Bi&&(he=!0);continue}else ge={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},Y===null?(N=Y=ge,S=m):Y=Y.next=ge,Ie.lanes|=le,Cr|=le;ge=re.action,ri&&r(m,ge),m=re.hasEagerState?re.eagerState:r(m,ge)}else le={lane:ge,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},Y===null?(N=Y=le,S=m):Y=Y.next=le,Ie.lanes|=ge,Cr|=ge;re=re.next}while(re!==null&&re!==t);if(Y===null?S=m:Y.next=N,!en(m,e.memoizedState)&&(wt=!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=St(),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)||(wt=!0),t.memoizedState=m,t.baseQueue===null&&(t.baseState=m),r.lastRenderedState=m}return[m,a]}function kg(e,t,r){var a=Ie,f=St(),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,wt=!0),f=f.queue,Mc(Ng.bind(null,a,f,e),[e]),f.getSnapshot!==t||S||xt!==null&&xt.memoizedState.tag&1){if(a.flags|=2048,Fi(9,{destroy:void 0},Rg.bind(null,a,f,r,t),null),ut===null)throw Error(o(349));m||(Zn&127)!==0||Ag(a,t,r)}return r}function Ag(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t=_o(),Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Rg(e,t,r,a){t.value=r,t.getSnapshot=a,Og(t)&&zg(e)}function Ng(e,t,r){return r(function(){Og(t)&&zg(e)})}function Og(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!en(e,r)}catch{return!0}}function zg(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){At(!0);try{r()}finally{At(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function Mg(e,t,r,a){return e.baseState=r,Rc(e,lt,typeof a=="function"?a:Kn)}function N2(e,t,r,a,f){if(ko(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)}};F.T!==null?r(!0):m.isTransition=!1,a(m),r=t.pending,r===null?(m.next=t.pending=m,Dg(t,m)):(m.next=r.next,t.pending=r.next=m)}}function Dg(e,t){var r=t.action,a=t.payload,f=e.state;if(t.isTransition){var m=F.T,S={};F.T=S;try{var N=r(f,a),Y=F.S;Y!==null&&Y(S,N),jg(e,t,N)}catch(re){zc(e,t,re)}finally{m!==null&&S.types!==null&&(m.types=S.types),F.T=m}}else try{m=r(f,a),jg(e,t,m)}catch(re){zc(e,t,re)}}function jg(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(a){Ug(e,t,a)},function(a){return zc(e,t,a)}):Ug(e,t,r)}function Ug(e,t,r){t.status="fulfilled",t.value=r,Bg(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,Dg(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,Bg(t),t=t.next;while(t!==a)}e.action=null}function Bg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lg(e,t){return t}function Ig(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:Lg,lastRenderedState:t},r.queue=a,r=iy.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=N2.bind(null,Ie,f,m,r),f.dispatch=r,a.memoizedState=e,[t,r,!1]}function Hg(e){var t=St();return qg(t,lt,e)}function qg(e,t,r){if(t=Rc(e,t,Lg)[0],e=wo(Kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=tl(t)}catch(S){throw S===Ii?mo:S}else a=t;t=St();var f=t.queue,m=f.dispatch;return r!==t.memoizedState&&(Ie.flags|=2048,Fi(9,{destroy:void 0},O2.bind(null,f,r),null)),[a,m,e]}function O2(e,t){e.action=t}function Yg(e){var t=St(),r=lt;if(r!==null)return qg(t,r,e);St(),t=t.memoizedState,r=St();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=_o(),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 Pg(){return St().memoizedState}function Co(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 To(e,t,r,a){var f=St();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 Fg(e,t){Co(8390656,8,e,t)}function Mc(e,t){To(2048,8,e,t)}function z2(e){Ie.flags|=4;var t=Ie.updateQueue;if(t===null)t=_o(),Ie.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function Vg(e){var t=St().memoizedState;return z2({ref:t,nextImpl:e}),function(){if((nt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Gg(e,t){return To(4,2,e,t)}function Xg(e,t){return To(4,4,e,t)}function Zg(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 Kg(e,t,r){r=r!=null?r.concat([e]):null,To(4,4,Zg.bind(null,t,e),r)}function Dc(){}function Qg(e,t){var r=St();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 Jg(e,t){var r=St();t=t===void 0?null:t;var a=r.memoizedState;if(t!==null&&xc(t,a[1]))return a[0];if(a=e(),ri){At(!0);try{e()}finally{At(!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=Wy(),Ie.lanes|=e,Cr|=e,r)}function Wg(e,t,r,a){return en(r,t)?r:qi.current!==null?(e=jc(e,r,a),en(e,t)||(wt=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(Ze&261930)===0?(wt=!0,e.memoizedState=r):(e=Wy(),Ie.lanes|=e,Cr|=e,t)}function $g(e,t,r,a,f){var m=Z.p;Z.p=m!==0&&8>m?m:8;var S=F.T,N={};F.T=N,Lc(e,!1,t,r);try{var Y=f(),re=F.S;if(re!==null&&re(N,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var he=k2(Y,a);nl(e,t,he,on(e))}else nl(e,t,a,on(e))}catch(ge){nl(e,t,{then:function(){},status:"rejected",reason:ge},on())}finally{Z.p=m,S!==null&&N.types!==null&&(S.types=N.types),F.T=S}}function M2(){}function Uc(e,t,r,a){if(e.tag!==5)throw Error(o(476));var f=ey(e).queue;$g(e,f,t,ie,r===null?M2:function(){return ty(e),r(a)})}function ey(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:ie},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 ty(e){var t=ey(e);t.next===null&&(t=e.alternate.memoizedState),nl(e,t.next.queue,{},on())}function Bc(){return Mt(vl)}function ny(){return St().memoizedState}function ry(){return St().memoizedState}function D2(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 j2(e,t,r){var a=on();r={lane:a,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ko(e)?ay(t,r):(r=tc(e,t,r,a),r!==null&&(Qt(r,e,a),ly(r,t,a)))}function iy(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(ko(e))ay(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,N=m(S,r);if(f.hasEagerState=!0,f.eagerState=N,en(N,S))return lo(e,t,f,0),ut===null&&ao(),!1}catch{}finally{}if(r=tc(e,t,f,a),r!==null)return Qt(r,e,a),ly(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},ko(e)){if(t)throw Error(o(479))}else t=tc(e,r,a,2),t!==null&&Qt(t,e,2)}function ko(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function ay(e,t){Yi=So=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ly(e,t,r){if((r&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,r|=a,t.lanes=r,fp(e,r)}}var rl={readContext:Mt,use:xo,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};rl.useEffectEvent=yt;var oy={readContext:Mt,use:xo,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Fg,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Co(4194308,4,Zg.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Co(4194308,4,e,t)},useInsertionEffect:function(e,t){Co(4,2,e,t)},useMemo:function(e,t){var r=Ht();t=t===void 0?null:t;var a=e();if(ri){At(!0);try{e()}finally{At(!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){At(!0);try{r(t)}finally{At(!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=j2.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=iy.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=$g.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||Ag(a,t,r)}f.memoizedState=r;var m={value:r,getSnapshot:t};return f.queue=m,Fg(Ng.bind(null,a,m,e),[e]),a.flags|=2048,Fi(9,{destroy:void 0},Rg.bind(null,a,m,r,t),null),r},useId:function(){var e=Ht(),t=ut.identifierPrefix;if(Qe){var r=jn,a=Dn;r=(a&~(1<<32-Fe(a)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Eo++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=A2++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bc,useFormState:Ig,useActionState:Ig,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=D2.bind(null,Ie)},useEffectEvent:function(e){var t=Ht(),r={impl:e};return t.memoizedState=r,function(){if((nt&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Ic={readContext:Mt,use:xo,useCallback:Qg,useContext:Mt,useEffect:Mc,useImperativeHandle:Kg,useInsertionEffect:Gg,useLayoutEffect:Xg,useMemo:Jg,useReducer:wo,useRef:Pg,useState:function(){return wo(Kn)},useDebugValue:Dc,useDeferredValue:function(e,t){var r=St();return Wg(r,lt.memoizedState,e,t)},useTransition:function(){var e=wo(Kn)[0],t=St().memoizedState;return[typeof e=="boolean"?e:tl(e),t]},useSyncExternalStore:kg,useId:ny,useHostTransitionStatus:Bc,useFormState:Hg,useActionState:Hg,useOptimistic:function(e,t){var r=St();return Mg(r,lt,e,t)},useMemoCache:Ac,useCacheRefresh:ry};Ic.useEffectEvent=Vg;var sy={readContext:Mt,use:xo,useCallback:Qg,useContext:Mt,useEffect:Mc,useImperativeHandle:Kg,useInsertionEffect:Gg,useLayoutEffect:Xg,useMemo:Jg,useReducer:Nc,useRef:Pg,useState:function(){return Nc(Kn)},useDebugValue:Dc,useDeferredValue:function(e,t){var r=St();return lt===null?jc(r,e,t):Wg(r,lt.memoizedState,e,t)},useTransition:function(){var e=Nc(Kn)[0],t=St().memoizedState;return[typeof e=="boolean"?e:tl(e),t]},useSyncExternalStore:kg,useId:ny,useHostTransitionStatus:Bc,useFormState:Yg,useActionState:Yg,useOptimistic:function(e,t){var r=St();return lt!==null?Mg(r,lt,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Ac,useCacheRefresh:ry};sy.useEffectEvent=Vg;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 uy(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 cy(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 fy(e){io(e)}function dy(e){console.error(e)}function hy(e){io(e)}function Ao(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function my(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(){Ao(e,t)},r}function py(e){return e=vr(e),e.tag=3,e}function gy(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(){my(t,r,a)}}var S=r.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){my(t,r,a),typeof f!="function"&&(Tr===null?Tr=new Set([this]):Tr.add(this));var N=a.stack;this.componentDidCatch(a.value,{componentStack:N!==null?N:""})})}function U2(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?Ho():r.alternate===null&&bt===0&&(bt=3),r.flags&=-257,r.flags|=65536,r.lanes=f,a===po?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===po?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),Ho(),!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),bt!==4&&(bt=2)),!1;var m=Error(o(520),{cause:a});if(m=pn(m,r),fl===null?fl=[m]:fl.push(m),bt!==4&&(bt=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=py(f),gy(f,e,r,a),bc(r,f),!1}r=r.return}while(r!==null);return!1}var Pc=Error(o(461)),wt=!1;function Dt(e,t,r,a){t.child=e===null?Sg(t,null,r,a):ni(t,e.child,r,a)}function yy(e,t,r,a,f){r=r.render;var m=t.ref;if("ref"in a){var S={};for(var N in a)N!=="ref"&&(S[N]=a[N])}else S=a;return Wr(t),a=wc(e,t,r,S,m,f),N=Cc(),e!==null&&!wt?(Tc(e,t,f),Qn(e,t,f)):(Qe&&N&&ac(t),t.flags|=1,Dt(e,t,a,f),t.child)}function by(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,vy(e,t,m,a,f)):(e=so(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 vy(e,t,r,a,f){if(e!==null){var m=e.memoizedProps;if(Pa(m,a)&&e.ref===t.ref)if(wt=!1,t.pendingProps=a=m,Jc(e,f))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,Qn(e,t,f)}return Fc(e,t,r,a,f)}function Sy(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 Ey(e,t,m,r,a)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ho(t,m!==null?m.cachePool:null),m!==null?xg(t,m):Sc(),wg(t);else return a=t.lanes=536870912,Ey(e,t,m!==null?m.baseLanes|r:r,r,a)}else m!==null?(ho(t,m.cachePool),xg(t,m),_r(),t.memoizedState=null):(e!==null&&ho(t,null),Sc(),_r());return Dt(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 Ey(e,t,r,a,f){var m=mc();return m=m===null?null:{parent:_t._currentValue,pool:m},t.memoizedState={baseLanes:r,cachePool:m},e!==null&&ho(t,null),Sc(),wg(t),e!==null&&Ui(e,t,a,!0),t.childLanes=f,null}function Ro(e,t){return t=Oo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _y(e,t,r){return ni(t,e.child,null,r),e=Ro(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function B2(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=Ro(t,a),t.lanes=536870912,il(null,e);if(_c(t),(e=dt)?(e=D0(e,bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mr!==null?{id:Dn,overflow:jn}:null,retryLane:536870912,hydrationErrors:null},r=ag(e),r.return=t,t.child=r,zt=t,dt=null)):e=null,e===null)throw gr(t);return t.lanes=536870912,null}return Ro(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=_y(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(wt||Ui(e,t,r,!1),f=(r&e.childLanes)!==0,wt||f){if(a=ut,a!==null&&(S=dp(a,r),S!==0&&S!==m.retryLane))throw m.retryLane=S,Zr(e,S),Qt(a,e,S),Pc;Ho(),t=_y(e,t,r)}else e=m.treeContext,dt=Sn(S.nextSibling),zt=t,Qe=!0,pr=null,bn=!1,e!==null&&sg(t,e),t=Ro(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 No(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&&!wt?(Tc(e,t,f),Qn(e,t,f)):(Qe&&a&&ac(t),t.flags|=1,Dt(e,t,r,f),t.child)}function xy(e,t,r,a,f,m){return Wr(t),t.updateQueue=null,r=Tg(t,a,r,f),Cg(e),a=Cc(),e!==null&&!wt?(Tc(e,t,m),Qn(e,t,m)):(Qe&&a&&ac(t),t.flags|=1,Dt(e,t,r,m),t.child)}function wy(e,t,r,a,f){if(Wr(t),t.stateNode===null){var m=zi,S=r.contextType;typeof S=="object"&&S!==null&&(m=Mt(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?Mt(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 N=t.memoizedProps,Y=ii(r,N);m.props=Y;var re=m.context,he=r.contextType;S=zi,typeof he=="object"&&he!==null&&(S=Mt(he));var ge=r.getDerivedStateFromProps;he=typeof ge=="function"||typeof m.getSnapshotBeforeUpdate=="function",N=t.pendingProps!==N,he||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(N||re!==S)&&cy(t,m,a,S),br=!1;var le=t.memoizedState;m.state=le,$a(t,a,m,f),Wa(),re=t.memoizedState,N||le!==re||br?(typeof ge=="function"&&(Hc(t,r,ge,a),re=t.memoizedState),(Y=br||uy(t,r,Y,a,le,re,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=re),m.props=a,m.state=re,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,ge=t.pendingProps,le=m.context,re=r.contextType,Y=zi,typeof re=="object"&&re!==null&&(Y=Mt(re)),N=r.getDerivedStateFromProps,(re=typeof N=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ge||le!==Y)&&cy(t,m,a,Y),br=!1,le=t.memoizedState,m.state=le,$a(t,a,m,f),Wa();var se=t.memoizedState;S!==ge||le!==se||br||e!==null&&e.dependencies!==null&&co(e.dependencies)?(typeof N=="function"&&(Hc(t,r,N,a),se=t.memoizedState),(he=br||uy(t,r,he,a,le,se,Y)||e!==null&&e.dependencies!==null&&co(e.dependencies))?(re||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(a,se,Y),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(a,se,Y)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=se),m.props=a,m.state=se,m.context=Y,a=he):(typeof m.componentDidUpdate!="function"||S===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),a=!1)}return m=a,No(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)):Dt(e,t,r,f),t.memoizedState=m.state,e=t.child):e=Qn(e,t,f),e}function Cy(e,t,r,a){return Qr(),t.flags|=256,Dt(e,t,r,a),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:mg()}}function Xc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=ln),e}function Ty(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:(vt.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=D0(e,bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mr!==null?{id:Dn,overflow:jn}:null,retryLane:536870912,hydrationErrors:null},r=ag(e),r.return=t,t.child=r,zt=t,dt=null)):e=null,e===null)throw gr(t);return Nf(e)?t.lanes=32:t.lanes=536870912,null}var N=a.children;return a=a.fallback,f?(_r(),f=t.mode,N=Oo({mode:"hidden",children:N},f),a=Kr(a,f,r,null),N.return=t,a.return=t,N.sibling=a,t.child=N,a=t.child,a.memoizedState=Gc(r),a.childLanes=Xc(e,S,r),t.memoizedState=Vc,il(null,a)):(Er(t),Zc(t,N))}var Y=e.memoizedState;if(Y!==null&&(N=Y.dehydrated,N!==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(),N=a.fallback,f=t.mode,a=Oo({mode:"visible",children:a.children},f),N=Kr(N,f,r,null),N.flags|=2,a.return=t,N.return=t,a.sibling=N,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(N)){if(S=N.nextSibling&&N.nextSibling.dataset,S)var re=S.dgst;S=re,a=Error(o(419)),a.stack="",a.digest=S,Ga({value:a,source:null,stack:null}),t=Kc(e,t,r)}else if(wt||Ui(e,t,r,!1),S=(r&e.childLanes)!==0,wt||S){if(S=ut,S!==null&&(a=dp(S,r),a!==0&&a!==Y.retryLane))throw Y.retryLane=a,Zr(e,a),Qt(S,e,a),Pc;Rf(N)||Ho(),t=Kc(e,t,r)}else Rf(N)?(t.flags|=192,t.child=e.child,t=null):(e=Y.treeContext,dt=Sn(N.nextSibling),zt=t,Qe=!0,pr=null,bn=!1,e!==null&&sg(t,e),t=Zc(t,a.children),t.flags|=4096);return t}return f?(_r(),N=a.fallback,f=t.mode,Y=e.child,re=Y.sibling,a=Fn(Y,{mode:"hidden",children:a.children}),a.subtreeFlags=Y.subtreeFlags&65011712,re!==null?N=Fn(re,N):(N=Kr(N,f,r,null),N.flags|=2),N.return=t,a.return=t,a.sibling=N,t.child=a,il(null,a),a=t.child,N=e.child.memoizedState,N===null?N=Gc(r):(f=N.cachePool,f!==null?(Y=_t._currentValue,f=f.parent!==Y?{parent:Y,pool:Y}:f):f=mg(),N={baseLanes:N.baseLanes|r,cachePool:f}),a.memoizedState=N,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=Oo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Oo(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 ky(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 Ay(e,t,r){var a=t.pendingProps,f=a.revealOrder,m=a.tail;a=a.children;var S=vt.current,N=(S&2)!==0;if(N?(S=S&1|2,t.flags|=128):S&=1,A(vt,S),Dt(e,t,a,r),a=Qe?Va:0,!N&&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(f){case"forwards":for(r=t.child,f=null;r!==null;)e=r.alternate,e!==null&&vo(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&&vo(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&&co(e)))}function L2(e,t,r){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),yr(t,_t,e.memoizedState.cache),Qr();break;case 27:case 5:Me(t);break;case 4:ke(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?Ty(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 Ay(e,t,r);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),A(vt,vt.current),a)break;return null;case 22:return t.lanes=0,Sy(e,t,r,t.pendingProps);case 24:yr(t,_t,e.memoizedState.cache)}return Qn(e,t,r)}function Ry(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!Jc(e,r)&&(t.flags&128)===0)return wt=!1,L2(e,t,r);wt=(e.flags&131072)!==0}else wt=!1,Qe&&(t.flags&1048576)!==0&&og(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=wy(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=yy(null,t,e,a,r);break e}else if(f===B){t.tag=14,t=by(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),wy(e,t,a,f,r);case 3:e:{if(ke(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,_t,a),a!==m.cache&&fc(t,[_t],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=Cy(e,t,a,r);break e}else if(a!==f){f=pn(Error(o(424)),t),Ga(f),t=Cy(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),zt=t,Qe=!0,pr=null,bn=!0,r=Sg(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}Dt(e,t,a,r)}t=t.child}return t;case 26:return No(e,t),e===null?(r=H0(t.type,null,t.pendingProps,null))?t.memoizedState=r:Qe||(r=t.type,e=t.pendingProps,a=Xo(de.current).createElement(r),a[Ot]=t,a[Ft]=e,jt(a,r,e),Rt(a),t.stateNode=a):t.memoizedState=H0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&Qe&&(a=t.stateNode=B0(t.type,t.pendingProps,de.current),zt=t,bn=!0,f=dt,Nr(t.type)?(Of=f,dt=Sn(a.firstChild)):dt=f),Dt(e,t,t.pendingProps.children,r),No(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qe&&((f=a=dt)&&(a=mC(a,t.type,t.pendingProps,bn),a!==null?(t.stateNode=a,zt=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,R2,null,null,r),vl._currentValue=f),No(e,t),Dt(e,t,a,r),t.child;case 6:return e===null&&Qe&&((e=r=dt)&&(r=pC(r,t.pendingProps,bn),r!==null?(t.stateNode=r,zt=t,dt=null,e=!0):e=!1),e||gr(t)),null;case 13:return Ty(e,t,r);case 4:return ke(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ni(t,null,a,r):Dt(e,t,a,r),t.child;case 11:return yy(e,t,t.type,t.pendingProps,r);case 7:return Dt(e,t,t.pendingProps,r),t.child;case 8:return Dt(e,t,t.pendingProps.children,r),t.child;case 12:return Dt(e,t,t.pendingProps.children,r),t.child;case 10:return a=t.pendingProps,yr(t,t.type,a.value),Dt(e,t,a.children,r),t.child;case 9:return f=t.type._context,a=t.pendingProps.children,Wr(t),f=Mt(f),a=a(f),t.flags|=1,Dt(e,t,a,r),t.child;case 14:return by(e,t,t.type,t.pendingProps,r);case 15:return vy(e,t,t.type,t.pendingProps,r);case 19:return Ay(e,t,r);case 31:return B2(e,t,r);case 22:return Sy(e,t,r,t.pendingProps);case 24:return Wr(t),a=Mt(_t),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,_t,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,_t,a)):(a=m.cache,yr(t,_t,a),a!==f.cache&&fc(t,[_t],r,!0))),Dt(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(n0())e.flags|=8192;else throw ti=po,pc}else e.flags&=-16777217}function Ny(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!V0(t))if(n0())e.flags|=8192;else throw ti=po,pc}function zo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?up():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 I2(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(_t),Te(),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),Ny(t,m)):(ht(t),Wc(t,f,null,a,r))):m?m!==e.memoizedState?(Jn(t),ht(t),Ny(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(Be(t),r=de.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)?ug(t):(e=B0(f,a,r),t.stateNode=e,Jn(t))}return ht(t),null;case 5:if(Be(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))ug(t);else{var S=Xo(de.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[Ot]=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(jt(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=de.current,ji(t)){if(e=t.stateNode,r=t.memoizedProps,a=null,f=zt,f!==null)switch(f.tag){case 27:case 5:a=f.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===r||a!==null&&a.suppressHydrationWarning===!0||T0(e.nodeValue,r)),e||gr(t,!0)}else e=Xo(e).createTextNode(a),e[Ot]=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[Ot]=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[Ot]=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),zo(t,t.updateQueue),ht(t),null);case 4:return Te(),e===null&&Ef(t.stateNode.containerInfo),ht(t),null;case 10:return Xn(t.type),ht(t),null;case 19:if(j(vt),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(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(m=vo(e),m!==null){for(t.flags|=128,al(a,!1),e=m.updateQueue,t.updateQueue=e,zo(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)ig(r,e),r=r.sibling;return A(vt,vt.current&1|2),Qe&&Vn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ce()>Bo&&(t.flags|=128,f=!0,al(a,!1),t.lanes=4194304)}else{if(!f)if(e=vo(m),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,zo(t,e),al(a,!0),a.tail===null&&a.tailMode==="hidden"&&!m.alternate&&!Qe)return ht(t),null}else 2*Ce()-a.renderingStartTime>Bo&&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=vt.current,A(vt,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&&zo(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(_t),ht(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function H2(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(_t),Te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Be(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(vt),null;case 4:return Te(),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(_t),null;case 25:return null;default:return null}}function Oy(e,t){switch(lc(t),t.tag){case 3:Xn(_t),Te();break;case 26:case 27:case 5:Be(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:j(vt);break;case 10:Xn(t.type);break;case 22:case 23:rn(t),Ec(),e!==null&&j($r);break;case 24:Xn(_t)}}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(N){it(t,t.return,N)}}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,N=S.destroy;if(N!==void 0){S.destroy=void 0,f=t;var Y=r,re=N;try{re()}catch(he){it(f,Y,he)}}}a=a.next}while(a!==m)}}catch(he){it(t,t.return,he)}}function zy(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{_g(t,r)}catch(a){it(e,e.return,a)}}}function My(e,t,r){r.props=ii(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(a){it(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){it(e,t,f)}}function Un(e,t){var r=e.ref,a=e.refCleanup;if(r!==null)if(typeof a=="function")try{a()}catch(f){it(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){it(e,t,f)}else r.current=null}function Dy(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){it(e,e.return,f)}}function $c(e,t,r){try{var a=e.stateNode;sC(a,e.type,r,t),a[Ft]=t}catch(f){it(e,e.return,f)}}function jy(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||jy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&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 Mo(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(Mo(e,t,r),e=e.sibling;e!==null;)Mo(e,t,r),e=e.sibling}function Uy(e){var t=e.stateNode,r=e.memoizedProps;try{for(var a=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);jt(t,a,r),t[Ot]=e,t[Ft]=r}catch(m){it(e,e.return,m)}}var Wn=!1,Ct=!1,nf=!1,By=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function q2(e,t){if(e=e.containerInfo,wf=es,e=Kp(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,N=-1,Y=-1,re=0,he=0,ge=e,le=null;t:for(;;){for(var se;ge!==r||f!==0&&ge.nodeType!==3||(N=S+f),ge!==m||a!==0&&ge.nodeType!==3||(Y=S+a),ge.nodeType===3&&(S+=ge.nodeValue.length),(se=ge.firstChild)!==null;)le=ge,ge=se;for(;;){if(ge===e)break t;if(le===r&&++re===f&&(N=S),le===m&&++he===a&&(Y=S),(se=ge.nextSibling)!==null)break;ge=le,le=ge.parentNode}ge=se}r=N===-1||Y===-1?null:{start:N,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(Cf={focusedElem:e,selectionRange:r},es=!1,Nt=t;Nt!==null;)if(t=Nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Nt=e;else for(;Nt!==null;){switch(t=Nt,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(De){it(r,r.return,De)}}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,Nt=e;break}Nt=t.return}}function Ly(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){it(r,r.return,S)}else{var f=ii(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(S){it(r,r.return,S)}}a&64&&zy(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{_g(e,t)}catch(S){it(r,r.return,S)}}break;case 27:t===null&&a&4&&Uy(r);case 26:case 5:er(e,r),t===null&&a&4&&Dy(r),a&512&&ol(r,r.return);break;case 12:er(e,r);break;case 31:er(e,r),a&4&&qy(e,r);break;case 13:er(e,r),a&4&&Yy(e,r),a&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=Q2.bind(null,r),gC(e,r))));break;case 22:if(a=r.memoizedState!==null||Wn,!a){t=t!==null&&t.memoizedState!==null||Ct,f=Wn;var m=Ct;Wn=a,(Ct=t)&&!m?tr(e,r,(r.subtreeFlags&8772)!==0):er(e,r),Wn=f,Ct=m}break;case 30:break;default:er(e,r)}}function Iy(e){var t=e.alternate;t!==null&&(e.alternate=null,Iy(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;)Hy(e,t,r),r=r.sibling}function Hy(e,t,r){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Pe,r)}catch{}switch(r.tag){case 26:Ct||Un(r,t),$n(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Ct||Un(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:Ct||Un(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){it(r,t,m)}else try{gt.removeChild(r.stateNode)}catch(m){it(r,t,m)}break;case 18:gt!==null&&(Gt?(e=gt,z0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),na(e)):z0(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),Ct||xr(4,r,t),$n(e,t,r);break;case 1:Ct||(Un(r,t),a=r.stateNode,typeof a.componentWillUnmount=="function"&&My(r,t,a)),$n(e,t,r);break;case 21:$n(e,t,r);break;case 22:Ct=(a=Ct)||r.memoizedState!==null,$n(e,t,r),Ct=a;break;default:$n(e,t,r)}}function qy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{na(e)}catch(r){it(t,t.return,r)}}}function Yy(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){it(t,t.return,r)}}function Y2(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new By),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new By),t;default:throw Error(o(435,e.tag))}}function Do(e,t){var r=Y2(e);t.forEach(function(a){if(!r.has(a)){r.add(a);var f=J2.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,N=S;e:for(;N!==null;){switch(N.tag){case 27:if(Nr(N.type)){gt=N.stateNode,Gt=!1;break e}break;case 5:gt=N.stateNode,Gt=!1;break e;case 3:case 4:gt=N.stateNode.containerInfo,Gt=!0;break e}N=N.return}if(gt===null)throw Error(o(160));Hy(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;)Py(t,e),t=t.sibling}var Cn=null;function Py(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&&(Ct||r===null||Un(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&&(Ct||r===null||Un(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[Ot]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(a),f.head.insertBefore(m,f.querySelector("head > title"))),jt(m,a,r),m[Ot]=e,Rt(m),a=m;break e;case"link":var S=P0("link","href",f).get(a+(r.href||""));if(S){for(var N=0;N<S.length;N++)if(m=S[N],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(N,1);break t}}m=f.createElement(a),jt(m,a,r),f.head.appendChild(m);break;case"meta":if(S=P0("meta","content",f).get(a+(r.content||""))){for(N=0;N<S.length;N++)if(m=S[N],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(N,1);break t}}m=f.createElement(a),jt(m,a,r),f.head.appendChild(m);break;default:throw Error(o(468,a))}m[Ot]=e,Rt(m),a=m}e.stateNode=a}else F0(f,e.type,e.stateNode);else e.stateNode=Y0(f,a,e.memoizedProps);else m!==a?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,a===null?F0(f,e.type,e.stateNode):Y0(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&&(Ct||r===null||Un(r,r.return)),r!==null&&a&4&&$c(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Xt(t,e),Zt(e),a&512&&(Ct||r===null||Un(r,r.return)),e.flags&32){f=e.stateNode;try{Ci(f,"")}catch(Ae){it(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){it(e,e.return,Ae)}}break;case 3:if(Qo=null,f=Cn,Cn=Zo(t.containerInfo),Xt(t,e),Cn=f,Zt(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{na(t.containerInfo)}catch(Ae){it(e,e.return,Ae)}nf&&(nf=!1,Fy(e));break;case 4:a=Cn,Cn=Zo(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,Do(e,a)));break;case 13:Xt(t,e),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Uo=Ce()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Do(e,a)));break;case 22:f=e.memoizedState!==null;var Y=r!==null&&r.memoizedState!==null,re=Wn,he=Ct;if(Wn=re||f,Ct=he||Y,Xt(t,e),Ct=he,Wn=re,Zt(e),a&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(r===null||Y||Wn||Ct||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{N=Y.stateNode;var ge=Y.memoizedProps.style,le=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;N.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Ae){it(Y,Y.return,Ae)}}}else if(t.tag===6){if(r===null){Y=t;try{Y.stateNode.nodeValue=f?"":Y.memoizedProps}catch(Ae){it(Y,Y.return,Ae)}}}else if(t.tag===18){if(r===null){Y=t;try{var se=Y.stateNode;f?M0(se,!0):M0(Y.stateNode,!1)}catch(Ae){it(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,Do(e,r))));break;case 19:Xt(t,e),Zt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Do(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(jy(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);Mo(e,m,f);break;case 5:var S=r.stateNode;r.flags&32&&(Ci(S,""),r.flags&=-33);var N=ef(e);Mo(e,N,S);break;case 3:case 4:var Y=r.stateNode.containerInfo,re=ef(e);tf(e,re,Y);break;default:throw Error(o(161))}}catch(he){it(e,e.return,he)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fy(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;)Ly(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:Un(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&My(t,t.return,r),ai(t);break;case 27:gl(t.stateNode);case 26:case 5:Un(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(re){it(a,a.return,re)}if(a=m,f=a.updateQueue,f!==null){var N=a.stateNode;try{var Y=f.shared.hiddenCallbacks;if(Y!==null)for(f.shared.hiddenCallbacks=null,f=0;f<Y.length;f++)Eg(Y[f],N)}catch(re){it(a,a.return,re)}}r&&S&64&&zy(m),ol(m,m.return);break;case 27:Uy(m);case 26:case 5:tr(f,m,r),r&&a===null&&S&4&&Dy(m),ol(m,m.return);break;case 12:tr(f,m,r);break;case 31:tr(f,m,r),r&&S&4&&qy(f,m);break;case 13:tr(f,m,r),r&&S&4&&Yy(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;)Vy(e,t,r,a),t=t.sibling}function Vy(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,N=m.onPostCommit;typeof N=="function"&&N(S,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){it(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,N=r,Y=a,re=S.flags;switch(S.tag){case 0:case 11:case 15:Vi(m,S,N,Y,f),ll(8,S);break;case 23:break;case 22:var he=S.stateNode;S.memoizedState!==null?he._visibility&2?Vi(m,S,N,Y,f):sl(m,S):(he._visibility|=2,Vi(m,S,N,Y,f)),f&&re&2048&&rf(S.alternate,S);break;case 24:Vi(m,S,N,Y,f),f&&re&2048&&af(S.alternate,S);break;default:Vi(m,S,N,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;)Gy(e,t,r),e=e.sibling}function Gy(e,t,r){switch(e.tag){case 26:Gi(e,t,r),e.flags&ul&&e.memoizedState!==null&&AC(r,Cn,e.memoizedState,e.memoizedProps);break;case 5:Gi(e,t,r);break;case 3:case 4:var a=Cn;Cn=Zo(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 Xy(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];Nt=a,Ky(a,e)}Xy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zy(e),e=e.sibling}function Zy(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,jo(e)):cl(e);break;default:cl(e)}}function jo(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];Nt=a,Ky(a,e)}Xy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xr(8,t,t.return),jo(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,jo(t));break;default:jo(t)}e=e.sibling}}function Ky(e,t){for(;Nt!==null;){var r=Nt;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,Nt=a;else e:for(r=e;Nt!==null;){a=Nt;var f=a.sibling,m=a.return;if(Iy(a),a===r){Nt=null;break e}if(f!==null){f.return=m,Nt=f;break e}Nt=m}}}var P2={getCacheForType:function(e){var t=Mt(_t),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Mt(_t).controller.signal}},F2=typeof WeakMap=="function"?WeakMap:Map,nt=0,ut=null,Ve=null,Ze=0,rt=0,an=null,wr=!1,Xi=!1,lf=!1,nr=0,bt=0,Cr=0,li=0,of=0,ln=0,Zi=0,fl=null,Kt=null,sf=!1,Uo=0,Qy=0,Bo=1/0,Lo=null,Tr=null,kt=0,kr=null,Ki=null,rr=0,uf=0,cf=null,Jy=null,dl=0,ff=null;function on(){return(nt&2)!==0&&Ze!==0?Ze&-Ze:F.T!==null?yf():hp()}function Wy(){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&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(Qi(e,0),Ar(e,Ze,ln,!1)),Ma(e,r),((nt&2)===0||e!==ut)&&(e===ut&&((nt&2)===0&&(li|=r),bt===4&&Ar(e,Ze,ln,!1)),Bn(e))}function $y(e,t,r){if((nt&6)!==0)throw Error(o(327));var a=!r&&(t&127)===0&&(t&e.expiredLanes)===0||za(e,t),f=a?X2(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&&!V2(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 N=e;f=fl;var Y=N.current.memoizedState.isDehydrated;if(Y&&(Qi(N,S).flags|=256),S=hf(N,S,!1),S!==2){if(lf&&!Y){N.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=Uo+300-Ce(),10<f)){if(Ar(a,t,ln,!wr),Xl(a,0,!0)!==0)break e;rr=t,a.timeoutHandle=N0(e0.bind(null,a,r,Kt,Lo,sf,t,ln,li,Zi,wr,m,"Throttled",-0,0),f);break e}e0(a,r,Kt,Lo,sf,t,ln,li,Zi,wr,m,null,-0,0)}}break}while(!0);Bn(e)}function e0(e,t,r,a,f,m,S,N,Y,re,he,ge,le,se){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Gy(t,m,ge);var Ae=(m&62914560)===m?Uo-Ce():(m&4194048)===m?Qy-Ce():0;if(Ae=RC(ge,Ae),Ae!==null){rr=m,e.cancelPendingCommit=Ae(s0.bind(null,e,t,m,r,a,f,S,N,Y,he,ge,null,le,se)),Ar(e,m,S,!re);return}}s0(e,t,m,r,a,f,S,N,Y)}function V2(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&&cp(e,r,t)}function Io(){return(nt&6)===0?(hl(0),!1):!0}function df(){if(Ve!==null){if(rt===0)var e=Ve.return;else e=Ve,Gn=Jr=null,kc(e),Hi=null,Ka=0,e=Ve;for(;e!==null;)Oy(e.alternate,e),e=e.return;Ve=null}}function Qi(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,fC(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),rr=0,df(),ut=e,Ve=r=Fn(e.current,null),Ze=t,rt=0,an=null,wr=!1,Xi=za(e,t),lf=!1,Zi=ln=of=li=Cr=bt=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,ao(),r}function t0(e,t){Ie=null,F.H=rl,t===Ii||t===mo?(t=yg(),rt=3):t===pc?(t=yg(),rt=4):rt=t===Pc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,an=t,Ve===null&&(bt=1,Ao(e,pn(t,e.current)))}function n0(){var e=nn.current;return e===null?!0:(Ze&4194048)===Ze?vn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===vn:!1}function r0(){var e=F.H;return F.H=rl,e===null?rl:e}function i0(){var e=F.A;return F.A=P2,e}function Ho(){bt=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=nt;nt|=2;var f=r0(),m=i0();(ut!==e||Ze!==t)&&(Lo=null,Qi(e,t)),t=!1;var S=bt;e:do try{if(rt!==0&&Ve!==null){var N=Ve,Y=an;switch(rt){case 8:df(),S=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(t=!0);var re=rt;if(rt=0,an=null,Ji(e,N,Y,re),r&&Xi){S=0;break e}break;default:re=rt,rt=0,an=null,Ji(e,N,Y,re)}}G2(),S=bt;break}catch(he){t0(e,he)}while(!0);return t&&e.shellSuspendCounter++,Gn=Jr=null,nt=a,F.H=f,F.A=m,Ve===null&&(ut=null,Ze=0,ao()),S}function G2(){for(;Ve!==null;)a0(Ve)}function X2(e,t){var r=nt;nt|=2;var a=r0(),f=i0();ut!==e||Ze!==t?(Lo=null,Bo=Ce()+500,Qi(e,t)):Xi=za(e,t);e:do try{if(rt!==0&&Ve!==null){t=Ve;var m=an;t:switch(rt){case 1:rt=0,an=null,Ji(e,t,m,1);break;case 2:case 9:if(pg(m)){rt=0,an=null,l0(t);break}t=function(){rt!==2&&rt!==9||ut!==e||(rt=7),Bn(e)},m.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:pg(m)?(rt=0,an=null,l0(t)):(rt=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 N=Ve;if(S?V0(S):N.stateNode.complete){rt=0,an=null;var Y=N.sibling;if(Y!==null)Ve=Y;else{var re=N.return;re!==null?(Ve=re,qo(re)):Ve=null}break t}}rt=0,an=null,Ji(e,t,m,5);break;case 6:rt=0,an=null,Ji(e,t,m,6);break;case 8:df(),bt=6;break e;default:throw Error(o(462))}}Z2();break}catch(he){t0(e,he)}while(!0);return Gn=Jr=null,F.H=a,F.A=f,nt=r,Ve!==null?0:(ut=null,Ze=0,ao(),bt)}function Z2(){for(;Ve!==null&&!ae();)a0(Ve)}function a0(e){var t=Ry(e.alternate,e,nr);e.memoizedProps=e.pendingProps,t===null?qo(e):Ve=t}function l0(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=xy(r,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=xy(r,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:kc(t);default:Oy(r,t),t=Ve=ig(t,nr),t=Ry(r,t,nr)}e.memoizedProps=e.pendingProps,t===null?qo(e):Ve=t}function Ji(e,t,r,a){Gn=Jr=null,kc(t),Hi=null,Ka=0;var f=t.return;try{if(U2(e,f,t,r,Ze)){bt=1,Ao(e,pn(r,e.current)),Ve=null;return}}catch(m){if(f!==null)throw Ve=f,m;bt=1,Ao(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))),o0(t,e)):qo(t)}function qo(e){var t=e;do{if((t.flags&32768)!==0){o0(t,wr);return}e=t.return;var r=I2(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);bt===0&&(bt=5)}function o0(e,t){do{var r=H2(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);bt=6,Ve=null}function s0(e,t,r,a,f,m,S,N,Y){e.cancelPendingCommit=null;do Yo();while(kt!==0);if((nt&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,kw(e,r,m,S,N,Y),e===ut&&(Ve=ut=null,Ze=0),Ki=t,kr=e,rr=r,uf=m,cf=f,Jy=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,W2(we,function(){return h0(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=F.T,F.T=null,f=Z.p,Z.p=2,S=nt,nt|=4;try{q2(e,t,r)}finally{nt=S,Z.p=f,F.T=a}}kt=1,u0(),c0(),f0()}}function u0(){if(kt===1){kt=0;var e=kr,t=Ki,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=F.T,F.T=null;var a=Z.p;Z.p=2;var f=nt;nt|=4;try{Py(t,e);var m=Cf,S=Kp(e.containerInfo),N=m.focusedElem,Y=m.selectionRange;if(S!==N&&N&&N.ownerDocument&&Zp(N.ownerDocument.documentElement,N)){if(Y!==null&&Ku(N)){var re=Y.start,he=Y.end;if(he===void 0&&(he=re),"selectionStart"in N)N.selectionStart=re,N.selectionEnd=Math.min(he,N.value.length);else{var ge=N.ownerDocument||document,le=ge&&ge.defaultView||window;if(le.getSelection){var se=le.getSelection(),Ae=N.textContent.length,De=Math.min(Y.start,Ae),st=Y.end===void 0?De:Math.min(Y.end,Ae);!se.extend&&De>st&&(S=st,st=De,De=S);var J=Xp(N,De),X=Xp(N,st);if(J&&X&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==X.node||se.focusOffset!==X.offset)){var te=ge.createRange();te.setStart(J.node,J.offset),se.removeAllRanges(),De>st?(se.addRange(te),se.extend(X.node,X.offset)):(te.setEnd(X.node,X.offset),se.addRange(te))}}}}for(ge=[],se=N;se=se.parentNode;)se.nodeType===1&&ge.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ge.length;N++){var pe=ge[N];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}es=!!wf,Cf=wf=null}finally{nt=f,Z.p=a,F.T=r}}e.current=t,kt=2}}function c0(){if(kt===2){kt=0;var e=kr,t=Ki,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=F.T,F.T=null;var a=Z.p;Z.p=2;var f=nt;nt|=4;try{Ly(e,t.alternate,t)}finally{nt=f,Z.p=a,F.T=r}}kt=3}}function f0(){if(kt===4||kt===3){kt=0,Ee();var e=kr,t=Ki,r=rr,a=Jy;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?kt=5:(kt=0,Ki=kr=null,d0(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=F.T,f=Z.p,Z.p=2,F.T=null;try{for(var m=e.onRecoverableError,S=0;S<a.length;S++){var N=a[S];m(N.value,{componentStack:N.stack})}}finally{F.T=t,Z.p=f}}(rr&3)!==0&&Yo(),Bn(e),f=e.pendingLanes,(r&261930)!==0&&(f&42)!==0?e===ff?dl++:(dl=0,ff=e):dl=0,hl(0)}}function d0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xa(t)))}function Yo(){return u0(),c0(),f0(),h0()}function h0(){if(kt!==5)return!1;var e=kr,t=uf;uf=0;var r=Nu(rr),a=F.T,f=Z.p;try{Z.p=32>r?32:r,F.T=null,r=cf,cf=null;var m=kr,S=rr;if(kt=0,Ki=kr=null,rr=0,(nt&6)!==0)throw Error(o(331));var N=nt;if(nt|=4,Zy(m.current),Vy(m,m.current,S,r),nt=N,hl(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Pe,m)}catch{}return!0}finally{Z.p=f,F.T=a,d0(e,t)}}function m0(e,t,r){t=pn(r,t),t=Yc(e.stateNode,t,2),e=Sr(e,t,2),e!==null&&(Ma(e,2),Bn(e))}function it(e,t,r){if(e.tag===3)m0(e,e,r);else for(;t!==null;){if(t.tag===3){m0(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=py(2),a=Sr(t,r,2),a!==null&&(gy(r,a,t,e),Ma(a,2),Bn(a));break}}t=t.return}}function mf(e,t,r){var a=e.pingCache;if(a===null){a=e.pingCache=new F2;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=K2.bind(null,e,t,r),t.then(e,e))}function K2(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&&(bt===4||bt===3&&(Ze&62914560)===Ze&&300>Ce()-Uo?(nt&2)===0&&Qi(e,0):of|=r,Zi===Ze&&(Zi=0)),Bn(e)}function p0(e,t){t===0&&(t=up()),e=Zr(e,t),e!==null&&(Ma(e,t),Bn(e))}function Q2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),p0(e,r)}function J2(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),p0(e,r)}function W2(e,t){return ye(e,t)}var Po=null,Wi=null,pf=!1,Fo=!1,gf=!1,Rr=0;function Bn(e){e!==Wi&&e.next===null&&(Wi===null?Po=Wi=e:Wi=Wi.next=e),Fo=!0,pf||(pf=!0,eC())}function hl(e,t){if(!gf&&Fo){gf=!0;do for(var r=!1,a=Po;a!==null;){if(e!==0){var f=a.pendingLanes;if(f===0)var m=0;else{var S=a.suspendedLanes,N=a.pingedLanes;m=(1<<31-Fe(42|e)+1)-1,m&=f&~(S&~N),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,v0(a,m))}else m=Ze,m=Xl(a,a===ut?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(m&3)===0||za(a,m)||(r=!0,v0(a,m));a=a.next}while(r);gf=!1}}function $2(){g0()}function g0(){Fo=pf=!1;var e=0;Rr!==0&&cC()&&(e=Rr);for(var t=Ce(),r=null,a=Po;a!==null;){var f=a.next,m=y0(a,t);m===0?(a.next=null,r===null?Po=f:r.next=f,f===null&&(Wi=r)):(r=a,(e!==0||(m&3)!==0)&&(Fo=!0)),a=f}kt!==0&&kt!==5||hl(e),Rr!==0&&(Rr=0)}function y0(e,t){for(var r=e.suspendedLanes,a=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var S=31-Fe(m),N=1<<S,Y=f[S];Y===-1?((N&r)===0||(N&a)!==0)&&(f[S]=Tw(N,t)):Y<=t&&(e.expiredLanes|=N),m&=~N}if(t=ut,r=Ze,r=Xl(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,r===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ve(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&&ve(a),Nu(r)){case 2:case 8:r=be;break;case 32:r=we;break;case 268435456:r=Xe;break;default:r=we}return a=b0.bind(null,e),r=ye(r,a),e.callbackPriority=t,e.callbackNode=r,t}return a!==null&&a!==null&&ve(a),e.callbackPriority=2,e.callbackNode=null,2}function b0(e,t){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Yo()&&e.callbackNode!==r)return null;var a=Ze;return a=Xl(e,e===ut?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:($y(e,a,t),y0(e,Ce()),e.callbackNode!=null&&e.callbackNode===r?b0.bind(null,e):null)}function v0(e,t){if(Yo())return null;$y(e,t,!0)}function eC(){dC(function(){(nt&6)!==0?ye(W,$2):g0()})}function yf(){if(Rr===0){var e=Bi;e===0&&(e=bi,bi<<=1,(bi&261888)===0&&(bi=256)),Rr=e}return Rr}function S0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jl(""+e)}function E0(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 tC(e,t,r,a,f){if(t==="submit"&&r&&r.stateNode===f){var m=S0((f[Ft]||null).action),S=a.submitter;S&&(t=(t=S[Ft]||null)?S0(t.formAction):S.getAttribute("formAction"),t!==null&&(m=t,S=null));var N=new to("action","action",null,a,f);e.push({event:N,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Rr!==0){var Y=S?E0(f,S):new FormData(f);Uc(r,{pending:!0,data:Y,method:f.method,action:m},null,Y)}}else typeof m=="function"&&(N.preventDefault(),Y=S?E0(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],nC=vf.toLowerCase(),rC=vf[0].toUpperCase()+vf.slice(1);wn(nC,"on"+rC)}wn(Wp,"onAnimationEnd"),wn($p,"onAnimationIteration"),wn(eg,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(v2,"onTransitionRun"),wn(S2,"onTransitionStart"),wn(E2,"onTransitionCancel"),wn(tg,"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(" "),iC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function _0(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 N=a[S],Y=N.instance,re=N.currentTarget;if(N=N.listener,Y!==m&&f.isPropagationStopped())break e;m=N,f.currentTarget=re;try{m(f)}catch(he){io(he)}f.currentTarget=null,m=Y}else for(S=0;S<a.length;S++){if(N=a[S],Y=N.instance,re=N.currentTarget,N=N.listener,Y!==m&&f.isPropagationStopped())break e;m=N,f.currentTarget=re;try{m(f)}catch(he){io(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)||(x0(t,e,2,!1),r.add(a))}function Sf(e,t,r){var a=0;t&&(a|=4),x0(r,e,a,t)}var Vo="_reactListening"+Math.random().toString(36).slice(2);function Ef(e){if(!e[Vo]){e[Vo]=!0,gp.forEach(function(r){r!=="selectionchange"&&(iC.has(r)||Sf(r,!1,e),Sf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vo]||(t[Vo]=!0,Sf("selectionchange",!1,t))}}function x0(e,t,r,a){switch(W0(t)){case 2:var f=zC;break;case 8:f=MC;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 N=a.stateNode.containerInfo;if(N===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(;N!==null;){if(S=Si(N),S===null)return;if(Y=S.tag,Y===5||Y===6||Y===26||Y===27){a=m=S;continue e}N=N.parentNode}}a=a.return}Ap(function(){var re=m,he=Lu(r),ge=[];e:{var le=ng.get(e);if(le!==void 0){var se=to,Ae=e;switch(e){case"keypress":if($l(r)===0)break e;case"keydown":case"keyup":se=Jw;break;case"focusin":Ae="focus",se=Fu;break;case"focusout":Ae="blur",se=Fu;break;case"beforeblur":case"afterblur":se=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":se=Op;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=Iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=e2;break;case Wp:case $p:case eg:se=Yw;break;case tg:se=n2;break;case"scroll":case"scrollend":se=Bw;break;case"wheel":se=i2;break;case"copy":case"cut":case"paste":se=Fw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=Mp;break;case"toggle":case"beforetoggle":se=l2}var De=(t&4)!==0,st=!De&&(e==="scroll"||e==="scrollend"),J=De?le!==null?le+"Capture":null:le;De=[];for(var X=re,te;X!==null;){var pe=X;if(te=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||te===null||J===null||(pe=Ua(X,J),pe!=null&&De.push(pl(X,pe,te))),st)break;X=X.return}0<De.length&&(le=new se(le,Ae,null,r,he),ge.push({event:le,listeners:De}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",se=e==="mouseout"||e==="pointerout",le&&r!==Bu&&(Ae=r.relatedTarget||r.fromElement)&&(Si(Ae)||Ae[vi]))break e;if((se||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,se?(Ae=r.relatedTarget||r.toElement,se=re,Ae=Ae?Si(Ae):null,Ae!==null&&(st=s(Ae),De=Ae.tag,Ae!==st||De!==5&&De!==27&&De!==6)&&(Ae=null)):(se=null,Ae=re),se!==Ae)){if(De=Op,pe="onMouseLeave",J="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(De=Mp,pe="onPointerLeave",J="onPointerEnter",X="pointer"),st=se==null?le:ja(se),te=Ae==null?le:ja(Ae),le=new De(pe,X+"leave",se,r,he),le.target=st,le.relatedTarget=te,pe=null,Si(he)===re&&(De=new De(J,X+"enter",Ae,r,he),De.target=te,De.relatedTarget=st,pe=De),st=pe,se&&Ae)t:{for(De=aC,J=se,X=Ae,te=0,pe=J;pe;pe=De(pe))te++;pe=0;for(var ze=X;ze;ze=De(ze))pe++;for(;0<te-pe;)J=De(J),te--;for(;0<pe-te;)X=De(X),pe--;for(;te--;){if(J===X||X!==null&&J===X.alternate){De=J;break t}J=De(J),X=De(X)}De=null}else De=null;se!==null&&w0(ge,le,se,De,!1),Ae!==null&&st!==null&&w0(ge,st,Ae,De,!0)}}e:{if(le=re?ja(re):window,se=le.nodeName&&le.nodeName.toLowerCase(),se==="select"||se==="input"&&le.type==="file")var $e=qp;else if(Ip(le))if(Yp)$e=g2;else{$e=m2;var Oe=h2}else se=le.nodeName,!se||se.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?re&&Uu(re.elementType)&&($e=qp):$e=p2;if($e&&($e=$e(e,re))){Hp(ge,$e,r,he);break e}Oe&&Oe(e,le,re),e==="focusout"&&re&&le.type==="number"&&re.memoizedProps.value!=null&&ju(le,"number",le.value)}switch(Oe=re?ja(re):window,e){case"focusin":(Ip(Oe)||Oe.contentEditable==="true")&&(Ri=Oe,Qu=re,Fa=null);break;case"focusout":Fa=Qu=Ri=null;break;case"mousedown":Ju=!0;break;case"contextmenu":case"mouseup":case"dragend":Ju=!1,Qp(ge,r,he);break;case"selectionchange":if(b2)break;case"keydown":case"keyup":Qp(ge,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?Bp(e,r)&&(Ke="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ke="onCompositionStart");Ke&&(Dp&&r.locale!=="ko"&&(Ai||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ai&&(qe=Rp()):(hr=he,qu="value"in hr?hr.value:hr.textContent,Ai=!0)),Oe=Go(re,Ke),0<Oe.length&&(Ke=new zp(Ke,e,null,r,he),ge.push({event:Ke,listeners:Oe}),qe?Ke.data=qe:(qe=Lp(r),qe!==null&&(Ke.data=qe)))),(qe=s2?u2(e,r):c2(e,r))&&(Ke=Go(re,"onBeforeInput"),0<Ke.length&&(Oe=new zp("onBeforeInput","beforeinput",null,r,he),ge.push({event:Oe,listeners:Ke}),Oe.data=qe)),tC(ge,e,re,r,he)}_0(ge,t)})}function pl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Go(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 aC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function w0(e,t,r,a,f){for(var m=t._reactName,S=[];r!==null&&r!==a;){var N=r,Y=N.alternate,re=N.stateNode;if(N=N.tag,Y!==null&&Y===a)break;N!==5&&N!==26&&N!==27||re===null||(Y=re,f?(re=Ua(r,m),re!=null&&S.unshift(pl(r,re,Y))):f||(re=Ua(r,m),re!=null&&S.push(pl(r,re,Y)))),r=r.return}S.length!==0&&e.push({event:t,listeners:S})}var lC=/\r\n?/g,oC=/\u0000|\uFFFD/g;function C0(e){return(typeof e=="string"?e:""+e).replace(lC,`
9
- `).replace(oC,"")}function T0(e,t){return t=C0(t),C0(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":Kl(e,"class",a);break;case"tabIndex":Kl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Kl(e,r,a);break;case"style":Tp(e,a,m);break;case"data":if(t!=="object"){Kl(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=Jl(""+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=Jl(""+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=Jl(""+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),Zl(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":Zl(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=jw.get(r)||r,Zl(e,r,a))}}function xf(e,t,r,a,f,m){switch(r){case"style":Tp(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(!yp.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,""):Zl(e,r,a)}}}function jt(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 N=m=S=f=null,Y=null,re=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":re=he;break;case"value":m=he;break;case"defaultValue":N=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(o(137,t));break;default:ot(e,t,a,he,r,null)}}_p(e,m,N,Y,re,S,f,!1);return;case"select":Ge("invalid",e),a=S=m=null;for(f in r)if(r.hasOwnProperty(f)&&(N=r[f],N!=null))switch(f){case"value":m=N;break;case"defaultValue":S=N;break;case"multiple":a=N;default:ot(e,t,f,N,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)&&(N=r[S],N!=null))switch(S){case"value":a=N;break;case"defaultValue":f=N;break;case"children":m=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(o(91));break;default:ot(e,t,S,N,r,null)}wp(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(re in r)if(r.hasOwnProperty(re)&&(a=r[re],a!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ot(e,t,re,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(N in r)r.hasOwnProperty(N)&&(a=r[N],a!=null&&ot(e,t,N,a,r,null))}function sC(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,N=null,Y=null,re=null,he=null;for(se in r){var ge=r[se];if(r.hasOwnProperty(se)&&ge!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":Y=ge;default:a.hasOwnProperty(se)||ot(e,t,se,null,a,ge)}}for(var le in a){var se=a[le];if(ge=r[le],a.hasOwnProperty(le)&&(se!=null||ge!=null))switch(le){case"type":m=se;break;case"name":f=se;break;case"checked":re=se;break;case"defaultChecked":he=se;break;case"value":S=se;break;case"defaultValue":N=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:se!==ge&&ot(e,t,le,se,a,ge)}}Du(e,S,N,Y,re,he,m,f);return;case"select":se=S=N=le=null;for(m in r)if(Y=r[m],r.hasOwnProperty(m)&&Y!=null)switch(m){case"value":break;case"multiple":se=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":le=m;break;case"defaultValue":N=m;break;case"multiple":S=m;default:m!==Y&&ot(e,t,f,m,a,Y)}t=N,r=S,a=se,le!=null?wi(e,!!r,le,!1):!!a!=!!r&&(t!=null?wi(e,!!r,t,!0):wi(e,!!r,r?[]:"",!1));return;case"textarea":se=le=null;for(N in r)if(f=r[N],r.hasOwnProperty(N)&&f!=null&&!a.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:ot(e,t,N,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":le=f;break;case"defaultValue":se=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)}xp(e,le,se);return;case"option":for(var Ae in r)if(le=r[Ae],r.hasOwnProperty(Ae)&&le!=null&&!a.hasOwnProperty(Ae))switch(Ae){case"selected":e.selected=!1;break;default:ot(e,t,Ae,null,a,le)}for(Y in a)if(le=a[Y],se=r[Y],a.hasOwnProperty(Y)&&le!==se&&(le!=null||se!=null))switch(Y){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:ot(e,t,Y,le,a,se)}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 De in r)le=r[De],r.hasOwnProperty(De)&&le!=null&&!a.hasOwnProperty(De)&&ot(e,t,De,null,a,le);for(re in a)if(le=a[re],se=r[re],a.hasOwnProperty(re)&&le!==se&&(le!=null||se!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:ot(e,t,re,le,a,se)}return;default:if(Uu(t)){for(var st in r)le=r[st],r.hasOwnProperty(st)&&le!==void 0&&!a.hasOwnProperty(st)&&xf(e,t,st,void 0,a,le);for(he in a)le=a[he],se=r[he],!a.hasOwnProperty(he)||le===se||le===void 0&&se===void 0||xf(e,t,he,le,a,se);return}}for(var J in r)le=r[J],r.hasOwnProperty(J)&&le!=null&&!a.hasOwnProperty(J)&&ot(e,t,J,null,a,le);for(ge in a)le=a[ge],se=r[ge],!a.hasOwnProperty(ge)||le===se||le==null&&se==null||ot(e,t,ge,le,a,se)}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 uC(){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,N=f.duration;if(m&&N&&k0(S)){for(S=0,N=f.responseEnd,a+=1;a<r.length;a++){var Y=r[a],re=Y.startTime;if(re>N)break;var he=Y.transferSize,ge=Y.initiatorType;he&&k0(ge)&&(Y=Y.responseEnd,S+=he*(Y<N?1:(N-re)/(Y-re)))}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 Xo(e){return e.nodeType===9?e:e.ownerDocument}function A0(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 R0(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 cC(){var e=window.event;return e&&e.type==="popstate"?e===kf?!1:(kf=e,!0):(kf=null,!1)}var N0=typeof setTimeout=="function"?setTimeout:void 0,fC=typeof clearTimeout=="function"?clearTimeout:void 0,O0=typeof Promise=="function"?Promise:void 0,dC=typeof queueMicrotask=="function"?queueMicrotask:typeof O0<"u"?function(e){return O0.resolve(null).then(e).catch(hC)}:N0;function hC(e){setTimeout(function(){throw e})}function Nr(e){return e==="head"}function z0(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,N=m.nodeName;m[Da]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=S}}else r==="body"&&gl(e.ownerDocument.body);r=f}while(r);na(t)}function M0(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 mC(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 pC(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 D0(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 gC(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 j0(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 U0(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 B0(e,t,r){switch(t=Xo(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,L0=new Set;function Zo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ir=Z.d;Z.d={f:yC,r:bC,D:vC,C:SC,L:EC,m:_C,X:wC,S:xC,M:CC};function yC(){var e=ir.f(),t=Io();return e||t}function bC(e){var t=Ei(e);t!==null&&t.tag===5&&t.type==="form"?ty(t):ir.r(e)}var $i=typeof document>"u"?null:document;function I0(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+'"]'),L0.has(f)||(L0.add(f),e={rel:e,crossOrigin:r,href:t},a.querySelector(f)===null&&(t=a.createElement("link"),jt(t,"link",e),Rt(t),a.head.appendChild(t)))}}function vC(e){ir.D(e),I0("dns-prefetch",e,null)}function SC(e,t){ir.C(e,t),I0("preconnect",e,t)}function EC(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"),jt(t,"link",e),Rt(t),a.head.appendChild(t)))}}function _C(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"),jt(a,"link",e),Rt(a),r.head.appendChild(a)}}}function xC(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 N={loading:0,preload:null};if(S=a.querySelector(yl(m)))N.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");Rt(Y),jt(Y,"link",e),Y._p=new Promise(function(re,he){Y.onload=re,Y.onerror=he}),Y.addEventListener("load",function(){N.loading|=1}),Y.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Ko(S,t,a)}S={type:"stylesheet",instance:S,count:1,state:N},f.set(m,S)}}}function wC(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"),Rt(m),jt(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(f,m))}}function CC(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"),Rt(m),jt(m,"link",e),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},a.set(f,m))}}function H0(e,t,r,a){var f=(f=de.current)?Zo(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||TC(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 q0(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function TC(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}),jt(t,"link",r),Rt(t),e.head.appendChild(t))}function ta(e){return'[src="'+hn(e)+'"]'}function bl(e){return"script[async]"+e}function Y0(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,Rt(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"),Rt(a),jt(a,"style",f),Ko(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,Rt(m),m;a=q0(r),(f=En.get(f))&&zf(a,f),m=(e.ownerDocument||e).createElement("link"),Rt(m);var S=m;return S._p=new Promise(function(N,Y){S.onload=N,S.onerror=Y}),jt(m,"link",a),t.state.loading|=4,Ko(m,r.precedence,e),t.instance=m;case"script":return m=ta(r.src),(f=e.querySelector(bl(m)))?(t.instance=f,Rt(f),f):(a=r,(f=En.get(m))&&(a=g({},r),Mf(a,f)),e=e.ownerDocument||e,f=e.createElement("script"),Rt(f),jt(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,Ko(a,r.precedence,e));return t.instance}function Ko(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 N=a[S];if(N.dataset.precedence===t)m=N;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 Qo=null;function P0(e,t,r){if(Qo===null){var a=new Map,f=Qo=new Map;f.set(r,a)}else f=Qo,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[Ot]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(t)||"";S=e+S;var N=a.get(S);N?N.push(m):a.set(S,[m])}}return a}function F0(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function kC(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 V0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function AC(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=Jo.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=m,Rt(m);return}m=t.ownerDocument||t,a=q0(a),(f=En.get(f))&&zf(a,f),m=m.createElement("link"),Rt(m);var S=m;S._p=new Promise(function(N,Y){S.onload=N,S.onerror=Y}),jt(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=Jo.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Df=0;function RC(e,t){return e.stylesheets&&e.count===0&&$o(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var a=setTimeout(function(){if(e.stylesheets&&$o(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+t);0<e.imgBytes&&Df===0&&(Df=62500*uC());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$o(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 Jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$o(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wo=null;function $o(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wo=new Map,t.forEach(NC,e),Wo=null,Jo.call(e))}function NC(e,t){if(!(t.state.loading&4)){var r=Wo.get(e);if(r)var a=r.get(null);else{r=new Map,Wo.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=Jo.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:ie,_currentValue2:ie,_threadCount:0};function OC(e,t,r,a,f,m,S,N,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 G0(e,t,r,a,f,m,S,N,Y,re,he,ge){return e=new OC(e,t,r,S,Y,re,he,ge,N),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 X0(e){return e?(e=zi,e):zi}function Z0(e,t,r,a,f,m){f=X0(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 K0(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){K0(e,t),(e=e.alternate)&&K0(e,t)}function Q0(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&Qt(t,e,67108864),jf(e,67108864)}}function J0(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 es=!0;function zC(e,t,r,a){var f=F.T;F.T=null;var m=Z.p;try{Z.p=2,Uf(e,t,r,a)}finally{Z.p=m,F.T=f}}function MC(e,t,r,a){var f=F.T;F.T=null;var m=Z.p;try{Z.p=8,Uf(e,t,r,a)}finally{Z.p=m,F.T=f}}function Uf(e,t,r,a){if(es){var f=Bf(a);if(f===null)_f(e,t,a,ts,r),$0(e,a);else if(jC(f,e,t,r,a))a.stopPropagation();else if($0(e,a),t&4&&-1<DC.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 N=m;for(N.pendingLanes|=2,N.entangledLanes|=2;S;){var Y=1<<31-Fe(S);N.entanglements[1]|=Y,S&=~Y}Bn(m),(nt&6)===0&&(Bo=Ce()+500,hl(0))}}break;case 31:case 13:N=Zr(m,2),N!==null&&Qt(N,m,2),Io(),jf(m,2)}if(m=Bf(a),m===null&&_f(e,t,a,ts,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 ts=null;function Lf(e){if(ts=null,e=Si(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=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 ts=e,null}function W0(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 be:return 8;case we:case je: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=[],DC="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 $0(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&&Q0(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function jC(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 eb(e){var t=Si(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,mp(e.priority,function(){J0(r)});return}}else if(t===31){if(t=d(r),t!==null){e.blockedOn=t,mp(e.priority,function(){J0(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 ns(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&&Q0(t),e.blockedOn=r,!1;t.shift()}return!0}function tb(e,t,r){ns(e)&&r.delete(t)}function UC(){If=!1,Or!==null&&ns(Or)&&(Or=null),zr!==null&&ns(zr)&&(zr=null),Mr!==null&&ns(Mr)&&(Mr=null),Sl.forEach(tb),El.forEach(tb)}function rs(e,t){e.blockedOn===t&&(e.blockedOn=null,If||(If=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,UC)))}var is=null;function nb(e){is!==e&&(is=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){is===e&&(is=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 rs(Y,e)}Or!==null&&rs(Or,e),zr!==null&&rs(zr,e),Mr!==null&&rs(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);)eb(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||nb(r);else if(S){var N=null;if(m&&m.hasAttribute("formAction")){if(f=m,S=m[Ft]||null)N=S.formAction;else if(Lf(f)!==null)continue}else N=S.action;typeof N=="function"?r[a+1]=N:(r.splice(a,3),a-=3),nb(r)}}}function rb(){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}as.prototype.render=Hf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,a=on();Z0(r,a,e,t,null,null)},as.prototype.unmount=Hf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Z0(e.current,2,null,e,null,null),Io(),t[vi]=null}};function as(e){this._internalRoot=e}as.prototype.unstable_scheduleHydration=function(e){if(e){var t=hp();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&&eb(e)}};var ib=l.version;if(ib!=="19.2.0")throw Error(o(527,ib,"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 BC={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ls.isDisabled&&ls.supportsFiber)try{Pe=ls.inject(BC),pt=ls}catch{}}return aa.createRoot=function(e,t){if(!u(e))throw Error(o(299));var r=!1,a="",f=fy,m=dy,S=hy;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=G0(e,1,!1,null,null,r,a,null,f,m,S,rb),e[vi]=t.current,Ef(e),new Hf(t)},aa.hydrateRoot=function(e,t,r){if(!u(e))throw Error(o(299));var a=!1,f="",m=fy,S=dy,N=hy,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&&(N=r.onRecoverableError),r.formState!==void 0&&(Y=r.formState)),t=G0(e,1,!0,t,r??null,a,f,Y,m,S,N,rb),t.context=X0(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),Bn(t),e[vi]=t.current,Ef(e),new as(t)},aa.version="19.2.0",aa}var Wf;function hb(){if(Wf)return fs.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(),fs.exports=db(),fs.exports}var mb=hb();Qf();function $f(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function ps(...n){return l=>{let i=!1;const o=n.map(u=>{const s=$f(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():$f(n[u],null)}}}}function Ln(...n){return K.useCallback(ps(...n),n)}function pb(n){const l=gb(n),i=K.forwardRef((o,u)=>{const{children:s,...c}=o,d=K.Children.toArray(s),h=d.find(bb);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 V.jsx(l,{...c,ref:u,children:K.isValidElement(p)?K.cloneElement(p,void 0,y):null})}return V.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}function gb(n){const l=K.forwardRef((i,o)=>{const{children:u,...s}=i;if(K.isValidElement(u)){const c=Sb(u),d=vb(s,u.props);return u.type!==K.Fragment&&(d.ref=o?ps(o,c):c),K.cloneElement(u,d)}return K.Children.count(u)>1?K.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var yb=Symbol("radix.slottable");function bb(n){return K.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===yb}function vb(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]=(...d)=>{const h=s(...d);return u(...d),h}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].filter(Boolean).join(" "))}return{...n,...i}}function Sb(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 Eb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ar=Eb.reduce((n,l)=>{const i=pb(`Primitive.${l}`),o=K.forwardRef((u,s)=>{const{asChild:c,...d}=u,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),V.jsx(h,{...d,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),lr=globalThis?.document?K.useLayoutEffect:()=>{};function _b(n,l){return K.useReducer((i,o)=>l[i][o]??i,n)}var oi=n=>{const{present:l,children:i}=n,o=xb(l),u=typeof i=="function"?i({present:o.isPresent}):K.Children.only(i),s=Ln(o.ref,wb(u));return typeof i=="function"||o.isPresent?K.cloneElement(u,{ref:s}):null};oi.displayName="Presence";function xb(n){const[l,i]=K.useState(),o=K.useRef(null),u=K.useRef(n),s=K.useRef("none"),c=n?"mounted":"unmounted",[d,h]=_b(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return K.useEffect(()=>{const p=Cl(o.current);s.current=d==="mounted"?p:"none"},[d]),lr(()=>{const p=o.current,y=u.current;if(y!==n){const v=s.current,b=Cl(p);n?h("MOUNT"):b==="none"||p?.display==="none"?h("UNMOUNT"):h(y&&v!==b?"ANIMATION_OUT":"UNMOUNT"),u.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"),!u.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&&(s.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 wb(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(s,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 V.jsx(E.Provider,{value:T,children:b})};p.displayName=s+"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 \`${s}\``)}return[p,y]}const u=()=>{const s=i.map(c=>K.createContext(c));return function(d){const h=d?.[n]||s;return K.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])}};return u.scopeName=n,[o,Cb(u,...l)]}function Cb(...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((d,{useScope:h,scopeName:p})=>{const g=h(s)[`__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 Tb=K.createContext(void 0);function kb(n){const l=K.useContext(Tb);return n||l||"ltr"}function Ab(n,[l,i]){return Math.min(i,Math.max(l,n))}function In(n,l,{checkForDefaultPrevented:i=!0}={}){return function(u){if(n?.(u),i===!1||!u.defaultPrevented)return l?.(u)}}function Rb(n,l){return K.useReducer((i,o)=>l[i][o]??i,n)}var gs="ScrollArea",[td]=ed(gs),[Nb,sn]=td(gs),nd=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,type:o="hover",dir:u,scrollHideDelay:s=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),[L,z]=K.useState(!1),[B,P]=K.useState(!1),q=Ln(l,ce=>h(ce)),oe=kb(u);return V.jsx(Nb,{scope:i,type:o,dir:oe,scrollHideDelay:s,scrollArea:d,viewport:p,onViewportChange:y,content:g,onContentChange:v,scrollbarX:b,onScrollbarXChange:C,scrollbarXEnabled:L,onScrollbarXEnabledChange:z,scrollbarY:E,onScrollbarYChange:T,scrollbarYEnabled:B,onScrollbarYEnabledChange:P,onCornerWidthChange:k,onCornerHeightChange:H,children:V.jsx(ar.div,{dir:oe,...c,ref:q,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":O+"px",...n.style}})})});nd.displayName=gs;var rd="ScrollAreaViewport",id=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,children:o,nonce:u,...s}=n,c=sn(rd,i),d=K.useRef(null),h=Ln(l,d,c.onViewportChange);return V.jsxs(V.Fragment,{children:[V.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}),V.jsx(ar.div,{"data-radix-scroll-area-viewport":"",...s,ref:h,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...n.style},children:V.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});id.displayName=rd;var kn="ScrollAreaScrollbar",ys=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=sn(kn,n.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=u,d=n.orientation==="horizontal";return K.useEffect(()=>(d?s(!0):c(!0),()=>{d?s(!1):c(!1)}),[d,s,c]),u.type==="hover"?V.jsx(Ob,{...o,ref:l,forceMount:i}):u.type==="scroll"?V.jsx(zb,{...o,ref:l,forceMount:i}):u.type==="auto"?V.jsx(ad,{...o,ref:l,forceMount:i}):u.type==="always"?V.jsx(bs,{...o,ref:l}):null});ys.displayName=kn;var Ob=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=sn(kn,n.__scopeScrollArea),[s,c]=K.useState(!1);return K.useEffect(()=>{const d=u.scrollArea;let h=0;if(d){const p=()=>{window.clearTimeout(h),c(!0)},y=()=>{h=window.setTimeout(()=>c(!1),u.scrollHideDelay)};return d.addEventListener("pointerenter",p),d.addEventListener("pointerleave",y),()=>{window.clearTimeout(h),d.removeEventListener("pointerenter",p),d.removeEventListener("pointerleave",y)}}},[u.scrollArea,u.scrollHideDelay]),V.jsx(oi,{present:i||s,children:V.jsx(ad,{"data-state":s?"visible":"hidden",...o,ref:l})})}),zb=K.forwardRef((n,l)=>{const{forceMount:i,...o}=n,u=sn(kn,n.__scopeScrollArea),s=n.orientation==="horizontal",c=Rl(()=>h("SCROLL_END"),100),[d,h]=Rb("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"),u.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,u.scrollHideDelay,h]),K.useEffect(()=>{const p=u.viewport,y=s?"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)}},[u.viewport,s,h,c]),V.jsx(oi,{present:i||d!=="hidden",children:V.jsx(bs,{"data-state":d==="hidden"?"hidden":"visible",...o,ref:l,onPointerEnter:In(n.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:In(n.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),ad=K.forwardRef((n,l)=>{const i=sn(kn,n.__scopeScrollArea),{forceMount:o,...u}=n,[s,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),V.jsx(oi,{present:o||s,children:V.jsx(bs,{"data-state":s?"visible":"hidden",...u,ref:l})})}),bs=K.forwardRef((n,l)=>{const{orientation:i="vertical",...o}=n,u=sn(kn,n.__scopeScrollArea),s=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=>s.current=v,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:v=>c.current=v};function g(v,b){return Lb(v,c.current,d,b)}return i==="horizontal"?V.jsx(Mb,{...y,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollLeft,b=fd(v,d,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=g(v,u.dir))}}):i==="vertical"?V.jsx(Db,{...y,ref:l,onThumbPositionChange:()=>{if(u.viewport&&s.current){const v=u.viewport.scrollTop,b=fd(v,d);s.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:v=>{u.viewport&&(u.viewport.scrollTop=v)},onDragScroll:v=>{u.viewport&&(u.viewport.scrollTop=g(v))}}):null}),Mb=K.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=sn(kn,n.__scopeScrollArea),[c,d]=K.useState(),h=K.useRef(null),p=Ln(l,h,s.onScrollbarXChange);return K.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),V.jsx(od,{"data-orientation":"horizontal",...u,ref:p,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":Al(i)+"px",...n.style},onThumbPointerDown:y=>n.onThumbPointerDown(y.x),onDragScroll:y=>n.onDragScroll(y.x),onWheelScroll:(y,g)=>{if(s.viewport){const v=s.viewport.scrollLeft+y.deltaX;n.onWheelScroll(v),hd(v,g)&&y.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:kl(c.paddingLeft),paddingEnd:kl(c.paddingRight)}})}})}),Db=K.forwardRef((n,l)=>{const{sizes:i,onSizesChange:o,...u}=n,s=sn(kn,n.__scopeScrollArea),[c,d]=K.useState(),h=K.useRef(null),p=Ln(l,h,s.onScrollbarYChange);return K.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),V.jsx(od,{"data-orientation":"vertical",...u,ref:p,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":Al(i)+"px",...n.style},onThumbPointerDown:y=>n.onThumbPointerDown(y.y),onDragScroll:y=>n.onDragScroll(y.y),onWheelScroll:(y,g)=>{if(s.viewport){const v=s.viewport.scrollTop+y.deltaY;n.onWheelScroll(v),hd(v,g)&&y.preventDefault()}},onResize:()=>{h.current&&s.viewport&&c&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:kl(c.paddingTop),paddingEnd:kl(c.paddingBottom)}})}})}),[jb,ld]=td(kn),od=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:u,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:d,onThumbPositionChange:h,onDragScroll:p,onWheelScroll:y,onResize:g,...v}=n,b=sn(kn,i),[C,E]=K.useState(null),T=Ln(l,q=>E(q)),_=K.useRef(null),k=K.useRef(""),O=b.viewport,H=o.content-o.viewport,L=or(y),z=or(h),B=Rl(g,10);function P(q){if(_.current){const oe=q.clientX-_.current.left,ce=q.clientY-_.current.top;p({x:oe,y:ce})}}return K.useEffect(()=>{const q=oe=>{const ce=oe.target;C?.contains(ce)&&L(oe,H)};return document.addEventListener("wheel",q,{passive:!1}),()=>document.removeEventListener("wheel",q,{passive:!1})},[O,C,H,L]),K.useEffect(z,[o,z]),si(C,B),si(b.content,B),V.jsx(jb,{scope:i,scrollbar:C,hasThumb:u,onThumbChange:or(s),onThumbPointerUp:or(c),onThumbPositionChange:z,onThumbPointerDown:or(d),children:V.jsx(ar.div,{...v,ref:T,style:{position:"absolute",...v.style},onPointerDown:In(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:In(n.onPointerMove,P),onPointerUp:In(n.onPointerUp,q=>{const oe=q.target;oe.hasPointerCapture(q.pointerId)&&oe.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,u=ld(Tl,n.__scopeScrollArea);return V.jsx(oi,{present:i||u.hasThumb,children:V.jsx(Ub,{ref:l,...o})})}),Ub=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,style:o,...u}=n,s=sn(Tl,i),c=ld(Tl,i),{onThumbPositionChange:d}=c,h=Ln(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=s.viewport;if(g){const v=()=>{if(y(),!p.current){const b=Ib(g,d);p.current=b,d()}};return d(),g.addEventListener("scroll",v),()=>g.removeEventListener("scroll",v)}},[s.viewport,y,d]),V.jsx(ar.div,{"data-state":c.hasThumb?"visible":"hidden",...u,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:In(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:In(n.onPointerUp,c.onThumbPointerUp)})});sd.displayName=Tl;var vs="ScrollAreaCorner",ud=K.forwardRef((n,l)=>{const i=sn(vs,n.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?V.jsx(Bb,{...n,ref:l}):null});ud.displayName=vs;var Bb=K.forwardRef((n,l)=>{const{__scopeScrollArea:i,...o}=n,u=sn(vs,i),[s,c]=K.useState(0),[d,h]=K.useState(0),p=!!(s&&d);return si(u.scrollbarX,()=>{const y=u.scrollbarX?.offsetHeight||0;u.onCornerHeightChange(y),h(y)}),si(u.scrollbarY,()=>{const y=u.scrollbarY?.offsetWidth||0;u.onCornerWidthChange(y),c(y)}),p?V.jsx(ar.div,{...o,ref:l,style:{width:s,height:d,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.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 Lb(n,l,i,o="ltr"){const u=Al(i),s=u/2,c=l||s,d=u-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),u=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,s=l.scrollbar.size-u,c=l.content-l.viewport,d=s-o,h=i==="ltr"?[0,c]:[c*-1,0],p=Ab(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 Ib=(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,d=i.top!==s.top;(c||d)&&l(),i=s,o=window.requestAnimationFrame(u)})(),()=>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 u=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return u.observe(n),()=>{window.cancelAnimationFrame(o),u.unobserve(n)}}},[n,i])}var md=nd,Hb=id,qb=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 u=n.length;for(l=0;l<u;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="",u=arguments.length;i<u;i++)(n=arguments[i])&&(l=pd(n))&&(o&&(o+=" "),o+=l);return o}const Yb=(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},Pb=(n,l)=>({classGroupId:n,validator:l}),yd=(n=new Map,l=null,i)=>({nextPart:n,validators:l,classGroupId:i}),Nl="-",bd=[],Fb="arbitrary..",Vb=n=>{const l=Xb(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Gb(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?Yb(p,h):h:p||bd}return i[c]||bd}}},vd=(n,l,i)=>{if(n.length-l===0)return i.classGroupId;const u=n[l],s=i.nextPart.get(u);if(s){const p=vd(n,l+1,s);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}},Gb=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?Fb+o:void 0})(),Xb=n=>{const{theme:l,classGroups:i}=n;return Zb(i,l)},Zb=(n,l)=>{const i=yd();for(const o in n){const u=n[o];Ss(u,i,o,l)}return i},Ss=(n,l,i,o)=>{const u=n.length;for(let s=0;s<u;s++){const c=n[s];Kb(c,l,i,o)}},Kb=(n,l,i,o)=>{if(typeof n=="string"){Qb(n,l,i);return}if(typeof n=="function"){Jb(n,l,i,o);return}Wb(n,l,i,o)},Qb=(n,l,i)=>{const o=n===""?l:Sd(l,n);o.classGroupId=i},Jb=(n,l,i,o)=>{if($b(n)){Ss(n(o),l,i,o);return}l.validators===null&&(l.validators=[]),l.validators.push(Pb(i,n))},Wb=(n,l,i,o)=>{const u=Object.entries(n),s=u.length;for(let c=0;c<s;c++){const[d,h]=u[c];Ss(h,Sd(l,d),i,o)}},Sd=(n,l)=>{let i=n;const o=l.split(Nl),u=o.length;for(let s=0;s<u;s++){const c=o[s];let d=i.nextPart.get(c);d||(d=yd(),i.nextPart.set(c,d)),i=d}return i},$b=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,ev=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)}}},Es="!",Ed=":",tv=[],_d=(n,l,i,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:o,isExternal:u}),nv=n=>{const{prefix:l,experimentalParseClassName:i}=n;let o=u=>{const s=[];let c=0,d=0,h=0,p;const y=u.length;for(let E=0;E<y;E++){const T=u[E];if(c===0&&d===0){if(T===Ed){s.push(u.slice(h,E)),h=E+1;continue}if(T==="/"){p=E;continue}}T==="["?c++:T==="]"?c--:T==="("?d++:T===")"&&d--}const g=s.length===0?u:u.slice(h);let v=g,b=!1;g.endsWith(Es)?(v=g.slice(0,-1),b=!0):g.startsWith(Es)&&(v=g.slice(1),b=!0);const C=p&&p>h?p-h:void 0;return _d(s,b,v,C)};if(l){const u=l+Ed,s=o;o=c=>c.startsWith(u)?s(c.slice(u.length)):_d(tv,!1,c,void 0,!0)}if(i){const u=o;o=s=>i({className:s,parseClassName:u})}return o},rv=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],d=c[0]==="[",h=l.has(c);d||h?(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}},iv=n=>({cache:ev(n.cacheSize),parseClassName:nv(n),sortModifiers:rv(n),...Vb(n)}),av=/\s+/,lv=(n,l)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:s}=l,c=[],d=n.trim().split(av);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]:s(v).join(":"),O=b?k+Es:k,H=O+_;if(c.indexOf(H)>-1)continue;c.push(H);const L=u(_,T);for(let z=0;z<L.length;++z){const B=L[z];c.push(O+B)}h=y+(h.length>0?" "+h:h)}return h},ov=(...n)=>{let l=0,i,o,u="";for(;l<n.length;)(i=n[l++])&&(o=xd(i))&&(u&&(u+=" "),u+=o);return u},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},sv=(n,...l)=>{let i,o,u,s;const c=h=>{const p=l.reduce((y,g)=>g(y),n());return i=iv(p),o=i.cache.get,u=i.cache.set,s=d,d(h)},d=h=>{const p=o(h);if(p)return p;const y=lv(h,i);return u(h,y),y};return s=c,(...h)=>s(ov(...h))},uv=[],Tt=n=>{const l=i=>i[n]||uv;return l.isThemeGetter=!0,l},wd=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cv=/^\d+\/\d+$/,fv=/^(\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$/,hv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ui=n=>cv.test(n),Ye=n=>!!n&&!Number.isNaN(Number(n)),sr=n=>!!n&&Number.isInteger(Number(n)),_s=n=>n.endsWith("%")&&Ye(n.slice(0,-1)),Hn=n=>fv.test(n),gv=()=>!0,yv=n=>dv.test(n)&&!hv.test(n),Td=()=>!1,bv=n=>mv.test(n),vv=n=>pv.test(n),Sv=n=>!Re(n)&&!Ne(n),Ev=n=>ci(n,Od,Td),Re=n=>wd.test(n),Ur=n=>ci(n,zd,yv),xs=n=>ci(n,Tv,Ye),kd=n=>ci(n,Rd,Td),_v=n=>ci(n,Nd,vv),Ol=n=>ci(n,Md,bv),Ne=n=>Cd.test(n),la=n=>fi(n,zd),xv=n=>fi(n,kv),Ad=n=>fi(n,Rd),wv=n=>fi(n,Od),Cv=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",Tv=n=>n==="number",kv=n=>n==="family-name",Md=n=>n==="shadow",Av=sv(()=>{const n=Tt("color"),l=Tt("font"),i=Tt("text"),o=Tt("font-weight"),u=Tt("tracking"),s=Tt("leading"),c=Tt("breakpoint"),d=Tt("container"),h=Tt("spacing"),p=Tt("radius"),y=Tt("shadow"),g=Tt("inset-shadow"),v=Tt("text-shadow"),b=Tt("drop-shadow"),C=Tt("blur"),E=Tt("perspective"),T=Tt("aspect"),_=Tt("ease"),k=Tt("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"],L=()=>[...H(),Ne,Re],z=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],P=()=>[Ne,Re,h],q=()=>[ui,"full","auto",...P()],oe=()=>[sr,"none","subgrid",Ne,Re],ce=()=>["auto",{span:["full",sr,Ne,Re]},sr,Ne,Re],D=()=>[sr,"auto",Ne,Re],ee=()=>["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"],F=()=>["auto",...P()],Z=()=>[ui,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],ie=()=>[n,Ne,Re],fe=()=>[...H(),Ad,kd,{position:[Ne,Re]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",wv,Ev,{size:[Ne,Re]}],j=()=>[_s,la,Ur],A=()=>["","none","full",p,Ne,Re],ne=()=>["",Ye,la,Ur],$=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_e=()=>[Ye,_s,Ad,kd],ke=()=>["","none",C,Ne,Re],Te=()=>["none",Ye,Ne,Re],Me=()=>["none",Ye,Ne,Re],Be=()=>[Ye,Ne,Re],at=()=>[ui,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Hn],breakpoint:[Hn],color:[gv],container:[Hn],"drop-shadow":[Hn],ease:["in","out","in-out"],font:[Sv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Hn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Hn],shadow:[Hn],spacing:["px",Ye],text:[Hn],"text-shadow":[Hn],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:L()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],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":oe()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":oe()}],"row-start-end":[{row:ce()}],"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":ee()}],"auto-rows":[{"auto-rows":ee()}],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:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"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,xs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_s,Re]}],"font-family":[{font:[xv,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,Ne,Re]}],"line-clamp":[{"line-clamp":[Ye,"none",Ne,xs]}],leading:[{leading:[s,...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:ie()}],"text-color":[{text:ie()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",Ne,Ur]}],"text-decoration-color":[{decoration:ie()}],"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:fe()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,Ne,Re],radial:["",Ne,Re],conic:[sr,Ne,Re]},Cv,_v]}],"bg-color":[{bg:ie()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:ie()}],"gradient-via":[{via:ie()}],"gradient-to":[{to:ie()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"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:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:ie()}],"border-color-x":[{"border-x":ie()}],"border-color-y":[{"border-y":ie()}],"border-color-s":[{"border-s":ie()}],"border-color-e":[{"border-e":ie()}],"border-color-t":[{"border-t":ie()}],"border-color-r":[{"border-r":ie()}],"border-color-b":[{"border-b":ie()}],"border-color-l":[{"border-l":ie()}],"divide-color":[{divide:ie()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,Ne,Re]}],"outline-w":[{outline:["",Ye,la,Ur]}],"outline-color":[{outline:ie()}],shadow:[{shadow:["","none",y,zl,Ol]}],"shadow-color":[{shadow:ie()}],"inset-shadow":[{"inset-shadow":["none",g,zl,Ol]}],"inset-shadow-color":[{"inset-shadow":ie()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ie()}],"ring-offset-w":[{"ring-offset":[Ye,Ur]}],"ring-offset-color":[{"ring-offset":ie()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":ie()}],"text-shadow":[{"text-shadow":["none",v,zl,Ol]}],"text-shadow-color":[{"text-shadow":ie()}],opacity:[{opacity:[Ye,Ne,Re]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":ie()}],"mask-image-linear-to-color":[{"mask-linear-to":ie()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":ie()}],"mask-image-t-to-color":[{"mask-t-to":ie()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":ie()}],"mask-image-r-to-color":[{"mask-r-to":ie()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":ie()}],"mask-image-b-to-color":[{"mask-b-to":ie()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":ie()}],"mask-image-l-to-color":[{"mask-l-to":ie()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":ie()}],"mask-image-x-to-color":[{"mask-x-to":ie()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":ie()}],"mask-image-y-to-color":[{"mask-y-to":ie()}],"mask-image-radial":[{"mask-radial":[Ne,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":ie()}],"mask-image-radial-to-color":[{"mask-radial-to":ie()}],"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":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":ie()}],"mask-image-conic-to-color":[{"mask-conic-to":ie()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Re]}],filter:[{filter:["","none",Ne,Re]}],blur:[{blur:ke()}],brightness:[{brightness:[Ye,Ne,Re]}],contrast:[{contrast:[Ye,Ne,Re]}],"drop-shadow":[{"drop-shadow":["","none",b,zl,Ol]}],"drop-shadow-color":[{"drop-shadow":ie()}],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":ke()}],"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":L()}],rotate:[{rotate:Te()}],"rotate-x":[{"rotate-x":Te()}],"rotate-y":[{"rotate-y":Te()}],"rotate-z":[{"rotate-z":Te()}],scale:[{scale:Me()}],"scale-x":[{"scale-x":Me()}],"scale-y":[{"scale-y":Me()}],"scale-z":[{"scale-z":Me()}],"scale-3d":["scale-3d"],skew:[{skew:Be()}],"skew-x":[{"skew-x":Be()}],"skew-y":[{"skew-y":Be()}],transform:[{transform:[Ne,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:ie()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ie()}],"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",...ie()]}],"stroke-w":[{stroke:[Ye,la,Ur,xs]}],stroke:[{stroke:["none",...ie()]}],"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 Av(gd(n))}function ws(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)=>V.jsxs(md,{ref:o,className:Je("relative overflow-hidden",n),...i,children:[V.jsx(Hb,{className:"h-full w-full rounded-[inherit]",children:l}),V.jsx(jd,{}),V.jsx(qb,{})]}));Dd.displayName=md.displayName;const jd=K.forwardRef(({className:n,orientation:l="vertical",...i},o)=>V.jsx(ys,{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:V.jsx(sd,{className:"relative flex-1 rounded-full bg-border"})}));jd.displayName=ys.displayName;const Cs=K.forwardRef(({className:n,...l},i)=>V.jsx("div",{ref:i,className:Je("rounded-xl border bg-card text-card-foreground shadow",n),...l}));Cs.displayName="Card";const Rv=K.forwardRef(({className:n,...l},i)=>V.jsx("div",{ref:i,className:Je("flex flex-col space-y-1.5 p-6",n),...l}));Rv.displayName="CardHeader";const Nv=K.forwardRef(({className:n,...l},i)=>V.jsx("div",{ref:i,className:Je("font-semibold leading-none tracking-tight",n),...l}));Nv.displayName="CardTitle";const Ov=K.forwardRef(({className:n,...l},i)=>V.jsx("div",{ref:i,className:Je("text-sm text-muted-foreground",n),...l}));Ov.displayName="CardDescription";const zv=K.forwardRef(({className:n,...l},i)=>V.jsx("div",{ref:i,className:Je("p-6 pt-0",n),...l}));zv.displayName="CardContent";const Mv=K.forwardRef(({className:n,...l},i)=>V.jsx("div",{ref:i,className:Je("flex items-center p-6 pt-0",n),...l}));Mv.displayName="CardFooter";const Dv=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jv=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,o)=>o?o.toUpperCase():i.toLowerCase()),Ud=n=>{const l=jv(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(),Uv=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var Bv={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 Lv=K.forwardRef(({color:n="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:s,iconNode:c,...d},h)=>K.createElement("svg",{ref:h,...Bv,width:l,height:l,stroke:n,strokeWidth:o?Number(i)*24/Number(l):i,className:Bd("lucide",u),...!s&&!Uv(d)&&{"aria-hidden":"true"},...d},[...c.map(([p,y])=>K.createElement(p,y)),...Array.isArray(s)?s:[s]]));const un=(n,l)=>{const i=K.forwardRef(({className:o,...u},s)=>K.createElement(Lv,{ref:s,iconNode:l,className:Bd(`lucide-${Dv(Ud(n))}`,`lucide-${n}`,o),...u}));return i.displayName=Ud(n),i};const Iv=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 Hv=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 qv=un("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Yv=un("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);const Pv=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 Fv=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 Vv=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 Gv=un("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Xv=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 Zv=un("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);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"),Ml=Vf[" use ".trim().toString()];function Wv(n){return typeof n=="object"&&n!==null&&"then"in n}function Ld(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Jv&&"_payload"in n&&Wv(n._payload)}function Id(n){const l=eS(n),i=K.forwardRef((o,u)=>{let{children:s,...c}=o;Ld(s)&&typeof Ml=="function"&&(s=Ml(s._payload));const d=K.Children.toArray(s),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 V.jsx(l,{...c,ref:u,children:K.isValidElement(p)?K.cloneElement(p,void 0,y):null})}return V.jsx(l,{...c,ref:u,children:s})});return i.displayName=`${n}.Slot`,i}var $v=Id("Slot");function eS(n){const l=K.forwardRef((i,o)=>{let{children:u,...s}=i;if(Ld(u)&&typeof Ml=="function"&&(u=Ml(u._payload)),K.isValidElement(u)){const c=iS(u),d=rS(s,u.props);return u.type!==K.Fragment&&(d.ref=o?ps(o,c):c),K.cloneElement(u,d)}return K.Children.count(u)>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 u=n[o],s=l[o];/^on[A-Z]/.test(o)?u&&s?i[o]=(...d)=>{const h=s(...d);return u(...d),h}:u&&(i[o]=u):o==="style"?i[o]={...u,...s}:o==="className"&&(i[o]=[u,s].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 Hd=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,qd=gd,aS=((n,l)=>i=>{var o;if(l?.variants==null)return qd(n,i?.class,i?.className);const{variants:u,defaultVariants:s}=l,c=Object.keys(u).map(p=>{const y=i?.[p],g=s?.[p];if(y===null)return null;const v=Hd(y)||Hd(g);return u[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({...s,...d}[E]):{...s,...d}[E]===T})?[...p,g,v]:p},[]);return qd(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"}}),An=K.forwardRef(({className:n,variant:l,size:i,asChild:o=!1,...u},s)=>{const c=o?$v:"button";return V.jsx(c,{className:Je(aS({variant:l,size:i,className:n})),ref:s,...u})});An.displayName="Button";function lS(n,l=[]){let i=[];function o(s,c){const d=K.createContext(c);d.displayName=s+"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 V.jsx(E.Provider,{value:T,children:b})};p.displayName=s+"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 \`${s}\``)}return[p,y]}const u=()=>{const s=i.map(c=>K.createContext(c));return function(d){const h=d?.[n]||s;return K.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])}};return u.scopeName=n,[o,oS(u,...l)]}function oS(...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((d,{useScope:h,scopeName:p})=>{const g=h(s)[`__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"],Ts=sS.reduce((n,l)=>{const i=Id(`Primitive.${l}`),o=K.forwardRef((u,s)=>{const{asChild:c,...d}=u,h=c?i:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),V.jsx(h,{...d,ref:s})});return o.displayName=`Primitive.${l}`,{...n,[l]:o}},{}),ks={exports:{}},As={};var Yd;function uS(){if(Yd)return As;Yd=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,u=n.useEffect,s=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 s(function(){E.value=b,E.getSnapshot=v,h(E)&&T({inst:E})},[g,b,v]),u(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 As.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,As}var Pd;function cS(){return Pd||(Pd=1,ks.exports=uS()),ks.exports}var fS=cS();function dS(){return fS.useSyncExternalStore(hS,()=>!0,()=>!1)}function hS(){return()=>{}}var Rs="Avatar",[mS]=lS(Rs),[pS,Fd]=mS(Rs),Vd=K.forwardRef((n,l)=>{const{__scopeAvatar:i,...o}=n,[u,s]=K.useState("idle");return V.jsx(pS,{scope:i,imageLoadingStatus:u,onImageLoadingStatusChange:s,children:V.jsx(Ts.span,{...o,ref:l})})});Vd.displayName=Rs;var Gd="AvatarImage",Xd=K.forwardRef((n,l)=>{const{__scopeAvatar:i,src:o,onLoadingStatusChange:u=()=>{},...s}=n,c=Fd(Gd,i),d=gS(o,s),h=or(p=>{u(p),c.onImageLoadingStatusChange(p)});return lr(()=>{d!=="idle"&&h(d)},[d,h]),d==="loaded"?V.jsx(Ts.img,{...s,ref:l,src:o}):null});Xd.displayName=Gd;var Zd="AvatarFallback",Kd=K.forwardRef((n,l)=>{const{__scopeAvatar:i,delayMs:o,...u}=n,s=Fd(Zd,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&&s.imageLoadingStatus!=="loaded"?V.jsx(Ts.span,{...u,ref:l}):null});Kd.displayName=Zd;function Qd(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(),u=K.useRef(null),s=o?(u.current||(u.current=new window.Image),u.current):null,[c,d]=K.useState(()=>Qd(s,n));return lr(()=>{d(Qd(s,n))},[s,n]),lr(()=>{const h=g=>()=>{d(g)};if(!s)return;const p=h("loaded"),y=h("error");return s.addEventListener("load",p),s.addEventListener("error",y),l&&(s.referrerPolicy=l),typeof i=="string"&&(s.crossOrigin=i),()=>{s.removeEventListener("load",p),s.removeEventListener("error",y)}},[s,i,l]),c}var Jd=Vd,Wd=Xd,$d=Kd;const Ns=K.forwardRef(({className:n,...l},i)=>V.jsx(Jd,{ref:i,className:Je("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...l}));Ns.displayName=Jd.displayName;const yS=K.forwardRef(({className:n,...l},i)=>V.jsx(Wd,{ref:i,className:Je("aspect-square h-full w-full",n),...l}));yS.displayName=Wd.displayName;const Os=K.forwardRef(({className:n,...l},i)=>V.jsx($d,{ref:i,className:Je("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...l}));Os.displayName=$d.displayName;var Br={},oa={},zs={},sa={},ua={},ca={},eh;function bS(){if(eh)return ca;eh=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.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 ca.EventEmitter=n,ca}var Lr={},th;function Dl(){return th||(th=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 nh;function rh(){if(nh)return ua;nh=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.BaseConnection=void 0;const n=bS(),l=Dl();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 ua.BaseConnection=i,ua}var Ms={},ih;function Rn(){return ih||(ih=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,B=n.SynapseErrorCode.UNKNOWN,P={}){super(z),this.name="SynapseError",this.code=B,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,B,P,q){const oe=i.makeMessage(B,P,z);super(oe,n.SynapseErrorCode.API,{cause:P,context:{status:B,hasBody:!!P},hint:B&&B>=500?"Retry the request or contact support if the issue persists.":void 0}),this.name="APIError",this.status=B,this.error=P,this.headers=q}static makeMessage(z,B,P){const q=B instanceof Error?B.message:P;return z&&q?`HTTP ${z}: ${q}`:z?`${z} status code (no body)`:q||"(no status code or body)"}static generate(z,B,P,q){if(!z)return new o({message:P});const oe=B?.error,ce=oe&&typeof oe=="object"&&!Array.isArray(oe)?oe:void 0;switch(z){case 400:return new s(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 u extends i{constructor({message:z}={}){super(z||"Request timed out.",void 0,void 0,void 0),this.name="APIConnectionTimeoutError"}}n.APIConnectionTimeoutError=u;class s extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="BadRequestError"}}n.BadRequestError=s;class c extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="UnauthorizedError"}}n.UnauthorizedError=c;class d extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="PermissionDeniedError"}}n.PermissionDeniedError=d;class h extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="NotFoundError"}}n.NotFoundError=h;class p extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="MethodNotAllowedError"}}n.MethodNotAllowedError=p;class y extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="RateLimitError"}}n.RateLimitError=y;class g extends i{constructor(z,B,P,q){super(z,B,P,q),this.name="InternalServerError"}}n.InternalServerError=g;class v extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.CONNECTION,B),this.name="ConnectionError"}}n.ConnectionError=v;class b extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.RECORDING,B),this.name="RecordingError"}}n.RecordingError=b;class C extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.FILE,B),this.name="FileError"}}n.FileError=C;class E extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.SESSION,B),this.name="SessionError"}}n.SessionError=E;class T extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.MESSAGE,B),this.name="MessageError"}}n.MessageError=T;class _ extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.STORE,B),this.name="StoreError"}}n.StoreError=_;class k extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.CONFIGURATION,B),this.name="ConfigurationError"}}n.ConfigurationError=k;class O extends l{constructor(z,B={}){super(z,n.SynapseErrorCode.VALIDATION,B),this.name="ValidationError"}}n.ValidationError=O;function H(L,z,B,P={}){if(L instanceof z)return L;const q={...P,context:{...L instanceof l?L.context:void 0,...P.context},hint:P.hint??(L instanceof l?L.hint:void 0),cause:P.cause??L};if(L instanceof l)return new z(L.message,q);const oe=L instanceof Error&&L.message?L.message:B;return new z(oe,q)}})(Ms)),Ms}var ah;function lh(){if(ah)return sa;ah=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.WebSocketConnection=void 0;const n=rh(),l=Dl(),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=`/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 d=(0,i.normalizeError)(c,i.MessageError,"Failed to parse incoming WebSocket message",{context:{stage:"handleSocketMessage"}});this.onErrorCallback?.(d)}}handleError(s){const c=new i.ConnectionError("WebSocket error",{context:{stage:"handleError"},cause:s});this.onErrorCallback?.(c)}handleClose(s){const c=s.wasClean,d=s.code,h=s.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(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 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 oh;function sh(){return oh||(oh=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectionFactory=n.ConnectionType=void 0;const l=lh(),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})(zs)),zs}var fa={},uh;function vS(){if(uh)return fa;uh=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=(u="production")=>u==="development"?l:u==="production"?n:u==="staging"?i:n;return fa.getConfig=o,fa}var da={},ha={},ch;function fh(){if(ch)return ha;ch=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.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 d;for(let h=0;h<=c;h++)try{const p=this.buildUrl(u,s?.params),y=await fetch(p,{method:o,headers:{...this.headers,...s?.headers},body:s?.body?JSON.stringify(s.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,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 ha.HttpClient=l,ha}var ma={},pa={},dh;function SS(){if(dh)return pa;dh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.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 pa.BaseResource=n,pa}var hh;function mh(){if(hh)return ma;hh=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,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 ma.Session=l,ma}var ph;function gh(){if(ph)return da;ph=1,Object.defineProperty(da,"__esModule",{value:!0}),da.ResourceManager=void 0;const n=fh(),l=mh(),i=Rn();class o{resourceConfig;httpClient;session;constructor(s){this.resourceConfig=s,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(s){try{const c=await this.session.create(s);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(s){try{const c=await this.session.retrieve(s);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(s,c){return await this.session.refresh(s,c)}async sendFeedback(s,c,d,h){return await this.session.feedback(s,c,d,h)}}return da.ResourceManager=o,da}var ga={},Ds={},yh;function js(){return yh||(yh=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)}})(Ds)),Ds}var Ir={};function jl(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 Us={exports:{}};var bh;function ES(){return bh||(bh=1,(function(n,l){(function(i){n.exports=i()})(function(){return(function i(o,u,s){function c(p,y){if(!u[p]){if(!o[p]){var g=typeof jl=="function"&&jl;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=u[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,u,s)}return u[p].exports}for(var d=typeof jl=="function"&&jl,h=0;h<s.length;h++)c(s[h]);return c})({1:[function(i,o,u){var s=i("./utils"),c=i("./support"),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(h){for(var p,y,g,v,b,C,E,T=[],_=0,k=h.length,O=k,H=s.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("")},u.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,u){var s=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(s.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(s.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,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 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?s.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,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"),d=i("./utils"),h=i("./stream/GenericWorker"),p=s?"uint8array":"array";function y(g,v){h.call(this,"FlateWorker/"+g),this._pako=null,this._pakoAction=g,this._pakoOptions=v,this.meta={}}u.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})}},u.compressWorker=function(g){return new y("Deflate",g)},u.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(i,o,u){function s(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,L=b.file,z=b.compression,B=k!==p.utf8encode,P=d.transformTo("string",k(L.name)),q=d.transformTo("string",p.utf8encode(L.name)),oe=L.comment,ce=d.transformTo("string",k(oe)),D=d.transformTo("string",p.utf8encode(oe)),ee=q.length!==L.name.length,w=D.length!==oe.length,G="",F="",Z="",ie=L.dir,fe=L.date,M={crc32:0,compressedSize:0,uncompressedSize:0};C&&!E||(M.crc32=b.crc32,M.compressedSize=b.compressedSize,M.uncompressedSize=b.uncompressedSize);var R=0;C&&(R|=8),B||!ee&&!w||(R|=2048);var j=0,A=0;ie&&(j|=16),_==="UNIX"?(A=798,j|=(function($,de){var _e=$;return $||(_e=de?16893:33204),(65535&_e)<<16})(L.unixPermissions,ie)):(A=20,j|=(function($){return 63&($||0)})(L.dosPermissions)),O=fe.getUTCHours(),O<<=6,O|=fe.getUTCMinutes(),O<<=5,O|=fe.getUTCSeconds()/2,H=fe.getUTCFullYear()-1980,H<<=4,H|=fe.getUTCMonth()+1,H<<=5,H|=fe.getUTCDate(),ee&&(F=s(1,1)+s(y(P),4)+q,G+="up"+s(F.length,2)+F),w&&(Z=s(1,1)+s(y(ce),4)+D,G+="uc"+s(Z.length,2)+Z);var ne="";return ne+=`
10
- \0`,ne+=s(R,2),ne+=z.magic,ne+=s(O,2),ne+=s(H,2),ne+=s(M.crc32,4),ne+=s(M.compressedSize,4),ne+=s(M.uncompressedSize,4),ne+=s(P.length,2),ne+=s(G.length,2),{fileRecord:g.LOCAL_FILE_HEADER+ne+P+G,dirRecord:g.CENTRAL_FILE_HEADER+s(A,2)+ne+s(ce.length,2)+"\0\0\0\0"+s(j,4)+s(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+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,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,L){var z=d.transformTo("string",L(H));return g.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(_,2)+s(_,2)+s(k,4)+s(O,4)+s(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,u){var s=i("../compressions"),c=i("./ZipFileWorker");u.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,L=s[H];if(!L)throw new Error(H+" is not a valid compression method !");return L})(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,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 d in this)typeof this[d]!="function"&&(c[d]=this[d]);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,d){return new s().loadAsync(c,d)},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"),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=s.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.")):s.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,L=s.resolve(O.fileNameStr);C.file(L,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(L).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,u){var s=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)}s.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,u){var s=i("readable-stream").Readable;function c(d,h,p){s.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,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(L,z,B){var P,q=d.getTypeOf(z),oe=d.extend(B||{},y);oe.date=oe.date||new Date,oe.compression!==null&&(oe.compression=oe.compression.toUpperCase()),typeof oe.unixPermissions=="string"&&(oe.unixPermissions=parseInt(oe.unixPermissions,8)),oe.unixPermissions&&16384&oe.unixPermissions&&(oe.dir=!0),oe.dosPermissions&&16&oe.dosPermissions&&(oe.dir=!0),oe.dir&&(L=_(L)),oe.createFolders&&(P=T(L))&&k.call(this,P,!0);var ce=q==="string"&&oe.binary===!1&&oe.base64===!1;B&&B.binary!==void 0||(oe.binary=!ce),(z instanceof g&&z.uncompressedSize===0||oe.dir||!z||z.length===0)&&(oe.base64=!1,oe.binary=!0,z="",oe.compression="STORE",q="string");var D=null;D=z instanceof g||z instanceof h?z:C.isNode&&C.isStream(z)?new E(L,z):d.prepareContent(L,z,oe.binary,oe.optimizedBinaryString,oe.base64);var ee=new v(L,D,oe);this.files[L]=ee}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(L){L.slice(-1)==="/"&&(L=L.substring(0,L.length-1));var z=L.lastIndexOf("/");return 0<z?L.substring(0,z):""},_=function(L){return L.slice(-1)!=="/"&&(L+="/"),L},k=function(L,z){return z=z!==void 0?z:y.createFolders,L=_(L),this.files[L]||s.call(this,L,null,{dir:!0,createFolders:z}),this.files[L]};function O(L){return Object.prototype.toString.call(L)==="[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(L){var z,B,P;for(z in this.files)P=this.files[z],(B=z.slice(this.root.length,z.length))&&z.slice(0,this.root.length)===this.root&&L(B,P)},filter:function(L){var z=[];return this.forEach(function(B,P){L(B,P)&&z.push(P)}),z},file:function(L,z,B){if(arguments.length!==1)return L=this.root+L,s.call(this,L,z,B),this;if(O(L)){var P=L;return this.filter(function(oe,ce){return!ce.dir&&P.test(oe)})}var q=this.files[this.root+L];return q&&!q.dir?q:null},folder:function(L){if(!L)return this;if(O(L))return this.filter(function(q,oe){return oe.dir&&L.test(q)});var z=this.root+L,B=k.call(this,z),P=this.clone();return P.root=B.name,P},remove:function(L){L=this.root+L;var z=this.files[L];if(z||(L.slice(-1)!=="/"&&(L+="/"),z=this.files[L]),z&&!z.dir)delete this.files[L];else for(var B=this.filter(function(q,oe){return oe.name.slice(0,L.length)===L}),P=0;P<B.length;P++)delete this.files[B[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(L){var z,B={};try{if((B=d.extend(L||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:c.utf8encode})).type=B.type.toLowerCase(),B.compression=B.compression.toUpperCase(),B.type==="binarystring"&&(B.type="string"),!B.type)throw new Error("No output type specified.");d.checkSupport(B.type),B.platform!=="darwin"&&B.platform!=="freebsd"&&B.platform!=="linux"&&B.platform!=="sunos"||(B.platform="UNIX"),B.platform==="win32"&&(B.platform="DOS");var P=B.comment||this.comment||"";z=b.generateWorker(this,B,P)}catch(q){(z=new h("error")).error(q)}return new p(z,B.type||"string",B.mimeType)},generateAsync:function(L,z){return this.generateInternalStream(L).accumulate(z)},generateNodeStream:function(L,z){return(L=L||{}).type||(L.type="nodebuffer"),this.generateInternalStream(L).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,u){o.exports=i("stream")},{stream:void 0}],17:[function(i,o,u){var s=i("./DataReader");function c(d){s.call(this,d);for(var h=0;h<this.data.length;h++)d[h]=255&d[h]}i("../utils").inherits(c,s),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,u){var s=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 s.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,u){var s=i("./Uint8ArrayReader");function c(d){s.call(this,d)}i("../utils").inherits(c,s),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,u){var s=i("./DataReader");function c(d){s.call(this,d)}i("../utils").inherits(c,s),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,u){var s=i("./ArrayReader");function c(d){s.call(this,d)}i("../utils").inherits(c,s),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,u){var s=i("../utils"),c=i("../support"),d=i("./ArrayReader"),h=i("./StringReader"),p=i("./NodeBufferReader"),y=i("./Uint8ArrayReader");o.exports=function(g){var v=s.getTypeOf(g);return s.checkSupport(v),v!=="string"||c.uint8array?v==="nodebuffer"?new p(g):c.uint8array?new y(s.transformTo("uint8array",g)):new d(s.transformTo("array",g)):new h(g)}},{"../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 d(h){s.call(this,"ConvertWorker to "+h),this.destType=h}c.inherits(d,s),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,u){var s=i("./GenericWorker"),c=i("../crc32");function d(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}i("../utils").inherits(d,s),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,u){var s=i("../utils"),c=i("./GenericWorker");function d(h){c.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}s.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,u){var s=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=s.getTypeOf(y),p.isPaused||p._tickAndRepeat()},function(y){p.error(y)})}s.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,s.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.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,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,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=s},{}],29:[function(i,o,u){var s=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,L=C._mimeType;C.on("data",function(z,B){k.push(z),E&&E(B)}).on("error",function(z){k=[],_(z)}).on("end",function(){try{var z=(function(B,P,q){switch(B){case"blob":return s.newBlob(s.transformTo("arraybuffer",P),q);case"base64":return h.encode(P);default:return s.transformTo(B,P)}})(H,(function(B,P){var q,oe=0,ce=null,D=0;for(q=0;q<P.length;q++)D+=P[q].length;switch(B){case"string":return P.join("");case"array":return Array.prototype.concat.apply([],P);case"uint8array":for(ce=new Uint8Array(D),q=0;q<P.length;q++)ce.set(P[q],oe),oe+=P[q].length;return ce;case"nodebuffer":return Buffer.concat(P);default:throw new Error("concat : unsupported type '"+B+"'")}})(O,k),L);T(z)}catch(B){_(B)}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,s.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(){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(C){if(s.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,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"),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")}u.utf8encode=function(b){return c.nodebuffer?d.newBufferFrom(b,"utf-8"):(function(C){var E,T,_,k,O,H=C.length,L=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++),L+=T<128?1:T<2048?2:T<65536?3:4;for(E=c.uint8array?new Uint8Array(L):new Array(L),k=O=0;O<L;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)},u.utf8decode=function(b){return c.nodebuffer?s.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),s.applyFromCharCode(H)})(b=s.transformTo(c.uint8array?"uint8array":"array",b))},s.inherits(g,h),g.prototype.processChunk=function(b){var C=s.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:u.utf8decode(_),meta:b.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=g,s.inherits(v,h),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"),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"),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 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 s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,d.allocBuffer(1)).length===1}catch{return!1}})()}};function v(E){var T=65536,_=u.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}u.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},u.transformTo=function(E,T){if(T=T||"",!E)return T;u.checkSupport(E);var _=u.getTypeOf(T);return C[_][E](T)},u.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("/")},u.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":s.nodebuffer&&d.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,_,k="";for(_=0;_<(E||"").length;_++)k+="\\x"+((T=E.charCodeAt(_))<16?"0":"")+T.toString(16).toUpperCase();return k},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,_,k,O){return h.Promise.resolve(T).then(function(H){return s.blob&&(H instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(H))!==-1)&&typeof FileReader<"u"?new h.Promise(function(L,z){var B=new FileReader;B.onload=function(P){L(P.target.result)},B.onerror=function(P){z(P.target.error)},B.readAsArrayBuffer(H)}):H}).then(function(H){var L=u.getTypeOf(H);return L?(L==="arraybuffer"?H=u.transformTo("uint8array",H):L==="string"&&(O?H=c.decode(H):_&&k!==!0&&(H=(function(z){return y(z,s.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,u){var s=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=s(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,u){var s=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=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 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=s(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=s(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,u){function s(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");s.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++)s.prototype[g[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,d,h=s.MutationObserver||s.WebKitMutationObserver;if(h){var p=0,y=new h(C),g=s.document.createTextNode("");y.observe(g,{characterData:!0}),c=function(){g.data=p=++p%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(){C(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},s.document.documentElement.appendChild(E)}:function(){setTimeout(C,0)};else{var v=new s.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,u){var s=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){s(function(){var H;try{H=k(O)}catch(L){return d.reject(_,L)}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(B){O||(O=!0,d.reject(_,B))}function L(B){O||(O=!0,d.resolve(_,B))}var z=T(function(){k(L,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 L=-1,z=_.queue.length;++L<z;)_.queue[L].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 L=new Array(O),z=0,B=-1,P=new this(c);++B<O;)q(_[B],B);return P;function q(oe,ce){k.resolve(oe).then(function(D){L[ce]=D,++z!==O||H||(H=!0,d.resolve(P,L))},function(D){H||(H=!0,d.reject(P,D))})}},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 L=-1,z=new this(c);++L<O;)B=_[L],k.resolve(B).then(function(P){H||(H=!0,d.resolve(z,P))},function(P){H||(H=!0,d.reject(z,P))});var B;return z}},{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"),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=s.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(O!==g)throw new Error(h[O]);if(k.header&&s.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=s.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,L=this.strm,z=this.options.chunkSize;if(this.ended)return!1;H=k===~~k?k:k===!0?4:0,typeof _=="string"?L.input=d.string2buf(_):y.call(_)==="[object ArrayBuffer]"?L.input=new Uint8Array(_):L.input=_,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new c.Buf8(z),L.next_out=0,L.avail_out=z),(O=s.deflate(L,H))!==1&&O!==g)return this.onEnd(O),!(this.ended=!0);L.avail_out!==0&&(L.avail_in!==0||H!==4&&H!==2)||(this.options.to==="string"?this.onData(d.buf2binstring(c.shrinkBuf(L.output,L.next_out))):this.onData(c.shrinkBuf(L.output,L.next_out)))}while((0<L.avail_in||L.avail_out===0)&&O!==1);return H===4?(O=s.deflateEnd(this.strm),this.onEnd(O),this.ended=!0,O===g):H!==2||(this.onEnd(g),!(L.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},u.Deflate=E,u.deflate=T,u.deflateRaw=function(_,k){return(k=k||{}).raw=!0,T(_,k)},u.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,u){var s=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 _=s.inflateInit2(this.strm,T.windowBits);if(_!==h.Z_OK)throw new Error(p[_]);this.header=new g,s.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,L,z,B=this.strm,P=this.options.chunkSize,q=this.options.dictionary,oe=!1;if(this.ended)return!1;k=T===~~T?T:T===!0?h.Z_FINISH:h.Z_NO_FLUSH,typeof E=="string"?B.input=d.binstring2buf(E):v.call(E)==="[object ArrayBuffer]"?B.input=new Uint8Array(E):B.input=E,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new c.Buf8(P),B.next_out=0,B.avail_out=P),(_=s.inflate(B,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,_=s.inflateSetDictionary(this.strm,z)),_===h.Z_BUF_ERROR&&oe===!0&&(_=h.Z_OK,oe=!1),_!==h.Z_STREAM_END&&_!==h.Z_OK)return this.onEnd(_),!(this.ended=!0);B.next_out&&(B.avail_out!==0&&_!==h.Z_STREAM_END&&(B.avail_in!==0||k!==h.Z_FINISH&&k!==h.Z_SYNC_FLUSH)||(this.options.to==="string"?(O=d.utf8border(B.output,B.next_out),H=B.next_out-O,L=d.buf2string(B.output,O),B.next_out=H,B.avail_out=P-H,H&&c.arraySet(B.output,B.output,O,H,0),this.onData(L)):this.onData(c.shrinkBuf(B.output,B.next_out)))),B.avail_in===0&&B.avail_out===0&&(oe=!0)}while((0<B.avail_in||B.avail_out===0)&&_!==h.Z_STREAM_END);return _===h.Z_STREAM_END&&(k=h.Z_FINISH),k===h.Z_FINISH?(_=s.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===h.Z_OK):k!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),!(B.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},u.Inflate=b,u.inflate=C,u.inflateRaw=function(E,T){return(T=T||{}).raw=!0,C(E,T)},u.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,u){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.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},u.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)}};u.setTyped=function(h){h?(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,d))},u.setTyped(s)},{}],42:[function(i,o,u){var s=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 s.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,s.shrinkBuf(g,v));for(var b="",C=0;C<v;C++)b+=String.fromCharCode(g[C]);return b}h[254]=h[254]=1,u.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 s.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},u.buf2binstring=function(g){return y(g,g.length)},u.binstring2buf=function(g){for(var v=new s.Buf8(g.length),b=0,C=v.length;b<C;b++)v[b]=g.charCodeAt(b);return v},u.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)},u.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,u){o.exports=function(s,c,d,h){for(var p=65535&s|0,y=s>>>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,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,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=s,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,u){var s,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,L=30,z=19,B=2*H+1,P=15,q=3,oe=258,ce=oe+q+1,D=42,ee=113,w=1,G=2,F=3,Z=4;function ie(x,me){return x.msg=y[me],me}function fe(x){return(x<<1)-(4<x?9:0)}function M(x){for(var me=x.length;0<=--me;)x[me]=0}function R(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,R(x.strm)}function A(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 $(x,me){var ue,I,U=x.max_chain_length,Q=x.strstart,ye=x.prev_length,ve=x.nice_match,ae=x.strstart>x.w_size-ce?x.strstart-(x.w_size-ce):0,Ee=x.window,Ce=x.w_mask,xe=x.prev,W=x.strstart+oe,be=Ee[Q+ye-1],we=Ee[Q+ye];x.prev_length>=x.good_match&&(U>>=2),ve>x.lookahead&&(ve=x.lookahead);do if(Ee[(ue=me)+ye]===we&&Ee[ue+ye-1]===be&&Ee[ue]===Ee[Q]&&Ee[++ue]===Ee[Q+1]){Q+=2,ue++;do;while(Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Ee[++Q]===Ee[++ue]&&Q<W);if(I=oe-(W-Q),Q=W-oe,ye<I){if(x.match_start=me,ve<=(ye=I))break;be=Ee[Q+ye-1],we=Ee[Q+ye]}}while((me=xe[me&Ce])>ae&&--U!=0);return ye<=x.lookahead?ye:x.lookahead}function de(x){var me,ue,I,U,Q,ye,ve,ae,Ee,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(ye=x.strm,ve=x.window,ae=x.strstart+x.lookahead,Ee=U,Ce=void 0,Ce=ye.avail_in,Ee<Ce&&(Ce=Ee),ue=Ce===0?0:(ye.avail_in-=Ce,c.arraySet(ve,ye.input,ye.next_in,Ce,ae),ye.state.wrap===1?ye.adler=h(ye.adler,ve,Ce,ae):ye.state.wrap===2&&(ye.adler=p(ye.adler,ve,Ce,ae)),ye.next_in+=Ce,ye.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 _e(x,me){for(var ue,I;;){if(x.lookahead<ce){if(de(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=$(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?F:Z):x.last_lit&&(j(x,!1),x.strm.avail_out===0)?w:G}function ke(x,me){for(var ue,I,U;;){if(x.lookahead<ce){if(de(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=$(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?F:Z):x.last_lit&&(j(x,!1),x.strm.avail_out===0)?w:G}function Te(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*B),this.dyn_dtree=new c.Buf16(2*(2*L+1)),this.bl_tree=new c.Buf16(2*(2*z+1)),M(this.dyn_ltree),M(this.dyn_dtree),M(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),M(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*H+1),M(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 Be(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?D:ee,x.adler=me.wrap===2?0:1,me.last_flush=g,d._tr_init(me),b):ie(x,C)}function at(x){var me=Be(x);return me===b&&(function(ue){ue.window_size=2*ue.w_size,M(ue.head),ue.max_lazy_match=s[ue.level].max_lazy,ue.good_match=s[ue.level].good_length,ue.nice_match=s[ue.level].nice_length,ue.max_chain_length=s[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 Lt(x,me,ue,I,U,Q){if(!x)return C;var ye=1;if(me===E&&(me=6),I<0?(ye=0,I=-I):15<I&&(ye=2,I-=16),U<1||O<U||ue!==k||I<8||15<I||me<0||9<me||Q<0||T<Q)return ie(x,C);I===8&&(I=9);var ve=new Me;return(x.state=ve).strm=x,ve.wrap=ye,ve.gzhead=null,ve.w_bits=I,ve.w_size=1<<ve.w_bits,ve.w_mask=ve.w_size-1,ve.hash_bits=U+7,ve.hash_size=1<<ve.hash_bits,ve.hash_mask=ve.hash_size-1,ve.hash_shift=~~((ve.hash_bits+q-1)/q),ve.window=new c.Buf8(2*ve.w_size),ve.head=new c.Buf16(ve.hash_size),ve.prev=new c.Buf16(ve.w_size),ve.lit_bufsize=1<<U+6,ve.pending_buf_size=4*ve.lit_bufsize,ve.pending_buf=new c.Buf8(ve.pending_buf_size),ve.d_buf=1*ve.lit_bufsize,ve.l_buf=3*ve.lit_bufsize,ve.level=me,ve.strategy=Q,ve.method=ue,at(x)}s=[new Te(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(de(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?F:Z):(x.strstart>x.block_start&&(j(x,!1),x.strm.avail_out),w)}),new Te(4,4,8,4,_e),new Te(4,5,16,8,_e),new Te(4,6,32,32,_e),new Te(4,4,16,16,ke),new Te(8,16,32,32,ke),new Te(8,16,128,128,ke),new Te(8,32,128,256,ke),new Te(32,128,258,1024,ke),new Te(32,258,258,4096,ke)],u.deflateInit=function(x,me){return Lt(x,me,k,15,8,0)},u.deflateInit2=Lt,u.deflateReset=at,u.deflateResetKeep=Be,u.deflateSetHeader=function(x,me){return x&&x.state?x.state.wrap!==2?C:(x.state.gzhead=me,b):C},u.deflate=function(x,me){var ue,I,U,Q;if(!x||!x.state||5<me||me<0)return x?ie(x,C):C;if(I=x.state,!x.output||!x.input&&x.avail_in!==0||I.status===666&&me!==v)return ie(x,x.avail_out===0?-5:C);if(I.strm=x,ue=I.last_flush,I.last_flush=me,I.status===D)if(I.wrap===2)x.adler=0,A(I,31),A(I,139),A(I,8),I.gzhead?(A(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)),A(I,255&I.gzhead.time),A(I,I.gzhead.time>>8&255),A(I,I.gzhead.time>>16&255),A(I,I.gzhead.time>>24&255),A(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),A(I,255&I.gzhead.os),I.gzhead.extra&&I.gzhead.extra.length&&(A(I,255&I.gzhead.extra.length),A(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):(A(I,0),A(I,0),A(I,0),A(I,0),A(I,0),A(I,I.level===9?2:2<=I.strategy||I.level<2?4:0),A(I,3),I.status=ee);else{var ye=k+(I.w_bits-8<<4)<<8;ye|=(2<=I.strategy||I.level<2?0:I.level<6?1:I.level===6?2:3)<<6,I.strstart!==0&&(ye|=32),ye+=31-ye%31,I.status=ee,ne(I,ye),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)),R(x),U=I.pending,I.pending!==I.pending_buf_size));)A(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)),R(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,A(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)),R(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,A(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&&R(x),I.pending+2<=I.pending_buf_size&&(A(I,255&x.adler),A(I,x.adler>>8&255),x.adler=0,I.status=ee)):I.status=ee),I.pending!==0){if(R(x),x.avail_out===0)return I.last_flush=-1,b}else if(x.avail_in===0&&fe(me)<=fe(ue)&&me!==v)return ie(x,-5);if(I.status===666&&x.avail_in!==0)return ie(x,-5);if(x.avail_in!==0||I.lookahead!==0||me!==g&&I.status!==666){var ve=I.strategy===2?(function(ae,Ee){for(var Ce;;){if(ae.lookahead===0&&(de(ae),ae.lookahead===0)){if(Ee===g)return w;break}if(ae.match_length=0,Ce=d._tr_tally(ae,0,ae.window[ae.strstart]),ae.lookahead--,ae.strstart++,Ce&&(j(ae,!1),ae.strm.avail_out===0))return w}return ae.insert=0,Ee===v?(j(ae,!0),ae.strm.avail_out===0?F:Z):ae.last_lit&&(j(ae,!1),ae.strm.avail_out===0)?w:G})(I,me):I.strategy===3?(function(ae,Ee){for(var Ce,xe,W,be,we=ae.window;;){if(ae.lookahead<=oe){if(de(ae),ae.lookahead<=oe&&Ee===g)return w;if(ae.lookahead===0)break}if(ae.match_length=0,ae.lookahead>=q&&0<ae.strstart&&(xe=we[W=ae.strstart-1])===we[++W]&&xe===we[++W]&&xe===we[++W]){be=ae.strstart+oe;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<be);ae.match_length=oe-(be-W),ae.match_length>ae.lookahead&&(ae.match_length=ae.lookahead)}if(ae.match_length>=q?(Ce=d._tr_tally(ae,1,ae.match_length-q),ae.lookahead-=ae.match_length,ae.strstart+=ae.match_length,ae.match_length=0):(Ce=d._tr_tally(ae,0,ae.window[ae.strstart]),ae.lookahead--,ae.strstart++),Ce&&(j(ae,!1),ae.strm.avail_out===0))return w}return ae.insert=0,Ee===v?(j(ae,!0),ae.strm.avail_out===0?F:Z):ae.last_lit&&(j(ae,!1),ae.strm.avail_out===0)?w:G})(I,me):s[I.level].func(I,me);if(ve!==F&&ve!==Z||(I.status=666),ve===w||ve===F)return x.avail_out===0&&(I.last_flush=-1),b;if(ve===G&&(me===1?d._tr_align(I):me!==5&&(d._tr_stored_block(I,0,0,!1),me===3&&(M(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),R(x),x.avail_out===0))return I.last_flush=-1,b}return me!==v?b:I.wrap<=0?1:(I.wrap===2?(A(I,255&x.adler),A(I,x.adler>>8&255),A(I,x.adler>>16&255),A(I,x.adler>>24&255),A(I,255&x.total_in),A(I,x.total_in>>8&255),A(I,x.total_in>>16&255),A(I,x.total_in>>24&255)):(ne(I,x.adler>>>16),ne(I,65535&x.adler)),R(x),0<I.wrap&&(I.wrap=-I.wrap),I.pending!==0?b:1)},u.deflateEnd=function(x){var me;return x&&x.state?(me=x.state.status)!==D&&me!==69&&me!==73&&me!==91&&me!==103&&me!==ee&&me!==666?ie(x,C):(x.state=null,me===ee?ie(x,-3):b):C},u.deflateSetDictionary=function(x,me){var ue,I,U,Q,ye,ve,ae,Ee,Ce=me.length;if(!x||!x.state||(Q=(ue=x.state).wrap)===2||Q===1&&ue.status!==D||ue.lookahead)return C;for(Q===1&&(x.adler=h(x.adler,me,Ce,0)),ue.wrap=0,Ce>=ue.w_size&&(Q===0&&(M(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),Ee=new c.Buf8(ue.w_size),c.arraySet(Ee,me,Ce-ue.w_size,ue.w_size,0),me=Ee,Ce=ue.w_size),ye=x.avail_in,ve=x.next_in,ae=x.input,x.avail_in=Ce,x.next_in=0,x.input=me,de(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,de(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=ve,x.input=ae,x.avail_in=ye,ue.wrap=Q,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 d,h,p,y,g,v,b,C,E,T,_,k,O,H,L,z,B,P,q,oe,ce,D,ee,w,G;d=s.state,h=s.next_in,w=s.input,p=h+(s.avail_in-5),y=s.next_out,G=s.output,g=y-(c-s.avail_out),v=y+(s.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,L=d.distcode,z=(1<<d.lenbits)-1,B=(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}s.msg="invalid literal/length code",d.mode=30;break e}oe=65535&P,(q&=15)&&(O<q&&(k+=w[h++]<<O,O+=8),oe+=k&(1<<q)-1,k>>>=q,O-=q),O<15&&(k+=w[h++]<<O,O+=8,k+=w[h++]<<O,O+=8),P=L[k&B];n:for(;;){if(k>>>=q=P>>>24,O-=q,!(16&(q=P>>>16&255))){if((64&q)==0){P=L[(65535&P)+(k&(1<<q)-1)];continue n}s.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)){s.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){s.msg="invalid distance too far back",d.mode=30;break e}if(ee=_,(D=0)===T){if(D+=C-q,q<oe){for(oe-=q;G[y++]=_[D++],--q;);D=y-ce,ee=G}}else if(T<q){if(D+=C+T-q,(q-=T)<oe){for(oe-=q;G[y++]=_[D++],--q;);if(D=0,T<oe){for(oe-=q=T;G[y++]=_[D++],--q;);D=y-ce,ee=G}}}else if(D+=T-q,q<oe){for(oe-=q;G[y++]=_[D++],--q;);D=y-ce,ee=G}for(;2<oe;)G[y++]=ee[D++],G[y++]=ee[D++],G[y++]=ee[D++],oe-=3;oe&&(G[y++]=ee[D++],1<oe&&(G[y++]=ee[D++]))}else{for(D=y-ce;G[y++]=G[D++],G[y++]=G[D++],G[y++]=G[D++],2<(oe-=3););oe&&(G[y++]=G[D++],1<oe&&(G[y++]=G[D++]))}break}}break}}while(h<p&&y<v);h-=oe=O>>3,k&=(1<<(O-=oe<<3))-1,s.next_in=h,s.next_out=y,s.avail_in=h<p?p-h+5:5-(h-p),s.avail_out=y<v?v-y+257:257-(y-v),d.hold=k,d.bits=O}},{}],49:[function(i,o,u){var s=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 _(D){return(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<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 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 O(D){var ee;return D&&D.state?(ee=D.state,D.total_in=D.total_out=ee.total=0,D.msg="",ee.wrap&&(D.adler=1&ee.wrap),ee.mode=C,ee.last=0,ee.havedict=0,ee.dmax=32768,ee.head=null,ee.hold=0,ee.bits=0,ee.lencode=ee.lendyn=new s.Buf32(E),ee.distcode=ee.distdyn=new s.Buf32(T),ee.sane=1,ee.back=-1,v):b}function H(D){var ee;return D&&D.state?((ee=D.state).wsize=0,ee.whave=0,ee.wnext=0,O(D)):b}function L(D,ee){var w,G;return D&&D.state?(G=D.state,ee<0?(w=0,ee=-ee):(w=1+(ee>>4),ee<48&&(ee&=15)),ee&&(ee<8||15<ee)?b:(G.window!==null&&G.wbits!==ee&&(G.window=null),G.wrap=w,G.wbits=ee,H(D))):b}function z(D,ee){var w,G;return D?(G=new k,(D.state=G).window=null,(w=L(D,ee))!==v&&(D.state=null),w):b}var B,P,q=!0;function oe(D){if(q){var ee;for(B=new s.Buf32(512),P=new s.Buf32(32),ee=0;ee<144;)D.lens[ee++]=8;for(;ee<256;)D.lens[ee++]=9;for(;ee<280;)D.lens[ee++]=7;for(;ee<288;)D.lens[ee++]=8;for(p(y,D.lens,0,288,B,0,D.work,{bits:9}),ee=0;ee<32;)D.lens[ee++]=5;p(g,D.lens,0,32,P,0,D.work,{bits:5}),q=!1}D.lencode=B,D.lenbits=9,D.distcode=P,D.distbits=5}function ce(D,ee,w,G){var F,Z=D.state;return Z.window===null&&(Z.wsize=1<<Z.wbits,Z.wnext=0,Z.whave=0,Z.window=new s.Buf8(Z.wsize)),G>=Z.wsize?(s.arraySet(Z.window,ee,w-Z.wsize,Z.wsize,0),Z.wnext=0,Z.whave=Z.wsize):(G<(F=Z.wsize-Z.wnext)&&(F=G),s.arraySet(Z.window,ee,w-G,F,Z.wnext),(G-=F)?(s.arraySet(Z.window,ee,w-G,G,0),Z.wnext=G,Z.whave=Z.wsize):(Z.wnext+=F,Z.wnext===Z.wsize&&(Z.wnext=0),Z.whave<Z.wsize&&(Z.whave+=F))),0}u.inflateReset=H,u.inflateReset2=L,u.inflateResetKeep=O,u.inflateInit=function(D){return z(D,15)},u.inflateInit2=z,u.inflate=function(D,ee){var w,G,F,Z,ie,fe,M,R,j,A,ne,$,de,_e,ke,Te,Me,Be,at,Lt,x,me,ue,I,U=0,Q=new s.Buf8(4),ye=[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;(w=D.state).mode===12&&(w.mode=13),ie=D.next_out,F=D.output,M=D.avail_out,Z=D.next_in,G=D.input,fe=D.avail_in,R=w.hold,j=w.bits,A=fe,ne=M,me=v;e:for(;;)switch(w.mode){case C:if(w.wrap===0){w.mode=13;break}for(;j<16;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(2&w.wrap&&R===35615){Q[w.check=0]=255&R,Q[1]=R>>>8&255,w.check=d(w.check,Q,2,0),j=R=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&R)<<8)+(R>>8))%31){D.msg="incorrect header check",w.mode=30;break}if((15&R)!=8){D.msg="unknown compression method",w.mode=30;break}if(j-=4,x=8+(15&(R>>>=4)),w.wbits===0)w.wbits=x;else if(x>w.wbits){D.msg="invalid window size",w.mode=30;break}w.dmax=1<<x,D.adler=w.check=1,w.mode=512&R?10:12,j=R=0;break;case 2:for(;j<16;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(w.flags=R,(255&w.flags)!=8){D.msg="unknown compression method",w.mode=30;break}if(57344&w.flags){D.msg="unknown header flags set",w.mode=30;break}w.head&&(w.head.text=R>>8&1),512&w.flags&&(Q[0]=255&R,Q[1]=R>>>8&255,w.check=d(w.check,Q,2,0)),j=R=0,w.mode=3;case 3:for(;j<32;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}w.head&&(w.head.time=R),512&w.flags&&(Q[0]=255&R,Q[1]=R>>>8&255,Q[2]=R>>>16&255,Q[3]=R>>>24&255,w.check=d(w.check,Q,4,0)),j=R=0,w.mode=4;case 4:for(;j<16;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}w.head&&(w.head.xflags=255&R,w.head.os=R>>8),512&w.flags&&(Q[0]=255&R,Q[1]=R>>>8&255,w.check=d(w.check,Q,2,0)),j=R=0,w.mode=5;case 5:if(1024&w.flags){for(;j<16;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}w.length=R,w.head&&(w.head.extra_len=R),512&w.flags&&(Q[0]=255&R,Q[1]=R>>>8&255,w.check=d(w.check,Q,2,0)),j=R=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(fe<($=w.length)&&($=fe),$&&(w.head&&(x=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,G,Z,$,x)),512&w.flags&&(w.check=d(w.check,G,$,Z)),fe-=$,Z+=$,w.length-=$),w.length))break e;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(fe===0)break e;for($=0;x=G[Z+$++],w.head&&x&&w.length<65536&&(w.head.name+=String.fromCharCode(x)),x&&$<fe;);if(512&w.flags&&(w.check=d(w.check,G,$,Z)),fe-=$,Z+=$,x)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=8;case 8:if(4096&w.flags){if(fe===0)break e;for($=0;x=G[Z+$++],w.head&&x&&w.length<65536&&(w.head.comment+=String.fromCharCode(x)),x&&$<fe;);if(512&w.flags&&(w.check=d(w.check,G,$,Z)),fe-=$,Z+=$,x)break e}else w.head&&(w.head.comment=null);w.mode=9;case 9:if(512&w.flags){for(;j<16;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(R!==(65535&w.check)){D.msg="header crc mismatch",w.mode=30;break}j=R=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),D.adler=w.check=0,w.mode=12;break;case 10:for(;j<32;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}D.adler=w.check=_(R),j=R=0,w.mode=11;case 11:if(w.havedict===0)return D.next_out=ie,D.avail_out=M,D.next_in=Z,D.avail_in=fe,w.hold=R,w.bits=j,2;D.adler=w.check=1,w.mode=12;case 12:if(ee===5||ee===6)break e;case 13:if(w.last){R>>>=7&j,j-=7&j,w.mode=27;break}for(;j<3;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}switch(w.last=1&R,j-=1,3&(R>>>=1)){case 0:w.mode=14;break;case 1:if(oe(w),w.mode=20,ee!==6)break;R>>>=2,j-=2;break e;case 2:w.mode=17;break;case 3:D.msg="invalid block type",w.mode=30}R>>>=2,j-=2;break;case 14:for(R>>>=7&j,j-=7&j;j<32;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if((65535&R)!=(R>>>16^65535)){D.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&R,j=R=0,w.mode=15,ee===6)break e;case 15:w.mode=16;case 16:if($=w.length){if(fe<$&&($=fe),M<$&&($=M),$===0)break e;s.arraySet(F,G,Z,$,ie),fe-=$,Z+=$,M-=$,ie+=$,w.length-=$;break}w.mode=12;break;case 17:for(;j<14;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(w.nlen=257+(31&R),R>>>=5,j-=5,w.ndist=1+(31&R),R>>>=5,j-=5,w.ncode=4+(15&R),R>>>=4,j-=4,286<w.nlen||30<w.ndist){D.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(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}w.lens[ye[w.have++]]=7&R,R>>>=3,j-=3}for(;w.have<19;)w.lens[ye[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){D.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(;Te=(U=w.lencode[R&(1<<w.lenbits)-1])>>>16&255,Me=65535&U,!((ke=U>>>24)<=j);){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(Me<16)R>>>=ke,j-=ke,w.lens[w.have++]=Me;else{if(Me===16){for(I=ke+2;j<I;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(R>>>=ke,j-=ke,w.have===0){D.msg="invalid bit length repeat",w.mode=30;break}x=w.lens[w.have-1],$=3+(3&R),R>>>=2,j-=2}else if(Me===17){for(I=ke+3;j<I;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}j-=ke,x=0,$=3+(7&(R>>>=ke)),R>>>=3,j-=3}else{for(I=ke+7;j<I;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}j-=ke,x=0,$=11+(127&(R>>>=ke)),R>>>=7,j-=7}if(w.have+$>w.nlen+w.ndist){D.msg="invalid bit length repeat",w.mode=30;break}for(;$--;)w.lens[w.have++]=x}}if(w.mode===30)break;if(w.lens[256]===0){D.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){D.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){D.msg="invalid distances set",w.mode=30;break}if(w.mode=20,ee===6)break e;case 20:w.mode=21;case 21:if(6<=fe&&258<=M){D.next_out=ie,D.avail_out=M,D.next_in=Z,D.avail_in=fe,w.hold=R,w.bits=j,h(D,ne),ie=D.next_out,F=D.output,M=D.avail_out,Z=D.next_in,G=D.input,fe=D.avail_in,R=w.hold,j=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;Te=(U=w.lencode[R&(1<<w.lenbits)-1])>>>16&255,Me=65535&U,!((ke=U>>>24)<=j);){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(Te&&(240&Te)==0){for(Be=ke,at=Te,Lt=Me;Te=(U=w.lencode[Lt+((R&(1<<Be+at)-1)>>Be)])>>>16&255,Me=65535&U,!(Be+(ke=U>>>24)<=j);){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}R>>>=Be,j-=Be,w.back+=Be}if(R>>>=ke,j-=ke,w.back+=ke,w.length=Me,Te===0){w.mode=26;break}if(32&Te){w.back=-1,w.mode=12;break}if(64&Te){D.msg="invalid literal/length code",w.mode=30;break}w.extra=15&Te,w.mode=22;case 22:if(w.extra){for(I=w.extra;j<I;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}w.length+=R&(1<<w.extra)-1,R>>>=w.extra,j-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;Te=(U=w.distcode[R&(1<<w.distbits)-1])>>>16&255,Me=65535&U,!((ke=U>>>24)<=j);){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if((240&Te)==0){for(Be=ke,at=Te,Lt=Me;Te=(U=w.distcode[Lt+((R&(1<<Be+at)-1)>>Be)])>>>16&255,Me=65535&U,!(Be+(ke=U>>>24)<=j);){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}R>>>=Be,j-=Be,w.back+=Be}if(R>>>=ke,j-=ke,w.back+=ke,64&Te){D.msg="invalid distance code",w.mode=30;break}w.offset=Me,w.extra=15&Te,w.mode=24;case 24:if(w.extra){for(I=w.extra;j<I;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}w.offset+=R&(1<<w.extra)-1,R>>>=w.extra,j-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){D.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(M===0)break e;if($=ne-M,w.offset>$){if(($=w.offset-$)>w.whave&&w.sane){D.msg="invalid distance too far back",w.mode=30;break}de=$>w.wnext?($-=w.wnext,w.wsize-$):w.wnext-$,$>w.length&&($=w.length),_e=w.window}else _e=F,de=ie-w.offset,$=w.length;for(M<$&&($=M),M-=$,w.length-=$;F[ie++]=_e[de++],--$;);w.length===0&&(w.mode=21);break;case 26:if(M===0)break e;F[ie++]=w.length,M--,w.mode=21;break;case 27:if(w.wrap){for(;j<32;){if(fe===0)break e;fe--,R|=G[Z++]<<j,j+=8}if(ne-=M,D.total_out+=ne,w.total+=ne,ne&&(D.adler=w.check=w.flags?d(w.check,F,ne,ie-ne):c(w.check,F,ne,ie-ne)),ne=M,(w.flags?R:_(R))!==w.check){D.msg="incorrect data check",w.mode=30;break}j=R=0}w.mode=28;case 28:if(w.wrap&&w.flags){for(;j<32;){if(fe===0)break e;fe--,R+=G[Z++]<<j,j+=8}if(R!==(4294967295&w.total)){D.msg="incorrect length check",w.mode=30;break}j=R=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 D.next_out=ie,D.avail_out=M,D.next_in=Z,D.avail_in=fe,w.hold=R,w.bits=j,(w.wsize||ne!==D.avail_out&&w.mode<30&&(w.mode<27||ee!==4))&&ce(D,D.output,D.next_out,ne-D.avail_out)?(w.mode=31,-4):(A-=D.avail_in,ne-=D.avail_out,D.total_in+=A,D.total_out+=ne,w.total+=ne,w.wrap&&ne&&(D.adler=w.check=w.flags?d(w.check,F,ne,D.next_out-ne):c(w.check,F,ne,D.next_out-ne)),D.data_type=w.bits+(w.last?64:0)+(w.mode===12?128:0)+(w.mode===20||w.mode===15?256:0),(A==0&&ne===0||ee===4)&&me===v&&(me=-5),me)},u.inflateEnd=function(D){if(!D||!D.state)return b;var ee=D.state;return ee.window&&(ee.window=null),D.state=null,v},u.inflateGetHeader=function(D,ee){var w;return D&&D.state?(2&(w=D.state).wrap)==0?b:((w.head=ee).done=!1,v):b},u.inflateSetDictionary=function(D,ee){var w,G=ee.length;return D&&D.state?(w=D.state).wrap!==0&&w.mode!==11?b:w.mode===11&&c(1,ee,G,0)!==w.check?-3:ce(D,ee,G,G)?(w.mode=31,-4):(w.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],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,L,z,B,P,q,oe,ce=_.bits,D=0,ee=0,w=0,G=0,F=0,Z=0,ie=0,fe=0,M=0,R=0,j=null,A=0,ne=new s.Buf16(16),$=new s.Buf16(16),de=null,_e=0;for(D=0;D<=15;D++)ne[D]=0;for(ee=0;ee<b;ee++)ne[g[v+ee]]++;for(F=ce,G=15;1<=G&&ne[G]===0;G--);if(G<F&&(F=G),G===0)return C[E++]=20971520,C[E++]=20971520,_.bits=1,0;for(w=1;w<G&&ne[w]===0;w++);for(F<w&&(F=w),D=fe=1;D<=15;D++)if(fe<<=1,(fe-=ne[D])<0)return-1;if(0<fe&&(y===0||G!==1))return-1;for($[1]=0,D=1;D<15;D++)$[D+1]=$[D]+ne[D];for(ee=0;ee<b;ee++)g[v+ee]!==0&&(T[$[g[v+ee]]++]=ee);if(B=y===0?(j=de=T,19):y===1?(j=c,A-=257,de=d,_e-=257,256):(j=h,de=p,-1),D=w,z=E,ie=ee=R=0,H=-1,L=(M=1<<(Z=F))-1,y===1&&852<M||y===2&&592<M)return 1;for(;;){for(P=D-ie,oe=T[ee]<B?(q=0,T[ee]):T[ee]>B?(q=de[_e+T[ee]],j[A+T[ee]]):(q=96,0),k=1<<D-ie,w=O=1<<Z;C[z+(R>>ie)+(O-=k)]=P<<24|q<<16|oe|0,O!==0;);for(k=1<<D-1;R&k;)k>>=1;if(k!==0?(R&=k-1,R+=k):R=0,ee++,--ne[D]==0){if(D===G)break;D=g[v+T[ee]]}if(F<D&&(R&L)!==H){for(ie===0&&(ie=F),z+=w,fe=1<<(Z=D-ie);Z+ie<G&&!((fe-=ne[Z+ie])<=0);)Z++,fe<<=1;if(M+=1<<Z,y===1&&852<M||y===2&&592<M)return 1;C[H=R&L]=F<<24|Z<<16|z-E|0}}return R!==0&&(C[z+R]=D-ie<<24|4194304|0),_.bits=F,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,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,L=17,z=18,B=[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],oe=[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 D=new Array(2*b);h(D);var ee=new Array(512);h(ee);var w=new Array(256);h(w);var G=new Array(y);h(G);var F,Z,ie,fe=new Array(b);function M(U,Q,ye,ve,ae){this.static_tree=U,this.extra_bits=Q,this.extra_base=ye,this.elems=ve,this.max_length=ae,this.has_stree=U&&U.length}function R(U,Q){this.dyn_tree=U,this.max_code=0,this.stat_desc=Q}function j(U){return U<256?ee[U]:ee[256+(U>>>7)]}function A(U,Q){U.pending_buf[U.pending++]=255&Q,U.pending_buf[U.pending++]=Q>>>8&255}function ne(U,Q,ye){U.bi_valid>_-ye?(U.bi_buf|=Q<<U.bi_valid&65535,A(U,U.bi_buf),U.bi_buf=Q>>_-U.bi_valid,U.bi_valid+=ye-_):(U.bi_buf|=Q<<U.bi_valid&65535,U.bi_valid+=ye)}function $(U,Q,ye){ne(U,ye[2*Q],ye[2*Q+1])}function de(U,Q){for(var ye=0;ye|=1&U,U>>>=1,ye<<=1,0<--Q;);return ye>>>1}function _e(U,Q,ye){var ve,ae,Ee=new Array(T+1),Ce=0;for(ve=1;ve<=T;ve++)Ee[ve]=Ce=Ce+ye[ve-1]<<1;for(ae=0;ae<=Q;ae++){var xe=U[2*ae+1];xe!==0&&(U[2*ae]=de(Ee[xe]++,xe))}}function ke(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 Te(U){8<U.bi_valid?A(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,ye,ve){var ae=2*Q,Ee=2*ye;return U[ae]<U[Ee]||U[ae]===U[Ee]&&ve[Q]<=ve[ye]}function Be(U,Q,ye){for(var ve=U.heap[ye],ae=ye<<1;ae<=U.heap_len&&(ae<U.heap_len&&Me(Q,U.heap[ae+1],U.heap[ae],U.depth)&&ae++,!Me(Q,ve,U.heap[ae],U.depth));)U.heap[ye]=U.heap[ae],ye=ae,ae<<=1;U.heap[ye]=ve}function at(U,Q,ye){var ve,ae,Ee,Ce,xe=0;if(U.last_lit!==0)for(;ve=U.pending_buf[U.d_buf+2*xe]<<8|U.pending_buf[U.d_buf+2*xe+1],ae=U.pending_buf[U.l_buf+xe],xe++,ve===0?$(U,ae,Q):($(U,(Ee=w[ae])+g+1,Q),(Ce=B[Ee])!==0&&ne(U,ae-=G[Ee],Ce),$(U,Ee=j(--ve),ye),(Ce=P[Ee])!==0&&ne(U,ve-=fe[Ee],Ce)),xe<U.last_lit;);$(U,O,Q)}function Lt(U,Q){var ye,ve,ae,Ee=Q.dyn_tree,Ce=Q.stat_desc.static_tree,xe=Q.stat_desc.has_stree,W=Q.stat_desc.elems,be=-1;for(U.heap_len=0,U.heap_max=E,ye=0;ye<W;ye++)Ee[2*ye]!==0?(U.heap[++U.heap_len]=be=ye,U.depth[ye]=0):Ee[2*ye+1]=0;for(;U.heap_len<2;)Ee[2*(ae=U.heap[++U.heap_len]=be<2?++be:0)]=1,U.depth[ae]=0,U.opt_len--,xe&&(U.static_len-=Ce[2*ae+1]);for(Q.max_code=be,ye=U.heap_len>>1;1<=ye;ye--)Be(U,Ee,ye);for(ae=W;ye=U.heap[1],U.heap[1]=U.heap[U.heap_len--],Be(U,Ee,1),ve=U.heap[1],U.heap[--U.heap_max]=ye,U.heap[--U.heap_max]=ve,Ee[2*ae]=Ee[2*ye]+Ee[2*ve],U.depth[ae]=(U.depth[ye]>=U.depth[ve]?U.depth[ye]:U.depth[ve])+1,Ee[2*ye+1]=Ee[2*ve+1]=ae,U.heap[1]=ae++,Be(U,Ee,1),2<=U.heap_len;);U.heap[--U.heap_max]=U.heap[1],(function(we,je){var Xe,mt,It,Pe,pt,At,Fe=je.dyn_tree,xn=je.max_code,$t=je.stat_desc.static_tree,ku=je.stat_desc.has_stree,bi=je.stat_desc.extra_bits,Pr=je.stat_desc.extra_base,Mn=je.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++)Mn<(Pe=Fe[2*Fe[2*(mt=we.heap[Xe])+1]+1]+1)&&(Pe=Mn,fn++),Fe[2*mt+1]=Pe,xn<mt||(we.bl_count[Pe]++,pt=0,Pr<=mt&&(pt=bi[mt-Pr]),At=Fe[2*mt],we.opt_len+=At*(Pe+pt),ku&&(we.static_len+=At*($t[2*mt+1]+pt)));if(fn!==0){do{for(Pe=Mn-1;we.bl_count[Pe]===0;)Pe--;we.bl_count[Pe]--,we.bl_count[Pe+1]+=2,we.bl_count[Mn]--,fn-=2}while(0<fn);for(Pe=Mn;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),_e(Ee,be,U.bl_count)}function x(U,Q,ye){var ve,ae,Ee=-1,Ce=Q[1],xe=0,W=7,be=4;for(Ce===0&&(W=138,be=3),Q[2*(ye+1)+1]=65535,ve=0;ve<=ye;ve++)ae=Ce,Ce=Q[2*(ve+1)+1],++xe<W&&ae===Ce||(xe<be?U.bl_tree[2*ae]+=xe:ae!==0?(ae!==Ee&&U.bl_tree[2*ae]++,U.bl_tree[2*H]++):xe<=10?U.bl_tree[2*L]++:U.bl_tree[2*z]++,Ee=ae,be=(xe=0)===Ce?(W=138,3):ae===Ce?(W=6,3):(W=7,4))}function me(U,Q,ye){var ve,ae,Ee=-1,Ce=Q[1],xe=0,W=7,be=4;for(Ce===0&&(W=138,be=3),ve=0;ve<=ye;ve++)if(ae=Ce,Ce=Q[2*(ve+1)+1],!(++xe<W&&ae===Ce)){if(xe<be)for(;$(U,ae,U.bl_tree),--xe!=0;);else ae!==0?(ae!==Ee&&($(U,ae,U.bl_tree),xe--),$(U,H,U.bl_tree),ne(U,xe-3,2)):xe<=10?($(U,L,U.bl_tree),ne(U,xe-3,3)):($(U,z,U.bl_tree),ne(U,xe-11,7));Ee=ae,be=(xe=0)===Ce?(W=138,3):ae===Ce?(W=6,3):(W=7,4)}}h(fe);var ue=!1;function I(U,Q,ye,ve){ne(U,(p<<1)+(ve?1:0),3),(function(ae,Ee,Ce,xe){Te(ae),A(ae,Ce),A(ae,~Ce),s.arraySet(ae.pending_buf,ae.window,Ee,Ce,ae.pending),ae.pending+=Ce})(U,Q,ye)}u._tr_init=function(U){ue||((function(){var Q,ye,ve,ae,Ee,Ce=new Array(T+1);for(ae=ve=0;ae<y-1;ae++)for(G[ae]=ve,Q=0;Q<1<<B[ae];Q++)w[ve++]=ae;for(w[ve-1]=ae,ae=Ee=0;ae<16;ae++)for(fe[ae]=Ee,Q=0;Q<1<<P[ae];Q++)ee[Ee++]=ae;for(Ee>>=7;ae<b;ae++)for(fe[ae]=Ee<<7,Q=0;Q<1<<P[ae]-7;Q++)ee[256+Ee++]=ae;for(ye=0;ye<=T;ye++)Ce[ye]=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(_e(ce,v+1,Ce),Q=0;Q<b;Q++)D[2*Q+1]=5,D[2*Q]=de(Q,5);F=new M(ce,B,g+1,v,T),Z=new M(D,P,0,b,T),ie=new M(new Array(0),q,0,C,k)})(),ue=!0),U.l_desc=new R(U.dyn_ltree,F),U.d_desc=new R(U.dyn_dtree,Z),U.bl_desc=new R(U.bl_tree,ie),U.bi_buf=0,U.bi_valid=0,ke(U)},u._tr_stored_block=I,u._tr_flush_block=function(U,Q,ye,ve){var ae,Ee,Ce=0;0<U.level?(U.strm.data_type===2&&(U.strm.data_type=(function(xe){var W,be=4093624447;for(W=0;W<=31;W++,be>>>=1)if(1&be&&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)),Lt(U,U.l_desc),Lt(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),Lt(xe,xe.bl_desc),W=C-1;3<=W&&xe.bl_tree[2*oe[W]+1]===0;W--);return xe.opt_len+=3*(W+1)+5+5+4,W})(U),ae=U.opt_len+3+7>>>3,(Ee=U.static_len+3+7>>>3)<=ae&&(ae=Ee)):ae=Ee=ye+5,ye+4<=ae&&Q!==-1?I(U,Q,ye,ve):U.strategy===4||Ee===ae?(ne(U,2+(ve?1:0),3),at(U,ce,D)):(ne(U,4+(ve?1:0),3),(function(xe,W,be,we){var je;for(ne(xe,W-257,5),ne(xe,be-1,5),ne(xe,we-4,4),je=0;je<we;je++)ne(xe,xe.bl_tree[2*oe[je]+1],3);me(xe,xe.dyn_ltree,W-1),me(xe,xe.dyn_dtree,be-1)})(U,U.l_desc.max_code+1,U.d_desc.max_code+1,Ce+1),at(U,U.dyn_ltree,U.dyn_dtree)),ke(U),ve&&Te(U)},u._tr_tally=function(U,Q,ye){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&ye,U.last_lit++,Q===0?U.dyn_ltree[2*ye]++:(U.matches++,Q--,U.dyn_ltree[2*(w[ye]+g+1)]++,U.dyn_dtree[2*j(Q)]++),U.last_lit===U.lit_bufsize-1},u._tr_align=function(U){ne(U,2,3),$(U,O,ce),(function(Q){Q.bi_valid===16?(A(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,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,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,L=c.onmessage;return c.onmessage=function(){H=!1},c.postMessage("","*"),c.onmessage=L,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 L=E.createElement("script");L.onreadystatechange=function(){k(H),L.onreadystatechange=null,p.removeChild(L),L=null},p.appendChild(L)}):function(H){setTimeout(k,0,H)},T.setImmediate=function(H){typeof H!="function"&&(H=new Function(""+H));for(var L=new Array(arguments.length-1),z=0;z<L.length;z++)L[z]=arguments[z+1];var B={callback:H,args:L};return b[v]=B,h(v),v++},T.clearImmediate=_}function _(H){delete b[H]}function k(H){if(C)setTimeout(k,0,H);else{var L=b[H];if(L){C=!0;try{(function(z){var B=z.callback,P=z.args;switch(P.length){case 0:B();break;case 1:B(P[0]);break;case 2:B(P[0],P[1]);break;case 3:B(P[0],P[1],P[2]);break;default:B.apply(d,P)}})(L)}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"?s===void 0?this:s:self)}).call(this,typeof xl<"u"?xl:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Us)),Us.exports}var vh;function _S(){if(vh)return Ir;vh=1;var n=Ir&&Ir.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.Filemanager=void 0;const l=n(ES()),i=Rn();class o{pendingFiles=[];pendingMessage="";pendingFormat="";messageId="";setFilesForUpload(s,c,d){this.pendingFiles.length>0&&this.clearPendingFilesState(),this.pendingFiles=s,this.messageId=c||Date.now().toString(),d&&d.trim()&&(this.pendingMessage=d),this.pendingFormat=s.length>1?"zip":s?.[0]?.type?.split("/")?.[1]||"unknown"}getPendingFileState(){return{files:this.pendingFiles,messageId:this.messageId||"",message:this.pendingMessage||"",format:this.pendingFormat||""}}async uploadFilesToPresignedUrl(s){let c=0;const d=s.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 s=new l.default;return this.pendingFiles.forEach(d=>{s.file(d.name,d)}),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"}clearPendingFilesState(){this.pendingFiles=[],this.pendingMessage="",this.pendingFormat="",this.messageId=""}}return Ir.Filemanager=o,Ir}var _n={},Sh;function Ul(){if(Sh)return _n;Sh=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=js();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={},Eh;function Bs(){return Eh||(Eh=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 _h;function xS(){if(_h)return ya;_h=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.AudioManager=void 0;const n=Bs(),l=Rn();class i{mediaRecorder=null;mediaStream=null;recordingStartTime=0;autoPauseTimer=null;config;onAudioData=null;onAudioError=null;onRecordingStatusChange=null;suppressCallbacks=!1;constructor(u={}){this.config={mimeType:"audio/webm;codecs=opus",audioBitsPerSecond:128e3,maxRecordingDuration:9e5,autoPauseEnabled:!0,...u}}async checkCurrentPermissionState(){const u=await navigator.permissions.query({name:"microphone"});if(u.state==="denied")throw new l.RecordingError("Microphone permission denied",{context:{permissionState:u.state},hint:"Ensure the browser has microphone access enabled for this site."});return u.state}async start(u,s,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=u,this.onAudioError=c??null,this.onRecordingStatusChange=s??null,this.suppressCallbacks=!1,this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!1,noiseSuppression:!1,autoGainControl:!1,sampleRate:44100,channelCount:1}}),this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:this.config.mimeType,audioBitsPerSecond:this.config.audioBitsPerSecond}),this.mediaRecorder.state!=="inactive")throw new 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(u){try{this.onRecordingStatusChange?.(n.AudioRecordingStatus.PROCESSING);const s=await this.blobToBase64(u),c=Date.now();if(!this.onAudioData)return;const d={audio:s,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(s){this.handleError(s,{stage:"process_audio_chunk"})}}toRecordingError(u,s,c){if(u instanceof l.RecordingError)return u;if(u instanceof l.SynapseError)return new l.RecordingError(u.message,{cause:u,context:{...u.context,...c},hint:u.hint});const d=u instanceof Error&&u.message?u.message:s;return new l.RecordingError(d,{cause:u,context:c})}handleError(u,s){const c=this.toRecordingError(u,"Unexpected recording error",s);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=u=>{this.suppressCallbacks||u.data.size<=0||this.processAudioChunk(u.data).catch(s=>this.handleError(s,{stage:"media_recorder_ondataavailable",hasData:u.data.size>0}))},this.mediaRecorder.onstop=async()=>{this.recordingStartTime=0},this.mediaRecorder.onerror=u=>{this.handleError(u.error instanceof Error?u.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(u){return new Promise((s,c)=>{const d=new FileReader;d.onload=()=>{if(typeof d.result=="string"){const h=d.result.split(",")[1];s(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(u)})}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(u=>u.stop()),this.mediaStream=null),this.onRecordingStatusChange?.(n.AudioRecordingStatus.IDLE),console.log("Audio recording stopped manually")}catch(u){throw this.toRecordingError(u,"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(u=>u.stop()),this.mediaStream=null),this.onRecordingStatusChange?.(n.AudioRecordingStatus.IDLE)}catch(u){throw this.toRecordingError(u,"Failed to cancel audio recording",{stage:"cancel"})}}destroy(){try{this.cancel(),this.mediaRecorder&&(this.mediaRecorder=null),this.mediaStream&&(this.mediaStream.getTracks().forEach(u=>u.stop()),this.mediaStream=null)}catch(u){throw this.toRecordingError(u,"Failed to destroy audio resources",{stage:"destroy"})}}}return ya.AudioManager=i,ya}var xh;function wh(){if(xh)return ga;xh=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.MessageManager=void 0;const n=js(),l=_S(),i=Ul(),o=xS(),u=Bs(),s=Rn();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 s.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 s.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?.(u.AudioRecordingStatus.IDLE)}break;default:const y=new s.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 s.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 s.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 s.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 s.RecordingError("Audio manager not set. Call startRecording() first.",{context:{stage:"stopRecording"}});throw this.emitError(h),h}try{this.audioManager.stop()}catch(h){const p=this.toRecordingError(h,"Failed to stop audio recording",{stage:"stopRecording"});throw this.emitError(p),p}}sendSocketPongMessage(){const h=this.assertConnection("sendSocketPongMessage"),p={ev:n.SOCKET_EVENTS.PONG,_id:Date.now().toString(),ts:Date.now()};h.sendMessage(p)}handleConnectionEstablished(){this.connection?.handleConnected(),this.connection?.emit(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,s.normalizeError)(h,s.FileError,p,{context:y,hint:g})}toRecordingError(h,p,y,g){return(0,s.normalizeError)(h,s.RecordingError,p,{context:y,hint:g})}assertConnection(h){if(!this.connection){const p=new s.ConnectionError("Connection not set. Please ensure the connection is established before calling this method.",{context:{stage:h}});throw this.emitError(p),p}return this.connection}};return ga.MessageManager=c,ga}var va={},Ch;function Th(){if(Ch)return va;Ch=1,Object.defineProperty(va,"__esModule",{value:!0}),va.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 va.ErrorUtils=l,va}var kh;function wS(){if(kh)return oa;kh=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.SynapseSDK=void 0;const n=sh(),l=Dl(),i=vS(),o=gh(),u=wh(),s=Ul(),c=Th(),d=Rn(),h=js();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 u.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(s.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 Ls={},Ah;function CS(){return Ah||(Ah=1,Object.defineProperty(Ls,"__esModule",{value:!0})),Ls}var Sa={},Rh;function TS(){return Rh||(Rh=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.USER_FEEDBACK=void 0,Sa.USER_FEEDBACK={LIKE:"LIKE",DISLIKE:"DISLIKE",NONE:"NONE"}),Sa}var Ea={},Nh;function kS(){return Nh||(Nh=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 Oh;function AS(){return Oh||(Oh=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 u=rh();Object.defineProperty(n,"BaseConnection",{enumerable:!0,get:function(){return u.BaseConnection}});var s=lh();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(Dl(),n);var d=gh();Object.defineProperty(n,"ResourceManager",{enumerable:!0,get:function(){return d.ResourceManager}}),i(CS(),n);var h=mh();Object.defineProperty(n,"Session",{enumerable:!0,get:function(){return h.Session}}),i(TS(),n);var p=wh();Object.defineProperty(n,"MessageManager",{enumerable:!0,get:function(){return p.MessageManager}});var y=Ul();Object.defineProperty(n,"SYNAPSE_REALTIME_EVENTS",{enumerable:!0,get:function(){return y.SYNAPSE_REALTIME_EVENTS}});var g=fh();Object.defineProperty(n,"HttpClient",{enumerable:!0,get:function(){return g.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}});var b=kS();Object.defineProperty(n,"ErrorType",{enumerable:!0,get:function(){return b.ErrorType}});var C=Th();Object.defineProperty(n,"ErrorUtils",{enumerable:!0,get:function(){return C.ErrorUtils}}),i(Bs(),n);var E=Ul();Object.defineProperty(n,"SYNAPSE_MESSAGE_TYPES",{enumerable:!0,get:function(){return E.SYNAPSE_MESSAGE_TYPES}})})(Br)),Br}var We=AS();const zh=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))}},u=()=>l,d={setState:o,getState:u,getInitialState:()=>h,subscribe:p=>(i.add(p),()=>i.delete(p))},h=l=n(o,u,d);return d},RS=(n=>n?zh(n):zh),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 Mh(n,l){let i;try{i=n()}catch{return}return{getItem:u=>{var s;const c=h=>h===null?null:JSON.parse(h,void 0),d=(s=i.getItem(u))!=null?s:null;return d instanceof Promise?d.then(c):c(d)},setItem:(u,s)=>i.setItem(u,JSON.stringify(s,void 0)),removeItem:u=>i.removeItem(u)}}const Is=n=>l=>{try{const i=n(l);return i instanceof Promise?i:{then(o){return Is(o)(i)},catch(o){return this}}}catch(i){return{then(o){return this},catch(o){return Is(o)(i)}}}},DS=(n,l)=>(i,o,u)=>{let s={storage:Mh(()=>localStorage),partialize:E=>E,version:0,merge:(E,T)=>({...T,...E}),...l},c=!1;const d=new Set,h=new Set;let p=s.storage;if(!p)return n((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),i(...E)},o,u);const y=()=>{const E=s.partialize({...o()});return p.setItem(s.name,{state:E,version:s.version})},g=u.setState;u.setState=(E,T)=>(g(E,T),y());const v=n((...E)=>(i(...E),y()),o,u);u.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=s.onRehydrateStorage)==null?void 0:T.call(s,(E=o())!=null?E:v))||void 0;return Is(p.getItem.bind(p))(s.name).then(k=>{if(k)if(typeof k.version=="number"&&k.version!==s.version){if(s.migrate){const O=s.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,L]=k;if(b=s.merge(L,(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 u.persist={setOptions:E=>{s={...s,...E},E.storage&&(p=E.storage)},clearStorage:()=>{p?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>C(),hasHydrated:()=>c,onHydrate:E=>(d.add(E),()=>{d.delete(E)}),onFinishHydration:E=>(h.add(E),()=>{h.delete(E)})},s.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},Hs=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}),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(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(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:Mh(()=>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}){const o=Hs(c=>c.connectionStatus),s=(()=>{switch(o){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 V.jsx("div",{className:"bg-white/80 backdrop-blur-md border-b border-white/30 px-6 py-4",children:V.jsxs("div",{className:"flex items-center justify-between",children:[V.jsxs("div",{className:"flex items-center gap-3",children:[V.jsx(Ns,{className:"w-12 h-12 bg-gradient-to-br from-lavender-400 to-lavender-500 flex-shrink-0 shadow-md ring-0",children:V.jsx(Os,{className:"text-white font-bold text-lg bg-transparent",children:i?V.jsx("img",{src:i,alt:"User Icon",className:"w-12 h-12"}):V.jsx("span",{className:"text-white font-bold text-lg bg-transparent",children:"MC"})})}),V.jsxs("div",{className:"flex flex-col",children:[V.jsx("p",{className:"text-md font-semibold text-slate-900",children:l||"Health Assist"}),V.jsxs("div",{className:"flex items-center gap-1.5",children:[V.jsx("div",{className:Je("w-1.5 h-1.5 rounded-full",s.dotColor,o===We.ConnectionStatus.CONNECTING&&"animate-pulse")}),V.jsx("span",{className:Je("text-xs font-medium",s.textColor),children:s.text})]})]})]}),V.jsxs("div",{className:"flex items-center gap-1",children:[V.jsx(An,{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:V.jsx(Zv,{className:"w-5 h-5"})}),V.jsx(An,{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:V.jsx(Yv,{className:"w-5 h-5"})}),V.jsx(An,{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:V.jsx(Qv,{className:"w-5 h-5"})})]})]})})}function BS({isOpen:n,onClose:l,iconUrl:i,children:o,title:u}){const[s,c]=K.useState(!1);K.useEffect(()=>{const p=()=>{const y=window?.innerWidth??0,g=navigator?.userAgent?.toLowerCase()??"",v=y<768||/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(g);c(v)};return p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]),K.useEffect(()=>{if(n){const p=document.body.style.overflow,y=document.body.style.paddingRight,g=document.documentElement.style.overflow,v=window.innerWidth-document.documentElement.clientWidth;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",v>0&&!s&&(document.body.style.paddingRight=`${v}px`),()=>{document.body.style.overflow=p,document.body.style.paddingRight=y,document.documentElement.style.overflow=g}}},[n,s]);const d=Je("synapse-chat-widget-container","fixed m-0 p-0","box-border","isolate","transition-all duration-300",s?"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"),h=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",s?"rounded-none":"rounded-3xl");return V.jsxs("div",{className:d,style:{margin:0,padding:0,border:"none",outline:"none",position:"fixed",zIndex:2147483647,fontSize:"16px",lineHeight:"2.5",userSelect:"auto"},children:[V.jsx("style",{children:`
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:`
11
11
  /* Isolate widget from host website styles */
12
12
  .synapse-chat-widget-container,
13
13
  .synapse-chat-widget-container *,
@@ -16,7 +16,7 @@ Error generating stack: `+a.message+`
16
16
  box-sizing: border-box;
17
17
  }
18
18
  .synapse-chat-widget-container {
19
- // isolation: isolate;
19
+ /* isolation: isolate; */
20
20
  /* Reset common host website interferences */
21
21
  text-align: left;
22
22
  text-decoration: none;
@@ -25,18 +25,37 @@ Error generating stack: `+a.message+`
25
25
  margin: 0 !important;
26
26
  padding: 0 !important;
27
27
  }
28
- `}),V.jsxs(Cs,{className:h,children:[V.jsx(US,{onClose:l,title:u,iconUrl:i}),o]})]})}const Hr={USER:"user",ASSISTANT:"assistant"};function Dh(){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,u]=K.useState([]),[s,c]=K.useState(!1),[d,h]=K.useState(0),[p,y]=K.useState(!1),g=K.useRef(null),{isOnline:v}=Dh(),{agentId:b,setSessionId:C,setSessionToken:E,sessionId:T,sessionToken:_,setError:k,setConnectionStatus:O,setShowRetryButton:H,setStartNewConnection:L,setIsStreaming:z,isStreaming:B,setRecordingStatus:P,clearSession:q,connectionStatus:oe,addMessageToSession:ce,getMessagesForSession:D,updateMessageInSession:ee}=Hs();K.useEffect(()=>{v?p?(O(We.ConnectionStatus.CONNECTED),ie()):O(We.ConnectionStatus.CONNECTING):O(We.ConnectionStatus.NOT_CONNECTED)},[v,p]),K.useEffect(()=>{if(T){const $=D(T)||[];u($)}},[T]),K.useEffect(()=>{if(y(!1),!b){console.warn("useChat: Agent ID is required but not provided");return}const $=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&&ie()},onRecordingStatusChange:de=>{P(de)},onSessionRefreshed:de=>{de?.session_id&&de?.session_token&&(C(de.session_id),E(de.session_token))}}});return g.current=$,y(!0),()=>{y(!1),g.current?.endSession(),g.current=null}},[b,n,l]),K.useEffect(()=>{const $=o[o.length-1];!$?.role||!T||($?.role===Hr.USER?ce(T,$):!B&&!$.isStored&&(u(de=>{const _e=[...de];return _e[_e.length-1]={...$,isStored:!0},_e}),ce(T,{...$,isStored:!0})))},[o,B]),K.useEffect(()=>{const $=o[o.length-1];return()=>{$&&!$?.isStored&&T&&ce(T,{...$,isStored:!0})}},[]);const w=async($=!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:",$);let de;$?(console.log("useChat: Creating new session"),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),fe()}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)}},G=oe===We.ConnectionStatus.CONNECTED,F=$=>G?!0:(console.log("ensureConnected: Connection unavailable",$),!1),Z=()=>{console.log("called end session"),g.current?.endSession()},ie=()=>{h(0),H(!1),L(!1),k(null)},fe=()=>{g.current?.on(We.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,$=>{const de=$;if(de.data?.text&&de.messageId){B||z(!0);const _e=de.data.text,ke=de.messageId,Te=de.timestamp;u(Me=>{const Be=Me[Me.length-1];if(Be.id===ke&&Be.role===Hr.ASSISTANT){const at=[...Me];return at[at.length-1]={...Be,content:Be.content+_e},at}else return[...Me,{id:ke,content:_e,role:Hr.ASSISTANT,timestamp:ws(Te??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,()=>{ie(),O(We.ConnectionStatus.CONNECTED)}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.TOOL_ESCALATION,$=>{const de=$;if(!de?.messageId||!de?.data||!de?.data?.type){console.warn("Tool escalation event missing messageId or data",de);return}const _e=de.messageId,ke=de.timestamp??Date.now();u(Te=>{const Me=Te[Te.length-1];if(Me.id===_e&&Me.role===Hr.ASSISTANT){const Be=[...Te],at={...Me,toolEscalationData:{...de.data,isResponded:!1},isResponseFromTool:!0};return Be[Te.length-1]=at,ee(T,_e,at),Be}else{const Be={id:_e,content:de.data?.text||"",role:Hr.ASSISTANT,toolEscalationData:{...de.data,isResponded:!1},isResponseFromTool:!0,timestamp:ws(ke),isStored:!1};return[...Te,Be]}})}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,$=>{console.log("disconnect details",$),O(We.ConnectionStatus.NOT_CONNECTED),d<3?(console.log("retry attempt",d),h(de=>de+1),H(!0)):(console.log("set start new connection"),L(!0))}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.ERROR,$=>{console.error("error",$)}),g.current?.on(We.SYNAPSE_REALTIME_EVENTS.INLINE_TEXT,$=>{console.log("inline text",$);const de=$;de?.data?.text&&i&&i?.(de.data.text)})};return{sendMessage:async({message:$,messageId:de,files:_e})=>{F("sending a message")&&(_e&&_e.length<0||$?.trim()===""||(await g.current?.sendMessage({message:$,messageId:de,files:_e}),$&&u(ke=>{const Te=[...ke],Me=Te.length-1;return Me>=0&&Te[Me].role===Hr.ASSISTANT&&Te[Me].toolEscalationData&&(Te[Me]={...Te[Me],toolEscalationData:{...Te[Me].toolEscalationData,isResponded:!0}}),[...Te,{id:de||Date.now().toString(),content:$,role:Hr.USER,timestamp:ws(Date.now()),isStored:!0}]})))},startSession:w,incomingMessages:o,loading:s,endSession:Z,isReady:p,startRecording:()=>{F("starting a recording")&&g.current?.startRecording()},stopRecording:()=>{F("stopping a recording")&&g.current?.endRecording()},handleRetryConnection:async()=>{ie(),await w(!1)},handleStartNewConnection:async()=>{ie(),await q(),await w(!0)}}},IS=K.lazy(()=>Promise.resolve().then(()=>yw)),HS=K.lazy(()=>Promise.resolve().then(()=>vw)),qS=K.lazy(()=>Promise.resolve().then(()=>xw)),YS=K.lazy(()=>Promise.resolve().then(()=>Cw).then(n=>({default:n.ConnectionStatus})));function PS({isOpen:n,onClose:l,title:i,agentId:o,iconUrl:u}){const[s,c]=K.useState(""),[d,h]=K.useState(!1),[p,y]=K.useState(!1),[g,v]=K.useState([]),b=K.useRef(!1),{setAgentId:C,startNewConnection:E,showRetryButton:T,clearError:_,error:k,connectionStatus:O,recordingStatus:H}=Hs(),{incomingMessages:L,loading:z,sendMessage:B,startSession:P,isReady:q,startRecording:oe,stopRecording:ce,handleRetryConnection:D,handleStartNewConnection:ee}=LS({environment:"production",onInlineText:A=>{console.log("inline text",A),c(ne=>ne+A)}});K.useEffect(()=>{if(!o){console.error("Agent ID is required");return}C(o),n&&q&&!b.current&&(b.current=!0,console.log("ChatWidget: SDK is ready, starting session"),P(!1))},[n,q,o]);const w=L.length>0,G=O===We.ConnectionStatus.CONNECTED,F=z||!G,Z=F||H===We.AudioRecordingStatus.IDLE?null:H===We.AudioRecordingStatus.LISTENING?"Listening...":H===We.AudioRecordingStatus.PROCESSING?"Processing...":H===We.AudioRecordingStatus.TRANSCRIBING?"Transcribing...":null,ie=F?"Connecting...":Z??"Ask me anything…",fe=async()=>{if(!F&&(s.trim()||d||p)){const A=Date.now().toString();g.length>0?(await B({files:g,message:s.trim(),messageId:A}),v([]),y(!1)):s.trim()&&await B({message:s,messageId:A}),c(""),h(!1),y(!1)}},M=async A=>{await B({message:A})},R=A=>{v(A),y(!0)},j=async()=>{if(d)await ce(),h(!1);else{if(F)return;await oe(),h(!0)}};return V.jsx(BS,{isOpen:n,onClose:l,title:i,iconUrl:u,onStartNewSession:()=>P(!0),children:!z&&V.jsx(K.Suspense,{fallback:V.jsx(FS,{}),children:V.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl",children:[V.jsx(Dd,{className:"flex-1 min-h-0",children:V.jsx("div",{className:Je("transition-all duration-300",w?"p-4 space-y-3":"p-6 space-y-6"),children:w?V.jsx(IS,{messages:L,onSendMessage:B}):V.jsx(qS,{onTaskClick:M,disabled:F})})}),V.jsx(YS,{className:"mt-2",onRetry:D,onStartNewSession:ee,showRetryButton:T,startNewConnection:E,clearError:_,error:k,isConnected:G}),V.jsx(HS,{value:s,onChange:c,onSend:fe,onFileChange:R,onRecording:j,isRecording:d,hasAttachment:p,attachmentFiles:g,isDisabled:F,placeholder:ie,recordingStatus:H})]})})})}function FS(){return V.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-white backdrop-blur-2xl animate-pulse",children:[V.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[V.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),V.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"}),V.jsx("div",{className:"h-16 bg-gray-100 rounded-2xl"})]}),V.jsx("div",{className:"h-24 border-t border-gray-100 bg-gray-50"})]})}function VS({agentId:n,title:l,iconUrl:i}){const[o,u]=K.useState(!1);return K.useEffect(()=>{u(!0)},[]),V.jsx(PS,{isOpen:o,onClose:()=>u(!1),title:l,agentId:n,iconUrl:i})}const jh=(n,l,i)=>{mb.createRoot(n).render(V.jsx(K.StrictMode,{children:V.jsx(VS,{agentId:l,title:"Medi Clinic",iconUrl:i})}))};typeof window<"u"&&(window.renderMedAssist=jh);function eT(){}function tT(){}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 Uh(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"?Bh(n.value):!1:Bh(n)}function Bh(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 Lh(n,l){const i={},o={};for(const u of n)Object.assign(i,u.property),Object.assign(o,u.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(),Et=qr(),Ys=qr(),Se=qr(),ct=qr(),di=qr(),Jt=qr();function qr(){return 2**++WS}const Ps=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:Et,commaOrSpaceSeparated:Jt,commaSeparated:di,number:Se,overloadedBoolean:Ys,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Fs=Object.keys(Ps);class Vs extends qt{constructor(l,i,o,u){let s=-1;if(super(l,i),Ih(this,"space",u),typeof o=="number")for(;++s<Fs.length;){const c=Fs[s];Ih(this,Fs[s],(o&Ps[c])===Ps[c])}}}Vs.prototype.defined=!0;function Ih(n,l,i){i&&(n[l]=i)}function hi(n){const l={},i={};for(const[o,u]of Object.entries(n.properties)){const s=new Vs(o,n.transform(n.attributes||{},o),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(s.mustUseProperty=!0),l[o]=s,i[qs(o)]=o,i[qs(s.attribute)]=o}return new _a(l,i,n.space)}const Hh=hi({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:ct,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:Se,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:ct,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:Et,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function qh(n,l){return l in n?n[l]:l}function Yh(n,l){return qh(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:Se,colSpan:null,content:null,contentEditable:Et,controls:He,controlsList:ct,coords:Se|di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:Ys,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:ct,height:Se,hidden:Ys,high:Se,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:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,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:Se,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:Se,rowSpan:Se,sandbox:ct,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:Et,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,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:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:Yh}),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:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,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:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,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:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qh}),Ph=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()}}),Fh=hi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Yh}),Vh=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,Gh=/-[a-z]/g,r1=/^data[-\w.:]+$/i;function i1(n,l){const i=qs(l);let o=l,u=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 s=l.slice(5).replace(Gh,l1);o="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!Gh.test(s)){let c=s.replace(n1,a1);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=Vs}return new u(o,l)}function a1(n){return"-"+n.toLowerCase()}function l1(n){return n.charAt(1).toUpperCase()}const o1=Lh([Hh,$S,Ph,Fh,Vh],"html"),Gs=Lh([Hh,e1,Ph,Fh,Vh],"svg");function s1(n){return n.join(" ").trim()}var mi={},Xs,Xh;function u1(){if(Xh)return Xs;Xh=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,h=`
29
- `,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 F=w.lastIndexOf(h);O=~F?w.length-F:O+w.length}function L(){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 B(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 F=G[0];return H(F),T=T.slice(F.length),G}}function q(){P(i)}function oe(w){var G;for(w=w||[];G=ce();)G!==!1&&w.push(G);return w}function ce(){var w=L();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 B("End of comment missing");var F=T.slice(2,G-2);return O+=2,H(F),T=T.slice(G),O+=2,w({type:v,comment:F})}}function D(){var w=L(),G=P(o);if(G){if(ce(),!P(u))return B("property missing ':'");var F=P(s),Z=w({type:b,property:E(G[0].replace(n,g)),value:F?E(F[0].replace(n,g)):g});return P(c),Z}}function ee(){var w=[];oe(w);for(var G;G=D();)G!==!1&&(w.push(G),oe(w));return w}return q(),ee()}function E(T){return T?T.replace(d,g):g}return Xs=C,Xs}var Zh;function c1(){if(Zh)return mi;Zh=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,u){let s=null;if(!o||typeof o!="string")return s;const c=(0,l.default)(o),d=typeof u=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:y}=h;d?u(p,y,h):y&&(s=s||{},s[p]=y)}),s}return mi}var xa={},Kh;function f1(){if(Kh)return xa;Kh=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)-/,u=/^-(ms)-/,s=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={}),s(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(u,d):p=p.replace(o,d),p.replace(l,c))};return xa.camelCase=h,xa}var wa,Qh;function d1(){if(Qh)return wa;Qh=1;var n=wa&&wa.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=n(c1()),i=f1();function o(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(d,h){d&&h&&(c[(0,i.camelCase)(d,s)]=h)}),c}return o.default=o,wa=o,wa}var h1=d1();const m1=ss(h1),Jh=Wh("end"),Zs=Wh("start");function Wh(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=Jh(n);if(l&&i)return{start:l,end:i}}function Ca(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?$h(n.position):"start"in n||"end"in n?$h(n):"line"in n||"column"in n?Ks(n):""}function Ks(n){return em(n&&n.line)+":"+em(n&&n.column)}function $h(n){return Ks(n&&n.start)+"-"+Ks(n&&n.end)}function em(n){return n&&typeof n=="number"?n:1}class Bt 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 h=o.indexOf(":");h===-1?s.ruleId=o:(s.source=o.slice(0,h),s.ruleId=o.slice(h+1))}if(!s.place&&s.ancestors&&s.ancestors){const h=s.ancestors[s.ancestors.length-1];h&&(s.place=h.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=d?d.line:void 0,this.name=Ca(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}}Bt.prototype.file="",Bt.prototype.name="",Bt.prototype.reason="",Bt.prototype.message="",Bt.prototype.stack="",Bt.prototype.column=void 0,Bt.prototype.line=void 0,Bt.prototype.ancestors=void 0,Bt.prototype.cause=void 0,Bt.prototype.fatal=void 0,Bt.prototype.place=void 0,Bt.prototype.ruleId=void 0,Bt.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"]),tm="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 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"?Gs:o1,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=nm(u,n,void 0);return s&&typeof s!="string"?s:u.create(n,u.Fragment,{children:s||void 0},void 0)}function nm(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 u=o;l.tagName.toLowerCase()==="svg"&&o.space==="html"&&(u=Gs,n.schema=u),n.ancestors.push(l);const s=im(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})),rm(n,c,s,l),Js(c,d),n.ancestors.pop(),n.schema=o,n.create(l,s,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 u=o;l.name==="svg"&&o.space==="html"&&(u=Gs,n.schema=u),n.ancestors.push(l);const s=l.name===null?n.Fragment:im(n,l.name,!0),c=N1(n,l),d=Ws(n,l);return rm(n,c,s,l),Js(c,d),n.ancestors.pop(),n.schema=o,n.create(l,s,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 rm(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(u,s,c,d){const p=Array.isArray(c.children)?i:l;return d?p(s,c,d):p(s,c)}}function A1(n,l){return i;function i(o,u,s,c){const d=Array.isArray(s.children),h=Zs(o);return l(u,s,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,u;for(u in l.properties)if(u!=="children"&&Qs.call(l.properties,u)){const s=O1(n,u,l.properties[u]);if(s){const[c,d]=s;n.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&v1.has(l.tagName)?o=d:i[c]=d}}if(o){const s=i.style||(i.style={});s[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 s=o.data.estree.body[0];s.type;const c=s.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 u=o.name;let s;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,s=n.evaluater.evaluateExpression(d.expression)}else Ta(n,l.position);else s=o.value===null?!0:o.value;i[u]=s}return i}function Ws(n,l){const i=[];let o=-1;const u=n.passKeys?new Map:g1;for(;++o<l.children.length;){const s=l.children[o];let c;if(n.passKeys){const h=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(h){const p=u.get(h)||0;c=h+"-"+p,u.set(h,p+1)}}const d=nm(n,s,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 u=typeof i=="object"?i:z1(n,String(i));return n.stylePropertyNameCase==="css"&&(u=M1(u)),["style",u]}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,u=new Bt("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=tm+"#cannot-parse-style-attribute",u}}function im(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 d=Uh(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}o=c}else o=Uh(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(o.type==="Literal"){const u=o.value;return Qs.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(o);Ta(n)}function Ta(n,l){const i=new Bt("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=tm+"#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,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return am(n,o,u)}function am(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 lm(n.children,l,i)}return Array.isArray(n)?lm(n,l,i):""}function lm(n,l,i){const o=[];let u=-1;for(;++u<n.length;)o[u]=am(n[u],l,i);return o.join("")}function L1(n){return!!(n&&typeof n=="object")}const om=document.createElement("i");function eu(n){const l="&"+n+";";om.innerHTML=l;const i=om.textContent;return i.charCodeAt(i.length-1)===59&&n!=="semi"||i===l?!1:i}function Nn(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 cn(n,l){return n.length>0?(Nn(n,n.length,0,l),n):l}const sm={}.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 u=(sm.call(n,i)?n[i]:void 0)||(n[i]={}),s=l[i];let c;if(s)for(c in s){sm.call(u,c)||(u[c]=[]);const d=s[c];q1(u[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]);Nn(n,0,0,o)}function um(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 On=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 Ue(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,u=0;for(;++i<n.length;){const s=n.charCodeAt(i);let c="";if(s===37&&Wt(n.charCodeAt(i+1))&&Wt(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 d=n.charCodeAt(i+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),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 ft(n,l,i,o){const u=o?o-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(h){return tt(h)?(n.enter(i),d(h)):l(h)}function d(h){return tt(h)&&s++<u?(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,u);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 u(d){return n.enter("paragraph"),s(d)}function s(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 Ue(d)?(n.consume(d),n.exit("chunkText"),s):(n.consume(d),c)}}const K1={tokenize:Q1},cm={tokenize:J1};function Q1(n){const l=this,i=[];let o=0,u,s,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,u&&k();const H=l.events.length;let L=H,z;for(;L--;)if(l.events[L][0]==="exit"&&l.events[L][1].type==="chunkFlow"){z=l.events[L][1].end;break}_(o);let B=H;for(;B<l.events.length;)l.events[B][1].end={...z},B++;return Nn(l.events,L+1,0,l.events.slice(H)),l.events.length=B,p(O)}return d(O)}function p(O){if(o===i.length){if(!u)return v(O);if(u.currentConstruct&&u.currentConstruct.concrete)return C(O);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check(cm,y,g)(O)}function y(O){return u&&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(cm,b,C)(O)}function b(O){return o++,i.push([l.currentConstruct,l.containerState]),v(O)}function C(O){if(O===null){u&&k(),_(0),n.consume(O);return}return u=u||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),E(O)}function E(O){if(O===null){T(n.exit("chunkFlow"),!0),_(0),n.consume(O);return}return Ue(O)?(n.consume(O),T(n.exit("chunkFlow")),o=0,l.interrupt=void 0,d):(n.consume(O),E)}function T(O,H){const L=l.sliceStream(O);if(H&&L.push(null),O.previous=s,s&&(s.next=O),s=O,u.defineSkip(O.start),u.write(L),l.parser.lazy[O.start.line]){let z=u.events.length;for(;z--;)if(u.events[z][1].start.offset<c&&(!u.events[z][1].end||u.events[z][1].end.offset>c))return;const B=l.events.length;let P=B,q,oe;for(;P--;)if(l.events[P][0]==="exit"&&l.events[P][1].type==="chunkFlow"){if(q){oe=l.events[P][1].end;break}q=!0}for(_(o),z=B;z<l.events.length;)l.events[z][1].end={...oe},z++;Nn(l.events,P+1,0,l.events.slice(B)),l.events.length=z}}function _(O){let H=i.length;for(;H-- >O;){const L=i[H];l.containerState=L[1],L[0].exit.call(l,n)}i.length=O}function k(){u.write([null]),s=void 0,u=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 fm(n){if(n===null||Yt(n)||G1(n))return 1;if(V1(n))return 2}function ru(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 iu={name:"attention",resolveAll:W1,tokenize:$1};function W1(n,l){let i=-1,o,u,s,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};dm(g,-h),dm(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},s={type:h>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[i][1].start}},u={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",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),p=cn(p,ru(l.parser.constructs.insideSpan.null,n.slice(o+1,i),l)),p=cn(p,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",u,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,Nn(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,u=fm(o);let s;return c;function c(h){return s=h,n.enter("attentionSequence"),d(h)}function d(h){if(h===s)return n.consume(h),d;const p=n.exit("attentionSequence"),y=fm(h),g=!y||y===2&&u||i.includes(h),v=!u||u===2&&y||i.includes(o);return p._open=!!(s===42?g:g&&(u||!v)),p._close=!!(s===42?v:v&&(y||!g)),l(h)}}function dm(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 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 On(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 Bl={partial:!0,tokenize:nE};function nE(n,l,i){return o;function o(s){return tt(s)?ft(n,u,"linePrefix")(s):u(s)}function u(s){return s===null||Ue(s)?l(s):i(s)}}const hm={continuation:{tokenize:iE},exit:aE,name:"blockQuote",tokenize:rE};function rE(n,l,i){const o=this;return u;function u(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"),s}return i(c)}function s(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 u;function u(c){return tt(c)?ft(n,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return n.attempt(hm,l,i)(c)}}function aE(n){n.exit("blockQuote")}const mm={name:"characterEscape",tokenize:lE};function lE(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 F1(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):i(s)}}const pm={name:"characterReference",tokenize:oE};function oE(n,l,i){const o=this;let u=0,s,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"),s=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"),s=6,c=P1,y):(n.enter("characterReferenceValue"),s=7,c=nu,y(g))}function y(g){if(g===59&&u){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)&&u++<s?(n.consume(g),y):i(g)}}const gm={partial:!0,tokenize:uE},ym={concrete:!0,name:"codeFenced",tokenize:sE};function sE(n,l,i){const o=this,u={partial:!0,tokenize:L};let s=0,c=0,d;return h;function h(z){return p(z)}function p(z){const B=o.events[o.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[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||Ue(z)?(n.exit("codeFencedFence"),o.interrupt?l(z):n.check(gm,E,H)(z)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),v(z))}function v(z){return z===null||Ue(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||Ue(z)?g(z):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),C(z))}function C(z){return z===null||Ue(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(u,H,T)(z)}function T(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),_}function _(z){return s>0&&tt(z)?ft(n,k,"linePrefix",s+1)(z):k(z)}function k(z){return z===null||Ue(z)?n.check(gm,E,H)(z):(n.enter("codeFlowValue"),O(z))}function O(z){return z===null||Ue(z)?(n.exit("codeFlowValue"),k(z)):(n.consume(z),O)}function H(z){return n.exit("codeFenced"),l(z)}function L(z,B,P){let q=0;return oe;function oe(G){return z.enter("lineEnding"),z.consume(G),z.exit("lineEnding"),ce}function ce(G){return z.enter("codeFencedFence"),tt(G)?ft(z,D,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):D(G)}function D(G){return G===d?(z.enter("codeFencedFenceSequence"),ee(G)):P(G)}function ee(G){return G===d?(q++,z.consume(G),ee):q>=c?(z.exit("codeFencedFenceSequence"),tt(G)?ft(z,w,"whitespace")(G):w(G)):P(G)}function w(G){return G===null||Ue(G)?(z.exit("codeFencedFence"),B(G)):P(G)}}}function uE(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 au={name:"codeIndented",tokenize:fE},cE={partial:!0,tokenize:dE};function fE(n,l,i){const o=this;return u;function u(p){return n.enter("codeIndented"),ft(n,s,"linePrefix",5)(p)}function s(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):Ue(p)?n.attempt(cE,c,h)(p):(n.enter("codeFlowValue"),d(p))}function d(p){return p===null||Ue(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 u;function u(c){return o.parser.lazy[o.now().line]?i(c):Ue(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):ft(n,s,"linePrefix",5)(c)}function s(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):Ue(c)?u(c):i(c)}}const hE={name:"codeText",previous:pE,resolve:mE,tokenize:gE};function mE(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 pE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function gE(n,l,i){let o=0,u,s;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?(s=n.enter("codeTextSequence"),u=0,y(g)):Ue(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||Ue(g)?(n.exit("codeTextData"),h(g)):(n.consume(g),p)}function y(g){return g===96?(n.consume(g),u++,y):u===o?(n.exit("codeTextSequence"),n.exit("codeText"),l(g)):(s.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 u=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return o&&ka(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),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 bm(n){const l={};let i=-1,o,u,s,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,s=0,s<h.length&&h[s][1].type==="lineEndingBlank"&&(s+=2),s<h.length&&h[s][1].type==="content"))for(;++s<h.length&&h[s][1].type!=="content";)h[s][1].type==="chunkText"&&(h[s][1]._isInFirstContentOfListItem=!0,s++);if(o[0]==="enter")o[1].contentType&&(Object.assign(l,bE(y,i)),i=l[i],p=!0);else if(o[1]._container){for(s=i,u=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(y.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={...y.get(u)[1].start},d=y.slice(u,i),d.unshift(o),y.splice(u,i-u+1,d))}}return Nn(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 u=l-1;const s=[];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(++u)[1]!==b;);s.push(u),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=s.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 bm(n),n}function _E(n,l){let i;return o;function o(d){return n.enter("content"),i=n.enter("chunkContent",{contentType:"content"}),u(d)}function u(d){return d===null?s(d):Ue(d)?n.check(SE,c,s)(d):(n.consume(d),u)}function s(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,u}}function xE(n,l,i){const o=this;return u;function u(c){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),ft(n,s,"linePrefix")}function s(c){if(c===null||Ue(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 vm(n,l,i,o,u,s,c,d,h){const p=h||Number.POSITIVE_INFINITY;let y=0;return g;function g(_){return _===60?(n.enter(o),n.enter(u),n.enter(s),n.consume(_),n.exit(s),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(s),n.consume(_),n.exit(s),n.exit(u),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||Ue(_)?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 Sm(n,l,i,o,u,s){const c=this;let d=0,h;return p;function p(b){return n.enter(o),n.enter(u),n.consume(b),n.exit(u),n.enter(s),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(s),n.enter(u),n.consume(b),n.exit(u),n.exit(o),l):Ue(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||Ue(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 Em(n,l,i,o,u,s){let c;return d;function d(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,h):i(v)}function h(v){return v===c?(n.enter(u),n.consume(v),n.exit(u),n.exit(o),l):(n.enter(s),p(v))}function p(v){return v===c?(n.exit(s),h(c)):v===null?i(v):Ue(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||Ue(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(u){return Ue(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),i=!0,o):tt(u)?ft(n,o,i?"linePrefix":"lineSuffix")(u):l(u)}}const wE={name:"definition",tokenize:TE},CE={partial:!0,tokenize:kE};function TE(n,l,i){const o=this;let u;return s;function s(b){return n.enter("definition"),c(b)}function c(b){return Sm.call(o,n,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return u=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 vm(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||Ue(b)?(n.exit("definition"),o.parser.defined.push(u),l(b)):i(b)}}function kE(n,l,i){return o;function o(d){return Yt(d)?Aa(n,u)(d):i(d)}function u(d){return Em(n,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return tt(d)?ft(n,c,"whitespace")(d):c(d)}function c(d){return d===null||Ue(d)?l(d):i(d)}}const AE={name:"hardBreakEscape",tokenize:RE};function RE(n,l,i){return o;function o(s){return n.enter("hardBreakEscape"),n.consume(s),u}function u(s){return Ue(s)?(n.exit("hardBreakEscape"),l(s)):i(s)}}const NE={name:"headingAtx",resolve:OE,tokenize:zE};function OE(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"},Nn(n,o,i-o+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),n}function zE(n,l,i){let o=0;return u;function u(y){return n.enter("atxHeading"),s(y)}function s(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||Ue(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"],_m=["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 u,s,c,d,h;return p;function p(A){return y(A)}function y(A){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(A),g}function g(A){return A===33?(n.consume(A),v):A===47?(n.consume(A),s=!0,E):A===63?(n.consume(A),u=3,o.interrupt?l:M):On(A)?(n.consume(A),c=String.fromCharCode(A),T):i(A)}function v(A){return A===45?(n.consume(A),u=2,b):A===91?(n.consume(A),u=5,d=0,C):On(A)?(n.consume(A),u=4,o.interrupt?l:M):i(A)}function b(A){return A===45?(n.consume(A),o.interrupt?l:M):i(A)}function C(A){const ne="CDATA[";return A===ne.charCodeAt(d++)?(n.consume(A),d===ne.length?o.interrupt?l:D:C):i(A)}function E(A){return On(A)?(n.consume(A),c=String.fromCharCode(A),T):i(A)}function T(A){if(A===null||A===47||A===62||Yt(A)){const ne=A===47,$=c.toLowerCase();return!ne&&!s&&_m.includes($)?(u=1,o.interrupt?l(A):D(A)):ME.includes(c.toLowerCase())?(u=6,ne?(n.consume(A),_):o.interrupt?l(A):D(A)):(u=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(A):s?k(A):O(A))}return A===45||Wt(A)?(n.consume(A),c+=String.fromCharCode(A),T):i(A)}function _(A){return A===62?(n.consume(A),o.interrupt?l:D):i(A)}function k(A){return tt(A)?(n.consume(A),k):oe(A)}function O(A){return A===47?(n.consume(A),oe):A===58||A===95||On(A)?(n.consume(A),H):tt(A)?(n.consume(A),O):oe(A)}function H(A){return A===45||A===46||A===58||A===95||Wt(A)?(n.consume(A),H):L(A)}function L(A){return A===61?(n.consume(A),z):tt(A)?(n.consume(A),L):O(A)}function z(A){return A===null||A===60||A===61||A===62||A===96?i(A):A===34||A===39?(n.consume(A),h=A,B):tt(A)?(n.consume(A),z):P(A)}function B(A){return A===h?(n.consume(A),h=null,q):A===null||Ue(A)?i(A):(n.consume(A),B)}function P(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Yt(A)?L(A):(n.consume(A),P)}function q(A){return A===47||A===62||tt(A)?O(A):i(A)}function oe(A){return A===62?(n.consume(A),ce):i(A)}function ce(A){return A===null||Ue(A)?D(A):tt(A)?(n.consume(A),ce):i(A)}function D(A){return A===45&&u===2?(n.consume(A),F):A===60&&u===1?(n.consume(A),Z):A===62&&u===4?(n.consume(A),R):A===63&&u===3?(n.consume(A),M):A===93&&u===5?(n.consume(A),fe):Ue(A)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(jE,j,ee)(A)):A===null||Ue(A)?(n.exit("htmlFlowData"),ee(A)):(n.consume(A),D)}function ee(A){return n.check(UE,w,j)(A)}function w(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),G}function G(A){return A===null||Ue(A)?ee(A):(n.enter("htmlFlowData"),D(A))}function F(A){return A===45?(n.consume(A),M):D(A)}function Z(A){return A===47?(n.consume(A),c="",ie):D(A)}function ie(A){if(A===62){const ne=c.toLowerCase();return _m.includes(ne)?(n.consume(A),R):D(A)}return On(A)&&c.length<8?(n.consume(A),c+=String.fromCharCode(A),ie):D(A)}function fe(A){return A===93?(n.consume(A),M):D(A)}function M(A){return A===62?(n.consume(A),R):A===45&&u===2?(n.consume(A),M):D(A)}function R(A){return A===null||Ue(A)?(n.exit("htmlFlowData"),j(A)):(n.consume(A),R)}function j(A){return n.exit("htmlFlow"),l(A)}}function IE(n,l,i){const o=this;return u;function u(c){return Ue(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 HE(n,l,i){return o;function o(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Bl,l,i)}}const qE={name:"htmlText",tokenize:YE};function YE(n,l,i){const o=this;let u,s,c;return d;function d(M){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(M),h}function h(M){return M===33?(n.consume(M),p):M===47?(n.consume(M),L):M===63?(n.consume(M),O):On(M)?(n.consume(M),P):i(M)}function p(M){return M===45?(n.consume(M),y):M===91?(n.consume(M),s=0,C):On(M)?(n.consume(M),k):i(M)}function y(M){return M===45?(n.consume(M),b):i(M)}function g(M){return M===null?i(M):M===45?(n.consume(M),v):Ue(M)?(c=g,Z(M)):(n.consume(M),g)}function v(M){return M===45?(n.consume(M),b):g(M)}function b(M){return M===62?F(M):M===45?v(M):g(M)}function C(M){const R="CDATA[";return M===R.charCodeAt(s++)?(n.consume(M),s===R.length?E:C):i(M)}function E(M){return M===null?i(M):M===93?(n.consume(M),T):Ue(M)?(c=E,Z(M)):(n.consume(M),E)}function T(M){return M===93?(n.consume(M),_):E(M)}function _(M){return M===62?F(M):M===93?(n.consume(M),_):E(M)}function k(M){return M===null||M===62?F(M):Ue(M)?(c=k,Z(M)):(n.consume(M),k)}function O(M){return M===null?i(M):M===63?(n.consume(M),H):Ue(M)?(c=O,Z(M)):(n.consume(M),O)}function H(M){return M===62?F(M):O(M)}function L(M){return On(M)?(n.consume(M),z):i(M)}function z(M){return M===45||Wt(M)?(n.consume(M),z):B(M)}function B(M){return Ue(M)?(c=B,Z(M)):tt(M)?(n.consume(M),B):F(M)}function P(M){return M===45||Wt(M)?(n.consume(M),P):M===47||M===62||Yt(M)?q(M):i(M)}function q(M){return M===47?(n.consume(M),F):M===58||M===95||On(M)?(n.consume(M),oe):Ue(M)?(c=q,Z(M)):tt(M)?(n.consume(M),q):F(M)}function oe(M){return M===45||M===46||M===58||M===95||Wt(M)?(n.consume(M),oe):ce(M)}function ce(M){return M===61?(n.consume(M),D):Ue(M)?(c=ce,Z(M)):tt(M)?(n.consume(M),ce):q(M)}function D(M){return M===null||M===60||M===61||M===62||M===96?i(M):M===34||M===39?(n.consume(M),u=M,ee):Ue(M)?(c=D,Z(M)):tt(M)?(n.consume(M),D):(n.consume(M),w)}function ee(M){return M===u?(n.consume(M),u=void 0,G):M===null?i(M):Ue(M)?(c=ee,Z(M)):(n.consume(M),ee)}function w(M){return M===null||M===34||M===39||M===60||M===61||M===96?i(M):M===47||M===62||Yt(M)?q(M):(n.consume(M),w)}function G(M){return M===47||M===62||Yt(M)?q(M):i(M)}function F(M){return M===62?(n.consume(M),n.exit("htmlTextData"),n.exit("htmlText"),l):i(M)}function Z(M){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(M),n.exit("lineEnding"),ie}function ie(M){return tt(M)?ft(n,fe,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):fe(M)}function fe(M){return n.enter("htmlTextData"),c(M)}}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 u=o.type==="labelImage"?4:2;o.type="data",l+=u}}return n.length!==i.length&&Nn(n,0,n.length,i),n}function XE(n,l){let i=n.length,o=0,u,s,c,d;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 h={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},p={type:"label",start:{...n[s][1].start},end:{...n[c][1].end}},y={type:"labelText",start:{...n[s+o+2][1].end},end:{...n[c-2][1].start}};return d=[["enter",h,l],["enter",p,l]],d=cn(d,n.slice(s+1,s+o+3)),d=cn(d,[["enter",y,l]]),d=cn(d,ru(l.parser.constructs.insideSpan.null,n.slice(s+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]]),Nn(n,s,n.length,d),n}function ZE(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 d;function d(v){return s?s._inactive?g(v):(c=o.parser.defined.includes(pi(o.sliceSerialize({start:s.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 s._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"),u}function u(g){return Yt(g)?Aa(n,s)(g):s(g)}function s(g){return g===41?y(g):vm(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?Em(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 u;function u(d){return Sm.call(o,n,s,c,"reference","referenceMarker","referenceString")(d)}function s(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(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 WE={name:"labelStartImage",resolveAll:lu.resolveAll,tokenize:$E};function $E(n,l,i){const o=this;return u;function u(d){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(d),n.exit("labelImageMarker"),s}function s(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 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 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 Ll={name:"thematicBreak",tokenize:r_};function r_(n,l,i){let o=0,u;return s;function s(p){return n.enter("thematicBreak"),c(p)}function c(p){return u=p,d(p)}function d(p){return p===u?(n.enter("thematicBreakSequence"),h(p)):o>=3&&(p===null||Ue(p))?(n.exit("thematicBreak"),l(p)):i(p)}function h(p){return p===u?(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,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 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(Ll,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(Bl,o.interrupt?i:y,n.attempt(i_,v,g))}function y(b){return o.containerState.initialBlankLine=!0,s++,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=s+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(Bl,u,s);function u(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,ft(n,l,"listItemIndent",o.containerState.size+1)(d)}function s(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,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 u_(n){n.exit(this.containerState.type)}function c_(n,l,i){const o=this;return ft(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!tt(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const xm={name:"setextUnderline",resolveTo:f_,tokenize:d_};function f_(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 d_(n,l,i){const o=this;let u;return s;function s(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"),u=p,c(p)):i(p)}function c(p){return n.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===u?(n.consume(p),d):(n.exit("setextHeadingLineSequence"),tt(p)?ft(n,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Ue(p)?(n.exit("setextHeadingLine"),l(p)):i(p)}}const h_={tokenize:m_};function m_(n){const l=this,i=n.attempt(Bl,o,n.attempt(this.parser.constructs.flowInitial,u,ft(n,n.attempt(this.parser.constructs.flow,u,n.attempt(vE,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 p_={resolveAll:Cm()},g_=wm("string"),y_=wm("text");function wm(n){return{resolveAll:Cm(n==="text"?b_:void 0),tokenize:l};function l(i){const o=this,u=this.parser.constructs[n],s=i.attempt(u,c,d);return c;function c(y){return p(y)?s(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"),s(y)):(i.consume(y),h)}function p(y){if(y===null)return!0;const g=u[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 Cm(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 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],u=l.sliceStream(o);let s=u.length,c=-1,d=0,h;for(;s--;){const p=u[s];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){s++;break}}if(l._contentTypeTextTrailing&&i===n.length&&(d=0),d){const p={type:i===n.length||h||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:o.start._bufferIndex+c,_index:o.start._index+s,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:hm},flow:{35:NE,42:Ll,45:[xm,Ll],60:DE,61:xm,95:Ll,96:ym,126:ym},flowInitial:{[-2]:au,[-1]:au,32:au},insideSpan:{null:[iu,p_]},string:{38:pm,92:mm},text:{[-5]:ou,[-4]:ou,[-3]:ou,33:WE,38:pm,42:iu,60:[eE,qE],91:e_,92:[AE,mm],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 u={},s=[];let c=[],d=[];const h={attempt:B(L),check:B(z),consume:k,enter:O,exit:H,interrupt:B(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&&s.push(l),p;function g(ce){return c=cn(c,ce),T(),c[c.length-1]!==null?[]:(P(l,0),p.events=ru(s,p.events,p),p.events)}function v(ce,D){return __(b(ce),D)}function b(ce){return E_(c,ce)}function C(){const{_bufferIndex:ce,_index:D,line:ee,column:w,offset:G}=o;return{_bufferIndex:ce,_index:D,line:ee,column:w,offset:G}}function E(ce){u[ce.line]=ce.column,oe()}function T(){let ce;for(;o._index<c.length;){const D=c[o._index];if(typeof D=="string")for(ce=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ce&&o._bufferIndex<D.length;)_(D.charCodeAt(o._bufferIndex));else _(D)}}function _(ce){y=y(ce)}function k(ce){Ue(ce)?(o.line++,o.column=1,o.offset+=ce===-3?2:1,oe()):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,D){const ee=D||{};return ee.type=ce,ee.start=C(),p.events.push(["enter",ee,p]),d.push(ee),ee}function H(ce){const D=d.pop();return D.end=C(),p.events.push(["exit",D,p]),D}function L(ce,D){P(ce,D.from)}function z(ce,D){D.restore()}function B(ce,D){return ee;function ee(w,G,F){let Z,ie,fe,M;return Array.isArray(w)?j(w):"tokenize"in w?j([w]):R(w);function R(de){return _e;function _e(ke){const Te=ke!==null&&de[ke],Me=ke!==null&&de.null,Be=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return j(Be)(ke)}}function j(de){return Z=de,ie=0,de.length===0?F:A(de[ie])}function A(de){return _e;function _e(ke){return M=q(),fe=de,de.partial||(p.currentConstruct=de),de.name&&p.parser.constructs.disable.null.includes(de.name)?$():de.tokenize.call(D?Object.assign(Object.create(p),D):p,h,ne,$)(ke)}}function ne(de){return ce(fe,M),G}function $(de){return M.restore(),++ie<Z.length?A(Z[ie]):F}}}function P(ce,D){ce.resolveAll&&!s.includes(ce)&&s.push(ce),ce.resolve&&Nn(p.events,D,p.events.length-D,ce.resolve(p.events.slice(D),p)),ce.resolveTo&&(p.events=ce.resolveTo(p.events,p))}function q(){const ce=C(),D=p.previous,ee=p.currentConstruct,w=p.events.length,G=Array.from(d);return{from:w,restore:F};function F(){o=ce,p.previous=D,p.currentConstruct=ee,p.events.length=w,d=G,oe()}}function oe(){o.line in u&&o.column<2&&(o.column=u[o.line],o.offset+=u[o.line]-1)}}function E_(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 d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}s>0&&c.push(n[u].slice(0,s))}return c}function __(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=`
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=`
30
49
  `;break}case-3:{c=`\r
31
- `;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 x_(n){const o={constructs:I1([v_,...(n||{}).extensions||[]]),content:u(X1),defined:[],document:u(K1),flow:u(h_),lazy:{},string:u(g_),text:u(y_)};return o;function u(s){return c;function c(d){return S_(o,s,d)}}}function w_(n){for(;!bm(n););return n}const Tm=/[\0\t\n\r]/g;function C_(){let n=1,l="",i=!0,o;return u;function u(s,c,d){const h=[];let p,y,g,v,b;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(Tm.lastIndex=g,p=Tm.exec(s),v=p&&p.index!==void 0?p.index:s.length,b=s.charCodeAt(v),!p){l=s.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(s.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 u=i.charCodeAt(1),s=u===120||u===88;return um(i.slice(s?2:1),s?16:10)}return eu(i)||n}const km={}.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:s(Q),autolinkProtocol:q,autolinkEmail:q,atxHeading:s(me),blockQuote:s(Me),characterEscape:q,characterReference:q,codeFenced:s(Be),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Be,c),codeText:s(at,c),codeTextData:q,data:q,codeFlowValue:q,definition:s(Lt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(x),hardBreakEscape:s(ue),hardBreakTrailing:s(ue),htmlFlow:s(I,c),htmlFlowData:q,htmlText:s(I,c),htmlTextData:q,image:s(U),label:c,link:s(Q),listItem:s(ve),listItemValue:v,listOrdered:s(ye,g),listUnordered:s(ye),paragraph:s(ae),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(me),strong:s(Ee),thematicBreak:s(xe)},exit:{atxHeading:h(),atxHeadingSequence:L,autolink:h(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:h(),characterEscapeValue:oe,characterReferenceMarkerHexadecimal:$,characterReferenceMarkerNumeric:$,characterReferenceValue:de,characterReference:_e,codeFenced:h(T),codeFencedFence:E,codeFencedFenceInfo:b,codeFencedFenceMeta:C,codeFlowValue:oe,codeIndented:h(_),codeText:h(G),codeTextData:oe,data:oe,definition:h(),definitionDestinationString:H,definitionLabelString:k,definitionTitleString:O,emphasis:h(),hardBreakEscape:h(D),hardBreakTrailing:h(D),htmlFlow:h(ee),htmlFlowData:oe,htmlText:h(w),htmlTextData:oe,image:h(Z),label:fe,labelText:ie,lineEnding:ce,link:h(F),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:M,resourceTitleString:R,resource:j,setextHeading:h(P),setextHeadingLineSequence:B,setextHeadingText:z,strong:h(),thematicBreak:h()}};Am(l,(n||{}).mdastExtensions||[]);const i={};return o;function o(W){let be={type:"root",children:[]};const we={stack:[be],tokenStack:[],config:l,enter:d,exit:p,buffer:c,resume:y,data:i},je=[];let Xe=-1;for(;++Xe<W.length;)if(W[Xe][1].type==="listOrdered"||W[Xe][1].type==="listUnordered")if(W[Xe][0]==="enter")je.push(Xe);else{const mt=je.pop();Xe=u(W,mt,Xe)}for(Xe=-1;++Xe<W.length;){const mt=l[W[Xe][0]];km.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]||Rm).call(we,void 0,mt[0])}for(be.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;)be=l.transforms[Xe](be)||be;return be}function u(W,be,we){let je=be-1,Xe=-1,mt=!1,It,Pe,pt,At;for(;++je<=we;){const Fe=W[je];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?Xe++:Xe--,At=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(It&&!At&&!Xe&&!pt&&(pt=je),At=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:At=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=je;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||je,0,["exit",It,Fe[2]]),je++,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(je,0,["enter",xn,Fe[2]]),je++,we++,pt=void 0,At=!0}}}return W[be][1]._spread=mt,we}function s(W,be){return we;function we(je){d.call(this,W(je),je),be&&be.call(this,je)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(W,be,we){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([be,we||void 0]),W.position={start:cr(be.start),end:void 0}}function h(W){return be;function be(we){W&&W.call(this,we),p.call(this,we)}}function p(W,be){const we=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==W.type&&(be?be.call(this,W,je[0]):(je[1]||Rm).call(this,W,je[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 be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function b(){const W=this.resume(),be=this.stack[this.stack.length-1];be.lang=W}function C(){const W=this.resume(),be=this.stack[this.stack.length-1];be.meta=W}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const W=this.resume(),be=this.stack[this.stack.length-1];be.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const W=this.resume(),be=this.stack[this.stack.length-1];be.value=W.replace(/(\r?\n|\r)$/g,"")}function k(W){const be=this.resume(),we=this.stack[this.stack.length-1];we.label=be,we.identifier=pi(this.sliceSerialize(W)).toLowerCase()}function O(){const W=this.resume(),be=this.stack[this.stack.length-1];be.title=W}function H(){const W=this.resume(),be=this.stack[this.stack.length-1];be.url=W}function L(W){const be=this.stack[this.stack.length-1];if(!be.depth){const we=this.sliceSerialize(W).length;be.depth=we}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function B(W){const be=this.stack[this.stack.length-1];be.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 je=we[we.length-1];(!je||je.type!=="text")&&(je=Ce(),je.position={start:cr(W.start),end:void 0},we.push(je)),this.stack.push(je)}function oe(W){const be=this.stack.pop();be.value+=this.sliceSerialize(W),be.position.end=cr(W.end)}function ce(W){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=be.children[be.children.length-1];we.position.end=cr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(be.type)&&(q.call(this,W),oe.call(this,W))}function D(){this.data.atHardBreak=!0}function ee(){const W=this.resume(),be=this.stack[this.stack.length-1];be.value=W}function w(){const W=this.resume(),be=this.stack[this.stack.length-1];be.value=W}function G(){const W=this.resume(),be=this.stack[this.stack.length-1];be.value=W}function F(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=be,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 be=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=be,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function ie(W){const be=this.sliceSerialize(W),we=this.stack[this.stack.length-2];we.label=k_(be),we.identifier=pi(be).toLowerCase()}function fe(){const W=this.stack[this.stack.length-1],be=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const je=W.children;we.children=je}else we.alt=be}function M(){const W=this.resume(),be=this.stack[this.stack.length-1];be.url=W}function R(){const W=this.resume(),be=this.stack[this.stack.length-1];be.title=W}function j(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ne(W){const be=this.resume(),we=this.stack[this.stack.length-1];we.label=be,we.identifier=pi(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function $(W){this.data.characterReferenceType=W.type}function de(W){const be=this.sliceSerialize(W),we=this.data.characterReferenceType;let je;we?(je=um(be,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=eu(be);const Xe=this.stack[this.stack.length-1];Xe.value+=je}function _e(W){const be=this.stack.pop();be.position.end=cr(W.end)}function ke(W){oe.call(this,W);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(W)}function Te(W){oe.call(this,W);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(W)}function Me(){return{type:"blockquote",children:[]}}function Be(){return{type:"code",lang:null,meta:null,value:""}}function at(){return{type:"inlineCode",value:""}}function Lt(){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 ye(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function ve(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function Ee(){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 Am(n,l){let i=-1;for(;++i<l.length;){const o=l[i];Array.isArray(o)?Am(n,o):O_(n,o)}}function O_(n,l){let i;for(i in l)if(km.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 Rm(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:`
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:`
32
51
  `}]}function j_(n,l){const i=l.value?l.value+`
33
- `:"",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 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(),u=gi(o.toLowerCase()),s=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=s+1,d+=1,n.footnoteCounts.set(o,d);const h={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+u,id:i+"fnref-"+u+(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 Nm(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 q_(n,l){const i=String(l.identifier).toUpperCase(),o=n.definitionById.get(i);if(!o)return Nm(n,l);const u={src:gi(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 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 Nm(n,l);const u={href:gi(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 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),u=i?X_(i):Om(l),s={},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:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<o.length;){const y=o[d];(u||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
34
- `}),y.type==="element"&&y.tagName==="p"&&!u?c.push(...y.children):c.push(y)}const h=o[o.length-1];h&&(u||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
35
- `});const p={type:"element",tagName:"li",properties:s,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=Om(i[o])}return l}function Om(n){const l=n.spread;return l??n.children.length>1}function Z_(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 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(),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)},d=Zs(l.children[1]),h=Jh(l.children[l.children.length-1]);d&&h&&(c.position={start:d,end:h}),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 $_(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,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:s,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 zm=9,Mm=32;function tx(n){const l=String(n),i=/\r?\n|\r/g;let o=i.exec(l),u=0;const s=[];for(;o;)s.push(Dm(l.slice(u,o.index),u>0,!0),o[0]),u=o.index+o[0].length,o=i.exec(l);return s.push(Dm(l.slice(u),u>0,!1)),s.join("")}function Dm(n,l,i){let o=0,u=n.length;if(l){let s=n.codePointAt(o);for(;s===zm||s===Mm;)o++,s=n.codePointAt(o)}if(i){let s=n.codePointAt(u-1);for(;s===zm||s===Mm;)u--,s=n.codePointAt(u-1)}return u>o?n.slice(o,u):""}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:Il,yaml:Il,definition:Il,footnoteDefinition:Il};function Il(){}const jm=-1,Hl=0,Ra=1,ql=2,su=3,uu=4,cu=5,fu=6,Um=7,Bm=8,Lm=typeof self=="object"?self:globalThis,ax=(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 Hl:case jm:return i(c,u);case Ra:{const d=i([],u);for(const h of c)d.push(o(h));return d}case ql:{const d=i({},u);for(const[h,p]of c)d[o(h)]=o(p);return d}case su:return i(new Date(c),u);case uu:{const{source:d,flags:h}=c;return i(new RegExp(d,h),u)}case cu:{const d=i(new Map,u);for(const[h,p]of c)d.set(o(h),o(p));return d}case fu:{const d=i(new Set,u);for(const h of c)d.add(o(h));return d}case Um:{const{name:d,message:h}=c;return i(new Lm[d](h),u)}case Bm: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:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(new Lm[s](c),u)};return o},Im=n=>ax(new Map,n)(0),yi="",{toString:lx}={},{keys:ox}=Object,Na=n=>{const l=typeof n;if(l!=="object"||!n)return[Hl,l];const i=lx.call(n).slice(8,-1);switch(i){case"Array":return[Ra,yi];case"Object":return[ql,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")?[Um,i]:[ql,i]},Yl=([n,l])=>n===Hl&&(l==="function"||l==="symbol"),sx=(n,l,i,o)=>{const u=(c,d)=>{const h=o.push(c)-1;return i.set(d,h),h},s=c=>{if(i.has(c))return i.get(c);let[d,h]=Na(c);switch(d){case Hl:{let y=c;switch(h){case"bigint":d=Bm,y=c.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+h);y=null;break;case"undefined":return u([jm],c)}return u([d,y],c)}case Ra:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),u([h,[...v]],c)}const y=[],g=u([d,y],c);for(const v of c)y.push(s(v));return g}case ql:{if(h)switch(h){case"BigInt":return u([h,c.toString()],c);case"Boolean":case"Number":case"String":return u([h,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const y=[],g=u([d,y],c);for(const v of ox(c))(n||!Yl(Na(c[v])))&&y.push([s(v),s(c[v])]);return g}case su:return u([d,c.toISOString()],c);case uu:{const{source:y,flags:g}=c;return u([d,{source:y,flags:g}],c)}case cu:{const y=[],g=u([d,y],c);for(const[v,b]of c)(n||!(Yl(Na(v))||Yl(Na(b))))&&y.push([s(v),s(b)]);return g}case fu:{const y=[],g=u([d,y],c);for(const v of c)(n||!Yl(Na(v)))&&y.push(s(v));return g}}const{message:p}=c;return u([d,{name:h,message:p}],c)};return s},Hm=(n,{json:l,lossy:i}={})=>{const o=[];return sx(!(l||i),!!l,new Map,o)(n),o},Pl=typeof structuredClone=="function"?(n,l)=>l&&("json"in l||"lossy"in l)?Im(Hm(n,l)):structuredClone(n):(n,l)=>Im(Hm(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,u=n.options.footnoteLabel||"Footnotes",s=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:s,properties:{...Pl(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",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:`
36
55
  `},{type:"element",tagName:"ol",properties:{},children:n.wrap(d,!0)},{type:"text",value:`
37
- `}]}}const qm=(function(n){if(n==null)return px;if(typeof n=="function")return Fl(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]=qm(n[i]);return Fl(o);function o(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function hx(n){const l=n;return Fl(i);function i(o){const u=o;let s;for(s in n)if(u[s]!==l[s])return!1;return!0}}function mx(n){return Fl(l);function l(i){return i&&i.type===n}}function Fl(n){return l;function l(i,o,u){return!!(gx(i)&&n.call(this,i,typeof o=="number"?o:void 0,u||void 0))}}function px(){return!0}function gx(n){return n!==null&&typeof n=="object"&&"type"in n}function fT(n){return n}const Ym=[],yx=!0,Pm=!1,bx="skip";function vx(n,l,i,o){let u;typeof l=="function"&&typeof i!="function"?(o=i,i=l):u=l;const s=qm(u),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=Ym,C,E,T;if((!l||s(h,p,y[y.length-1]||void 0))&&(b=Sx(i(h,y)),b[0]===Pm))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]===Pm)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?Ym:[n]}function Fm(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),vx(n,s,d,u);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,u=new Map,s=new Map,c={...ix,...i.handlers},d={all:p,applyData:wx,definitionById:o,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:h,options:i,patch:xx,wrap:Tx};return Fm(n,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?o:u,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,_=Pl(T);return _.children=d.all(y),_}return Pl(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=Vm(C.value)),!Array.isArray(C)&&C.type==="element")){const E=C.children[0];E&&E.type==="text"&&(E.value=Vm(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,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,Pl(s)),"children"in i&&i.children&&u!==null&&u!==void 0&&(i.children=u)}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:`
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:`
38
57
  `});++o<n.length;)o&&i.push({type:"text",value:`
39
58
  `}),i.push(n[o]);return l&&n.length>0&&i.push({type:"text",value:`
40
- `}),i}function Vm(n){let l=0,i=n.charCodeAt(l);for(;i===9||i===32;)l++,i=n.charCodeAt(l);return n.slice(l)}function Gm(n,l){const i=_x(n,l),o=i.one(n,void 0),u=fx(i),s=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
41
- `},u),s}function kx(n,l){return n&&"run"in n?async function(i,o){const u=Gm(i,{file:o,...l});await n.run(u,o)}:function(i,o){return Gm(i,{file:o,...n||l})}}function Xm(n){if(n)throw n}var hu,Zm;function Ax(){if(Zm)return hu;Zm=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u=function(p){return typeof Array.isArray=="function"?Array.isArray(p):l.call(p)==="[object Array]"},s=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&&(s(v)||(b=u(v)))?(b?(b=!1,C=g&&u(g)?g:[]):C=g&&s(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=ss(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(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...u);function d(h,...p){const y=n[++s];let g=-1;if(h){c(h);return}for(;++g<u.length;)(p[g]===null||p[g]===void 0)&&(p[g]=u[g]);u=p,y?Ox(y,d)(...p):c(null,...p)}}function o(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),l}}function Ox(n,l){let i;return o;function o(...c){const d=n.length>c.length;let h;d&&c.push(u);try{h=n.apply(this,c)}catch(p){const y=p;if(d&&i)throw y;return u(y)}d||(h&&h.then&&typeof h.then=="function"?h.then(s,u):h instanceof Error?u(h):s(h))}function u(c,...d){i||(i=!0,l(c,...d))}function s(c){u(null,c)}}const zn={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,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,d=l.length-1;for(;u--;)if(n.codePointAt(u)===47){if(s){i=u+1;break}}else c<0&&(s=!0,c=u+1),d>-1&&(n.codePointAt(u)===l.codePointAt(d--)?d<0&&(o=u):(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,u=-1,s=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?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 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,u=-1,s=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(!(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(h=i.lastIndexOf("/"),h!==i.length-1){h<0?(i="",o=0):(i=i.slice(0,h),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 d===46&&s>-1?s++:s=-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 u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const yu=["history","path","basename","stem","extname","dirname"];class Km{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 s=yu[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)yu.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?zn.basename(this.path):void 0}set basename(l){vu(l,"basename"),bu(l,"basename"),this.path=zn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?zn.dirname(this.path):void 0}set dirname(l){Qm(this.basename,"dirname"),this.path=zn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?zn.extname(this.path):void 0}set extname(l){if(bu(l,"extname"),Qm(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=zn.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"?zn.basename(this.path,this.extname):void 0}set stem(l){vu(l,"stem"),bu(l,"stem"),this.path=zn.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 Bt(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 bu(n,l){if(n&&n.includes(zn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+zn.sep+"`")}function vu(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function Qm(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,u=o[n],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,o),s}),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 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=Vl(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?u(void 0,i):new Promise(u);function u(s,c){const d=Vl(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):s?s(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,u),Wm("processSync","process",i),o;function u(s,c){i=!0,Xm(s),o=c}}run(l,i,o){Jm(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,d){const h=Vl(i);u.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,u;return this.run(l,i,s),Wm("runSync","run",o),u;function s(c,d){Xm(c),u=d,o=!0}}stringify(l,i){this.freeze();const o=Vl(i),u=this.compiler||this.Compiler;return _u("stringify",u),Jm(l),u(l,o)}use(l,...i){const o=this.attachers,u=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 s(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&&(u.settings=mu(!0,u.settings,p.settings))}function d(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const g=p[y];s(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 Jm(n){if(!pu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Wm(n,l,i){if(!i)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function Vl(n){return Gx(n)?n:new Km(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",$m=[],ep={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||$m,i=n.remarkPlugins||$m,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...ep}:ep;return Vx().use(z_).use(i).use(kx,o).use(l)}function ew(n){const l=n.children||"",i=new Km;return typeof l=="string"&&(i.value=l),i}function tw(n,l){const i=l.allowedElements,o=l.allowElement,u=l.components,s=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 Fm(n,p),S1(n,{Fragment:V.Fragment,components:u,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.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):s?s.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("#"),u=n.indexOf("/");return l===-1||u!==-1&&l>u||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:u,disabled:s=!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]),V.jsxs("div",{ref:h,onClick:s?void 0:u,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,s?"opacity-50 cursor-not-allowed":""),style:{maxWidth:l},title:n,children:[o&&V.jsx("span",{className:"text-lavender-500",children:o}),V.jsxs("div",{className:"pill-marquee-wrapper",children:[V.jsx("span",{ref:p,className:Je("block whitespace-nowrap",c?"pill-marquee":""),children:n}),c&&V.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[u,s,c]=lw({defaultProp:l,onChange:i}),d=n!==void 0,h=d?n:u;{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 s(y)},[d,n,s,c]);return[h,p]}function lw({defaultProp:n,onChange:l}){const[i,o]=K.useState(n),u=K.useRef(i),s=K.useRef(l);return iw(()=>{s.current=l},[l]),K.useEffect(()=>{u.current!==i&&(s.current?.(i),u.current=i)},[i,u]),[i,o,s]}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(u=>{if(!Array.isArray(u)||!u.length)return;const s=u[0];let c,d;if("borderBoxSize"in s){const h=s.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 Gl="Checkbox",[cw]=ed(Gl),[fw,wu]=cw(Gl);function dw(n){const{__scopeCheckbox:l,checked:i,children:o,defaultChecked:u,disabled:s,form:c,name:d,onCheckedChange:h,required:p,value:y="on",internal_do_not_use_render:g}=n,[v,b]=aw({prop:i,defaultProp:u??!1,onChange:h,caller:Gl}),[C,E]=K.useState(null),[T,_]=K.useState(null),k=K.useRef(!1),O=C?!!c||!!C.closest("form"):!0,H={checked:v,disabled:s,setChecked:b,control:C,setControl:E,name:d,form:c,value:y,hasConsumerStoppedPropagationRef:k,required:p,defaultChecked:fr(u)?!1:u,isFormControl:O,bubbleInput:T,setBubbleInput:_};return V.jsx(fw,{scope:l,...H,children:hw(g)?g(H):o})}var tp="CheckboxTrigger",np=K.forwardRef(({__scopeCheckbox:n,onKeyDown:l,onClick:i,...o},u)=>{const{control:s,value:c,disabled:d,checked:h,required:p,setControl:y,setChecked:g,hasConsumerStoppedPropagationRef:v,isFormControl:b,bubbleInput:C}=wu(tp,n),E=Ln(u,y),T=K.useRef(h);return K.useEffect(()=>{const _=s?.form;if(_){const k=()=>g(T.current);return _.addEventListener("reset",k),()=>_.removeEventListener("reset",k)}},[s,g]),V.jsx(ar.button,{type:"button",role:"checkbox","aria-checked":fr(h)?"mixed":h,"aria-required":p,"data-state":op(h),"data-disabled":d?"":void 0,disabled:d,value:c,...o,ref:E,onKeyDown:In(l,_=>{_.key==="Enter"&&_.preventDefault()}),onClick:In(i,_=>{g(k=>fr(k)?!0:!k),C&&b&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})});np.displayName=tp;var Cu=K.forwardRef((n,l)=>{const{__scopeCheckbox:i,name:o,checked:u,defaultChecked:s,required:c,disabled:d,value:h,onCheckedChange:p,form:y,...g}=n;return V.jsx(dw,{__scopeCheckbox:i,checked:u,defaultChecked:s,disabled:d,required:c,onCheckedChange:p,name:o,form:y,value:h,internal_do_not_use_render:({isFormControl:v})=>V.jsxs(V.Fragment,{children:[V.jsx(np,{...g,ref:l,__scopeCheckbox:i}),v&&V.jsx(lp,{__scopeCheckbox:i})]})})});Cu.displayName=Gl;var rp="CheckboxIndicator",ip=K.forwardRef((n,l)=>{const{__scopeCheckbox:i,forceMount:o,...u}=n,s=wu(rp,i);return V.jsx(oi,{present:o||fr(s.checked)||s.checked===!0,children:V.jsx(ar.span,{"data-state":op(s.checked),"data-disabled":s.disabled?"":void 0,...u,ref:l,style:{pointerEvents:"none",...n.style}})})});ip.displayName=rp;var ap="CheckboxBubbleInput",lp=K.forwardRef(({__scopeCheckbox:n,...l},i)=>{const{control:o,hasConsumerStoppedPropagationRef:u,checked:s,defaultChecked:c,required:d,disabled:h,name:p,value:y,form:g,bubbleInput:v,setBubbleInput:b}=wu(ap,n),C=Ln(i,b),E=sw(s),T=uw(o);K.useEffect(()=>{const k=v;if(!k)return;const O=window.HTMLInputElement.prototype,L=Object.getOwnPropertyDescriptor(O,"checked").set,z=!u.current;if(E!==s&&L){const B=new Event("click",{bubbles:z});k.indeterminate=fr(s),L.call(k,fr(s)?!1:s),k.dispatchEvent(B)}},[v,E,s,u]);const _=K.useRef(fr(s)?!1:s);return V.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%)"}})});lp.displayName=ap;function hw(n){return typeof n=="function"}function fr(n){return n==="indeterminate"}function op(n){return fr(n)?"indeterminate":n?"checked":"unchecked"}const Tu=K.forwardRef(({className:n,...l},i)=>V.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:V.jsx(ip,{className:Je("grid place-content-center text-current"),children:V.jsx(qv,{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:u,required:s=!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=_=>!(s&&_.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=!s||l.length>0,T=p?l.filter(_=>_!==p.value).length:l.length;return V.jsxs("div",{className:Je("bg-gray-50","rounded-lg","p-4","border border-gray-200",u),children:[V.jsxs("div",{className:"space-y-3",children:[n.map(_=>{const k=h||c&&T>=c&&!l.includes(_.value);return V.jsxs("div",{className:"flex items-center space-x-3",children:[V.jsx(Tu,{id:_.id,checked:!!l.includes(_.value),disabled:!!k,onCheckedChange:O=>C(_.value,!!O),className:"mt-0.5 border border-muted-foreground"}),V.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&&V.jsxs(V.Fragment,{children:[V.jsx("div",{className:"border-t border-gray-300 my-3"}),V.jsxs("div",{className:"flex items-center space-x-3",children:[V.jsx(Tu,{id:p.id,checked:l.includes(p.value),onCheckedChange:_=>C(p.value,_),className:"mt-0.5 border border-muted-foreground"}),V.jsx("label",{htmlFor:p.id,className:"text-sm font-medium leading-none cursor-pointer text-secondary-foreground",children:p.label})]})]})]}),d&&V.jsx("p",{className:"text-sm text-red-500 mt-3",children:d}),s&&!E&&V.jsx("p",{className:"text-sm text-red-500 mt-3",children:"Please select at least one option"}),c&&T>=c&&V.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,toolEscalationData:o,onSendMessage:u}){const s=n==="user",[c,d]=K.useState([]),h=()=>o?.choices?Array.isArray(o.choices)?o.choices.map((b,C)=>({id:`option-${C}`,label:b,value:b})):Object.keys(o.choices).map((b,C)=>({id:`option-${C}`,label:b,value:b})):[],p=async b=>{console.log("Pill clicked:",b);const C=Date.now().toString();await u({message:b,messageId:C})},y=b=>{d(b),console.log("Multi-select changed:",b)},g=()=>{if(!o?.additional_option)return;const b=o.additional_option;if(typeof b=="string"&&(b===Yr.NOTA||b===Yr.AOTA))return b;if(typeof b=="object"&&b!==null){if(b.NOTA===Yr.NOTA)return Yr.NOTA;if(b.AOTA===Yr.AOTA)return Yr.AOTA}},v=async()=>{if(c.length>0){const b=c.join(", "),C=Date.now().toString();await u({message:b,messageId:C})}};return V.jsx("div",{className:Je("flex",s?"justify-end":"justify-start"),children:V.jsxs("div",{className:Je("flex gap-3",s?"flex-row-reverse":"flex-row",o?.type===We.SYNAPSE_MESSAGE_TYPES.MULTI?"max-w-md":"max-w-xs"),children:[!s&&V.jsx(Ns,{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:V.jsx(Os,{className:"bg-transparent text-white text-xs font-bold",children:"A"})}),V.jsxs(Cs,{className:Je("px-4 py-2 rounded-2xl shadow-none",s?"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",o?.type===We.SYNAPSE_MESSAGE_TYPES.MULTI&&"w-full"),children:[l&&V.jsx("div",{className:"text-sm markdown-content mb-3",children:V.jsx(Wx,{children:l})}),o?.type===We.SYNAPSE_MESSAGE_TYPES.PILL&&o?.choices&&V.jsx("div",{className:"flex flex-wrap gap-2 mt-3",children:o.choices.map((b,C)=>V.jsx(rw,{disabled:o?.isResponded,text:b,onClick:()=>p(b),className:"cursor-pointer hover:bg-lavender-100/80 transition-colors"},C))}),o?.type===We.SYNAPSE_MESSAGE_TYPES.MULTI&&o?.choices&&V.jsxs("div",{className:"mt-3 space-y-3",children:[V.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Select multiple options:"}),V.jsx(mw,{options:h(),selectedValues:c,onSelectionChange:y,additionalOption:g(),disabled:o?.isResponded}),V.jsx(An,{onClick:v,disabled:c.length===0||o?.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&&V.jsx("p",{className:Je("text-xs mt-2 text-right","text-slate-500"),children:i})]})]})})}function gw({messages:n,onSendMessage:l}){return V.jsx(V.Fragment,{children:n&&n.length>0&&V.jsx(V.Fragment,{children:n.map(i=>V.jsx("div",{className:"animate-slideUp",children:V.jsx(pw,{role:i.role,content:i.content,toolEscalationData:i.toolEscalationData,timestamp:i.timestamp,onSendMessage:l})},i.id))})})}const yw=Object.freeze(Object.defineProperty({__proto__:null,default:gw},Symbol.toStringTag,{value:"Module"})),sp=K.forwardRef(({className:n,type:l,...i},o)=>V.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}));sp.displayName="Input";function bw({value:n,onChange:l,onSend:i,onFileChange:o,onRecording:u,isRecording:s,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)&&!s,C=Je("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)]":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 V.jsxs("div",{className:"border-t border-white/20 bg-white/70 backdrop-blur-xl p-4",children:[V.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:E}),V.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",s||c?"ring-2 ring-lavender-200/40":"ring-2 ring-lavender-300/40 backdrop-blur-xl",h&&"opacity-60"),children:[c&&d.length>0&&V.jsxs("span",{className:"text-xs text-lavender-600 mr-2",children:[d.length," file(s)"]}),V.jsx(sp,{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"}),V.jsx(An,{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:V.jsx(Fv,{className:"w-5 h-5"})}),s?V.jsx(An,{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:V.jsx(Kv,{className:"w-4 h-4"})}):V.jsx(An,{type:"button",variant:"ghost",size:"icon",onClick:u,disabled:b,className:C,title:"Start recording",children:V.jsx(Pv,{className:"w-5 h-5"})}),v&&!h&&V.jsx(An,{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:V.jsx(Xv,{className:"w-4 h-4"})})]})]})}const vw=Object.freeze(Object.defineProperty({__proto__:null,default:bw},Symbol.toStringTag,{value:"Module"})),Sw=[{id:1,icon:Gv,title:"I am not feeling well today",description:"I need to know what is wrong with me."},{id:2,icon:Hv,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:Vv,title:"I have an emergency",description:"I need to talk to a doctor immediately."},{id:4,icon:Iv,title:"What is the normal range for blood pressure?",description:"I need to know the normal range for blood pressure."}];function Ew({onTaskClick:n,disabled:l}){return V.jsx("div",{className:"grid grid-cols-2 gap-3",children:Sw.map(i=>{const o=i.icon;return V.jsx(An,{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:V.jsxs("div",{className:"flex items-start justify-between gap-3",children:[V.jsx(o,{className:"w-5 h-5 mt-1 text-slate-900 group-hover:text-lavender-600"}),V.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 _w({onTaskClick:n,disabled:l}){return V.jsxs(V.Fragment,{children:[V.jsx("div",{className:"text-center space-y-2 animate-fadeIn",children:V.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"How can I assist you today?"})}),V.jsx(Ew,{onTaskClick:n,disabled:l})]})}const xw=Object.freeze(Object.defineProperty({__proto__:null,default:_w},Symbol.toStringTag,{value:"Module"}));function ww({className:n="",onRetry:l,onStartNewSession:i,showRetryButton:o,startNewConnection:u,clearError:s,error:c,isConnected:d}){const{isOnline:h}=Dh(),[p,y]=K.useState(!0);if(K.useEffect(()=>{if(!u&&!o&&!!c){y(!0);const b=setTimeout(()=>y(!1),5e3);return()=>clearTimeout(b)}y(!0)},[c,u,o]),u)return V.jsx("div",{className:Je("mx-4 mb-3 px-2 py-1 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:V.jsxs("div",{className:"flex items-center gap-3",children:[V.jsx("div",{className:"w-4 h-4 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:V.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),V.jsxs("div",{className:"flex-1",children:[V.jsx("div",{className:"text-[#333333] font-semibold text-sm",children:c?.title??"Something went wrong"}),V.jsx("div",{className:"text-[#666666] text-xs mt-1",children:"Start a new session."})]}),V.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:[V.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:V.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),V.jsx("span",{className:"text-xs font-semibold",children:"Start new chat"})]})]})});if(o)return V.jsx("div",{className:Je("mx-4 mb-3 p-2 bg-[#FFFBEB] border border-[#FEE39B] rounded-lg",n),children:V.jsxs("div",{className:"flex items-center gap-3",children:[V.jsx("div",{className:"w-5 h-5 bg-[#F7B500] rounded-full flex items-center justify-center flex-shrink-0",children:V.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),V.jsxs("div",{className:"flex-1",children:[V.jsx("div",{className:"text-[#333333] font-semibold text-sm",children:c?.title??"Failed to connect"}),V.jsx("div",{className:"text-[#666666] text-xs mt-1",children:c?.description??"Please check your connection and try again"})]}),V.jsxs("button",{onClick:()=>{s(),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:[V.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:V.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=!u&&!o;return V.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:V.jsxs("div",{className:"flex items-center gap-3",children:[V.jsx("div",{className:"w-5 h-5 bg-[#FDD835] rounded-full flex items-center justify-center flex-shrink-0",children:V.jsx("span",{className:"text-white text-sm font-bold",children:"!"})}),V.jsxs("div",{className:"flex-1",children:[V.jsx("div",{className:"text-[#333333] font-semibold text-sm",children:h?c?.title||"Connecting...":"No internet connection"}),V.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&&V.jsx("div",{className:"flex-shrink-0",children:V.jsx("div",{className:"w-6 h-6 border-2 border-[#FDD835] border-t-transparent rounded-full animate-spin"})})]})})}const Cw=Object.freeze(Object.defineProperty({__proto__:null,ConnectionStatus:ww},Symbol.toStringTag,{value:"Module"}));return os.renderMedAssist=jh,Object.defineProperty(os,Symbol.toStringTag,{value:"Module"}),os})({});
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})({});
42
61
  //# sourceMappingURL=medassist-widget.js.map