voicecc 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function Hc(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Js={exports:{}},Ni={};var am;function Zx(){if(am)return Ni;am=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var y in c)y!=="key"&&(f[y]=c[y])}else f=c;return c=f.ref,{$$typeof:l,type:u,key:d,ref:c!==void 0?c:null,props:f}}return Ni.Fragment=i,Ni.jsx=r,Ni.jsxs=r,Ni}var im;function Kx(){return im||(im=1,Js.exports=Zx()),Js.exports}var p=Kx(),Ps={exports:{}},ve={};var rm;function Fx(){if(rm)return ve;rm=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function b(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,z={};function k(j,O,C){this.props=j,this.context=O,this.refs=z,this.updater=C||R}k.prototype.isReactComponent={},k.prototype.setState=function(j,O){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,O,"setState")},k.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function D(){}D.prototype=k.prototype;function _(j,O,C){this.props=j,this.context=O,this.refs=z,this.updater=C||R}var I=_.prototype=new D;I.constructor=_,A(I,k.prototype),I.isPureReactComponent=!0;var W=Array.isArray;function B(){}var Q={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ee(j,O,C){var te=C.ref;return{$$typeof:l,type:j,key:O,ref:te!==void 0?te:null,props:C}}function oe(j,O){return ee(j.type,O,j.props)}function ne(j){return typeof j=="object"&&j!==null&&j.$$typeof===l}function re(j){var O={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(C){return O[C]})}var he=/\/+/g;function P(j,O){return typeof j=="object"&&j!==null&&j.key!=null?re(""+j.key):O.toString(36)}function F(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(B,B):(j.status="pending",j.then(function(O){j.status==="pending"&&(j.status="fulfilled",j.value=O)},function(O){j.status==="pending"&&(j.status="rejected",j.reason=O)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function U(j,O,C,te,fe){var ue=typeof j;(ue==="undefined"||ue==="boolean")&&(j=null);var xe=!1;if(j===null)xe=!0;else switch(ue){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(j.$$typeof){case l:case i:xe=!0;break;case g:return xe=j._init,U(xe(j._payload),O,C,te,fe)}}if(xe)return fe=fe(j),xe=te===""?"."+P(j,0):te,W(fe)?(C="",xe!=null&&(C=xe.replace(he,"$&/")+"/"),U(fe,O,C,"",function(Xt){return Xt})):fe!=null&&(ne(fe)&&(fe=oe(fe,C+(fe.key==null||j&&j.key===fe.key?"":(""+fe.key).replace(he,"$&/")+"/")+xe)),O.push(fe)),1;xe=0;var qe=te===""?".":te+":";if(W(j))for(var Le=0;Le<j.length;Le++)te=j[Le],ue=qe+P(te,Le),xe+=U(te,O,C,ue,fe);else if(Le=b(j),typeof Le=="function")for(j=Le.call(j),Le=0;!(te=j.next()).done;)te=te.value,ue=qe+P(te,Le++),xe+=U(te,O,C,ue,fe);else if(ue==="object"){if(typeof j.then=="function")return U(F(j),O,C,te,fe);throw O=String(j),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return xe}function $(j,O,C){if(j==null)return j;var te=[],fe=0;return U(j,te,"","",function(ue){return O.call(C,ue,fe++)}),te}function se(j){if(j._status===-1){var O=j._result;O=O(),O.then(function(C){(j._status===0||j._status===-1)&&(j._status=1,j._result=C)},function(C){(j._status===0||j._status===-1)&&(j._status=2,j._result=C)}),j._status===-1&&(j._status=0,j._result=O)}if(j._status===1)return j._result.default;throw j._result}var ae=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},T={map:$,forEach:function(j,O,C){$(j,function(){O.apply(this,arguments)},C)},count:function(j){var O=0;return $(j,function(){O++}),O},toArray:function(j){return $(j,function(O){return O})||[]},only:function(j){if(!ne(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ve.Activity=v,ve.Children=T,ve.Component=k,ve.Fragment=r,ve.Profiler=c,ve.PureComponent=_,ve.StrictMode=u,ve.Suspense=m,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,ve.__COMPILER_RUNTIME={__proto__:null,c:function(j){return Q.H.useMemoCache(j)}},ve.cache=function(j){return function(){return j.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(j,O,C){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var te=A({},j.props),fe=j.key;if(O!=null)for(ue in O.key!==void 0&&(fe=""+O.key),O)!V.call(O,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&O.ref===void 0||(te[ue]=O[ue]);var ue=arguments.length-2;if(ue===1)te.children=C;else if(1<ue){for(var xe=Array(ue),qe=0;qe<ue;qe++)xe[qe]=arguments[qe+2];te.children=xe}return ee(j.type,fe,te)},ve.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},ve.createElement=function(j,O,C){var te,fe={},ue=null;if(O!=null)for(te in O.key!==void 0&&(ue=""+O.key),O)V.call(O,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(fe[te]=O[te]);var xe=arguments.length-2;if(xe===1)fe.children=C;else if(1<xe){for(var qe=Array(xe),Le=0;Le<xe;Le++)qe[Le]=arguments[Le+2];fe.children=qe}if(j&&j.defaultProps)for(te in xe=j.defaultProps,xe)fe[te]===void 0&&(fe[te]=xe[te]);return ee(j,ue,fe)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(j){return{$$typeof:y,render:j}},ve.isValidElement=ne,ve.lazy=function(j){return{$$typeof:g,_payload:{_status:-1,_result:j},_init:se}},ve.memo=function(j,O){return{$$typeof:h,type:j,compare:O===void 0?null:O}},ve.startTransition=function(j){var O=Q.T,C={};Q.T=C;try{var te=j(),fe=Q.S;fe!==null&&fe(C,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(B,ae)}catch(ue){ae(ue)}finally{O!==null&&C.types!==null&&(O.types=C.types),Q.T=O}},ve.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},ve.use=function(j){return Q.H.use(j)},ve.useActionState=function(j,O,C){return Q.H.useActionState(j,O,C)},ve.useCallback=function(j,O){return Q.H.useCallback(j,O)},ve.useContext=function(j){return Q.H.useContext(j)},ve.useDebugValue=function(){},ve.useDeferredValue=function(j,O){return Q.H.useDeferredValue(j,O)},ve.useEffect=function(j,O){return Q.H.useEffect(j,O)},ve.useEffectEvent=function(j){return Q.H.useEffectEvent(j)},ve.useId=function(){return Q.H.useId()},ve.useImperativeHandle=function(j,O,C){return Q.H.useImperativeHandle(j,O,C)},ve.useInsertionEffect=function(j,O){return Q.H.useInsertionEffect(j,O)},ve.useLayoutEffect=function(j,O){return Q.H.useLayoutEffect(j,O)},ve.useMemo=function(j,O){return Q.H.useMemo(j,O)},ve.useOptimistic=function(j,O){return Q.H.useOptimistic(j,O)},ve.useReducer=function(j,O,C){return Q.H.useReducer(j,O,C)},ve.useRef=function(j){return Q.H.useRef(j)},ve.useState=function(j){return Q.H.useState(j)},ve.useSyncExternalStore=function(j,O,C){return Q.H.useSyncExternalStore(j,O,C)},ve.useTransition=function(){return Q.H.useTransition()},ve.version="19.2.4",ve}var um;function qc(){return um||(um=1,Ps.exports=Fx()),Ps.exports}var w=qc();const ft=Hc(w);var $s={exports:{}},ki={},Ws={exports:{}},ec={};var om;function Jx(){return om||(om=1,(function(l){function i(U,$){var se=U.length;U.push($);e:for(;0<se;){var ae=se-1>>>1,T=U[ae];if(0<c(T,$))U[ae]=$,U[se]=T,se=ae;else break e}}function r(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var $=U[0],se=U.pop();if(se!==$){U[0]=se;e:for(var ae=0,T=U.length,j=T>>>1;ae<j;){var O=2*(ae+1)-1,C=U[O],te=O+1,fe=U[te];if(0>c(C,se))te<T&&0>c(fe,C)?(U[ae]=fe,U[te]=se,ae=te):(U[ae]=C,U[O]=se,ae=O);else if(te<T&&0>c(fe,se))U[ae]=fe,U[te]=se,ae=te;else break e}}return $}function c(U,$){var se=U.sortIndex-$.sortIndex;return se!==0?se:U.id-$.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var d=Date,y=d.now();l.unstable_now=function(){return d.now()-y}}var m=[],h=[],g=1,v=null,S=3,b=!1,R=!1,A=!1,z=!1,k=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function I(U){for(var $=r(h);$!==null;){if($.callback===null)u(h);else if($.startTime<=U)u(h),$.sortIndex=$.expirationTime,i(m,$);else break;$=r(h)}}function W(U){if(A=!1,I(U),!R)if(r(m)!==null)R=!0,B||(B=!0,re());else{var $=r(h);$!==null&&F(W,$.startTime-U)}}var B=!1,Q=-1,V=5,ee=-1;function oe(){return z?!0:!(l.unstable_now()-ee<V)}function ne(){if(z=!1,B){var U=l.unstable_now();ee=U;var $=!0;try{e:{R=!1,A&&(A=!1,D(Q),Q=-1),b=!0;var se=S;try{t:{for(I(U),v=r(m);v!==null&&!(v.expirationTime>U&&oe());){var ae=v.callback;if(typeof ae=="function"){v.callback=null,S=v.priorityLevel;var T=ae(v.expirationTime<=U);if(U=l.unstable_now(),typeof T=="function"){v.callback=T,I(U),$=!0;break t}v===r(m)&&u(m),I(U)}else u(m);v=r(m)}if(v!==null)$=!0;else{var j=r(h);j!==null&&F(W,j.startTime-U),$=!1}}break e}finally{v=null,S=se,b=!1}$=void 0}}finally{$?re():B=!1}}}var re;if(typeof _=="function")re=function(){_(ne)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,P=he.port2;he.port1.onmessage=ne,re=function(){P.postMessage(null)}}else re=function(){k(ne,0)};function F(U,$){Q=k(function(){U(l.unstable_now())},$)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(U){U.callback=null},l.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<U?Math.floor(1e3/U):5},l.unstable_getCurrentPriorityLevel=function(){return S},l.unstable_next=function(U){switch(S){case 1:case 2:case 3:var $=3;break;default:$=S}var se=S;S=$;try{return U()}finally{S=se}},l.unstable_requestPaint=function(){z=!0},l.unstable_runWithPriority=function(U,$){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var se=S;S=U;try{return $()}finally{S=se}},l.unstable_scheduleCallback=function(U,$,se){var ae=l.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ae+se:ae):se=ae,U){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=se+T,U={id:g++,callback:$,priorityLevel:U,startTime:se,expirationTime:T,sortIndex:-1},se>ae?(U.sortIndex=se,i(h,U),r(m)===null&&U===r(h)&&(A?(D(Q),Q=-1):A=!0,F(W,se-ae))):(U.sortIndex=T,i(m,U),R||b||(R=!0,B||(B=!0,re()))),U},l.unstable_shouldYield=oe,l.unstable_wrapCallback=function(U){var $=S;return function(){var se=S;S=$;try{return U.apply(this,arguments)}finally{S=se}}}})(ec)),ec}var sm;function Px(){return sm||(sm=1,Ws.exports=Jx()),Ws.exports}var tc={exports:{}},xt={};var cm;function $x(){if(cm)return xt;cm=1;var l=qc();function i(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(m,h,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:m,containerInfo:h,implementation:g}}var d=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,xt.createPortal=function(m,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return f(m,h,null,g)},xt.flushSync=function(m){var h=d.T,g=u.p;try{if(d.T=null,u.p=2,m)return m()}finally{d.T=h,u.p=g,u.d.f()}},xt.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,u.d.C(m,h))},xt.prefetchDNS=function(m){typeof m=="string"&&u.d.D(m)},xt.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var g=h.as,v=y(g,h.crossOrigin),S=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?u.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:b}):g==="script"&&u.d.X(m,{crossOrigin:v,integrity:S,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xt.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=y(h.as,h.crossOrigin);u.d.M(m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&u.d.M(m)},xt.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,v=y(g,h.crossOrigin);u.d.L(m,g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},xt.preloadModule=function(m,h){if(typeof m=="string")if(h){var g=y(h.as,h.crossOrigin);u.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else u.d.m(m)},xt.requestFormReset=function(m){u.d.r(m)},xt.unstable_batchedUpdates=function(m,h){return m(h)},xt.useFormState=function(m,h,g){return d.H.useFormState(m,h,g)},xt.useFormStatus=function(){return d.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var fm;function Wx(){if(fm)return tc.exports;fm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),tc.exports=$x(),tc.exports}var dm;function e1(){if(dm)return ki;dm=1;var l=Px(),i=qc(),r=Wx();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function d(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 y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(f(e)!==e)throw Error(u(188))}function h(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,a=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(a=o.return,a!==null){n=a;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return m(o),e;if(s===a)return m(o),t;s=s.sibling}throw Error(u(188))}if(n.return!==a.return)n=o,a=s;else{for(var x=!1,E=o.child;E;){if(E===n){x=!0,n=o,a=s;break}if(E===a){x=!0,a=o,n=s;break}E=E.sibling}if(!x){for(E=s.child;E;){if(E===n){x=!0,n=s,a=o;break}if(E===a){x=!0,a=s,n=o;break}E=E.sibling}if(!x)throw Error(u(189))}}if(n.alternate!==a)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),_=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function P(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case k:return"Profiler";case z:return"StrictMode";case W:return"Suspense";case B:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case _:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:P(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ae=[],T=-1;function j(e){return{current:e}}function O(e){0>T||(e.current=ae[T],ae[T]=null,T--)}function C(e,t){T++,ae[T]=e.current,e.current=t}var te=j(null),fe=j(null),ue=j(null),xe=j(null);function qe(e,t){switch(C(ue,t),C(fe,e),C(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ap(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ap(t),e=zp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(te),C(te,e)}function Le(){O(te),O(fe),O(ue)}function Xt(e){e.memoizedState!==null&&C(xe,e);var t=te.current,n=zp(t,e.type);t!==n&&(C(fe,e),C(te,n))}function xn(e){fe.current===e&&(O(te),O(fe)),xe.current===e&&(O(xe),ji._currentValue=se)}var Ba,Zi;function bn(e){if(Ba===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ba=t&&t[1]||"",Zi=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ba+e+Zi}var Hl=!1;function ql(e,t){if(!e||Hl)return"";Hl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(G){var Y=G}Reflect.construct(e,[],J)}else{try{J.call()}catch(G){Y=G}e.call(J.prototype)}}else{try{throw Error()}catch(G){Y=G}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(G){if(G&&Y&&typeof G.stack=="string")return[G.stack,Y.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),x=s[0],E=s[1];if(x&&E){var N=x.split(`
4
+ `),q=E.split(`
5
+ `);for(o=a=0;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;for(;o<q.length&&!q[o].includes("DetermineComponentFrameRoot");)o++;if(a===N.length||o===q.length)for(a=N.length-1,o=q.length-1;1<=a&&0<=o&&N[a]!==q[o];)o--;for(;1<=a&&0<=o;a--,o--)if(N[a]!==q[o]){if(a!==1||o!==1)do if(a--,o--,0>o||N[a]!==q[o]){var X=`
6
+ `+N[a].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=a&&0<=o);break}}}finally{Hl=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?bn(n):""}function Ki(e,t){switch(e.tag){case 26:case 27:case 5:return bn(e.type);case 16:return bn("Lazy");case 13:return e.child!==t&&t!==null?bn("Suspense Fallback"):bn("Suspense");case 19:return bn("SuspenseList");case 0:case 15:return ql(e.type,!1);case 11:return ql(e.type.render,!1);case 1:return ql(e.type,!0);case 31:return bn("Activity");default:return""}}function Fi(e){try{var t="",n=null;do t+=Ki(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Yl=Object.prototype.hasOwnProperty,Vl=l.unstable_scheduleCallback,Ua=l.unstable_cancelCallback,Ou=l.unstable_shouldYield,Du=l.unstable_requestPaint,St=l.unstable_now,Lu=l.unstable_getCurrentPriorityLevel,Z=l.unstable_ImmediatePriority,ie=l.unstable_UserBlockingPriority,ge=l.unstable_NormalPriority,Te=l.unstable_LowPriority,Be=l.unstable_IdlePriority,Lt=l.log,Sn=l.unstable_setDisableYieldValue,Et=null,st=null;function Tt(e){if(typeof Lt=="function"&&Sn(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(Et,e)}catch{}}var Ge=Math.clz32?Math.clz32:_y,Xn=Math.log,rn=Math.LN2;function _y(e){return e>>>=0,e===0?32:31-(Xn(e)/rn|0)|0}var Ji=256,Pi=262144,$i=4194304;function xl(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 Wi(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,s=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=a&134217727;return E!==0?(a=E&~s,a!==0?o=xl(a):(x&=E,x!==0?o=xl(x):n||(n=E&~e,n!==0&&(o=xl(n))))):(E=a&~s,E!==0?o=xl(E):x!==0?o=xl(x):n||(n=a&~e,n!==0&&(o=xl(n)))),o===0?0:t!==0&&t!==o&&(t&s)===0&&(s=o&-o,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:o}function Ha(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Oy(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 of(){var e=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),e}function Bu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dy(e,t,n,a,o,s){var x=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var E=e.entanglements,N=e.expirationTimes,q=e.hiddenUpdates;for(n=x&~n;0<n;){var X=31-Ge(n),J=1<<X;E[X]=0,N[X]=-1;var Y=q[X];if(Y!==null)for(q[X]=null,X=0;X<Y.length;X++){var G=Y[X];G!==null&&(G.lane&=-536870913)}n&=~J}a!==0&&sf(e,a,0),s!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=s&~(x&~t))}function sf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ge(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function cf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Ge(n),o=1<<a;o&t|e[a]&t&&(e[a]|=t),n&=~o}}function ff(e,t){var n=t&-t;return n=(n&42)!==0?1:Uu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Uu(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 Hu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function df(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Pp(e.type))}function hf(e,t){var n=$.p;try{return $.p=e,t()}finally{$.p=n}}var Zn=Math.random().toString(36).slice(2),pt="__reactFiber$"+Zn,wt="__reactProps$"+Zn,Il="__reactContainer$"+Zn,qu="__reactEvents$"+Zn,Ly="__reactListeners$"+Zn,By="__reactHandles$"+Zn,pf="__reactResources$"+Zn,Ya="__reactMarker$"+Zn;function Yu(e){delete e[pt],delete e[wt],delete e[qu],delete e[Ly],delete e[By]}function Gl(e){var t=e[pt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Il]||n[pt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Dp(e);e!==null;){if(n=e[pt])return n;e=Dp(e)}return t}e=n,n=e.parentNode}return null}function Ql(e){if(e=e[pt]||e[Il]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Va(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Xl(e){var t=e[pf];return t||(t=e[pf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function dt(e){e[Ya]=!0}var mf=new Set,gf={};function bl(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(gf[e]=t,e=0;e<t.length;e++)mf.add(t[e])}var Uy=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]*$"),yf={},vf={};function Hy(e){return Yl.call(vf,e)?!0:Yl.call(yf,e)?!1:Uy.test(e)?vf[e]=!0:(yf[e]=!0,!1)}function er(e,t,n){if(Hy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function tr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function En(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qy(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(x){n=""+x,s.call(this,x)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(x){n=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vu(e){if(!e._valueTracker){var t=xf(e)?"checked":"value";e._valueTracker=qy(e,t,""+e[t])}}function bf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=xf(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function nr(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 Yy=/[\n"\\]/g;function Kt(e){return e.replace(Yy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Iu(e,t,n,a,o,s,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Gu(e,x,Zt(t)):n!=null?Gu(e,x,Zt(n)):a!=null&&e.removeAttribute("value"),o==null&&s!=null&&(e.defaultChecked=!!s),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Zt(E):e.removeAttribute("name")}function Sf(e,t,n,a,o,s,x,E){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Vu(e);return}n=n!=null?""+Zt(n):"",t=t!=null?""+Zt(t):n,E||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=E?e.checked:!!a,e.defaultChecked=!!a,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Vu(e)}function Gu(e,t,n){t==="number"&&nr(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Kl(e,t,n,a){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ef(e,t,n){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Zt(n):""}function Cf(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(u(92));if(F(a)){if(1<a.length)throw Error(u(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Zt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Vu(e)}function Fl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vy=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 Tf(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Vy.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function wf(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var o in t)a=t[o],t.hasOwnProperty(o)&&n[o]!==a&&Tf(e,o,a)}else for(var s in t)t.hasOwnProperty(s)&&Tf(e,s,t[s])}function Qu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Iy=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"]]),Gy=/^[\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 lr(e){return Gy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cn(){}var Xu=null;function Zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Pl=null;function jf(e){var t=Ql(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Iu(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var o=a[wt]||null;if(!o)throw Error(u(90));Iu(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&bf(a)}break e;case"textarea":Ef(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Kl(e,!!n.multiple,t,!1)}}}var Ku=!1;function Af(e,t,n){if(Ku)return e(t,n);Ku=!0;try{var a=e(t);return a}finally{if(Ku=!1,(Jl!==null||Pl!==null)&&(Gr(),Jl&&(t=Jl,e=Pl,Pl=Jl=null,jf(t),e)))for(t=0;t<e.length;t++)jf(e[t])}}function Ia(e,t){var n=e.stateNode;if(n===null)return null;var a=n[wt]||null;if(a===null)return null;n=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(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fu=!1;if(Tn)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){Fu=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{Fu=!1}var Kn=null,Ju=null,ar=null;function zf(){if(ar)return ar;var e,t=Ju,n=t.length,a,o="value"in Kn?Kn.value:Kn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var x=n-e;for(a=1;a<=x&&t[n-a]===o[s-a];a++);return ar=o.slice(e,1<a?1-a:void 0)}function ir(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 rr(){return!0}function Rf(){return!1}function jt(e){function t(n,a,o,s,x){this._reactName=n,this._targetInst=o,this.type=a,this.nativeEvent=s,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(n=e[E],this[E]=n?n(s):s[E]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?rr:Rf,this.isPropagationStopped=Rf,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=jt(Sl),Qa=v({},Sl,{view:0,detail:0}),Qy=jt(Qa),Pu,$u,Xa,or=v({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eo,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!==Xa&&(Xa&&e.type==="mousemove"?(Pu=e.screenX-Xa.screenX,$u=e.screenY-Xa.screenY):$u=Pu=0,Xa=e),Pu)},movementY:function(e){return"movementY"in e?e.movementY:$u}}),Nf=jt(or),Xy=v({},or,{dataTransfer:0}),Zy=jt(Xy),Ky=v({},Qa,{relatedTarget:0}),Wu=jt(Ky),Fy=v({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),Jy=jt(Fy),Py=v({},Sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$y=jt(Py),Wy=v({},Sl,{data:0}),kf=jt(Wy),ev={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tv={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"},nv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nv[e])?!!t[e]:!1}function eo(){return lv}var av=v({},Qa,{key:function(e){if(e.key){var t=ev[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eo,charCode:function(e){return e.type==="keypress"?ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iv=jt(av),rv=v({},or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mf=jt(rv),uv=v({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eo}),ov=jt(uv),sv=v({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),cv=jt(sv),fv=v({},or,{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}),dv=jt(fv),hv=v({},Sl,{newState:0,oldState:0}),pv=jt(hv),mv=[9,13,27,32],to=Tn&&"CompositionEvent"in window,Za=null;Tn&&"documentMode"in document&&(Za=document.documentMode);var gv=Tn&&"TextEvent"in window&&!Za,_f=Tn&&(!to||Za&&8<Za&&11>=Za),Of=" ",Df=!1;function Lf(e,t){switch(e){case"keyup":return mv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $l=!1;function yv(e,t){switch(e){case"compositionend":return Bf(t);case"keypress":return t.which!==32?null:(Df=!0,Of);case"textInput":return e=t.data,e===Of&&Df?null:e;default:return null}}function vv(e,t){if($l)return e==="compositionend"||!to&&Lf(e,t)?(e=zf(),ar=Ju=Kn=null,$l=!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 _f&&t.locale!=="ko"?null:t.data;default:return null}}var xv={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 Uf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xv[e.type]:t==="textarea"}function Hf(e,t,n,a){Jl?Pl?Pl.push(a):Pl=[a]:Jl=a,t=Pr(t,"onChange"),0<t.length&&(n=new ur("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ka=null,Fa=null;function bv(e){Sp(e,0)}function sr(e){var t=Va(e);if(bf(t))return e}function qf(e,t){if(e==="change")return t}var Yf=!1;if(Tn){var no;if(Tn){var lo="oninput"in document;if(!lo){var Vf=document.createElement("div");Vf.setAttribute("oninput","return;"),lo=typeof Vf.oninput=="function"}no=lo}else no=!1;Yf=no&&(!document.documentMode||9<document.documentMode)}function If(){Ka&&(Ka.detachEvent("onpropertychange",Gf),Fa=Ka=null)}function Gf(e){if(e.propertyName==="value"&&sr(Fa)){var t=[];Hf(t,Fa,e,Zu(e)),Af(bv,t)}}function Sv(e,t,n){e==="focusin"?(If(),Ka=t,Fa=n,Ka.attachEvent("onpropertychange",Gf)):e==="focusout"&&If()}function Ev(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sr(Fa)}function Cv(e,t){if(e==="click")return sr(t)}function Tv(e,t){if(e==="input"||e==="change")return sr(t)}function wv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:wv;function Ja(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var o=n[a];if(!Yl.call(t,o)||!Bt(e[o],t[o]))return!1}return!0}function Qf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xf(e,t){var n=Qf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qf(n)}}function Zf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nr(e.document)}return t}function ao(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 jv=Tn&&"documentMode"in document&&11>=document.documentMode,Wl=null,io=null,Pa=null,ro=!1;function Ff(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ro||Wl==null||Wl!==nr(a)||(a=Wl,"selectionStart"in a&&ao(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}),Pa&&Ja(Pa,a)||(Pa=a,a=Pr(io,"onSelect"),0<a.length&&(t=new ur("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Wl)))}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ea={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionrun:El("Transition","TransitionRun"),transitionstart:El("Transition","TransitionStart"),transitioncancel:El("Transition","TransitionCancel"),transitionend:El("Transition","TransitionEnd")},uo={},Jf={};Tn&&(Jf=document.createElement("div").style,"AnimationEvent"in window||(delete ea.animationend.animation,delete ea.animationiteration.animation,delete ea.animationstart.animation),"TransitionEvent"in window||delete ea.transitionend.transition);function Cl(e){if(uo[e])return uo[e];if(!ea[e])return e;var t=ea[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jf)return uo[e]=t[n];return e}var Pf=Cl("animationend"),$f=Cl("animationiteration"),Wf=Cl("animationstart"),Av=Cl("transitionrun"),zv=Cl("transitionstart"),Rv=Cl("transitioncancel"),ed=Cl("transitionend"),td=new Map,oo="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(" ");oo.push("scrollEnd");function un(e,t){td.set(e,t),bl(t,[e])}var cr=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)},Ft=[],ta=0,so=0;function fr(){for(var e=ta,t=so=ta=0;t<e;){var n=Ft[t];Ft[t++]=null;var a=Ft[t];Ft[t++]=null;var o=Ft[t];Ft[t++]=null;var s=Ft[t];if(Ft[t++]=null,a!==null&&o!==null){var x=a.pending;x===null?o.next=o:(o.next=x.next,x.next=o),a.pending=o}s!==0&&nd(n,o,s)}}function dr(e,t,n,a){Ft[ta++]=e,Ft[ta++]=t,Ft[ta++]=n,Ft[ta++]=a,so|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function co(e,t,n,a){return dr(e,t,n,a),hr(e)}function Tl(e,t){return dr(e,null,null,t),hr(e)}function nd(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var o=!1,s=e.return;s!==null;)s.childLanes|=n,a=s.alternate,a!==null&&(a.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(o=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,o&&t!==null&&(o=31-Ge(n),e=s.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=n|536870912),s):null}function hr(e){if(50<xi)throw xi=0,bs=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var na={};function Nv(e,t,n,a){this.tag=e,this.key=n,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 Ut(e,t,n,a){return new Nv(e,t,n,a)}function fo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wn(e,t){var n=e.alternate;return n===null?(n=Ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ld(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pr(e,t,n,a,o,s){var x=0;if(a=e,typeof e=="function")fo(e)&&(x=1);else if(typeof e=="string")x=Dx(e,n,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Ut(31,n,t,o),e.elementType=ee,e.lanes=s,e;case A:return wl(n.children,o,s,t);case z:x=8,o|=24;break;case k:return e=Ut(12,n,t,o|2),e.elementType=k,e.lanes=s,e;case W:return e=Ut(13,n,t,o),e.elementType=W,e.lanes=s,e;case B:return e=Ut(19,n,t,o),e.elementType=B,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:x=10;break e;case D:x=9;break e;case I:x=11;break e;case Q:x=14;break e;case V:x=16,a=null;break e}x=29,n=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=Ut(x,n,t,o),t.elementType=e,t.type=a,t.lanes=s,t}function wl(e,t,n,a){return e=Ut(7,e,a,t),e.lanes=n,e}function ho(e,t,n){return e=Ut(6,e,null,t),e.lanes=n,e}function ad(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function po(e,t,n){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var id=new WeakMap;function Jt(e,t){if(typeof e=="object"&&e!==null){var n=id.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Fi(t)},id.set(e,t),t)}return{value:e,source:t,stack:Fi(t)}}var la=[],aa=0,mr=null,$a=0,Pt=[],$t=0,Fn=null,dn=1,hn="";function jn(e,t){la[aa++]=$a,la[aa++]=mr,mr=e,$a=t}function rd(e,t,n){Pt[$t++]=dn,Pt[$t++]=hn,Pt[$t++]=Fn,Fn=e;var a=dn;e=hn;var o=32-Ge(a)-1;a&=~(1<<o),n+=1;var s=32-Ge(t)+o;if(30<s){var x=o-o%5;s=(a&(1<<x)-1).toString(32),a>>=x,o-=x,dn=1<<32-Ge(t)+o|n<<o|a,hn=s+e}else dn=1<<s|n<<o|a,hn=e}function mo(e){e.return!==null&&(jn(e,1),rd(e,1,0))}function go(e){for(;e===mr;)mr=la[--aa],la[aa]=null,$a=la[--aa],la[aa]=null;for(;e===Fn;)Fn=Pt[--$t],Pt[$t]=null,hn=Pt[--$t],Pt[$t]=null,dn=Pt[--$t],Pt[$t]=null}function ud(e,t){Pt[$t++]=dn,Pt[$t++]=hn,Pt[$t++]=Fn,dn=t.id,hn=t.overflow,Fn=e}var mt=null,Ke=null,Ne=!1,Jn=null,Wt=!1,yo=Error(u(519));function Pn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wa(Jt(t,e)),yo}function od(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[pt]=e,t[wt]=a,n){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(n=0;n<Si.length;n++)je(Si[n],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),Sf(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),Cf(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||wp(t.textContent,n)?(a.popover!=null&&(je("beforetoggle",t),je("toggle",t)),a.onScroll!=null&&je("scroll",t),a.onScrollEnd!=null&&je("scrollend",t),a.onClick!=null&&(t.onclick=Cn),t=!0):t=!1,t||Pn(e,!0)}function sd(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:mt=mt.return}}function ia(e){if(e!==mt)return!1;if(!Ne)return sd(e),Ne=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Ds(e.type,e.memoizedProps)),n=!n),n&&Ke&&Pn(e),sd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ke=Op(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ke=Op(e)}else t===27?(t=Ke,fl(e.type)?(e=qs,qs=null,Ke=e):Ke=t):Ke=mt?tn(e.stateNode.nextSibling):null;return!0}function jl(){Ke=mt=null,Ne=!1}function vo(){var e=Jn;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Jn=null),e}function Wa(e){Jn===null?Jn=[e]:Jn.push(e)}var xo=j(null),Al=null,An=null;function $n(e,t,n){C(xo,t._currentValue),t._currentValue=n}function zn(e){e._currentValue=xo.current,O(xo)}function bo(e,t,n){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===n)break;e=e.return}}function So(e,t,n,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){var x=o.child;s=s.firstContext;e:for(;s!==null;){var E=s;s=o;for(var N=0;N<t.length;N++)if(E.context===t[N]){s.lanes|=n,E=s.alternate,E!==null&&(E.lanes|=n),bo(s.return,n,e),a||(x=null);break e}s=E.next}}else if(o.tag===18){if(x=o.return,x===null)throw Error(u(341));x.lanes|=n,s=x.alternate,s!==null&&(s.lanes|=n),bo(x,n,e),x=null}else x=o.child;if(x!==null)x.return=o;else for(x=o;x!==null;){if(x===e){x=null;break}if(o=x.sibling,o!==null){o.return=x.return,x=o;break}x=x.return}o=x}}function ra(e,t,n,a){e=null;for(var o=t,s=!1;o!==null;){if(!s){if((o.flags&524288)!==0)s=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var x=o.alternate;if(x===null)throw Error(u(387));if(x=x.memoizedProps,x!==null){var E=o.type;Bt(o.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(o===xe.current){if(x=o.alternate,x===null)throw Error(u(387));x.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ji):e=[ji])}o=o.return}e!==null&&So(t,e,n,a),t.flags|=262144}function gr(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zl(e){Al=e,An=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return cd(Al,e)}function yr(e,t){return Al===null&&zl(e),cd(e,t)}function cd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},An===null){if(e===null)throw Error(u(308));An=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else An=An.next=t;return n}var kv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Mv=l.unstable_scheduleCallback,_v=l.unstable_NormalPriority,at={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eo(){return{controller:new kv,data:new Map,refCount:0}}function ei(e){e.refCount--,e.refCount===0&&Mv(_v,function(){e.controller.abort()})}var ti=null,Co=0,ua=0,oa=null;function Ov(e,t){if(ti===null){var n=ti=[];Co=0,ua=js(),oa={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Co++,t.then(fd,fd),t}function fd(){if(--Co===0&&ti!==null){oa!==null&&(oa.status="fulfilled");var e=ti;ti=null,ua=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Dv(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),a}var dd=U.S;U.S=function(e,t){Fh=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ov(e,t),dd!==null&&dd(e,t)};var Rl=j(null);function To(){var e=Rl.current;return e!==null?e:Qe.pooledCache}function vr(e,t){t===null?C(Rl,Rl.current):C(Rl,t.pool)}function hd(){var e=To();return e===null?null:{parent:at._currentValue,pool:e}}var sa=Error(u(460)),wo=Error(u(474)),xr=Error(u(542)),br={then:function(){}};function pd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function md(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Cn,Cn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yd(e),e;default:if(typeof t.status=="string")t.then(Cn,Cn);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yd(e),e}throw kl=t,sa}}function Nl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(kl=n,sa):n}}var kl=null;function gd(){if(kl===null)throw Error(u(459));var e=kl;return kl=null,e}function yd(e){if(e===sa||e===xr)throw Error(u(483))}var ca=null,ni=0;function Sr(e){var t=ni;return ni+=1,ca===null&&(ca=[]),md(ca,e,t)}function li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Er(e,t){throw t.$$typeof===S?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vd(e){function t(L,M){if(e){var H=L.deletions;H===null?(L.deletions=[M],L.flags|=16):H.push(M)}}function n(L,M){if(!e)return null;for(;M!==null;)t(L,M),M=M.sibling;return null}function a(L){for(var M=new Map;L!==null;)L.key!==null?M.set(L.key,L):M.set(L.index,L),L=L.sibling;return M}function o(L,M){return L=wn(L,M),L.index=0,L.sibling=null,L}function s(L,M,H){return L.index=H,e?(H=L.alternate,H!==null?(H=H.index,H<M?(L.flags|=67108866,M):H):(L.flags|=67108866,M)):(L.flags|=1048576,M)}function x(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function E(L,M,H,K){return M===null||M.tag!==6?(M=ho(H,L.mode,K),M.return=L,M):(M=o(M,H),M.return=L,M)}function N(L,M,H,K){var pe=H.type;return pe===A?X(L,M,H.props.children,K,H.key):M!==null&&(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===V&&Nl(pe)===M.type)?(M=o(M,H.props),li(M,H),M.return=L,M):(M=pr(H.type,H.key,H.props,null,L.mode,K),li(M,H),M.return=L,M)}function q(L,M,H,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=po(H,L.mode,K),M.return=L,M):(M=o(M,H.children||[]),M.return=L,M)}function X(L,M,H,K,pe){return M===null||M.tag!==7?(M=wl(H,L.mode,K,pe),M.return=L,M):(M=o(M,H),M.return=L,M)}function J(L,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ho(""+M,L.mode,H),M.return=L,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return H=pr(M.type,M.key,M.props,null,L.mode,H),li(H,M),H.return=L,H;case R:return M=po(M,L.mode,H),M.return=L,M;case V:return M=Nl(M),J(L,M,H)}if(F(M)||re(M))return M=wl(M,L.mode,H,null),M.return=L,M;if(typeof M.then=="function")return J(L,Sr(M),H);if(M.$$typeof===_)return J(L,yr(L,M),H);Er(L,M)}return null}function Y(L,M,H,K){var pe=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return pe!==null?null:E(L,M,""+H,K);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===pe?N(L,M,H,K):null;case R:return H.key===pe?q(L,M,H,K):null;case V:return H=Nl(H),Y(L,M,H,K)}if(F(H)||re(H))return pe!==null?null:X(L,M,H,K,null);if(typeof H.then=="function")return Y(L,M,Sr(H),K);if(H.$$typeof===_)return Y(L,M,yr(L,H),K);Er(L,H)}return null}function G(L,M,H,K,pe){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return L=L.get(H)||null,E(M,L,""+K,pe);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return L=L.get(K.key===null?H:K.key)||null,N(M,L,K,pe);case R:return L=L.get(K.key===null?H:K.key)||null,q(M,L,K,pe);case V:return K=Nl(K),G(L,M,H,K,pe)}if(F(K)||re(K))return L=L.get(H)||null,X(M,L,K,pe,null);if(typeof K.then=="function")return G(L,M,H,Sr(K),pe);if(K.$$typeof===_)return G(L,M,H,yr(M,K),pe);Er(M,K)}return null}function ce(L,M,H,K){for(var pe=null,Me=null,de=M,Se=M=0,Re=null;de!==null&&Se<H.length;Se++){de.index>Se?(Re=de,de=null):Re=de.sibling;var _e=Y(L,de,H[Se],K);if(_e===null){de===null&&(de=Re);break}e&&de&&_e.alternate===null&&t(L,de),M=s(_e,M,Se),Me===null?pe=_e:Me.sibling=_e,Me=_e,de=Re}if(Se===H.length)return n(L,de),Ne&&jn(L,Se),pe;if(de===null){for(;Se<H.length;Se++)de=J(L,H[Se],K),de!==null&&(M=s(de,M,Se),Me===null?pe=de:Me.sibling=de,Me=de);return Ne&&jn(L,Se),pe}for(de=a(de);Se<H.length;Se++)Re=G(de,L,Se,H[Se],K),Re!==null&&(e&&Re.alternate!==null&&de.delete(Re.key===null?Se:Re.key),M=s(Re,M,Se),Me===null?pe=Re:Me.sibling=Re,Me=Re);return e&&de.forEach(function(gl){return t(L,gl)}),Ne&&jn(L,Se),pe}function me(L,M,H,K){if(H==null)throw Error(u(151));for(var pe=null,Me=null,de=M,Se=M=0,Re=null,_e=H.next();de!==null&&!_e.done;Se++,_e=H.next()){de.index>Se?(Re=de,de=null):Re=de.sibling;var gl=Y(L,de,_e.value,K);if(gl===null){de===null&&(de=Re);break}e&&de&&gl.alternate===null&&t(L,de),M=s(gl,M,Se),Me===null?pe=gl:Me.sibling=gl,Me=gl,de=Re}if(_e.done)return n(L,de),Ne&&jn(L,Se),pe;if(de===null){for(;!_e.done;Se++,_e=H.next())_e=J(L,_e.value,K),_e!==null&&(M=s(_e,M,Se),Me===null?pe=_e:Me.sibling=_e,Me=_e);return Ne&&jn(L,Se),pe}for(de=a(de);!_e.done;Se++,_e=H.next())_e=G(de,L,Se,_e.value,K),_e!==null&&(e&&_e.alternate!==null&&de.delete(_e.key===null?Se:_e.key),M=s(_e,M,Se),Me===null?pe=_e:Me.sibling=_e,Me=_e);return e&&de.forEach(function(Xx){return t(L,Xx)}),Ne&&jn(L,Se),pe}function Ie(L,M,H,K){if(typeof H=="object"&&H!==null&&H.type===A&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var pe=H.key;M!==null;){if(M.key===pe){if(pe=H.type,pe===A){if(M.tag===7){n(L,M.sibling),K=o(M,H.props.children),K.return=L,L=K;break e}}else if(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===V&&Nl(pe)===M.type){n(L,M.sibling),K=o(M,H.props),li(K,H),K.return=L,L=K;break e}n(L,M);break}else t(L,M);M=M.sibling}H.type===A?(K=wl(H.props.children,L.mode,K,H.key),K.return=L,L=K):(K=pr(H.type,H.key,H.props,null,L.mode,K),li(K,H),K.return=L,L=K)}return x(L);case R:e:{for(pe=H.key;M!==null;){if(M.key===pe)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){n(L,M.sibling),K=o(M,H.children||[]),K.return=L,L=K;break e}else{n(L,M);break}else t(L,M);M=M.sibling}K=po(H,L.mode,K),K.return=L,L=K}return x(L);case V:return H=Nl(H),Ie(L,M,H,K)}if(F(H))return ce(L,M,H,K);if(re(H)){if(pe=re(H),typeof pe!="function")throw Error(u(150));return H=pe.call(H),me(L,M,H,K)}if(typeof H.then=="function")return Ie(L,M,Sr(H),K);if(H.$$typeof===_)return Ie(L,M,yr(L,H),K);Er(L,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(n(L,M.sibling),K=o(M,H),K.return=L,L=K):(n(L,M),K=ho(H,L.mode,K),K.return=L,L=K),x(L)):n(L,M)}return function(L,M,H,K){try{ni=0;var pe=Ie(L,M,H,K);return ca=null,pe}catch(de){if(de===sa||de===xr)throw de;var Me=Ut(29,de,null,L.mode);return Me.lanes=K,Me.return=L,Me}}}var Ml=vd(!0),xd=vd(!1),Wn=!1;function jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ao(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 el(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function tl(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Oe&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=hr(e),nd(e,null,n),t}return dr(e,a,t,n),hr(e)}function ai(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,cf(e,n)}}function zo(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var x={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?o=s=x:s=s.next=x,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ro=!1;function ii(){if(Ro){var e=oa;if(e!==null)throw e}}function ri(e,t,n,a){Ro=!1;var o=e.updateQueue;Wn=!1;var s=o.firstBaseUpdate,x=o.lastBaseUpdate,E=o.shared.pending;if(E!==null){o.shared.pending=null;var N=E,q=N.next;N.next=null,x===null?s=q:x.next=q,x=N;var X=e.alternate;X!==null&&(X=X.updateQueue,E=X.lastBaseUpdate,E!==x&&(E===null?X.firstBaseUpdate=q:E.next=q,X.lastBaseUpdate=N))}if(s!==null){var J=o.baseState;x=0,X=q=N=null,E=s;do{var Y=E.lane&-536870913,G=Y!==E.lane;if(G?(ze&Y)===Y:(a&Y)===Y){Y!==0&&Y===ua&&(Ro=!0),X!==null&&(X=X.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ce=e,me=E;Y=t;var Ie=n;switch(me.tag){case 1:if(ce=me.payload,typeof ce=="function"){J=ce.call(Ie,J,Y);break e}J=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=me.payload,Y=typeof ce=="function"?ce.call(Ie,J,Y):ce,Y==null)break e;J=v({},J,Y);break e;case 2:Wn=!0}}Y=E.callback,Y!==null&&(e.flags|=64,G&&(e.flags|=8192),G=o.callbacks,G===null?o.callbacks=[Y]:G.push(Y))}else G={lane:Y,tag:E.tag,payload:E.payload,callback:E.callback,next:null},X===null?(q=X=G,N=J):X=X.next=G,x|=Y;if(E=E.next,E===null){if(E=o.shared.pending,E===null)break;G=E,E=G.next,G.next=null,o.lastBaseUpdate=G,o.shared.pending=null}}while(!0);X===null&&(N=J),o.baseState=N,o.firstBaseUpdate=q,o.lastBaseUpdate=X,s===null&&(o.shared.lanes=0),rl|=x,e.lanes=x,e.memoizedState=J}}function bd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Sd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bd(n[e],t)}var fa=j(null),Cr=j(0);function Ed(e,t){e=Bn,C(Cr,e),C(fa,t),Bn=e|t.baseLanes}function No(){C(Cr,Bn),C(fa,fa.current)}function ko(){Bn=Cr.current,O(fa),O(Cr)}var Ht=j(null),en=null;function nl(e){var t=e.alternate;C(tt,tt.current&1),C(Ht,e),en===null&&(t===null||fa.current!==null||t.memoizedState!==null)&&(en=e)}function Mo(e){C(tt,tt.current),C(Ht,e),en===null&&(en=e)}function Cd(e){e.tag===22?(C(tt,tt.current),C(Ht,e),en===null&&(en=e)):ll()}function ll(){C(tt,tt.current),C(Ht,Ht.current)}function qt(e){O(Ht),en===e&&(en=null),O(tt)}var tt=j(0);function Tr(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Us(n)||Hs(n)))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 Rn=0,be=null,Ye=null,it=null,wr=!1,da=!1,_l=!1,jr=0,ui=0,ha=null,Lv=0;function $e(){throw Error(u(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Oo(e,t,n,a,o,s){return Rn=s,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?rh:Fo,_l=!1,s=n(a,o),_l=!1,da&&(s=wd(t,n,a,o)),Td(e),s}function Td(e){U.H=ci;var t=Ye!==null&&Ye.next!==null;if(Rn=0,it=Ye=be=null,wr=!1,ui=0,ha=null,t)throw Error(u(300));e===null||rt||(e=e.dependencies,e!==null&&gr(e)&&(rt=!0))}function wd(e,t,n,a){be=e;var o=0;do{if(da&&(ha=null),ui=0,da=!1,25<=o)throw Error(u(301));if(o+=1,it=Ye=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}U.H=uh,s=t(n,a)}while(da);return s}function Bv(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?oi(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(be.flags|=1024),t}function Do(){var e=jr!==0;return jr=0,e}function Lo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bo(e){if(wr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wr=!1}Rn=0,it=Ye=be=null,da=!1,ui=jr=0,ha=null}function Ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?be.memoizedState=it=e:it=it.next=e,it}function nt(){if(Ye===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=it===null?be.memoizedState:it.next;if(t!==null)it=t,Ye=e;else{if(e===null)throw be.alternate===null?Error(u(467)):Error(u(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},it===null?be.memoizedState=it=e:it=it.next=e}return it}function Ar(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oi(e){var t=ui;return ui+=1,ha===null&&(ha=[]),e=md(ha,e,t),t=be,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?rh:Fo),e}function zr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return oi(e);if(e.$$typeof===_)return gt(e)}throw Error(u(438,String(e)))}function Uo(e){var t=null,n=be.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=be.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ar(),be.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=oe;return t.index++,n}function Nn(e,t){return typeof t=="function"?t(e):t}function Rr(e){var t=nt();return Ho(t,Ye,e)}function Ho(e,t,n){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=n;var o=e.baseQueue,s=a.pending;if(s!==null){if(o!==null){var x=o.next;o.next=s.next,s.next=x}t.baseQueue=o=s,a.pending=null}if(s=e.baseState,o===null)e.memoizedState=s;else{t=o.next;var E=x=null,N=null,q=t,X=!1;do{var J=q.lane&-536870913;if(J!==q.lane?(ze&J)===J:(Rn&J)===J){var Y=q.revertLane;if(Y===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),J===ua&&(X=!0);else if((Rn&Y)===Y){q=q.next,Y===ua&&(X=!0);continue}else J={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(E=N=J,x=s):N=N.next=J,be.lanes|=Y,rl|=Y;J=q.action,_l&&n(s,J),s=q.hasEagerState?q.eagerState:n(s,J)}else Y={lane:J,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(E=N=Y,x=s):N=N.next=Y,be.lanes|=J,rl|=J;q=q.next}while(q!==null&&q!==t);if(N===null?x=s:N.next=E,!Bt(s,e.memoizedState)&&(rt=!0,X&&(n=oa,n!==null)))throw n;e.memoizedState=s,e.baseState=x,e.baseQueue=N,a.lastRenderedState=s}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qo(e){var t=nt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var a=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var x=o=o.next;do s=e(s,x.action),x=x.next;while(x!==o);Bt(s,t.memoizedState)||(rt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,a]}function jd(e,t,n){var a=be,o=nt(),s=Ne;if(s){if(n===void 0)throw Error(u(407));n=n()}else n=t();var x=!Bt((Ye||o).memoizedState,n);if(x&&(o.memoizedState=n,rt=!0),o=o.queue,Io(Rd.bind(null,a,o,e),[e]),o.getSnapshot!==t||x||it!==null&&it.memoizedState.tag&1){if(a.flags|=2048,pa(9,{destroy:void 0},zd.bind(null,a,o,n,t),null),Qe===null)throw Error(u(349));s||(Rn&127)!==0||Ad(a,t,n)}return n}function Ad(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t=Ar(),be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zd(e,t,n,a){t.value=n,t.getSnapshot=a,Nd(t)&&kd(e)}function Rd(e,t,n){return n(function(){Nd(t)&&kd(e)})}function Nd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function kd(e){var t=Tl(e,2);t!==null&&kt(t,e,2)}function Yo(e){var t=Ct();if(typeof e=="function"){var n=e;if(e=n(),_l){Tt(!0);try{n()}finally{Tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:e},t}function Md(e,t,n,a){return e.baseState=n,Ho(e,Ye,typeof a=="function"?a:Nn)}function Uv(e,t,n,a,o){if(Mr(e))throw Error(u(485));if(e=t.action,e!==null){var s={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){s.listeners.push(x)}};U.T!==null?n(!0):s.isTransition=!1,a(s),n=t.pending,n===null?(s.next=t.pending=s,_d(t,s)):(s.next=n.next,t.pending=n.next=s)}}function _d(e,t){var n=t.action,a=t.payload,o=e.state;if(t.isTransition){var s=U.T,x={};U.T=x;try{var E=n(o,a),N=U.S;N!==null&&N(x,E),Od(e,t,E)}catch(q){Vo(e,t,q)}finally{s!==null&&x.types!==null&&(s.types=x.types),U.T=s}}else try{s=n(o,a),Od(e,t,s)}catch(q){Vo(e,t,q)}}function Od(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Dd(e,t,a)},function(a){return Vo(e,t,a)}):Dd(e,t,n)}function Dd(e,t,n){t.status="fulfilled",t.value=n,Ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_d(e,n)))}function Vo(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ld(t),t=t.next;while(t!==a)}e.action=null}function Ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bd(e,t){return t}function Ud(e,t){if(Ne){var n=Qe.formState;if(n!==null){e:{var a=be;if(Ne){if(Ke){t:{for(var o=Ke,s=Wt;o.nodeType!==8;){if(!s){o=null;break t}if(o=tn(o.nextSibling),o===null){o=null;break t}}s=o.data,o=s==="F!"||s==="F"?o:null}if(o){Ke=tn(o.nextSibling),a=o.data==="F!";break e}}Pn(a)}a=!1}a&&(t=n[0])}}return n=Ct(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bd,lastRenderedState:t},n.queue=a,n=lh.bind(null,be,a),a.dispatch=n,a=Yo(!1),s=Ko.bind(null,be,!1,a.queue),a=Ct(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,n=Uv.bind(null,be,o,s,n),o.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hd(e){var t=nt();return qd(t,Ye,e)}function qd(e,t,n){if(t=Ho(e,t,Bd)[0],e=Rr(Nn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=oi(t)}catch(x){throw x===sa?xr:x}else a=t;t=nt();var o=t.queue,s=o.dispatch;return n!==t.memoizedState&&(be.flags|=2048,pa(9,{destroy:void 0},Hv.bind(null,o,n),null)),[a,s,e]}function Hv(e,t){e.action=t}function Yd(e){var t=nt(),n=Ye;if(n!==null)return qd(t,n,e);nt(),t=t.memoizedState,n=nt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function pa(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=be.updateQueue,t===null&&(t=Ar(),be.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Vd(){return nt().memoizedState}function Nr(e,t,n,a){var o=Ct();be.flags|=e,o.memoizedState=pa(1|t,{destroy:void 0},n,a===void 0?null:a)}function kr(e,t,n,a){var o=nt();a=a===void 0?null:a;var s=o.memoizedState.inst;Ye!==null&&a!==null&&_o(a,Ye.memoizedState.deps)?o.memoizedState=pa(t,s,n,a):(be.flags|=e,o.memoizedState=pa(1|t,s,n,a))}function Id(e,t){Nr(8390656,8,e,t)}function Io(e,t){kr(2048,8,e,t)}function qv(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=Ar(),be.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gd(e){var t=nt().memoizedState;return qv({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Qd(e,t){return kr(4,2,e,t)}function Xd(e,t){return kr(4,4,e,t)}function Zd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kd(e,t,n){n=n!=null?n.concat([e]):null,kr(4,4,Zd.bind(null,t,e),n)}function Go(){}function Fd(e,t){var n=nt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&_o(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Jd(e,t){var n=nt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&_o(t,a[1]))return a[0];if(a=e(),_l){Tt(!0);try{e()}finally{Tt(!1)}}return n.memoizedState=[a,t],a}function Qo(e,t,n){return n===void 0||(Rn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ph(),be.lanes|=e,rl|=e,n)}function Pd(e,t,n,a){return Bt(n,t)?n:fa.current!==null?(e=Qo(e,n,a),Bt(e,t)||(rt=!0),e):(Rn&42)===0||(Rn&1073741824)!==0&&(ze&261930)===0?(rt=!0,e.memoizedState=n):(e=Ph(),be.lanes|=e,rl|=e,t)}function $d(e,t,n,a,o){var s=$.p;$.p=s!==0&&8>s?s:8;var x=U.T,E={};U.T=E,Ko(e,!1,t,n);try{var N=o(),q=U.S;if(q!==null&&q(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var X=Dv(N,a);si(e,t,X,It(e))}else si(e,t,a,It(e))}catch(J){si(e,t,{then:function(){},status:"rejected",reason:J},It())}finally{$.p=s,x!==null&&E.types!==null&&(x.types=E.types),U.T=x}}function Yv(){}function Xo(e,t,n,a){if(e.tag!==5)throw Error(u(476));var o=Wd(e).queue;$d(e,o,t,se,n===null?Yv:function(){return eh(e),n(a)})}function Wd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function eh(e){var t=Wd(e);t.next===null&&(t=e.alternate.memoizedState),si(e,t.next.queue,{},It())}function Zo(){return gt(ji)}function th(){return nt().memoizedState}function nh(){return nt().memoizedState}function Vv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=It();e=el(n);var a=tl(t,e,n);a!==null&&(kt(a,t,n),ai(a,t,n)),t={cache:Eo()},e.payload=t;return}t=t.return}}function Iv(e,t,n){var a=It();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Mr(e)?ah(t,n):(n=co(e,t,n,a),n!==null&&(kt(n,e,a),ih(n,t,a)))}function lh(e,t,n){var a=It();si(e,t,n,a)}function si(e,t,n,a){var o={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mr(e))ah(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var x=t.lastRenderedState,E=s(x,n);if(o.hasEagerState=!0,o.eagerState=E,Bt(E,x))return dr(e,t,o,0),Qe===null&&fr(),!1}catch{}if(n=co(e,t,o,a),n!==null)return kt(n,e,a),ih(n,t,a),!0}return!1}function Ko(e,t,n,a){if(a={lane:2,revertLane:js(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mr(e)){if(t)throw Error(u(479))}else t=co(e,n,a,2),t!==null&&kt(t,e,2)}function Mr(e){var t=e.alternate;return e===be||t!==null&&t===be}function ah(e,t){da=wr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ih(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,cf(e,n)}}var ci={readContext:gt,use:zr,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};ci.useEffectEvent=$e;var rh={readContext:gt,use:zr,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Id,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Nr(4194308,4,Zd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nr(4194308,4,e,t)},useInsertionEffect:function(e,t){Nr(4,2,e,t)},useMemo:function(e,t){var n=Ct();t=t===void 0?null:t;var a=e();if(_l){Tt(!0);try{e()}finally{Tt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Ct();if(n!==void 0){var o=n(t);if(_l){Tt(!0);try{n(t)}finally{Tt(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=Iv.bind(null,be,e),[a.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=lh.bind(null,be,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Go,useDeferredValue:function(e,t){var n=Ct();return Qo(n,e,t)},useTransition:function(){var e=Yo(!1);return e=$d.bind(null,be,e.queue,!0,!1),Ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=be,o=Ct();if(Ne){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Qe===null)throw Error(u(349));(ze&127)!==0||Ad(a,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Id(Rd.bind(null,a,s,e),[e]),a.flags|=2048,pa(9,{destroy:void 0},zd.bind(null,a,s,n,t),null),n},useId:function(){var e=Ct(),t=Qe.identifierPrefix;if(Ne){var n=hn,a=dn;n=(a&~(1<<32-Ge(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=jr++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Lv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zo,useFormState:Ud,useActionState:Ud,useOptimistic:function(e){var t=Ct();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ko.bind(null,be,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uo,useCacheRefresh:function(){return Ct().memoizedState=Vv.bind(null,be)},useEffectEvent:function(e){var t=Ct(),n={impl:e};return t.memoizedState=n,function(){if((Oe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Fo={readContext:gt,use:zr,useCallback:Fd,useContext:gt,useEffect:Io,useImperativeHandle:Kd,useInsertionEffect:Qd,useLayoutEffect:Xd,useMemo:Jd,useReducer:Rr,useRef:Vd,useState:function(){return Rr(Nn)},useDebugValue:Go,useDeferredValue:function(e,t){var n=nt();return Pd(n,Ye.memoizedState,e,t)},useTransition:function(){var e=Rr(Nn)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:oi(e),t]},useSyncExternalStore:jd,useId:th,useHostTransitionStatus:Zo,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=nt();return Md(n,Ye,e,t)},useMemoCache:Uo,useCacheRefresh:nh};Fo.useEffectEvent=Gd;var uh={readContext:gt,use:zr,useCallback:Fd,useContext:gt,useEffect:Io,useImperativeHandle:Kd,useInsertionEffect:Qd,useLayoutEffect:Xd,useMemo:Jd,useReducer:qo,useRef:Vd,useState:function(){return qo(Nn)},useDebugValue:Go,useDeferredValue:function(e,t){var n=nt();return Ye===null?Qo(n,e,t):Pd(n,Ye.memoizedState,e,t)},useTransition:function(){var e=qo(Nn)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:oi(e),t]},useSyncExternalStore:jd,useId:th,useHostTransitionStatus:Zo,useFormState:Yd,useActionState:Yd,useOptimistic:function(e,t){var n=nt();return Ye!==null?Md(n,Ye,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uo,useCacheRefresh:nh};uh.useEffectEvent=Gd;function Jo(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Po={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=It(),o=el(a);o.payload=t,n!=null&&(o.callback=n),t=tl(e,o,a),t!==null&&(kt(t,e,a),ai(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=It(),o=el(a);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tl(e,o,a),t!==null&&(kt(t,e,a),ai(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),a=el(n);a.tag=2,t!=null&&(a.callback=t),t=tl(e,a,n),t!==null&&(kt(t,e,n),ai(t,e,n))}};function oh(e,t,n,a,o,s,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,x):t.prototype&&t.prototype.isPureReactComponent?!Ja(n,a)||!Ja(o,s):!0}function sh(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Po.enqueueReplaceState(t,t.state,null)}function Ol(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function ch(e){cr(e)}function fh(e){console.error(e)}function dh(e){cr(e)}function _r(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function hh(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function $o(e,t,n){return n=el(n),n.tag=3,n.payload={element:null},n.callback=function(){_r(e,t)},n}function ph(e){return e=el(e),e.tag=3,e}function mh(e,t,n,a){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var s=a.value;e.payload=function(){return o(s)},e.callback=function(){hh(t,n,a)}}var x=n.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){hh(t,n,a),typeof o!="function"&&(ul===null?ul=new Set([this]):ul.add(this));var E=a.stack;this.componentDidCatch(a.value,{componentStack:E!==null?E:""})})}function Gv(e,t,n,a,o){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ra(t,n,o,!0),n=Ht.current,n!==null){switch(n.tag){case 31:case 13:return en===null?Qr():n.alternate===null&&We===0&&(We=3),n.flags&=-257,n.flags|=65536,n.lanes=o,a===br?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Cs(e,a,o)),!1;case 22:return n.flags|=65536,a===br?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Cs(e,a,o)),!1}throw Error(u(435,n.tag))}return Cs(e,a,o),Qr(),!1}if(Ne)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==yo&&(e=Error(u(422),{cause:a}),Wa(Jt(e,n)))):(a!==yo&&(t=Error(u(423),{cause:a}),Wa(Jt(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=Jt(a,n),o=$o(e.stateNode,a,o),zo(e,o),We!==4&&(We=2)),!1;var s=Error(u(520),{cause:a});if(s=Jt(s,n),vi===null?vi=[s]:vi.push(s),We!==4&&(We=2),t===null)return!0;a=Jt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=$o(n.stateNode,a,e),zo(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(ul===null||!ul.has(s))))return n.flags|=65536,o&=-o,n.lanes|=o,o=ph(o),mh(o,e,n,a),zo(n,o),!1}n=n.return}while(n!==null);return!1}var Wo=Error(u(461)),rt=!1;function yt(e,t,n,a){t.child=e===null?xd(t,null,n,a):Ml(t,e.child,n,a)}function gh(e,t,n,a,o){n=n.render;var s=t.ref;if("ref"in a){var x={};for(var E in a)E!=="ref"&&(x[E]=a[E])}else x=a;return zl(t),a=Oo(e,t,n,x,s,o),E=Do(),e!==null&&!rt?(Lo(e,t,o),kn(e,t,o)):(Ne&&E&&mo(t),t.flags|=1,yt(e,t,a,o),t.child)}function yh(e,t,n,a,o){if(e===null){var s=n.type;return typeof s=="function"&&!fo(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,vh(e,t,s,a,o)):(e=pr(n.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!us(e,o)){var x=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ja,n(x,a)&&e.ref===t.ref)return kn(e,t,o)}return t.flags|=1,e=wn(s,a),e.ref=t.ref,e.return=t,t.child=e}function vh(e,t,n,a,o){if(e!==null){var s=e.memoizedProps;if(Ja(s,a)&&e.ref===t.ref)if(rt=!1,t.pendingProps=a=s,us(e,o))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,kn(e,t,o)}return es(e,t,n,a,o)}function xh(e,t,n,a){var o=a.children,s=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(s=s!==null?s.baseLanes|n:n,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~s}else a=0,t.child=null;return bh(e,t,s,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,s!==null?s.cachePool:null),s!==null?Ed(t,s):No(),Cd(t);else return a=t.lanes=536870912,bh(e,t,s!==null?s.baseLanes|n:n,n,a)}else s!==null?(vr(t,s.cachePool),Ed(t,s),ll(),t.memoizedState=null):(e!==null&&vr(t,null),No(),ll());return yt(e,t,o,n),t.child}function fi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function bh(e,t,n,a,o){var s=To();return s=s===null?null:{parent:at._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&vr(t,null),No(),Cd(t),e!==null&&ra(e,t,a,!0),t.childLanes=o,null}function Or(e,t){return t=Lr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sh(e,t,n){return Ml(t,e.child,null,n),e=Or(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function Qv(e,t,n){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(a.mode==="hidden")return e=Or(t,a),t.lanes=536870912,fi(null,e);if(Mo(t),(e=Ke)?(e=_p(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:dn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,mt=t,Ke=null)):e=null,e===null)throw Pn(t);return t.lanes=536870912,null}return Or(t,a)}var s=e.memoizedState;if(s!==null){var x=s.dehydrated;if(Mo(t),o)if(t.flags&256)t.flags&=-257,t=Sh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(rt||ra(e,t,n,!1),o=(n&e.childLanes)!==0,rt||o){if(a=Qe,a!==null&&(x=ff(a,n),x!==0&&x!==s.retryLane))throw s.retryLane=x,Tl(e,x),kt(a,e,x),Wo;Qr(),t=Sh(e,t,n)}else e=s.treeContext,Ke=tn(x.nextSibling),mt=t,Ne=!0,Jn=null,Wt=!1,e!==null&&ud(t,e),t=Or(t,a),t.flags|=4096;return t}return e=wn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Dr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function es(e,t,n,a,o){return zl(t),n=Oo(e,t,n,a,void 0,o),a=Do(),e!==null&&!rt?(Lo(e,t,o),kn(e,t,o)):(Ne&&a&&mo(t),t.flags|=1,yt(e,t,n,o),t.child)}function Eh(e,t,n,a,o,s){return zl(t),t.updateQueue=null,n=wd(t,a,n,o),Td(e),a=Do(),e!==null&&!rt?(Lo(e,t,s),kn(e,t,s)):(Ne&&a&&mo(t),t.flags|=1,yt(e,t,n,s),t.child)}function Ch(e,t,n,a,o){if(zl(t),t.stateNode===null){var s=na,x=n.contextType;typeof x=="object"&&x!==null&&(s=gt(x)),s=new n(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Po,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},jo(t),x=n.contextType,s.context=typeof x=="object"&&x!==null?gt(x):na,s.state=t.memoizedState,x=n.getDerivedStateFromProps,typeof x=="function"&&(Jo(t,n,x,a),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(x=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),x!==s.state&&Po.enqueueReplaceState(s,s.state,null),ri(t,a,s,o),ii(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var E=t.memoizedProps,N=Ol(n,E);s.props=N;var q=s.context,X=n.contextType;x=na,typeof X=="object"&&X!==null&&(x=gt(X));var J=n.getDerivedStateFromProps;X=typeof J=="function"||typeof s.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,X||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(E||q!==x)&&sh(t,s,a,x),Wn=!1;var Y=t.memoizedState;s.state=Y,ri(t,a,s,o),ii(),q=t.memoizedState,E||Y!==q||Wn?(typeof J=="function"&&(Jo(t,n,J,a),q=t.memoizedState),(N=Wn||oh(t,n,N,a,Y,q,x))?(X||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=q),s.props=a,s.state=q,s.context=x,a=N):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,Ao(e,t),x=t.memoizedProps,X=Ol(n,x),s.props=X,J=t.pendingProps,Y=s.context,q=n.contextType,N=na,typeof q=="object"&&q!==null&&(N=gt(q)),E=n.getDerivedStateFromProps,(q=typeof E=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(x!==J||Y!==N)&&sh(t,s,a,N),Wn=!1,Y=t.memoizedState,s.state=Y,ri(t,a,s,o),ii();var G=t.memoizedState;x!==J||Y!==G||Wn||e!==null&&e.dependencies!==null&&gr(e.dependencies)?(typeof E=="function"&&(Jo(t,n,E,a),G=t.memoizedState),(X=Wn||oh(t,n,X,a,Y,G,N)||e!==null&&e.dependencies!==null&&gr(e.dependencies))?(q||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,G,N),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,G,N)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=G),s.props=a,s.state=G,s.context=N,a=X):(typeof s.componentDidUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,Dr(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=Ml(t,e.child,null,o),t.child=Ml(t,null,n,o)):yt(e,t,n,o),t.memoizedState=s.state,e=t.child):e=kn(e,t,o),e}function Th(e,t,n,a){return jl(),t.flags|=256,yt(e,t,n,a),t.child}var ts={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ns(e){return{baseLanes:e,cachePool:hd()}}function ls(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vt),e}function wh(e,t,n){var a=t.pendingProps,o=!1,s=(t.flags&128)!==0,x;if((x=s)||(x=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),x&&(o=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(o?nl(t):ll(),(e=Ke)?(e=_p(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:dn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,mt=t,Ke=null)):e=null,e===null)throw Pn(t);return Hs(e)?t.lanes=32:t.lanes=536870912,null}var E=a.children;return a=a.fallback,o?(ll(),o=t.mode,E=Lr({mode:"hidden",children:E},o),a=wl(a,o,n,null),E.return=t,a.return=t,E.sibling=a,t.child=E,a=t.child,a.memoizedState=ns(n),a.childLanes=ls(e,x,n),t.memoizedState=ts,fi(null,a)):(nl(t),as(t,E))}var N=e.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(s)t.flags&256?(nl(t),t.flags&=-257,t=is(e,t,n)):t.memoizedState!==null?(ll(),t.child=e.child,t.flags|=128,t=null):(ll(),E=a.fallback,o=t.mode,a=Lr({mode:"visible",children:a.children},o),E=wl(E,o,n,null),E.flags|=2,a.return=t,E.return=t,a.sibling=E,t.child=a,Ml(t,e.child,null,n),a=t.child,a.memoizedState=ns(n),a.childLanes=ls(e,x,n),t.memoizedState=ts,t=fi(null,a));else if(nl(t),Hs(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var q=x.dgst;x=q,a=Error(u(419)),a.stack="",a.digest=x,Wa({value:a,source:null,stack:null}),t=is(e,t,n)}else if(rt||ra(e,t,n,!1),x=(n&e.childLanes)!==0,rt||x){if(x=Qe,x!==null&&(a=ff(x,n),a!==0&&a!==N.retryLane))throw N.retryLane=a,Tl(e,a),kt(x,e,a),Wo;Us(E)||Qr(),t=is(e,t,n)}else Us(E)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ke=tn(E.nextSibling),mt=t,Ne=!0,Jn=null,Wt=!1,e!==null&&ud(t,e),t=as(t,a.children),t.flags|=4096);return t}return o?(ll(),E=a.fallback,o=t.mode,N=e.child,q=N.sibling,a=wn(N,{mode:"hidden",children:a.children}),a.subtreeFlags=N.subtreeFlags&65011712,q!==null?E=wn(q,E):(E=wl(E,o,n,null),E.flags|=2),E.return=t,a.return=t,a.sibling=E,t.child=a,fi(null,a),a=t.child,E=e.child.memoizedState,E===null?E=ns(n):(o=E.cachePool,o!==null?(N=at._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=hd(),E={baseLanes:E.baseLanes|n,cachePool:o}),a.memoizedState=E,a.childLanes=ls(e,x,n),t.memoizedState=ts,fi(e.child,a)):(nl(t),n=e.child,e=n.sibling,n=wn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=n,t.memoizedState=null,n)}function as(e,t){return t=Lr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Lr(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function is(e,t,n){return Ml(t,e.child,null,n),e=as(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jh(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bo(e.return,t,n)}function rs(e,t,n,a,o,s){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:o,treeForkCount:s}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=n,x.tailMode=o,x.treeForkCount=s)}function Ah(e,t,n){var a=t.pendingProps,o=a.revealOrder,s=a.tail;a=a.children;var x=tt.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,C(tt,x),yt(e,t,a,n),a=Ne?$a:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jh(e,n,t);else if(e.tag===19)jh(e,n,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(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Tr(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,s,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Tr(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,s,a);break;case"together":rs(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function us(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&gr(e)))}function Xv(e,t,n){switch(t.tag){case 3:qe(t,t.stateNode.containerInfo),$n(t,at,e.memoizedState.cache),jl();break;case 27:case 5:Xt(t);break;case 4:qe(t,t.stateNode.containerInfo);break;case 10:$n(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(nl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?wh(e,t,n):(nl(t),e=kn(e,t,n),e!==null?e.sibling:null);nl(t);break;case 19:var o=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ra(e,t,n,!1),a=(n&t.childLanes)!==0),o){if(a)return Ah(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),C(tt,tt.current),a)break;return null;case 22:return t.lanes=0,xh(e,t,n,t.pendingProps);case 24:$n(t,at,e.memoizedState.cache)}return kn(e,t,n)}function zh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!us(e,n)&&(t.flags&128)===0)return rt=!1,Xv(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Ne&&(t.flags&1048576)!==0&&rd(t,$a,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Nl(t.elementType),t.type=e,typeof e=="function")fo(e)?(a=Ol(e,a),t.tag=1,t=Ch(null,t,e,a,n)):(t.tag=0,t=es(null,t,e,a,n));else{if(e!=null){var o=e.$$typeof;if(o===I){t.tag=11,t=gh(null,t,e,a,n);break e}else if(o===Q){t.tag=14,t=yh(null,t,e,a,n);break e}}throw t=P(e)||e,Error(u(306,t,""))}}return t;case 0:return es(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,o=Ol(a,t.pendingProps),Ch(e,t,a,o,n);case 3:e:{if(qe(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var s=t.memoizedState;o=s.element,Ao(e,t),ri(t,a,null,n);var x=t.memoizedState;if(a=x.cache,$n(t,at,a),a!==s.cache&&So(t,[at],n,!0),ii(),a=x.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Th(e,t,a,n);break e}else if(a!==o){o=Jt(Error(u(424)),t),Wa(o),t=Th(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=tn(e.firstChild),mt=t,Ne=!0,Jn=null,Wt=!0,n=xd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jl(),a===o){t=kn(e,t,n);break e}yt(e,t,a,n)}t=t.child}return t;case 26:return Dr(e,t),e===null?(n=Hp(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ne||(n=t.type,e=t.pendingProps,a=$r(ue.current).createElement(n),a[pt]=t,a[wt]=e,vt(a,n,e),dt(a),t.stateNode=a):t.memoizedState=Hp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xt(t),e===null&&Ne&&(a=t.stateNode=Lp(t.type,t.pendingProps,ue.current),mt=t,Wt=!0,o=Ke,fl(t.type)?(qs=o,Ke=tn(a.firstChild)):Ke=o),yt(e,t,t.pendingProps.children,n),Dr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((o=a=Ke)&&(a=Ex(a,t.type,t.pendingProps,Wt),a!==null?(t.stateNode=a,mt=t,Ke=tn(a.firstChild),Wt=!1,o=!0):o=!1),o||Pn(t)),Xt(t),o=t.type,s=t.pendingProps,x=e!==null?e.memoizedProps:null,a=s.children,Ds(o,s)?a=null:x!==null&&Ds(o,x)&&(t.flags|=32),t.memoizedState!==null&&(o=Oo(e,t,Bv,null,null,n),ji._currentValue=o),Dr(e,t),yt(e,t,a,n),t.child;case 6:return e===null&&Ne&&((e=n=Ke)&&(n=Cx(n,t.pendingProps,Wt),n!==null?(t.stateNode=n,mt=t,Ke=null,e=!0):e=!1),e||Pn(t)),null;case 13:return wh(e,t,n);case 4:return qe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ml(t,null,a,n):yt(e,t,a,n),t.child;case 11:return gh(e,t,t.type,t.pendingProps,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,$n(t,t.type,a.value),yt(e,t,a.children,n),t.child;case 9:return o=t.type._context,a=t.pendingProps.children,zl(t),o=gt(o),a=a(o),t.flags|=1,yt(e,t,a,n),t.child;case 14:return yh(e,t,t.type,t.pendingProps,n);case 15:return vh(e,t,t.type,t.pendingProps,n);case 19:return Ah(e,t,n);case 31:return Qv(e,t,n);case 22:return xh(e,t,n,t.pendingProps);case 24:return zl(t),a=gt(at),e===null?(o=To(),o===null&&(o=Qe,s=Eo(),o.pooledCache=s,s.refCount++,s!==null&&(o.pooledCacheLanes|=n),o=s),t.memoizedState={parent:a,cache:o},jo(t),$n(t,at,o)):((e.lanes&n)!==0&&(Ao(e,t),ri(t,null,null,n),ii()),o=e.memoizedState,s=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),$n(t,at,a)):(a=s.cache,$n(t,at,a),a!==o.cache&&So(t,[at],n,!0))),yt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Mn(e){e.flags|=4}function os(e,t,n,a,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(tp())e.flags|=8192;else throw kl=br,wo}else e.flags&=-16777217}function Rh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gp(t))if(tp())e.flags|=8192;else throw kl=br,wo}function Br(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?of():536870912,e.lanes|=t,va|=t)}function di(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags&65011712,a|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Zv(e,t,n){var a=t.pendingProps;switch(go(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),zn(at),Le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ia(t)?Mn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vo())),Fe(t),null;case 26:var o=t.type,s=t.memoizedState;return e===null?(Mn(t),s!==null?(Fe(t),Rh(t,s)):(Fe(t),os(t,o,null,a,n))):s?s!==e.memoizedState?(Mn(t),Fe(t),Rh(t,s)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Mn(t),Fe(t),os(t,o,e,a,n)),null;case 27:if(xn(t),n=ue.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Mn(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Fe(t),null}e=te.current,ia(t)?od(t):(e=Lp(o,a,n),t.stateNode=e,Mn(t))}return Fe(t),null;case 5:if(xn(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Mn(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Fe(t),null}if(s=te.current,ia(t))od(t);else{var x=$r(ue.current);switch(s){case 1:s=x.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:s=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":s=x.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":s=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":s=x.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?x.createElement(o,{is:a.is}):x.createElement(o)}}s[pt]=t,s[wt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)s.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=s;e:switch(vt(s,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Mn(t)}}return Fe(t),os(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Mn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=ue.current,ia(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,o=mt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||wp(e.nodeValue,n)),e||Pn(t,!0)}else e=$r(e).createTextNode(a),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ia(t),n!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[pt]=t}else jl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else n=vo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Fe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ia(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[pt]=t}else jl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),o=!1}else o=vo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==o&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Br(t,t.updateQueue),Fe(t),null);case 4:return Le(),e===null&&Ns(t.stateNode.containerInfo),Fe(t),null;case 10:return zn(t.type),Fe(t),null;case 19:if(O(tt),a=t.memoizedState,a===null)return Fe(t),null;if(o=(t.flags&128)!==0,s=a.rendering,s===null)if(o)di(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Tr(e),s!==null){for(t.flags|=128,di(a,!1),e=s.updateQueue,t.updateQueue=e,Br(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ld(n,e),n=n.sibling;return C(tt,tt.current&1|2),Ne&&jn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&St()>Vr&&(t.flags|=128,o=!0,di(a,!1),t.lanes=4194304)}else{if(!o)if(e=Tr(s),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Br(t,e),di(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Ne)return Fe(t),null}else 2*St()-a.renderingStartTime>Vr&&n!==536870912&&(t.flags|=128,o=!0,di(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=St(),e.sibling=null,n=tt.current,C(tt,o?n&1|2:n&1),Ne&&jn(t,a.treeForkCount),e):(Fe(t),null);case 22:case 23:return qt(t),ko(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),n=t.updateQueue,n!==null&&Br(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&O(Rl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zn(at),Fe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Kv(e,t){switch(go(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(at),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xn(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(u(340));jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(tt),null;case 4:return Le(),null;case 10:return zn(t.type),null;case 22:case 23:return qt(t),ko(),e!==null&&O(Rl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zn(at),null;case 25:return null;default:return null}}function Nh(e,t){switch(go(t),t.tag){case 3:zn(at),Le();break;case 26:case 27:case 5:xn(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:O(tt);break;case 10:zn(t.type);break;case 22:case 23:qt(t),ko(),e!==null&&O(Rl);break;case 24:zn(at)}}function hi(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var o=a.next;n=o;do{if((n.tag&e)===e){a=void 0;var s=n.create,x=n.inst;a=s(),x.destroy=a}n=n.next}while(n!==o)}}catch(E){He(t,t.return,E)}}function al(e,t,n){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var s=o.next;a=s;do{if((a.tag&e)===e){var x=a.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,o=t;var N=n,q=E;try{q()}catch(X){He(o,N,X)}}}a=a.next}while(a!==s)}}catch(X){He(t,t.return,X)}}function kh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Sd(t,n)}catch(a){He(e,e.return,a)}}}function Mh(e,t,n){n.props=Ol(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){He(e,t,a)}}function pi(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(a):n.current=a}}catch(o){He(e,t,o)}}function pn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(o){He(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){He(e,t,o)}else n.current=null}function _h(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(o){He(e,e.return,o)}}function ss(e,t,n){try{var a=e.stateNode;gx(a,e.type,n,t),a[wt]=t}catch(o){He(e,e.return,o)}}function Oh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fl(e.type)||e.tag===4}function cs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Oh(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&&fl(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 fs(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cn));else if(a!==4&&(a===27&&fl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(fs(e,t,n),e=e.sibling;e!==null;)fs(e,t,n),e=e.sibling}function Ur(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&fl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ur(e,t,n),e=e.sibling;e!==null;)Ur(e,t,n),e=e.sibling}function Dh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);vt(t,a,n),t[pt]=e,t[wt]=n}catch(s){He(e,e.return,s)}}var _n=!1,ut=!1,ds=!1,Lh=typeof WeakSet=="function"?WeakSet:Set,ht=null;function Fv(e,t){if(e=e.containerInfo,_s=iu,e=Kf(e),ao(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var o=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var x=0,E=-1,N=-1,q=0,X=0,J=e,Y=null;t:for(;;){for(var G;J!==n||o!==0&&J.nodeType!==3||(E=x+o),J!==s||a!==0&&J.nodeType!==3||(N=x+a),J.nodeType===3&&(x+=J.nodeValue.length),(G=J.firstChild)!==null;)Y=J,J=G;for(;;){if(J===e)break t;if(Y===n&&++q===o&&(E=x),Y===s&&++X===a&&(N=x),(G=J.nextSibling)!==null)break;J=Y,Y=J.parentNode}J=G}n=E===-1||N===-1?null:{start:E,end:N}}else n=null}n=n||{start:0,end:0}}else n=null;for(Os={focusedElem:e,selectionRange:n},iu=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,s=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(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,o=s.memoizedProps,s=s.memoizedState,a=n.stateNode;try{var ce=Ol(n.type,o);e=a.getSnapshotBeforeUpdate(ce,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(me){He(n,n.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Bs(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Bs(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function Bh(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Dn(e,n),a&4&&hi(5,n);break;case 1:if(Dn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(x){He(n,n.return,x)}else{var o=Ol(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){He(n,n.return,x)}}a&64&&kh(n),a&512&&pi(n,n.return);break;case 3:if(Dn(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Sd(e,t)}catch(x){He(n,n.return,x)}}break;case 27:t===null&&a&4&&Dh(n);case 26:case 5:Dn(e,n),t===null&&a&4&&_h(n),a&512&&pi(n,n.return);break;case 12:Dn(e,n);break;case 31:Dn(e,n),a&4&&qh(e,n);break;case 13:Dn(e,n),a&4&&Yh(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ax.bind(null,n),Tx(e,n))));break;case 22:if(a=n.memoizedState!==null||_n,!a){t=t!==null&&t.memoizedState!==null||ut,o=_n;var s=ut;_n=a,(ut=t)&&!s?Ln(e,n,(n.subtreeFlags&8772)!==0):Dn(e,n),_n=o,ut=s}break;case 30:break;default:Dn(e,n)}}function Uh(e){var t=e.alternate;t!==null&&(e.alternate=null,Uh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yu(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 Je=null,At=!1;function On(e,t,n){for(n=n.child;n!==null;)Hh(e,t,n),n=n.sibling}function Hh(e,t,n){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(Et,n)}catch{}switch(n.tag){case 26:ut||pn(n,t),On(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||pn(n,t);var a=Je,o=At;fl(n.type)&&(Je=n.stateNode,At=!1),On(e,t,n),Ci(n.stateNode),Je=a,At=o;break;case 5:ut||pn(n,t);case 6:if(a=Je,o=At,Je=null,On(e,t,n),Je=a,At=o,Je!==null)if(At)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(s){He(n,t,s)}else try{Je.removeChild(n.stateNode)}catch(s){He(n,t,s)}break;case 18:Je!==null&&(At?(e=Je,kp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ja(e)):kp(Je,n.stateNode));break;case 4:a=Je,o=At,Je=n.stateNode.containerInfo,At=!0,On(e,t,n),Je=a,At=o;break;case 0:case 11:case 14:case 15:al(2,n,t),ut||al(4,n,t),On(e,t,n);break;case 1:ut||(pn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Mh(n,t,a)),On(e,t,n);break;case 21:On(e,t,n);break;case 22:ut=(a=ut)||n.memoizedState!==null,On(e,t,n),ut=a;break;default:On(e,t,n)}}function qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ja(e)}catch(n){He(t,t.return,n)}}}function Yh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ja(e)}catch(n){He(t,t.return,n)}}function Jv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lh),t;default:throw Error(u(435,e.tag))}}function Hr(e,t){var n=Jv(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var o=ix.bind(null,e,a);a.then(o,o)}})}function zt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var o=n[a],s=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(fl(E.type)){Je=E.stateNode,At=!1;break e}break;case 5:Je=E.stateNode,At=!1;break e;case 3:case 4:Je=E.stateNode.containerInfo,At=!0;break e}E=E.return}if(Je===null)throw Error(u(160));Hh(s,x,o),Je=null,At=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vh(t,e),t=t.sibling}var on=null;function Vh(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zt(t,e),Rt(e),a&4&&(al(3,e,e.return),hi(3,e),al(5,e,e.return));break;case 1:zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),a&64&&_n&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var o=on;if(zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),a&4){var s=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(a){case"title":s=o.getElementsByTagName("title")[0],(!s||s[Ya]||s[pt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=o.createElement(a),o.head.insertBefore(s,o.querySelector("head > title"))),vt(s,a,n),s[pt]=e,dt(s),a=s;break e;case"link":var x=Vp("link","href",o).get(a+(n.href||""));if(x){for(var E=0;E<x.length;E++)if(s=x[E],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){x.splice(E,1);break t}}s=o.createElement(a),vt(s,a,n),o.head.appendChild(s);break;case"meta":if(x=Vp("meta","content",o).get(a+(n.content||""))){for(E=0;E<x.length;E++)if(s=x[E],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){x.splice(E,1);break t}}s=o.createElement(a),vt(s,a,n),o.head.appendChild(s);break;default:throw Error(u(468,a))}s[pt]=e,dt(s),a=s}e.stateNode=a}else Ip(o,e.type,e.stateNode);else e.stateNode=Yp(o,a,e.memoizedProps);else s!==a?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,a===null?Ip(o,e.type,e.stateNode):Yp(o,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ss(e,e.memoizedProps,n.memoizedProps)}break;case 27:zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),n!==null&&a&4&&ss(e,e.memoizedProps,n.memoizedProps);break;case 5:if(zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),e.flags&32){o=e.stateNode;try{Fl(o,"")}catch(ce){He(e,e.return,ce)}}a&4&&e.stateNode!=null&&(o=e.memoizedProps,ss(e,o,n!==null?n.memoizedProps:o)),a&1024&&(ds=!0);break;case 6:if(zt(t,e),Rt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ce){He(e,e.return,ce)}}break;case 3:if(tu=null,o=on,on=Wr(t.containerInfo),zt(t,e),on=o,Rt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ja(t.containerInfo)}catch(ce){He(e,e.return,ce)}ds&&(ds=!1,Ih(e));break;case 4:a=on,on=Wr(e.stateNode.containerInfo),zt(t,e),Rt(e),on=a;break;case 12:zt(t,e),Rt(e);break;case 31:zt(t,e),Rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Hr(e,a)));break;case 13:zt(t,e),Rt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yr=St()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Hr(e,a)));break;case 22:o=e.memoizedState!==null;var N=n!==null&&n.memoizedState!==null,q=_n,X=ut;if(_n=q||o,ut=X||N,zt(t,e),ut=X,_n=q,Rt(e),a&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||N||_n||ut||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){N=n=t;try{if(s=N.stateNode,o)x=s.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=N.stateNode;var J=N.memoizedProps.style,Y=J!=null&&J.hasOwnProperty("display")?J.display:null;E.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(ce){He(N,N.return,ce)}}}else if(t.tag===6){if(n===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(ce){He(N,N.return,ce)}}}else if(t.tag===18){if(n===null){N=t;try{var G=N.stateNode;o?Mp(G,!0):Mp(N.stateNode,!1)}catch(ce){He(N,N.return,ce)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Hr(e,n))));break;case 19:zt(t,e),Rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Hr(e,a)));break;case 30:break;case 21:break;default:zt(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Oh(a)){n=a;break}a=a.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var o=n.stateNode,s=cs(e);Ur(e,s,o);break;case 5:var x=n.stateNode;n.flags&32&&(Fl(x,""),n.flags&=-33);var E=cs(e);Ur(e,E,x);break;case 3:case 4:var N=n.stateNode.containerInfo,q=cs(e);fs(e,q,N);break;default:throw Error(u(161))}}catch(X){He(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ih(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ih(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bh(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:al(4,t,t.return),Dl(t);break;case 1:pn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Mh(t,t.return,n),Dl(t);break;case 27:Ci(t.stateNode);case 26:case 5:pn(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ln(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,o=e,s=t,x=s.flags;switch(s.tag){case 0:case 11:case 15:Ln(o,s,n),hi(4,s);break;case 1:if(Ln(o,s,n),a=s,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(q){He(a,a.return,q)}if(a=s,o=a.updateQueue,o!==null){var E=a.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)bd(N[o],E)}catch(q){He(a,a.return,q)}}n&&x&64&&kh(s),pi(s,s.return);break;case 27:Dh(s);case 26:case 5:Ln(o,s,n),n&&a===null&&x&4&&_h(s),pi(s,s.return);break;case 12:Ln(o,s,n);break;case 31:Ln(o,s,n),n&&x&4&&qh(o,s);break;case 13:Ln(o,s,n),n&&x&4&&Yh(o,s);break;case 22:s.memoizedState===null&&Ln(o,s,n),pi(s,s.return);break;case 30:break;default:Ln(o,s,n)}t=t.sibling}}function hs(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ei(n))}function ps(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ei(e))}function sn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gh(e,t,n,a),t=t.sibling}function Gh(e,t,n,a){var o=t.flags;switch(t.tag){case 0:case 11:case 15:sn(e,t,n,a),o&2048&&hi(9,t);break;case 1:sn(e,t,n,a);break;case 3:sn(e,t,n,a),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ei(e)));break;case 12:if(o&2048){sn(e,t,n,a),e=t.stateNode;try{var s=t.memoizedProps,x=s.id,E=s.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){He(t,t.return,N)}}else sn(e,t,n,a);break;case 31:sn(e,t,n,a);break;case 13:sn(e,t,n,a);break;case 23:break;case 22:s=t.stateNode,x=t.alternate,t.memoizedState!==null?s._visibility&2?sn(e,t,n,a):mi(e,t):s._visibility&2?sn(e,t,n,a):(s._visibility|=2,ma(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),o&2048&&hs(x,t);break;case 24:sn(e,t,n,a),o&2048&&ps(t.alternate,t);break;default:sn(e,t,n,a)}}function ma(e,t,n,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,x=t,E=n,N=a,q=x.flags;switch(x.tag){case 0:case 11:case 15:ma(s,x,E,N,o),hi(8,x);break;case 23:break;case 22:var X=x.stateNode;x.memoizedState!==null?X._visibility&2?ma(s,x,E,N,o):mi(s,x):(X._visibility|=2,ma(s,x,E,N,o)),o&&q&2048&&hs(x.alternate,x);break;case 24:ma(s,x,E,N,o),o&&q&2048&&ps(x.alternate,x);break;default:ma(s,x,E,N,o)}t=t.sibling}}function mi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,o=a.flags;switch(a.tag){case 22:mi(n,a),o&2048&&hs(a.alternate,a);break;case 24:mi(n,a),o&2048&&ps(a.alternate,a);break;default:mi(n,a)}t=t.sibling}}var gi=8192;function ga(e,t,n){if(e.subtreeFlags&gi)for(e=e.child;e!==null;)Qh(e,t,n),e=e.sibling}function Qh(e,t,n){switch(e.tag){case 26:ga(e,t,n),e.flags&gi&&e.memoizedState!==null&&Lx(n,on,e.memoizedState,e.memoizedProps);break;case 5:ga(e,t,n);break;case 3:case 4:var a=on;on=Wr(e.stateNode.containerInfo),ga(e,t,n),on=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gi,gi=16777216,ga(e,t,n),gi=a):ga(e,t,n));break;default:ga(e,t,n)}}function Xh(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 yi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,Kh(a,e)}Xh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zh(e),e=e.sibling}function Zh(e){switch(e.tag){case 0:case 11:case 15:yi(e),e.flags&2048&&al(9,e,e.return);break;case 3:yi(e);break;case 12:yi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qr(e)):yi(e);break;default:yi(e)}}function qr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,Kh(a,e)}Xh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:al(8,t,t.return),qr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qr(t));break;default:qr(t)}e=e.sibling}}function Kh(e,t){for(;ht!==null;){var n=ht;switch(n.tag){case 0:case 11:case 15:al(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ei(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ht=a;else e:for(n=e;ht!==null;){a=ht;var o=a.sibling,s=a.return;if(Uh(a),a===n){ht=null;break e}if(o!==null){o.return=s,ht=o;break e}ht=s}}}var Pv={getCacheForType:function(e){var t=gt(at),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return gt(at).controller.signal}},$v=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Qe=null,we=null,ze=0,Ue=0,Yt=null,il=!1,ya=!1,ms=!1,Bn=0,We=0,rl=0,Ll=0,gs=0,Vt=0,va=0,vi=null,Nt=null,ys=!1,Yr=0,Fh=0,Vr=1/0,Ir=null,ul=null,ct=0,ol=null,xa=null,Un=0,vs=0,xs=null,Jh=null,xi=0,bs=null;function It(){return(Oe&2)!==0&&ze!==0?ze&-ze:U.T!==null?js():df()}function Ph(){if(Vt===0)if((ze&536870912)===0||Ne){var e=Pi;Pi<<=1,(Pi&3932160)===0&&(Pi=262144),Vt=e}else Vt=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Vt}function kt(e,t,n){(e===Qe&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(ba(e,0),sl(e,ze,Vt,!1)),qa(e,n),((Oe&2)===0||e!==Qe)&&(e===Qe&&((Oe&2)===0&&(Ll|=n),We===4&&sl(e,ze,Vt,!1)),mn(e))}function $h(e,t,n){if((Oe&6)!==0)throw Error(u(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ha(e,t),o=a?tx(e,t):Es(e,t,!0),s=a;do{if(o===0){ya&&!a&&sl(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Wv(n)){o=Es(e,t,!1),s=!1;continue}if(o===2){if(s=t,e.errorRecoveryDisabledLanes&s)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;o=vi;var N=E.current.memoizedState.isDehydrated;if(N&&(ba(E,x).flags|=256),x=Es(E,x,!1),x!==2){if(ms&&!N){E.errorRecoveryDisabledLanes|=s,Ll|=s,o=4;break e}s=Nt,Nt=o,s!==null&&(Nt===null?Nt=s:Nt.push.apply(Nt,s))}o=x}if(s=!1,o!==2)continue}}if(o===1){ba(e,0),sl(e,t,0,!0);break}e:{switch(a=e,s=o,s){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:sl(a,t,Vt,!il);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(o=Yr+300-St(),10<o)){if(sl(a,t,Vt,!il),Wi(a,0,!0)!==0)break e;Un=t,a.timeoutHandle=Rp(Wh.bind(null,a,n,Nt,Ir,ys,t,Vt,Ll,va,il,s,"Throttled",-0,0),o);break e}Wh(a,n,Nt,Ir,ys,t,Vt,Ll,va,il,s,null,-0,0)}}break}while(!0);mn(e)}function Wh(e,t,n,a,o,s,x,E,N,q,X,J,Y,G){if(e.timeoutHandle=-1,J=t.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cn},Qh(t,s,J);var ce=(s&62914560)===s?Yr-St():(s&4194048)===s?Fh-St():0;if(ce=Bx(J,ce),ce!==null){Un=s,e.cancelPendingCommit=ce(up.bind(null,e,t,s,n,a,o,x,E,N,X,J,null,Y,G)),sl(e,s,x,!q);return}}up(e,t,s,n,a,o,x,E,N)}function Wv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var o=n[a],s=o.getSnapshot;o=o.value;try{if(!Bt(s(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 sl(e,t,n,a){t&=~gs,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var s=31-Ge(o),x=1<<s;a[s]=-1,o&=~x}n!==0&&sf(e,n,t)}function Gr(){return(Oe&6)===0?(bi(0),!1):!0}function Ss(){if(we!==null){if(Ue===0)var e=we.return;else e=we,An=Al=null,Bo(e),ca=null,ni=0,e=we;for(;e!==null;)Nh(e.alternate,e),e=e.return;we=null}}function ba(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,xx(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Un=0,Ss(),Qe=e,we=n=wn(e.current,null),ze=t,Ue=0,Yt=null,il=!1,ya=Ha(e,t),ms=!1,va=Vt=gs=Ll=rl=We=0,Nt=vi=null,ys=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var o=31-Ge(a),s=1<<o;t|=e[o],a&=~s}return Bn=t,fr(),n}function ep(e,t){be=null,U.H=ci,t===sa||t===xr?(t=gd(),Ue=3):t===wo?(t=gd(),Ue=4):Ue=t===Wo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,we===null&&(We=1,_r(e,Jt(t,e.current)))}function tp(){var e=Ht.current;return e===null?!0:(ze&4194048)===ze?en===null:(ze&62914560)===ze||(ze&536870912)!==0?e===en:!1}function np(){var e=U.H;return U.H=ci,e===null?ci:e}function lp(){var e=U.A;return U.A=Pv,e}function Qr(){We=4,il||(ze&4194048)!==ze&&Ht.current!==null||(ya=!0),(rl&134217727)===0&&(Ll&134217727)===0||Qe===null||sl(Qe,ze,Vt,!1)}function Es(e,t,n){var a=Oe;Oe|=2;var o=np(),s=lp();(Qe!==e||ze!==t)&&(Ir=null,ba(e,t)),t=!1;var x=We;e:do try{if(Ue!==0&&we!==null){var E=we,N=Yt;switch(Ue){case 8:Ss(),x=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var q=Ue;if(Ue=0,Yt=null,Sa(e,E,N,q),n&&ya){x=0;break e}break;default:q=Ue,Ue=0,Yt=null,Sa(e,E,N,q)}}ex(),x=We;break}catch(X){ep(e,X)}while(!0);return t&&e.shellSuspendCounter++,An=Al=null,Oe=a,U.H=o,U.A=s,we===null&&(Qe=null,ze=0,fr()),x}function ex(){for(;we!==null;)ap(we)}function tx(e,t){var n=Oe;Oe|=2;var a=np(),o=lp();Qe!==e||ze!==t?(Ir=null,Vr=St()+500,ba(e,t)):ya=Ha(e,t);e:do try{if(Ue!==0&&we!==null){t=we;var s=Yt;t:switch(Ue){case 1:Ue=0,Yt=null,Sa(e,t,s,1);break;case 2:case 9:if(pd(s)){Ue=0,Yt=null,ip(t);break}t=function(){Ue!==2&&Ue!==9||Qe!==e||(Ue=7),mn(e)},s.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:pd(s)?(Ue=0,Yt=null,ip(t)):(Ue=0,Yt=null,Sa(e,t,s,7));break;case 5:var x=null;switch(we.tag){case 26:x=we.memoizedState;case 5:case 27:var E=we;if(x?Gp(x):E.stateNode.complete){Ue=0,Yt=null;var N=E.sibling;if(N!==null)we=N;else{var q=E.return;q!==null?(we=q,Xr(q)):we=null}break t}}Ue=0,Yt=null,Sa(e,t,s,5);break;case 6:Ue=0,Yt=null,Sa(e,t,s,6);break;case 8:Ss(),We=6;break e;default:throw Error(u(462))}}nx();break}catch(X){ep(e,X)}while(!0);return An=Al=null,U.H=a,U.A=o,Oe=n,we!==null?0:(Qe=null,ze=0,fr(),We)}function nx(){for(;we!==null&&!Ou();)ap(we)}function ap(e){var t=zh(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?Xr(e):we=t}function ip(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Eh(n,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Eh(n,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Bo(t);default:Nh(n,t),t=we=ld(t,Bn),t=zh(n,t,Bn)}e.memoizedProps=e.pendingProps,t===null?Xr(e):we=t}function Sa(e,t,n,a){An=Al=null,Bo(t),ca=null,ni=0;var o=t.return;try{if(Gv(e,o,t,n,ze)){We=1,_r(e,Jt(n,e.current)),we=null;return}}catch(s){if(o!==null)throw we=o,s;We=1,_r(e,Jt(n,e.current)),we=null;return}t.flags&32768?(Ne||a===1?e=!0:ya||(ze&536870912)!==0?e=!1:(il=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ht.current,a!==null&&a.tag===13&&(a.flags|=16384))),rp(t,e)):Xr(t)}function Xr(e){var t=e;do{if((t.flags&32768)!==0){rp(t,il);return}e=t.return;var n=Zv(t.alternate,t,Bn);if(n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);We===0&&(We=5)}function rp(e,t){do{var n=Kv(e.alternate,e);if(n!==null){n.flags&=32767,we=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=n}while(e!==null);We=6,we=null}function up(e,t,n,a,o,s,x,E,N){e.cancelPendingCommit=null;do Zr();while(ct!==0);if((Oe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(s=t.lanes|t.childLanes,s|=so,Dy(e,n,s,x,E,N),e===Qe&&(we=Qe=null,ze=0),xa=t,ol=e,Un=n,vs=s,xs=o,Jh=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rx(ge,function(){return dp(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null,o=$.p,$.p=2,x=Oe,Oe|=4;try{Fv(e,t,n)}finally{Oe=x,$.p=o,U.T=a}}ct=1,op(),sp(),cp()}}function op(){if(ct===1){ct=0;var e=ol,t=xa,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=U.T,U.T=null;var a=$.p;$.p=2;var o=Oe;Oe|=4;try{Vh(t,e);var s=Os,x=Kf(e.containerInfo),E=s.focusedElem,N=s.selectionRange;if(x!==E&&E&&E.ownerDocument&&Zf(E.ownerDocument.documentElement,E)){if(N!==null&&ao(E)){var q=N.start,X=N.end;if(X===void 0&&(X=q),"selectionStart"in E)E.selectionStart=q,E.selectionEnd=Math.min(X,E.value.length);else{var J=E.ownerDocument||document,Y=J&&J.defaultView||window;if(Y.getSelection){var G=Y.getSelection(),ce=E.textContent.length,me=Math.min(N.start,ce),Ie=N.end===void 0?me:Math.min(N.end,ce);!G.extend&&me>Ie&&(x=Ie,Ie=me,me=x);var L=Xf(E,me),M=Xf(E,Ie);if(L&&M&&(G.rangeCount!==1||G.anchorNode!==L.node||G.anchorOffset!==L.offset||G.focusNode!==M.node||G.focusOffset!==M.offset)){var H=J.createRange();H.setStart(L.node,L.offset),G.removeAllRanges(),me>Ie?(G.addRange(H),G.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),G.addRange(H))}}}}for(J=[],G=E;G=G.parentNode;)G.nodeType===1&&J.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<J.length;E++){var K=J[E];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}iu=!!_s,Os=_s=null}finally{Oe=o,$.p=a,U.T=n}}e.current=t,ct=2}}function sp(){if(ct===2){ct=0;var e=ol,t=xa,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=U.T,U.T=null;var a=$.p;$.p=2;var o=Oe;Oe|=4;try{Bh(e,t.alternate,t)}finally{Oe=o,$.p=a,U.T=n}}ct=3}}function cp(){if(ct===4||ct===3){ct=0,Du();var e=ol,t=xa,n=Un,a=Jh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,xa=ol=null,fp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ul=null),Hu(n),t=t.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(Et,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=U.T,o=$.p,$.p=2,U.T=null;try{for(var s=e.onRecoverableError,x=0;x<a.length;x++){var E=a[x];s(E.value,{componentStack:E.stack})}}finally{U.T=t,$.p=o}}(Un&3)!==0&&Zr(),mn(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===bs?xi++:(xi=0,bs=e):xi=0,bi(0)}}function fp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ei(t)))}function Zr(){return op(),sp(),cp(),dp()}function dp(){if(ct!==5)return!1;var e=ol,t=vs;vs=0;var n=Hu(Un),a=U.T,o=$.p;try{$.p=32>n?32:n,U.T=null,n=xs,xs=null;var s=ol,x=Un;if(ct=0,xa=ol=null,Un=0,(Oe&6)!==0)throw Error(u(331));var E=Oe;if(Oe|=4,Zh(s.current),Gh(s,s.current,x,n),Oe=E,bi(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(Et,s)}catch{}return!0}finally{$.p=o,U.T=a,fp(e,t)}}function hp(e,t,n){t=Jt(n,t),t=$o(e.stateNode,t,2),e=tl(e,t,2),e!==null&&(qa(e,2),mn(e))}function He(e,t,n){if(e.tag===3)hp(e,e,n);else for(;t!==null;){if(t.tag===3){hp(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ul===null||!ul.has(a))){e=Jt(n,e),n=ph(2),a=tl(t,n,2),a!==null&&(mh(n,a,t,e),qa(a,2),mn(a));break}}t=t.return}}function Cs(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new $v;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(n)||(ms=!0,o.add(n),e=lx.bind(null,e,t,n),t.then(e,e))}function lx(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qe===e&&(ze&n)===n&&(We===4||We===3&&(ze&62914560)===ze&&300>St()-Yr?(Oe&2)===0&&ba(e,0):gs|=n,va===ze&&(va=0)),mn(e)}function pp(e,t){t===0&&(t=of()),e=Tl(e,t),e!==null&&(qa(e,t),mn(e))}function ax(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pp(e,n)}function ix(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),pp(e,n)}function rx(e,t){return Vl(e,t)}var Kr=null,Ea=null,Ts=!1,Fr=!1,ws=!1,cl=0;function mn(e){e!==Ea&&e.next===null&&(Ea===null?Kr=Ea=e:Ea=Ea.next=e),Fr=!0,Ts||(Ts=!0,ox())}function bi(e,t){if(!ws&&Fr){ws=!0;do for(var n=!1,a=Kr;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var s=0;else{var x=a.suspendedLanes,E=a.pingedLanes;s=(1<<31-Ge(42|e)+1)-1,s&=o&~(x&~E),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,vp(a,s))}else s=ze,s=Wi(a,a===Qe?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||Ha(a,s)||(n=!0,vp(a,s));a=a.next}while(n);ws=!1}}function ux(){mp()}function mp(){Fr=Ts=!1;var e=0;cl!==0&&vx()&&(e=cl);for(var t=St(),n=null,a=Kr;a!==null;){var o=a.next,s=gp(a,t);s===0?(a.next=null,n===null?Kr=o:n.next=o,o===null&&(Ea=n)):(n=a,(e!==0||(s&3)!==0)&&(Fr=!0)),a=o}ct!==0&&ct!==5||bi(e),cl!==0&&(cl=0)}function gp(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var x=31-Ge(s),E=1<<x,N=o[x];N===-1?((E&n)===0||(E&a)!==0)&&(o[x]=Oy(E,t)):N<=t&&(e.expiredLanes|=E),s&=~E}if(t=Qe,n=ze,n=Wi(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ua(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ha(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ua(a),Hu(n)){case 2:case 8:n=ie;break;case 32:n=ge;break;case 268435456:n=Be;break;default:n=ge}return a=yp.bind(null,e),n=Vl(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ua(a),e.callbackPriority=2,e.callbackNode=null,2}function yp(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zr()&&e.callbackNode!==n)return null;var a=ze;return a=Wi(e,e===Qe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:($h(e,a,t),gp(e,St()),e.callbackNode!=null&&e.callbackNode===n?yp.bind(null,e):null)}function vp(e,t){if(Zr())return null;$h(e,t,!0)}function ox(){bx(function(){(Oe&6)!==0?Vl(Z,ux):mp()})}function js(){if(cl===0){var e=ua;e===0&&(e=Ji,Ji<<=1,(Ji&261888)===0&&(Ji=256)),cl=e}return cl}function xp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lr(""+e)}function bp(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function sx(e,t,n,a,o){if(t==="submit"&&n&&n.stateNode===o){var s=xp((o[wt]||null).action),x=a.submitter;x&&(t=(t=x[wt]||null)?xp(t.formAction):x.getAttribute("formAction"),t!==null&&(s=t,x=null));var E=new ur("action","action",null,a,o);e.push({event:E,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(cl!==0){var N=x?bp(o,x):new FormData(o);Xo(n,{pending:!0,data:N,method:o.method,action:s},null,N)}}else typeof s=="function"&&(E.preventDefault(),N=x?bp(o,x):new FormData(o),Xo(n,{pending:!0,data:N,method:o.method,action:s},s,N))},currentTarget:o}]})}}for(var As=0;As<oo.length;As++){var zs=oo[As],cx=zs.toLowerCase(),fx=zs[0].toUpperCase()+zs.slice(1);un(cx,"on"+fx)}un(Pf,"onAnimationEnd"),un($f,"onAnimationIteration"),un(Wf,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(Av,"onTransitionRun"),un(zv,"onTransitionStart"),un(Rv,"onTransitionCancel"),un(ed,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bl("onBeforeInput",["compositionend","keypress","textInput","paste"]),bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="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(" "),dx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Si));function Sp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],o=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var x=a.length-1;0<=x;x--){var E=a[x],N=E.instance,q=E.currentTarget;if(E=E.listener,N!==s&&o.isPropagationStopped())break e;s=E,o.currentTarget=q;try{s(o)}catch(X){cr(X)}o.currentTarget=null,s=N}else for(x=0;x<a.length;x++){if(E=a[x],N=E.instance,q=E.currentTarget,E=E.listener,N!==s&&o.isPropagationStopped())break e;s=E,o.currentTarget=q;try{s(o)}catch(X){cr(X)}o.currentTarget=null,s=N}}}}function je(e,t){var n=t[qu];n===void 0&&(n=t[qu]=new Set);var a=e+"__bubble";n.has(a)||(Ep(t,e,2,!1),n.add(a))}function Rs(e,t,n){var a=0;t&&(a|=4),Ep(n,e,a,t)}var Jr="_reactListening"+Math.random().toString(36).slice(2);function Ns(e){if(!e[Jr]){e[Jr]=!0,mf.forEach(function(n){n!=="selectionchange"&&(dx.has(n)||Rs(n,!1,e),Rs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jr]||(t[Jr]=!0,Rs("selectionchange",!1,t))}}function Ep(e,t,n,a){switch(Pp(t)){case 2:var o=qx;break;case 8:o=Yx;break;default:o=Qs}n=o.bind(null,t,n,e),o=void 0,!Fu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ks(e,t,n,a,o){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var E=a.stateNode.containerInfo;if(E===o)break;if(x===4)for(x=a.return;x!==null;){var N=x.tag;if((N===3||N===4)&&x.stateNode.containerInfo===o)return;x=x.return}for(;E!==null;){if(x=Gl(E),x===null)return;if(N=x.tag,N===5||N===6||N===26||N===27){a=s=x;continue e}E=E.parentNode}}a=a.return}Af(function(){var q=s,X=Zu(n),J=[];e:{var Y=td.get(e);if(Y!==void 0){var G=ur,ce=e;switch(e){case"keypress":if(ir(n)===0)break e;case"keydown":case"keyup":G=iv;break;case"focusin":ce="focus",G=Wu;break;case"focusout":ce="blur",G=Wu;break;case"beforeblur":case"afterblur":G=Wu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=Zy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=ov;break;case Pf:case $f:case Wf:G=Jy;break;case ed:G=cv;break;case"scroll":case"scrollend":G=Qy;break;case"wheel":G=dv;break;case"copy":case"cut":case"paste":G=$y;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Mf;break;case"toggle":case"beforetoggle":G=pv}var me=(t&4)!==0,Ie=!me&&(e==="scroll"||e==="scrollend"),L=me?Y!==null?Y+"Capture":null:Y;me=[];for(var M=q,H;M!==null;){var K=M;if(H=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||H===null||L===null||(K=Ia(M,L),K!=null&&me.push(Ei(M,K,H))),Ie)break;M=M.return}0<me.length&&(Y=new G(Y,ce,null,n,X),J.push({event:Y,listeners:me}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",Y&&n!==Xu&&(ce=n.relatedTarget||n.fromElement)&&(Gl(ce)||ce[Il]))break e;if((G||Y)&&(Y=X.window===X?X:(Y=X.ownerDocument)?Y.defaultView||Y.parentWindow:window,G?(ce=n.relatedTarget||n.toElement,G=q,ce=ce?Gl(ce):null,ce!==null&&(Ie=f(ce),me=ce.tag,ce!==Ie||me!==5&&me!==27&&me!==6)&&(ce=null)):(G=null,ce=q),G!==ce)){if(me=Nf,K="onMouseLeave",L="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(me=Mf,K="onPointerLeave",L="onPointerEnter",M="pointer"),Ie=G==null?Y:Va(G),H=ce==null?Y:Va(ce),Y=new me(K,M+"leave",G,n,X),Y.target=Ie,Y.relatedTarget=H,K=null,Gl(X)===q&&(me=new me(L,M+"enter",ce,n,X),me.target=H,me.relatedTarget=Ie,K=me),Ie=K,G&&ce)t:{for(me=hx,L=G,M=ce,H=0,K=L;K;K=me(K))H++;K=0;for(var pe=M;pe;pe=me(pe))K++;for(;0<H-K;)L=me(L),H--;for(;0<K-H;)M=me(M),K--;for(;H--;){if(L===M||M!==null&&L===M.alternate){me=L;break t}L=me(L),M=me(M)}me=null}else me=null;G!==null&&Cp(J,Y,G,me,!1),ce!==null&&Ie!==null&&Cp(J,Ie,ce,me,!0)}}e:{if(Y=q?Va(q):window,G=Y.nodeName&&Y.nodeName.toLowerCase(),G==="select"||G==="input"&&Y.type==="file")var Me=qf;else if(Uf(Y))if(Yf)Me=Tv;else{Me=Ev;var de=Sv}else G=Y.nodeName,!G||G.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?q&&Qu(q.elementType)&&(Me=qf):Me=Cv;if(Me&&(Me=Me(e,q))){Hf(J,Me,n,X);break e}de&&de(e,Y,q),e==="focusout"&&q&&Y.type==="number"&&q.memoizedProps.value!=null&&Gu(Y,"number",Y.value)}switch(de=q?Va(q):window,e){case"focusin":(Uf(de)||de.contentEditable==="true")&&(Wl=de,io=q,Pa=null);break;case"focusout":Pa=io=Wl=null;break;case"mousedown":ro=!0;break;case"contextmenu":case"mouseup":case"dragend":ro=!1,Ff(J,n,X);break;case"selectionchange":if(jv)break;case"keydown":case"keyup":Ff(J,n,X)}var Se;if(to)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else $l?Lf(e,n)&&(Re="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Re="onCompositionStart");Re&&(_f&&n.locale!=="ko"&&($l||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&$l&&(Se=zf()):(Kn=X,Ju="value"in Kn?Kn.value:Kn.textContent,$l=!0)),de=Pr(q,Re),0<de.length&&(Re=new kf(Re,e,null,n,X),J.push({event:Re,listeners:de}),Se?Re.data=Se:(Se=Bf(n),Se!==null&&(Re.data=Se)))),(Se=gv?yv(e,n):vv(e,n))&&(Re=Pr(q,"onBeforeInput"),0<Re.length&&(de=new kf("onBeforeInput","beforeinput",null,n,X),J.push({event:de,listeners:Re}),de.data=Se)),sx(J,e,q,n,X)}Sp(J,t)})}function Ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pr(e,t){for(var n=t+"Capture",a=[];e!==null;){var o=e,s=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||s===null||(o=Ia(e,n),o!=null&&a.unshift(Ei(e,o,s)),o=Ia(e,t),o!=null&&a.push(Ei(e,o,s))),e.tag===3)return a;e=e.return}return[]}function hx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cp(e,t,n,a,o){for(var s=t._reactName,x=[];n!==null&&n!==a;){var E=n,N=E.alternate,q=E.stateNode;if(E=E.tag,N!==null&&N===a)break;E!==5&&E!==26&&E!==27||q===null||(N=q,o?(q=Ia(n,s),q!=null&&x.unshift(Ei(n,q,N))):o||(q=Ia(n,s),q!=null&&x.push(Ei(n,q,N)))),n=n.return}x.length!==0&&e.push({event:t,listeners:x})}var px=/\r\n?/g,mx=/\u0000|\uFFFD/g;function Tp(e){return(typeof e=="string"?e:""+e).replace(px,`
9
+ `).replace(mx,"")}function wp(e,t){return t=Tp(t),Tp(e)===t}function Ve(e,t,n,a,o,s){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Fl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Fl(e,""+a);break;case"className":tr(e,"class",a);break;case"tabIndex":tr(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":tr(e,n,a);break;case"style":wf(e,a,s);break;case"data":if(t!=="object"){tr(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=lr(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 s=="function"&&(n==="formAction"?(t!=="input"&&Ve(e,t,"name",o.name,o,null),Ve(e,t,"formEncType",o.formEncType,o,null),Ve(e,t,"formMethod",o.formMethod,o,null),Ve(e,t,"formTarget",o.formTarget,o,null)):(Ve(e,t,"encType",o.encType,o,null),Ve(e,t,"method",o.method,o,null),Ve(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=lr(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Cn);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=n}}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}n=lr(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);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(n,""+a):e.removeAttribute(n);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(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":je("beforetoggle",e),je("toggle",e),er(e,"popover",a);break;case"xlinkActuate":En(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":En(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":En(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":En(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":En(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":En(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":En(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":En(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":En(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":er(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Iy.get(n)||n,er(e,n,a))}}function Ms(e,t,n,a,o,s){switch(n){case"style":wf(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Fl(e,a):(typeof a=="number"||typeof a=="bigint")&&Fl(e,""+a);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Cn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),s=e[wt]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,o),typeof a=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,o);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):er(e,n,a)}}}function vt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var a=!1,o=!1,s;for(s in n)if(n.hasOwnProperty(s)){var x=n[s];if(x!=null)switch(s){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ve(e,t,s,x,n,null)}}o&&Ve(e,t,"srcSet",n.srcSet,n,null),a&&Ve(e,t,"src",n.src,n,null);return;case"input":je("invalid",e);var E=s=x=o=null,N=null,q=null;for(a in n)if(n.hasOwnProperty(a)){var X=n[a];if(X!=null)switch(a){case"name":o=X;break;case"type":x=X;break;case"checked":N=X;break;case"defaultChecked":q=X;break;case"value":s=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,t));break;default:Ve(e,t,a,X,n,null)}}Sf(e,s,E,N,q,x,o,!1);return;case"select":je("invalid",e),a=x=s=null;for(o in n)if(n.hasOwnProperty(o)&&(E=n[o],E!=null))switch(o){case"value":s=E;break;case"defaultValue":x=E;break;case"multiple":a=E;default:Ve(e,t,o,E,n,null)}t=s,n=x,e.multiple=!!a,t!=null?Kl(e,!!a,t,!1):n!=null&&Kl(e,!!a,n,!0);return;case"textarea":je("invalid",e),s=o=a=null;for(x in n)if(n.hasOwnProperty(x)&&(E=n[x],E!=null))switch(x){case"value":a=E;break;case"defaultValue":o=E;break;case"children":s=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(91));break;default:Ve(e,t,x,E,n,null)}Cf(e,a,o,s);return;case"option":for(N in n)n.hasOwnProperty(N)&&(a=n[N],a!=null)&&(N==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ve(e,t,N,a,n,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(a=0;a<Si.length;a++)je(Si[a],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in n)if(n.hasOwnProperty(q)&&(a=n[q],a!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ve(e,t,q,a,n,null)}return;default:if(Qu(t)){for(X in n)n.hasOwnProperty(X)&&(a=n[X],a!==void 0&&Ms(e,t,X,a,n,void 0));return}}for(E in n)n.hasOwnProperty(E)&&(a=n[E],a!=null&&Ve(e,t,E,a,n,null))}function gx(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,s=null,x=null,E=null,N=null,q=null,X=null;for(G in n){var J=n[G];if(n.hasOwnProperty(G)&&J!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":N=J;default:a.hasOwnProperty(G)||Ve(e,t,G,null,a,J)}}for(var Y in a){var G=a[Y];if(J=n[Y],a.hasOwnProperty(Y)&&(G!=null||J!=null))switch(Y){case"type":s=G;break;case"name":o=G;break;case"checked":q=G;break;case"defaultChecked":X=G;break;case"value":x=G;break;case"defaultValue":E=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(u(137,t));break;default:G!==J&&Ve(e,t,Y,G,a,J)}}Iu(e,x,E,N,q,X,s,o);return;case"select":G=x=E=Y=null;for(s in n)if(N=n[s],n.hasOwnProperty(s)&&N!=null)switch(s){case"value":break;case"multiple":G=N;default:a.hasOwnProperty(s)||Ve(e,t,s,null,a,N)}for(o in a)if(s=a[o],N=n[o],a.hasOwnProperty(o)&&(s!=null||N!=null))switch(o){case"value":Y=s;break;case"defaultValue":E=s;break;case"multiple":x=s;default:s!==N&&Ve(e,t,o,s,a,N)}t=E,n=x,a=G,Y!=null?Kl(e,!!n,Y,!1):!!a!=!!n&&(t!=null?Kl(e,!!n,t,!0):Kl(e,!!n,n?[]:"",!1));return;case"textarea":G=Y=null;for(E in n)if(o=n[E],n.hasOwnProperty(E)&&o!=null&&!a.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ve(e,t,E,null,a,o)}for(x in a)if(o=a[x],s=n[x],a.hasOwnProperty(x)&&(o!=null||s!=null))switch(x){case"value":Y=o;break;case"defaultValue":G=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(u(91));break;default:o!==s&&Ve(e,t,x,o,a,s)}Ef(e,Y,G);return;case"option":for(var ce in n)Y=n[ce],n.hasOwnProperty(ce)&&Y!=null&&!a.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:Ve(e,t,ce,null,a,Y));for(N in a)Y=a[N],G=n[N],a.hasOwnProperty(N)&&Y!==G&&(Y!=null||G!=null)&&(N==="selected"?e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol":Ve(e,t,N,Y,a,G));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 me in n)Y=n[me],n.hasOwnProperty(me)&&Y!=null&&!a.hasOwnProperty(me)&&Ve(e,t,me,null,a,Y);for(q in a)if(Y=a[q],G=n[q],a.hasOwnProperty(q)&&Y!==G&&(Y!=null||G!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,t));break;default:Ve(e,t,q,Y,a,G)}return;default:if(Qu(t)){for(var Ie in n)Y=n[Ie],n.hasOwnProperty(Ie)&&Y!==void 0&&!a.hasOwnProperty(Ie)&&Ms(e,t,Ie,void 0,a,Y);for(X in a)Y=a[X],G=n[X],!a.hasOwnProperty(X)||Y===G||Y===void 0&&G===void 0||Ms(e,t,X,Y,a,G);return}}for(var L in n)Y=n[L],n.hasOwnProperty(L)&&Y!=null&&!a.hasOwnProperty(L)&&Ve(e,t,L,null,a,Y);for(J in a)Y=a[J],G=n[J],!a.hasOwnProperty(J)||Y===G||Y==null&&G==null||Ve(e,t,J,Y,a,G)}function jp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var o=n[a],s=o.transferSize,x=o.initiatorType,E=o.duration;if(s&&E&&jp(x)){for(x=0,E=o.responseEnd,a+=1;a<n.length;a++){var N=n[a],q=N.startTime;if(q>E)break;var X=N.transferSize,J=N.initiatorType;X&&jp(J)&&(N=N.responseEnd,x+=X*(N<E?1:(E-q)/(N-q)))}if(--a,t+=8*(s+x)/(o.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 _s=null,Os=null;function $r(e){return e.nodeType===9?e:e.ownerDocument}function Ap(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 zp(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 Ds(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 Ls=null;function vx(){var e=window.event;return e&&e.type==="popstate"?e===Ls?!1:(Ls=e,!0):(Ls=null,!1)}var Rp=typeof setTimeout=="function"?setTimeout:void 0,xx=typeof clearTimeout=="function"?clearTimeout:void 0,Np=typeof Promise=="function"?Promise:void 0,bx=typeof queueMicrotask=="function"?queueMicrotask:typeof Np<"u"?function(e){return Np.resolve(null).then(e).catch(Sx)}:Rp;function Sx(e){setTimeout(function(){throw e})}function fl(e){return e==="head"}function kp(e,t){var n=t,a=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(o),ja(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Ci(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ci(n);for(var s=n.firstChild;s;){var x=s.nextSibling,E=s.nodeName;s[Ya]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=x}}else n==="body"&&Ci(e.ownerDocument.body);n=o}while(n);ja(t)}function Mp(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Bs(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Bs(n),Yu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Ex(e,t,n,a){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ya])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=tn(e.nextSibling),e===null)break}return null}function Cx(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=tn(e.nextSibling),e===null))return null;return e}function _p(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=tn(e.nextSibling),e===null))return null;return e}function Us(e){return e.data==="$?"||e.data==="$~"}function Hs(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Tx(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function tn(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 qs=null;function Op(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return tn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Dp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Lp(e,t,n){switch(t=$r(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ci(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yu(e)}var nn=new Map,Bp=new Set;function Wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Hn=$.d;$.d={f:wx,r:jx,D:Ax,C:zx,L:Rx,m:Nx,X:Mx,S:kx,M:_x};function wx(){var e=Hn.f(),t=Gr();return e||t}function jx(e){var t=Ql(e);t!==null&&t.tag===5&&t.type==="form"?eh(t):Hn.r(e)}var Ca=typeof document>"u"?null:document;function Up(e,t,n){var a=Ca;if(a&&typeof t=="string"&&t){var o=Kt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Bp.has(o)||(Bp.add(o),e={rel:e,crossOrigin:n,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),vt(t,"link",e),dt(t),a.head.appendChild(t)))}}function Ax(e){Hn.D(e),Up("dns-prefetch",e,null)}function zx(e,t){Hn.C(e,t),Up("preconnect",e,t)}function Rx(e,t,n){Hn.L(e,t,n);var a=Ca;if(a&&e&&t){var o='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Kt(n.imageSizes)+'"]')):o+='[href="'+Kt(e)+'"]';var s=o;switch(t){case"style":s=Ta(e);break;case"script":s=wa(e)}nn.has(s)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),nn.set(s,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(Ti(s))||t==="script"&&a.querySelector(wi(s))||(t=a.createElement("link"),vt(t,"link",e),dt(t),a.head.appendChild(t)))}}function Nx(e,t){Hn.m(e,t);var n=Ca;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Kt(a)+'"][href="'+Kt(e)+'"]',s=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=wa(e)}if(!nn.has(s)&&(e=v({rel:"modulepreload",href:e},t),nn.set(s,e),n.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(wi(s)))return}a=n.createElement("link"),vt(a,"link",e),dt(a),n.head.appendChild(a)}}}function kx(e,t,n){Hn.S(e,t,n);var a=Ca;if(a&&e){var o=Xl(a).hoistableStyles,s=Ta(e);t=t||"default";var x=o.get(s);if(!x){var E={loading:0,preload:null};if(x=a.querySelector(Ti(s)))E.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=nn.get(s))&&Ys(e,n);var N=x=a.createElement("link");dt(N),vt(N,"link",e),N._p=new Promise(function(q,X){N.onload=q,N.onerror=X}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,eu(x,t,a)}x={type:"stylesheet",instance:x,count:1,state:E},o.set(s,x)}}}function Mx(e,t){Hn.X(e,t);var n=Ca;if(n&&e){var a=Xl(n).hoistableScripts,o=wa(e),s=a.get(o);s||(s=n.querySelector(wi(o)),s||(e=v({src:e,async:!0},t),(t=nn.get(o))&&Vs(e,t),s=n.createElement("script"),dt(s),vt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(o,s))}}function _x(e,t){Hn.M(e,t);var n=Ca;if(n&&e){var a=Xl(n).hoistableScripts,o=wa(e),s=a.get(o);s||(s=n.querySelector(wi(o)),s||(e=v({src:e,async:!0,type:"module"},t),(t=nn.get(o))&&Vs(e,t),s=n.createElement("script"),dt(s),vt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(o,s))}}function Hp(e,t,n,a){var o=(o=ue.current)?Wr(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ta(n.href),n=Xl(o).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ta(n.href);var s=Xl(o).hoistableStyles,x=s.get(e);if(x||(o=o.ownerDocument||o,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,x),(s=o.querySelector(Ti(e)))&&!s._p&&(x.instance=s,x.state.loading=5),nn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},nn.set(e,n),s||Ox(o,e,n,x.state))),t&&a===null)throw Error(u(528,""));return x}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wa(n),n=Xl(o).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ta(e){return'href="'+Kt(e)+'"'}function Ti(e){return'link[rel="stylesheet"]['+e+"]"}function qp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Ox(e,t,n,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}),vt(t,"link",n),dt(t),e.head.appendChild(t))}function wa(e){return'[src="'+Kt(e)+'"]'}function wi(e){return"script[async]"+e}function Yp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Kt(n.href)+'"]');if(a)return t.instance=a,dt(a),a;var o=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),dt(a),vt(a,"style",o),eu(a,n.precedence,e),t.instance=a;case"stylesheet":o=Ta(n.href);var s=e.querySelector(Ti(o));if(s)return t.state.loading|=4,t.instance=s,dt(s),s;a=qp(n),(o=nn.get(o))&&Ys(a,o),s=(e.ownerDocument||e).createElement("link"),dt(s);var x=s;return x._p=new Promise(function(E,N){x.onload=E,x.onerror=N}),vt(s,"link",a),t.state.loading|=4,eu(s,n.precedence,e),t.instance=s;case"script":return s=wa(n.src),(o=e.querySelector(wi(s)))?(t.instance=o,dt(o),o):(a=n,(o=nn.get(s))&&(a=v({},n),Vs(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),dt(o),vt(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,eu(a,n.precedence,e));return t.instance}function eu(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,s=o,x=0;x<a.length;x++){var E=a[x];if(E.dataset.precedence===t)s=E;else if(s!==o)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Ys(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var tu=null;function Vp(e,t,n){if(tu===null){var a=new Map,o=tu=new Map;o.set(n,a)}else o=tu,a=o.get(n),a||(a=new Map,o.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var s=n[o];if(!(s[Ya]||s[pt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var x=s.getAttribute(t)||"";x=e+x;var E=a.get(x);E?E.push(s):a.set(x,[s])}}return a}function Ip(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Dx(e,t,n){if(n===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 Gp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Lx(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Ta(a.href),s=t.querySelector(Ti(o));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,dt(s);return}s=t.ownerDocument||t,a=qp(a),(o=nn.get(o))&&Ys(a,o),s=s.createElement("link"),dt(s);var x=s;x._p=new Promise(function(E,N){x.onload=E,x.onerror=N}),vt(s,"link",a),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=nu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Is=0;function Bx(e,t){return e.stylesheets&&e.count===0&&au(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&au(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Is===0&&(Is=62500*yx());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&au(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Is?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)au(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var lu=null;function au(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lu=new Map,t.forEach(Ux,e),lu=null,nu.call(e))}function Ux(e,t){if(!(t.state.loading&4)){var n=lu.get(e);if(n)var a=n.get(null);else{n=new Map,lu.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<o.length;s++){var x=o[s];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(n.set(x.dataset.precedence,x),a=x)}a&&n.set(null,a)}o=t.instance,x=o.getAttribute("data-precedence"),s=n.get(x)||a,s===a&&n.set(null,o),n.set(x,o),this.count++,a=nu.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),s?s.parentNode.insertBefore(o,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ji={$$typeof:_,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Hx(e,t,n,a,o,s,x,E,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.hiddenUpdates=Bu(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=s,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Qp(e,t,n,a,o,s,x,E,N,q,X,J){return e=new Hx(e,t,n,x,N,q,X,J,E),t=1,s===!0&&(t|=24),s=Ut(3,null,null,t),e.current=s,s.stateNode=e,t=Eo(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:n,cache:t},jo(s),e}function Xp(e){return e?(e=na,e):na}function Zp(e,t,n,a,o,s){o=Xp(o),a.context===null?a.context=o:a.pendingContext=o,a=el(t),a.payload={element:n},s=s===void 0?null:s,s!==null&&(a.callback=s),n=tl(e,a,t),n!==null&&(kt(n,e,t),ai(n,e,t))}function Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gs(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function Fp(e){if(e.tag===13||e.tag===31){var t=Tl(e,67108864);t!==null&&kt(t,e,67108864),Gs(e,67108864)}}function Jp(e){if(e.tag===13||e.tag===31){var t=It();t=Uu(t);var n=Tl(e,t);n!==null&&kt(n,e,t),Gs(e,t)}}var iu=!0;function qx(e,t,n,a){var o=U.T;U.T=null;var s=$.p;try{$.p=2,Qs(e,t,n,a)}finally{$.p=s,U.T=o}}function Yx(e,t,n,a){var o=U.T;U.T=null;var s=$.p;try{$.p=8,Qs(e,t,n,a)}finally{$.p=s,U.T=o}}function Qs(e,t,n,a){if(iu){var o=Xs(a);if(o===null)ks(e,t,a,ru,n),$p(e,a);else if(Ix(o,e,t,n,a))a.stopPropagation();else if($p(e,a),t&4&&-1<Vx.indexOf(e)){for(;o!==null;){var s=Ql(o);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var x=xl(s.pendingLanes);if(x!==0){var E=s;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var N=1<<31-Ge(x);E.entanglements[1]|=N,x&=~N}mn(s),(Oe&6)===0&&(Vr=St()+500,bi(0))}}break;case 31:case 13:E=Tl(s,2),E!==null&&kt(E,s,2),Gr(),Gs(s,2)}if(s=Xs(a),s===null&&ks(e,t,a,ru,n),s===o)break;o=s}o!==null&&a.stopPropagation()}else ks(e,t,a,null,n)}}function Xs(e){return e=Zu(e),Zs(e)}var ru=null;function Zs(e){if(ru=null,e=Gl(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=d(t),e!==null)return e;e=null}else if(n===31){if(e=y(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ru=e,null}function Pp(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(Lu()){case Z:return 2;case ie:return 8;case ge:case Te:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Ks=!1,dl=null,hl=null,pl=null,Ai=new Map,zi=new Map,ml=[],Vx="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 $p(e,t){switch(e){case"focusin":case"focusout":dl=null;break;case"dragenter":case"dragleave":hl=null;break;case"mouseover":case"mouseout":pl=null;break;case"pointerover":case"pointerout":Ai.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(t.pointerId)}}function Ri(e,t,n,a,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Ql(t),t!==null&&Fp(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Ix(e,t,n,a,o){switch(t){case"focusin":return dl=Ri(dl,e,t,n,a,o),!0;case"dragenter":return hl=Ri(hl,e,t,n,a,o),!0;case"mouseover":return pl=Ri(pl,e,t,n,a,o),!0;case"pointerover":var s=o.pointerId;return Ai.set(s,Ri(Ai.get(s)||null,e,t,n,a,o)),!0;case"gotpointercapture":return s=o.pointerId,zi.set(s,Ri(zi.get(s)||null,e,t,n,a,o)),!0}return!1}function Wp(e){var t=Gl(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=d(n),t!==null){e.blockedOn=t,hf(e.priority,function(){Jp(n)});return}}else if(t===31){if(t=y(n),t!==null){e.blockedOn=t,hf(e.priority,function(){Jp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xs(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Xu=a,n.target.dispatchEvent(a),Xu=null}else return t=Ql(n),t!==null&&Fp(t),e.blockedOn=n,!1;t.shift()}return!0}function em(e,t,n){uu(e)&&n.delete(t)}function Gx(){Ks=!1,dl!==null&&uu(dl)&&(dl=null),hl!==null&&uu(hl)&&(hl=null),pl!==null&&uu(pl)&&(pl=null),Ai.forEach(em),zi.forEach(em)}function ou(e,t){e.blockedOn===t&&(e.blockedOn=null,Ks||(Ks=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Gx)))}var su=null;function tm(e){su!==e&&(su=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){su===e&&(su=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Zs(a||n)===null)continue;break}var s=Ql(n);s!==null&&(e.splice(t,3),t-=3,Xo(s,{pending:!0,data:o,method:n.method,action:a},a,o))}}))}function ja(e){function t(N){return ou(N,e)}dl!==null&&ou(dl,e),hl!==null&&ou(hl,e),pl!==null&&ou(pl,e),Ai.forEach(t),zi.forEach(t);for(var n=0;n<ml.length;n++){var a=ml[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ml.length&&(n=ml[0],n.blockedOn===null);)Wp(n),n.blockedOn===null&&ml.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var o=n[a],s=n[a+1],x=o[wt]||null;if(typeof s=="function")x||tm(n);else if(x){var E=null;if(s&&s.hasAttribute("formAction")){if(o=s,x=s[wt]||null)E=x.formAction;else if(Zs(o)!==null)continue}else E=x.action;typeof E=="function"?n[a+1]=E:(n.splice(a,3),a-=3),tm(n)}}}function nm(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(x){return o=x})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Fs(e){this._internalRoot=e}cu.prototype.render=Fs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,a=It();Zp(n,a,e,t,null,null)},cu.prototype.unmount=Fs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zp(e.current,2,null,e,null,null),Gr(),t[Il]=null}};function cu(e){this._internalRoot=e}cu.prototype.unstable_scheduleHydration=function(e){if(e){var t=df();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ml.length&&t!==0&&t<ml[n].priority;n++);ml.splice(n,0,e),n===0&&Wp(e)}};var lm=i.version;if(lm!=="19.2.4")throw Error(u(527,lm,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=h(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Qx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fu.isDisabled&&fu.supportsFiber)try{Et=fu.inject(Qx),st=fu}catch{}}return ki.createRoot=function(e,t){if(!c(e))throw Error(u(299));var n=!1,a="",o=ch,s=fh,x=dh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=Qp(e,1,!1,null,null,n,a,null,o,s,x,nm),e[Il]=t.current,Ns(e),new Fs(t)},ki.hydrateRoot=function(e,t,n){if(!c(e))throw Error(u(299));var a=!1,o="",s=ch,x=fh,E=dh,N=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(x=n.onCaughtError),n.onRecoverableError!==void 0&&(E=n.onRecoverableError),n.formState!==void 0&&(N=n.formState)),t=Qp(e,1,!0,t,n??null,a,o,N,s,x,E,nm),t.context=Xp(null),n=t.current,a=It(),a=Uu(a),o=el(a),o.callback=null,tl(n,o,a),n=a,t.current.lanes=n,qa(t,n),mn(t),e[Il]=t.current,Ns(e),new cu(t)},ki.version="19.2.4",ki}var hm;function t1(){if(hm)return $s.exports;hm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),$s.exports=e1(),$s.exports}var n1=t1();var pm="popstate";function l1(l={}){function i(u,c){let{pathname:f,search:d,hash:y}=u.location;return Tc("",{pathname:f,search:d,hash:y},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function r(u,c){return typeof c=="string"?c:qi(c)}return i1(i,r,null,l)}function Pe(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function cn(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function a1(){return Math.random().toString(36).substring(2,10)}function mm(l,i){return{usr:l.state,key:l.key,idx:i}}function Tc(l,i,r=null,u){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?_a(i):i,state:r,key:i&&i.key||u||a1()}}function qi({pathname:l="/",search:i="",hash:r=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function _a(l){let i={};if(l){let r=l.indexOf("#");r>=0&&(i.hash=l.substring(r),l=l.substring(0,r));let u=l.indexOf("?");u>=0&&(i.search=l.substring(u),l=l.substring(0,u)),l&&(i.pathname=l)}return i}function i1(l,i,r,u={}){let{window:c=document.defaultView,v5Compat:f=!1}=u,d=c.history,y="POP",m=null,h=g();h==null&&(h=0,d.replaceState({...d.state,idx:h},""));function g(){return(d.state||{idx:null}).idx}function v(){y="POP";let z=g(),k=z==null?null:z-h;h=z,m&&m({action:y,location:A.location,delta:k})}function S(z,k){y="PUSH";let D=Tc(A.location,z,k);h=g()+1;let _=mm(D,h),I=A.createHref(D);try{d.pushState(_,"",I)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;c.location.assign(I)}f&&m&&m({action:y,location:A.location,delta:1})}function b(z,k){y="REPLACE";let D=Tc(A.location,z,k);h=g();let _=mm(D,h),I=A.createHref(D);d.replaceState(_,"",I),f&&m&&m({action:y,location:A.location,delta:0})}function R(z){return r1(z)}let A={get action(){return y},get location(){return l(c,d)},listen(z){if(m)throw new Error("A history only accepts one active listener");return c.addEventListener(pm,v),m=z,()=>{c.removeEventListener(pm,v),m=null}},createHref(z){return i(c,z)},createURL:R,encodeLocation(z){let k=R(z);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:S,replace:b,go(z){return d.go(z)}};return A}function r1(l,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(r,"No window.location.(origin|href) available to create URL");let u=typeof l=="string"?l:qi(l);return u=u.replace(/ $/,"%20"),!i&&u.startsWith("//")&&(u=r+u),new URL(u,r)}function fg(l,i,r="/"){return u1(l,i,r,!1)}function u1(l,i,r,u){let c=typeof i=="string"?_a(i):i,f=Gn(c.pathname||"/",r);if(f==null)return null;let d=dg(l);o1(d);let y=null;for(let m=0;y==null&&m<d.length;++m){let h=x1(f);y=y1(d[m],h,u)}return y}function dg(l,i=[],r=[],u="",c=!1){let f=(d,y,m=c,h)=>{let g={relativePath:h===void 0?d.path||"":h,caseSensitive:d.caseSensitive===!0,childrenIndex:y,route:d};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(u)&&m)return;Pe(g.relativePath.startsWith(u),`Absolute route path "${g.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(u.length)}let v=In([u,g.relativePath]),S=r.concat(g);d.children&&d.children.length>0&&(Pe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),dg(d.children,i,S,v,m)),!(d.path==null&&!d.index)&&i.push({path:v,score:m1(v,d.index),routesMeta:S})};return l.forEach((d,y)=>{if(d.path===""||!d.path?.includes("?"))f(d,y);else for(let m of hg(d.path))f(d,y,!0,m)}),i}function hg(l){let i=l.split("/");if(i.length===0)return[];let[r,...u]=i,c=r.endsWith("?"),f=r.replace(/\?$/,"");if(u.length===0)return c?[f,""]:[f];let d=hg(u.join("/")),y=[];return y.push(...d.map(m=>m===""?f:[f,m].join("/"))),c&&y.push(...d),y.map(m=>l.startsWith("/")&&m===""?"/":m)}function o1(l){l.sort((i,r)=>i.score!==r.score?r.score-i.score:g1(i.routesMeta.map(u=>u.childrenIndex),r.routesMeta.map(u=>u.childrenIndex)))}var s1=/^:[\w-]+$/,c1=3,f1=2,d1=1,h1=10,p1=-2,gm=l=>l==="*";function m1(l,i){let r=l.split("/"),u=r.length;return r.some(gm)&&(u+=p1),i&&(u+=f1),r.filter(c=>!gm(c)).reduce((c,f)=>c+(s1.test(f)?c1:f===""?d1:h1),u)}function g1(l,i){return l.length===i.length&&l.slice(0,-1).every((u,c)=>u===i[c])?l[l.length-1]-i[i.length-1]:0}function y1(l,i,r=!1){let{routesMeta:u}=l,c={},f="/",d=[];for(let y=0;y<u.length;++y){let m=u[y],h=y===u.length-1,g=f==="/"?i:i.slice(f.length)||"/",v=Su({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},g),S=m.route;if(!v&&h&&r&&!u[u.length-1].route.index&&(v=Su({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},g)),!v)return null;Object.assign(c,v.params),d.push({params:c,pathname:In([f,v.pathname]),pathnameBase:C1(In([f,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(f=In([f,v.pathnameBase]))}return d}function Su(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,u]=v1(l.path,l.caseSensitive,l.end),c=i.match(r);if(!c)return null;let f=c[0],d=f.replace(/(.)\/+$/,"$1"),y=c.slice(1);return{params:u.reduce((h,{paramName:g,isOptional:v},S)=>{if(g==="*"){let R=y[S]||"";d=f.slice(0,f.length-R.length).replace(/(.)\/+$/,"$1")}const b=y[S];return v&&!b?h[g]=void 0:h[g]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:f,pathnameBase:d,pattern:l}}function v1(l,i=!1,r=!0){cn(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let u=[],c="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,y,m)=>(u.push({paramName:y,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(u.push({paramName:"*"}),c+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":l!==""&&l!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),u]}function x1(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return cn(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function Gn(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,u=l.charAt(r);return u&&u!=="/"?null:l.slice(r)||"/"}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function S1(l,i="/"){let{pathname:r,search:u="",hash:c=""}=typeof l=="string"?_a(l):l,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=ym(r.substring(1),"/"):f=ym(r,i)):f=i,{pathname:f,search:T1(u),hash:w1(c)}}function ym(l,i){let r=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function nc(l,i,r,u){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function E1(l){return l.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function pg(l){let i=E1(l);return i.map((r,u)=>u===i.length-1?r.pathname:r.pathnameBase)}function mg(l,i,r,u=!1){let c;typeof l=="string"?c=_a(l):(c={...l},Pe(!c.pathname||!c.pathname.includes("?"),nc("?","pathname","search",c)),Pe(!c.pathname||!c.pathname.includes("#"),nc("#","pathname","hash",c)),Pe(!c.search||!c.search.includes("#"),nc("#","search","hash",c)));let f=l===""||c.pathname==="",d=f?"/":c.pathname,y;if(d==null)y=r;else{let v=i.length-1;if(!u&&d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),v-=1;c.pathname=S.join("/")}y=v>=0?i[v]:"/"}let m=S1(c,y),h=d&&d!=="/"&&d.endsWith("/"),g=(f||d===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(h||g)&&(m.pathname+="/"),m}var In=l=>l.join("/").replace(/\/\/+/g,"/"),C1=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),T1=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,w1=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,j1=class{constructor(l,i,r,u=!1){this.status=l,this.statusText=i||"",this.internal=u,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function A1(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function z1(l){return l.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var gg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yg(l,i){let r=l;if(typeof r!="string"||!b1.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let u=r,c=!1;if(gg)try{let f=new URL(window.location.href),d=r.startsWith("//")?new URL(f.protocol+r):new URL(r),y=Gn(d.pathname,i);d.origin===f.origin&&y!=null?r=y+d.search+d.hash:c=!0}catch{cn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:c,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vg=["POST","PUT","PATCH","DELETE"];new Set(vg);var R1=["GET",...vg];new Set(R1);var Oa=w.createContext(null);Oa.displayName="DataRouter";var zu=w.createContext(null);zu.displayName="DataRouterState";var N1=w.createContext(!1),xg=w.createContext({isTransitioning:!1});xg.displayName="ViewTransition";var k1=w.createContext(new Map);k1.displayName="Fetchers";var M1=w.createContext(null);M1.displayName="Await";var an=w.createContext(null);an.displayName="Navigation";var Vi=w.createContext(null);Vi.displayName="Location";var fn=w.createContext({outlet:null,matches:[],isDataRoute:!1});fn.displayName="Route";var Yc=w.createContext(null);Yc.displayName="RouteError";var bg="REACT_ROUTER_ERROR",_1="REDIRECT",O1="ROUTE_ERROR_RESPONSE";function D1(l){if(l.startsWith(`${bg}:${_1}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function L1(l){if(l.startsWith(`${bg}:${O1}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new j1(i.status,i.statusText,i.data)}catch{}}function B1(l,{relative:i}={}){Pe(Ii(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:u}=w.useContext(an),{hash:c,pathname:f,search:d}=Gi(l,{relative:i}),y=f;return r!=="/"&&(y=f==="/"?r:In([r,f])),u.createHref({pathname:y,search:d,hash:c})}function Ii(){return w.useContext(Vi)!=null}function Qn(){return Pe(Ii(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Vi).location}var Sg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Eg(l){w.useContext(an).static||w.useLayoutEffect(l)}function Ru(){let{isDataRoute:l}=w.useContext(fn);return l?P1():U1()}function U1(){Pe(Ii(),"useNavigate() may be used only in the context of a <Router> component.");let l=w.useContext(Oa),{basename:i,navigator:r}=w.useContext(an),{matches:u}=w.useContext(fn),{pathname:c}=Qn(),f=JSON.stringify(pg(u)),d=w.useRef(!1);return Eg(()=>{d.current=!0}),w.useCallback((m,h={})=>{if(cn(d.current,Sg),!d.current)return;if(typeof m=="number"){r.go(m);return}let g=mg(m,JSON.parse(f),c,h.relative==="path");l==null&&i!=="/"&&(g.pathname=g.pathname==="/"?i:In([i,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[i,r,f,c,l])}var Cg=w.createContext(null);function Tg(){return w.useContext(Cg)}function H1(l){let i=w.useContext(fn).outlet;return w.useMemo(()=>i&&w.createElement(Cg.Provider,{value:l},i),[i,l])}function wg(){let{matches:l}=w.useContext(fn),i=l[l.length-1];return i?i.params:{}}function Gi(l,{relative:i}={}){let{matches:r}=w.useContext(fn),{pathname:u}=Qn(),c=JSON.stringify(pg(r));return w.useMemo(()=>mg(l,JSON.parse(c),u,i==="path"),[l,c,u,i])}function q1(l,i){return jg(l,i)}function jg(l,i,r,u,c){Pe(Ii(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=w.useContext(an),{matches:d}=w.useContext(fn),y=d[d.length-1],m=y?y.params:{},h=y?y.pathname:"/",g=y?y.pathnameBase:"/",v=y&&y.route;{let D=v&&v.path||"";zg(h,!v||D.endsWith("*")||D.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${D}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${D}"> to <Route path="${D==="/"?"*":`${D}/*`}">.`)}let S=Qn(),b;if(i){let D=typeof i=="string"?_a(i):i;Pe(g==="/"||D.pathname?.startsWith(g),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${D.pathname}" was given in the \`location\` prop.`),b=D}else b=S;let R=b.pathname||"/",A=R;if(g!=="/"){let D=g.replace(/^\//,"").split("/");A="/"+R.replace(/^\//,"").split("/").slice(D.length).join("/")}let z=fg(l,{pathname:A});cn(v||z!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),cn(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=Q1(z&&z.map(D=>Object.assign({},D,{params:Object.assign({},m,D.params),pathname:In([g,f.encodeLocation?f.encodeLocation(D.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?g:In([g,f.encodeLocation?f.encodeLocation(D.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:D.pathnameBase])})),d,r,u,c);return i&&k?w.createElement(Vi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},k):k}function Y1(){let l=J1(),i=A1(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,u="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},d=null;return console.error("Error handled by React Router default ErrorBoundary:",l),d=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},i),r?w.createElement("pre",{style:c},r):null,d)}var V1=w.createElement(Y1,null),Ag=class extends w.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const r=L1(l.digest);r&&(l=r)}let i=l!==void 0?w.createElement(fn.Provider,{value:this.props.routeContext},w.createElement(Yc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?w.createElement(I1,{error:l},i):i}};Ag.contextType=N1;var lc=new WeakMap;function I1({children:l,error:i}){let{basename:r}=w.useContext(an);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let u=D1(i.digest);if(u){let c=lc.get(i);if(c)throw c;let f=yg(u.location,r);if(gg&&!lc.get(i))if(f.isExternal||u.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:u.replace}));throw lc.set(i,d),d}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function G1({routeContext:l,match:i,children:r}){let u=w.useContext(Oa);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),w.createElement(fn.Provider,{value:l},r)}function Q1(l,i=[],r=null,u=null,c=null){if(l==null){if(!r)return null;if(r.errors)l=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)l=r.matches;else return null}let f=l,d=r?.errors;if(d!=null){let g=f.findIndex(v=>v.route.id&&d?.[v.route.id]!==void 0);Pe(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,g+1))}let y=!1,m=-1;if(r)for(let g=0;g<f.length;g++){let v=f[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(m=g),v.route.id){let{loaderData:S,errors:b}=r,R=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!b||b[v.route.id]===void 0);if(v.route.lazy||R){y=!0,m>=0?f=f.slice(0,m+1):f=[f[0]];break}}}let h=r&&u?(g,v)=>{u(g,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:z1(r.matches),errorInfo:v})}:void 0;return f.reduceRight((g,v,S)=>{let b,R=!1,A=null,z=null;r&&(b=d&&v.route.id?d[v.route.id]:void 0,A=v.route.errorElement||V1,y&&(m<0&&S===0?(zg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,z=null):m===S&&(R=!0,z=v.route.hydrateFallbackElement||null)));let k=i.concat(f.slice(0,S+1)),D=()=>{let _;return b?_=A:R?_=z:v.route.Component?_=w.createElement(v.route.Component,null):v.route.element?_=v.route.element:_=g,w.createElement(G1,{match:v,routeContext:{outlet:g,matches:k,isDataRoute:r!=null},children:_})};return r&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?w.createElement(Ag,{location:r.location,revalidation:r.revalidation,component:A,error:b,children:D(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):D()},null)}function Vc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function X1(l){let i=w.useContext(Oa);return Pe(i,Vc(l)),i}function Z1(l){let i=w.useContext(zu);return Pe(i,Vc(l)),i}function K1(l){let i=w.useContext(fn);return Pe(i,Vc(l)),i}function Ic(l){let i=K1(l),r=i.matches[i.matches.length-1];return Pe(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function F1(){return Ic("useRouteId")}function J1(){let l=w.useContext(Yc),i=Z1("useRouteError"),r=Ic("useRouteError");return l!==void 0?l:i.errors?.[r]}function P1(){let{router:l}=X1("useNavigate"),i=Ic("useNavigate"),r=w.useRef(!1);return Eg(()=>{r.current=!0}),w.useCallback(async(c,f={})=>{cn(r.current,Sg),r.current&&(typeof c=="number"?await l.navigate(c):await l.navigate(c,{fromRouteId:i,...f}))},[l,i])}var vm={};function zg(l,i,r){!i&&!vm[l]&&(vm[l]=!0,cn(!1,r))}w.memo($1);function $1({routes:l,future:i,state:r,onError:u}){return jg(l,void 0,r,u,i)}function W1(l){return H1(l.context)}function Vn(l){Pe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function e0({basename:l="/",children:i=null,location:r,navigationType:u="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Pe(!Ii(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),m=w.useMemo(()=>({basename:y,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[y,c,f,d]);typeof r=="string"&&(r=_a(r));let{pathname:h="/",search:g="",hash:v="",state:S=null,key:b="default"}=r,R=w.useMemo(()=>{let A=Gn(h,y);return A==null?null:{location:{pathname:A,search:g,hash:v,state:S,key:b},navigationType:u}},[y,h,g,v,S,b,u]);return cn(R!=null,`<Router basename="${y}"> is not able to match the URL "${h}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:w.createElement(an.Provider,{value:m},w.createElement(Vi.Provider,{children:i,value:R}))}function t0({children:l,location:i}){return q1(wc(l),i)}function wc(l,i=[]){let r=[];return w.Children.forEach(l,(u,c)=>{if(!w.isValidElement(u))return;let f=[...i,c];if(u.type===w.Fragment){r.push.apply(r,wc(u.props.children,f));return}Pe(u.type===Vn,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pe(!u.props.index||!u.props.children,"An index route cannot have child routes.");let d={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(d.children=wc(u.props.children,f)),r.push(d)}),r}var vu="get",xu="application/x-www-form-urlencoded";function Nu(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function n0(l){return Nu(l)&&l.tagName.toLowerCase()==="button"}function l0(l){return Nu(l)&&l.tagName.toLowerCase()==="form"}function a0(l){return Nu(l)&&l.tagName.toLowerCase()==="input"}function i0(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function r0(l,i){return l.button===0&&(!i||i==="_self")&&!i0(l)}function jc(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((i,r)=>{let u=l[r];return i.concat(Array.isArray(u)?u.map(c=>[r,c]):[[r,u]])},[]))}function u0(l,i){let r=jc(l);return i&&i.forEach((u,c)=>{r.has(c)||i.getAll(c).forEach(f=>{r.append(c,f)})}),r}var du=null;function o0(){if(du===null)try{new FormData(document.createElement("form"),0),du=!1}catch{du=!0}return du}var s0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ac(l){return l!=null&&!s0.has(l)?(cn(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xu}"`),null):l}function c0(l,i){let r,u,c,f,d;if(l0(l)){let y=l.getAttribute("action");u=y?Gn(y,i):null,r=l.getAttribute("method")||vu,c=ac(l.getAttribute("enctype"))||xu,f=new FormData(l)}else if(n0(l)||a0(l)&&(l.type==="submit"||l.type==="image")){let y=l.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=l.getAttribute("formaction")||y.getAttribute("action");if(u=m?Gn(m,i):null,r=l.getAttribute("formmethod")||y.getAttribute("method")||vu,c=ac(l.getAttribute("formenctype"))||ac(y.getAttribute("enctype"))||xu,f=new FormData(y,l),!o0()){let{name:h,type:g,value:v}=l;if(g==="image"){let S=h?`${h}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else h&&f.append(h,v)}}else{if(Nu(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=vu,u=null,c=xu,d=l}return f&&c==="text/plain"&&(d=f,f=void 0),{action:u,method:r.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gc(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function f0(l,i,r,u){let c=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${u}`:c.pathname=`${c.pathname}.${u}`:c.pathname==="/"?c.pathname=`_root.${u}`:i&&Gn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${u}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${u}`,c}async function d0(l,i){if(l.id in i)return i[l.id];try{let r=await import(l.module);return i[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function h0(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function p0(l,i,r){let u=await Promise.all(l.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await d0(f,r);return d.links?d.links():[]}return[]}));return v0(u.flat(1).filter(h0).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function xm(l,i,r,u,c,f){let d=(m,h)=>r[h]?m.route.id!==r[h].route.id:!0,y=(m,h)=>r[h].pathname!==m.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==m.params["*"];return f==="assets"?i.filter((m,h)=>d(m,h)||y(m,h)):f==="data"?i.filter((m,h)=>{let g=u.routes[m.route.id];if(!g||!g.hasLoader)return!1;if(d(m,h)||y(m,h))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(l,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function m0(l,i,{includeHydrateFallback:r}={}){return g0(l.map(u=>{let c=i.routes[u.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function g0(l){return[...new Set(l)]}function y0(l){let i={},r=Object.keys(l).sort();for(let u of r)i[u]=l[u];return i}function v0(l,i){let r=new Set;return new Set(i),l.reduce((u,c)=>{let f=JSON.stringify(y0(c));return r.has(f)||(r.add(f),u.push({key:f,link:c})),u},[])}function Rg(){let l=w.useContext(Oa);return Gc(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function x0(){let l=w.useContext(zu);return Gc(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Qc=w.createContext(void 0);Qc.displayName="FrameworkContext";function Ng(){let l=w.useContext(Qc);return Gc(l,"You must render this element inside a <HydratedRouter> element"),l}function b0(l,i){let r=w.useContext(Qc),[u,c]=w.useState(!1),[f,d]=w.useState(!1),{onFocus:y,onBlur:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:v}=i,S=w.useRef(null);w.useEffect(()=>{if(l==="render"&&d(!0),l==="viewport"){let A=k=>{k.forEach(D=>{d(D.isIntersecting)})},z=new IntersectionObserver(A,{threshold:.5});return S.current&&z.observe(S.current),()=>{z.disconnect()}}},[l]),w.useEffect(()=>{if(u){let A=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(A)}}},[u]);let b=()=>{c(!0)},R=()=>{c(!1),d(!1)};return r?l!=="intent"?[f,S,{}]:[f,S,{onFocus:Mi(y,b),onBlur:Mi(m,R),onMouseEnter:Mi(h,b),onMouseLeave:Mi(g,R),onTouchStart:Mi(v,b)}]:[!1,S,{}]}function Mi(l,i){return r=>{l&&l(r),r.defaultPrevented||i(r)}}function S0({page:l,...i}){let{router:r}=Rg(),u=w.useMemo(()=>fg(r.routes,l,r.basename),[r.routes,l,r.basename]);return u?w.createElement(C0,{page:l,matches:u,...i}):null}function E0(l){let{manifest:i,routeModules:r}=Ng(),[u,c]=w.useState([]);return w.useEffect(()=>{let f=!1;return p0(l,i,r).then(d=>{f||c(d)}),()=>{f=!0}},[l,i,r]),u}function C0({page:l,matches:i,...r}){let u=Qn(),{future:c,manifest:f,routeModules:d}=Ng(),{basename:y}=Rg(),{loaderData:m,matches:h}=x0(),g=w.useMemo(()=>xm(l,i,h,f,u,"data"),[l,i,h,f,u]),v=w.useMemo(()=>xm(l,i,h,f,u,"assets"),[l,i,h,f,u]),S=w.useMemo(()=>{if(l===u.pathname+u.search+u.hash)return[];let A=new Set,z=!1;if(i.forEach(D=>{let _=f.routes[D.route.id];!_||!_.hasLoader||(!g.some(I=>I.route.id===D.route.id)&&D.route.id in m&&d[D.route.id]?.shouldRevalidate||_.hasClientLoader?z=!0:A.add(D.route.id))}),A.size===0)return[];let k=f0(l,y,c.unstable_trailingSlashAwareDataRequests,"data");return z&&A.size>0&&k.searchParams.set("_routes",i.filter(D=>A.has(D.route.id)).map(D=>D.route.id).join(",")),[k.pathname+k.search]},[y,c.unstable_trailingSlashAwareDataRequests,m,u,f,g,i,l,d]),b=w.useMemo(()=>m0(v,f),[v,f]),R=E0(v);return w.createElement(w.Fragment,null,S.map(A=>w.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...r})),b.map(A=>w.createElement("link",{key:A,rel:"modulepreload",href:A,...r})),R.map(({key:A,link:z})=>w.createElement("link",{key:A,nonce:r.nonce,...z,crossOrigin:z.crossOrigin??r.crossOrigin})))}function T0(...l){return i=>{l.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var w0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{w0&&(window.__reactRouterVersion="7.13.0")}catch{}function j0({basename:l,children:i,unstable_useTransitions:r,window:u}){let c=w.useRef();c.current==null&&(c.current=l1({window:u,v5Compat:!0}));let f=c.current,[d,y]=w.useState({action:f.action,location:f.location}),m=w.useCallback(h=>{r===!1?y(h):w.startTransition(()=>y(h))},[r]);return w.useLayoutEffect(()=>f.listen(m),[f,m]),w.createElement(e0,{basename:l,children:i,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:r})}var kg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_t=w.forwardRef(function({onClick:i,discover:r="render",prefetch:u="none",relative:c,reloadDocument:f,replace:d,state:y,target:m,to:h,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S,...b},R){let{basename:A,unstable_useTransitions:z}=w.useContext(an),k=typeof h=="string"&&kg.test(h),D=yg(h,A);h=D.to;let _=B1(h,{relative:c}),[I,W,B]=b0(u,b),Q=N0(h,{replace:d,state:y,target:m,preventScrollReset:g,relative:c,viewTransition:v,unstable_defaultShouldRevalidate:S,unstable_useTransitions:z});function V(oe){i&&i(oe),oe.defaultPrevented||Q(oe)}let ee=w.createElement("a",{...b,...B,href:D.absoluteURL||_,onClick:D.isExternal||f?i:V,ref:T0(R,W),target:m,"data-discover":!k&&r==="render"?"true":void 0});return I&&!k?w.createElement(w.Fragment,null,ee,w.createElement(S0,{page:_})):ee});_t.displayName="Link";var A0=w.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:u="",end:c=!1,style:f,to:d,viewTransition:y,children:m,...h},g){let v=Gi(d,{relative:h.relative}),S=Qn(),b=w.useContext(zu),{navigator:R,basename:A}=w.useContext(an),z=b!=null&&D0(v)&&y===!0,k=R.encodeLocation?R.encodeLocation(v).pathname:v.pathname,D=S.pathname,_=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(D=D.toLowerCase(),_=_?_.toLowerCase():null,k=k.toLowerCase()),_&&A&&(_=Gn(_,A)||_);const I=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let W=D===k||!c&&D.startsWith(k)&&D.charAt(I)==="/",B=_!=null&&(_===k||!c&&_.startsWith(k)&&_.charAt(k.length)==="/"),Q={isActive:W,isPending:B,isTransitioning:z},V=W?i:void 0,ee;typeof u=="function"?ee=u(Q):ee=[u,W?"active":null,B?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let oe=typeof f=="function"?f(Q):f;return w.createElement(_t,{...h,"aria-current":V,className:ee,ref:g,style:oe,to:d,viewTransition:y},typeof m=="function"?m(Q):m)});A0.displayName="NavLink";var z0=w.forwardRef(({discover:l="render",fetcherKey:i,navigate:r,reloadDocument:u,replace:c,state:f,method:d=vu,action:y,onSubmit:m,relative:h,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S,...b},R)=>{let{unstable_useTransitions:A}=w.useContext(an),z=_0(),k=O0(y,{relative:h}),D=d.toLowerCase()==="get"?"get":"post",_=typeof y=="string"&&kg.test(y),I=W=>{if(m&&m(W),W.defaultPrevented)return;W.preventDefault();let B=W.nativeEvent.submitter,Q=B?.getAttribute("formmethod")||d,V=()=>z(B||W.currentTarget,{fetcherKey:i,method:Q,navigate:r,replace:c,state:f,relative:h,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S});A&&r!==!1?w.startTransition(()=>V()):V()};return w.createElement("form",{ref:R,method:D,action:k,onSubmit:u?m:I,...b,"data-discover":!_&&l==="render"?"true":void 0})});z0.displayName="Form";function R0(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mg(l){let i=w.useContext(Oa);return Pe(i,R0(l)),i}function N0(l,{target:i,replace:r,state:u,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:y,unstable_useTransitions:m}={}){let h=Ru(),g=Qn(),v=Gi(l,{relative:f});return w.useCallback(S=>{if(r0(S,i)){S.preventDefault();let b=r!==void 0?r:qi(g)===qi(v),R=()=>h(l,{replace:b,state:u,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:y});m?w.startTransition(()=>R()):R()}},[g,h,v,r,u,i,l,c,f,d,y,m])}function _g(l){cn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=w.useRef(jc(l)),r=w.useRef(!1),u=Qn(),c=w.useMemo(()=>u0(u.search,r.current?null:i.current),[u.search]),f=Ru(),d=w.useCallback((y,m)=>{const h=jc(typeof y=="function"?y(new URLSearchParams(c)):y);r.current=!0,f("?"+h,m)},[f,c]);return[c,d]}var k0=0,M0=()=>`__${String(++k0)}__`;function _0(){let{router:l}=Mg("useSubmit"),{basename:i}=w.useContext(an),r=F1(),u=l.fetch,c=l.navigate;return w.useCallback(async(f,d={})=>{let{action:y,method:m,encType:h,formData:g,body:v}=c0(f,i);if(d.navigate===!1){let S=d.fetcherKey||M0();await u(S,r,d.action||y,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:v,formMethod:d.method||m,formEncType:d.encType||h,flushSync:d.flushSync})}else await c(d.action||y,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:v,formMethod:d.method||m,formEncType:d.encType||h,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[u,c,i,r])}function O0(l,{relative:i}={}){let{basename:r}=w.useContext(an),u=w.useContext(fn);Pe(u,"useFormAction must be used inside a RouteContext");let[c]=u.matches.slice(-1),f={...Gi(l||".",{relative:i})},d=Qn();if(l==null){f.search=d.search;let y=new URLSearchParams(f.search),m=y.getAll("index");if(m.some(g=>g==="")){y.delete("index"),m.filter(v=>v).forEach(v=>y.append("index",v));let g=y.toString();f.search=g?`?${g}`:""}}return(!l||l===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:In([r,f.pathname])),qi(f)}function D0(l,{relative:i}={}){let r=w.useContext(xg);Pe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Mg("useViewTransitionState"),c=Gi(l,{relative:i});if(!r.isTransitioning)return!1;let f=Gn(r.currentLocation.pathname,u)||r.currentLocation.pathname,d=Gn(r.nextLocation.pathname,u)||r.nextLocation.pathname;return Su(c.pathname,d)!=null||Su(c.pathname,f)!=null}async function Ce(l){const i=await fetch(l);if(!i.ok){const r=await i.json().catch(()=>({error:"Request failed"}));throw{status:i.status,message:r.error||"Request failed"}}return i.json()}async function lt(l,i){const r=await fetch(l,{method:"POST",headers:i!==void 0?{"Content-Type":"application/json"}:{},body:i!==void 0?JSON.stringify(i):void 0});if(!r.ok){const u=await r.json().catch(()=>({error:"Request failed"}));throw{status:r.status,message:u.error||"Request failed"}}return r.json()}async function bm(l,i){const r=await fetch(l,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!r.ok){const u=await r.json().catch(()=>({error:"Request failed"}));throw{status:r.status,message:u.error||"Request failed"}}return r.json()}async function Og(l){const i=await fetch(l,{method:"DELETE"});if(!i.ok){const r=await i.json().catch(()=>({error:"Request failed"}));throw{status:i.status,message:r.error||"Request failed"}}return i.json()}function L0({twilioStatus:l,authStatus:i}){const[r,u]=w.useState([]),c=Qn(),[f,d]=w.useState(()=>localStorage.getItem("theme")==="dark"||!localStorage.getItem("theme")&&window.matchMedia("(prefers-color-scheme: dark)").matches);w.useEffect(()=>{Ce("/api/conversations").then(u).catch(()=>{})},[]),w.useEffect(()=>{f?(document.body.classList.add("dark"),document.body.classList.remove("light"),localStorage.setItem("theme","dark")):(document.body.classList.remove("dark"),document.body.classList.add("light"),localStorage.setItem("theme","light"))},[f]);const y=h=>{const g=Math.floor((Date.now()-new Date(h).getTime())/1e3);if(g<60)return"just now";const v=Math.floor(g/60);if(v<60)return`${v}m ago`;const S=Math.floor(v/60);if(S<24)return`${S}h ago`;const b=Math.floor(S/24);if(b<30)return`${b}d ago`;const R=Math.floor(b/30);return R<12?`${R}m ago`:`${Math.floor(R/12)}y ago`},m=h=>h.firstMessage.slice(0,40);return p.jsxs("div",{className:"sidebar",children:[p.jsx("div",{style:{padding:"24px 16px 8px 24px",display:"flex",alignItems:"center",gap:10},children:p.jsx("span",{style:{fontSize:"28px",fontWeight:"400",fontFamily:"'IBM Plex Serif', serif",letterSpacing:"-0.5px",color:"var(--text-primary)"},children:"VoiceCC"})}),p.jsxs("div",{className:"sidebar-nav",children:[p.jsxs(_t,{to:"/",className:`sidebar-item ${c.pathname==="/"?"active":""}`,style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),p.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),"Home"]}),p.jsxs(_t,{to:"/agents",className:`sidebar-item ${c.pathname.startsWith("/agents")?"active":""}`,style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),p.jsx("circle",{cx:"9",cy:"7",r:"4"}),p.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),p.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),"Agents"]}),p.jsxs(_t,{to:"/settings",className:`sidebar-item ${c.pathname.startsWith("/settings")?"active":""}`,style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"3"}),p.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),"Settings"]}),p.jsx("div",{className:"sidebar-section-label",style:{marginTop:16,flexShrink:0},children:"History"}),p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,flex:1,overflowY:"auto"},children:[r.length===0&&p.jsx("div",{style:{padding:"8px 12px",fontSize:13,color:"var(--text-secondary)"},children:"No history yet."}),r.map(h=>{const g=h.agentId?`/c/${h.sessionId}?agentId=${h.agentId}`:`/c/${h.sessionId}`;return p.jsxs(_t,{to:g,className:`sidebar-conversation ${c.pathname===`/c/${h.sessionId}`?"active":""}`,title:h.firstMessage,style:{textDecoration:"none",display:"flex",flexDirection:"column",gap:2},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m(h)}),p.jsx("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:9999,background:"var(--bg-tertiary)",color:"var(--text-secondary)",whiteSpace:"nowrap",flexShrink:0},children:y(h.timestamp)})]}),h.agentId&&p.jsx("span",{style:{fontSize:11,color:"var(--text-secondary)"},children:h.agentId})]},`${h.agentId??"main"}-${h.sessionId}`)})]})]}),p.jsxs("div",{className:"sidebar-footer",children:[i===!1&&p.jsx("div",{style:{margin:"0 12px 8px",padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:"Claude not authenticated"}),p.jsxs("button",{className:"sidebar-item",onClick:()=>d(!f),children:[f?p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"5"}),p.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),p.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),p.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),p.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),p.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),p.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),p.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),p.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),f?"Light Mode":"Dark Mode"]}),p.jsxs("button",{className:"sidebar-item",onClick:()=>{},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"10"}),p.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),p.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),"Support"]})]})]})}function B0(){const[l,i]=w.useState({running:!1,tunnelUrl:null}),[r,u]=w.useState({callBaseUrl:""}),[c,f]=w.useState(null),[d,y]=w.useState(null),[m,h]=w.useState(!1);w.useEffect(()=>{const v=()=>{Ce("/api/twilio/status").then(i).catch(()=>{}),Ce("/api/browser-call/status").then(u).catch(()=>{})};v();const S=setInterval(v,5e3);return()=>clearInterval(S)},[]),w.useEffect(()=>{Ce("/api/auth").then(v=>f(v.authenticated)).catch(()=>f(!1))},[]),w.useEffect(()=>{Ce("/api/version").then(y).catch(()=>{})},[]);const g=d?.updateAvailable&&!m;return p.jsxs("div",{style:{display:"flex",height:"100vh"},children:[p.jsx(L0,{twilioStatus:l,authStatus:c}),p.jsxs("div",{className:"main",style:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden"},children:[g&&p.jsxs("div",{style:{padding:"8px 16px",background:"var(--bg-surface)",borderBottom:"1px solid var(--border-color)",fontSize:12,color:"var(--text-secondary)",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[p.jsxs("span",{children:["Update available: ",p.jsxs("strong",{style:{color:"var(--text-primary)"},children:["v",d.latest]})," (current: v",d.current,"). Run ",p.jsx("code",{style:{background:"var(--bg-main)",padding:"1px 5px",fontFamily:'"SF Mono", "Fira Code", monospace',fontSize:11,color:"var(--accent-color)"},children:"npm update -g voicecc"})," to update."]}),p.jsx("button",{onClick:()=>h(!0),style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",fontSize:14,padding:"0 4px",lineHeight:1},children:"x"})]}),p.jsx(W1,{context:{authStatus:c,setAuthStatus:f,browserCallStatus:r}})]})]})}const U0={display:"flex",gap:0,marginBottom:20,borderBottom:"1px solid var(--border-color)"},Sm=l=>({padding:"8px 16px",fontSize:13,fontWeight:l?600:400,color:l?"var(--text-primary)":"var(--text-secondary)",background:"none",border:"none",borderBottom:l?"2px solid var(--accent-color)":"2px solid transparent",cursor:"pointer",marginBottom:-1}),H0={fontSize:12,color:"var(--text-secondary)",background:"color-mix(in srgb, var(--warning-color, #f59e0b) 8%, transparent)",border:"1px solid color-mix(in srgb, var(--warning-color, #f59e0b) 20%, transparent)",padding:"8px 12px",borderRadius:6,marginTop:12,lineHeight:1.5},Em={width:"100%",padding:"8px 10px",fontSize:13,fontFamily:'"SF Mono", "Fira Code", monospace',background:"var(--bg-main)",border:"1px solid var(--border-color)",color:"var(--text-primary)",boxSizing:"border-box"},ic={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},rc={background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,padding:"8px 16px",fontSize:13,fontWeight:500,fontFamily:"inherit",cursor:"pointer",transition:"all 0.2s"},uc={background:"var(--btn-secondary-bg)",color:"var(--btn-secondary-text)",border:"1px solid var(--btn-secondary-border)",borderRadius:0,padding:"8px 16px",fontSize:13,fontWeight:500,fontFamily:"inherit",cursor:"pointer",transition:"all 0.2s"},q0={fontSize:10,fontWeight:600,color:"var(--accent-color)",background:"color-mix(in srgb, var(--accent-color) 12%, transparent)",padding:"2px 6px",borderRadius:4,marginLeft:6,verticalAlign:"middle"};function Dg({onClose:l,onAuthenticated:i}){const[r,u]=w.useState("oauth"),[c,f]=w.useState(null),[d,y]=w.useState(""),[m,h]=w.useState(!1),[g,v]=w.useState(!1),[S,b]=w.useState(null),[R,A]=w.useState(""),[z,k]=w.useState(!1),[D,_]=w.useState(null),I=V=>{V.target===V.currentTarget&&l()},W=async()=>{h(!0),b(null),f(null),y("");try{const V=await lt("/api/auth/oauth/start");f(V.url)}catch(V){b(V?.message||"Failed to start login")}h(!1)},B=async()=>{const V=d.trim();if(V){v(!0),b(null);try{(await lt("/api/auth/oauth/code",{code:V})).authenticated?(i(),l()):b("Login completed but authentication check failed. Try again.")}catch(ee){b(ee?.message||"Failed to complete login")}v(!1)}},Q=async()=>{const V=R.trim();if(V){k(!0),_(null);try{(await lt("/api/auth/token",{token:V})).authenticated?(i(),l()):_("Token was saved but authentication failed. Check that the token is valid.")}catch(ee){_(ee?.message||"Failed to save token")}k(!1)}};return p.jsx("div",{className:"modal-overlay visible",onClick:I,children:p.jsxs("div",{className:"modal",style:{width:520},children:[p.jsx("button",{className:"modal-close",onClick:l,children:"×"}),p.jsx("h2",{children:"Authenticate with Claude"}),p.jsxs("div",{style:U0,children:[p.jsxs("button",{style:Sm(r==="oauth"),onClick:()=>u("oauth"),children:["Login with Claude",p.jsx("span",{style:q0,children:"recommended"})]}),p.jsx("button",{style:Sm(r==="token"),onClick:()=>u("token"),children:"Setup Token"})]}),r==="oauth"&&p.jsxs("div",{children:[!c&&!m&&p.jsxs("div",{children:[p.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)",lineHeight:1.6},children:p.jsx("p",{style:{marginBottom:12},children:"Sign in with your Claude account. This authenticates the CLI directly, enabling all features including cloud integrations like Gmail, Google Calendar, and Slack."})}),p.jsxs("div",{style:ic,children:[p.jsx("button",{style:uc,onClick:l,children:"Cancel"}),p.jsx("button",{style:rc,onClick:W,children:"Start login"})]})]}),!c&&m&&p.jsxs("div",{style:{textAlign:"center",padding:"24px 0"},children:[p.jsx("div",{style:{display:"inline-block",width:20,height:20,border:"2px solid var(--border-color)",borderTopColor:"var(--accent-color)",borderRadius:"50%",animation:"spin 0.8s linear infinite",marginBottom:12}}),p.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Preparing login session..."}),p.jsx("p",{style:{fontSize:11,color:"var(--text-secondary)",marginTop:4,opacity:.7},children:"Starting CLI, accepting prompts, navigating to login"})]}),c&&p.jsxs("div",{children:[p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)",lineHeight:1.6},children:[p.jsx("p",{style:{marginBottom:12},children:"Open this URL in your browser and sign in:"}),p.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:{display:"block",background:"var(--bg-main)",border:"1px solid var(--border-color)",padding:"8px 12px",fontFamily:'"SF Mono", "Fira Code", monospace',fontSize:11,color:"var(--accent-color)",marginBottom:12,wordBreak:"break-all",textDecoration:"none"},children:c}),p.jsx("p",{style:{fontSize:11,color:"var(--text-secondary)",marginBottom:16},children:"Click the link to open it in your browser. After signing in, paste the code below."})]}),p.jsx("input",{type:"text",placeholder:"Paste the code here...",value:d,onChange:V=>y(V.target.value),onKeyDown:V=>{V.key==="Enter"&&B()},style:Em,autoFocus:!0}),p.jsxs("div",{style:ic,children:[p.jsx("button",{style:uc,onClick:l,children:"Cancel"}),p.jsx("button",{style:rc,onClick:B,disabled:g||!d.trim(),children:g?p.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[p.jsx("span",{style:{display:"inline-block",width:12,height:12,border:"2px solid rgba(255,255,255,0.3)",borderTopColor:"#fff",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),"Authenticating..."]}):"Submit code"})]})]}),S&&p.jsx("p",{style:{fontSize:12,color:"#d73a49",marginTop:8},children:S})]}),r==="token"&&p.jsxs("div",{children:[p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16,lineHeight:1.5},children:[p.jsx("p",{style:{marginBottom:12},children:"Run the following command in your terminal to generate a token:"}),p.jsx("code",{style:{display:"block",background:"var(--bg-main)",border:"1px solid var(--border-color)",padding:"8px 12px",fontFamily:'"SF Mono", "Fira Code", monospace',fontSize:12,color:"var(--accent-color)",marginBottom:12},children:"claude setup-token"}),p.jsx("p",{children:"Complete the sign-in in your browser, then paste the token below."})]}),p.jsx("input",{type:"password",placeholder:"sk-ant-oat01-...",value:R,onChange:V=>A(V.target.value),onKeyDown:V=>{V.key==="Enter"&&Q()},style:Em}),p.jsx("div",{style:H0,children:'Cloud MCP servers (Gmail, Google Calendar, Slack, etc.) will not be available with this method. Use "Login with Claude" for full integration support.'}),D&&p.jsx("p",{style:{fontSize:12,color:"#d73a49",marginTop:8},children:D}),p.jsxs("div",{style:ic,children:[p.jsx("button",{style:uc,onClick:l,children:"Cancel"}),p.jsx("button",{style:rc,onClick:Q,disabled:z||!R.trim(),children:z?"Saving...":"Save token"})]})]})]})})}function Y0(){const{authStatus:l,setAuthStatus:i}=Tg(),[r,u]=w.useState(null),[c,f]=w.useState(null),[d,y]=w.useState(null),[m,h]=w.useState(!1),[g,v]=w.useState(null);return w.useEffect(()=>{Ce("/api/agents").then(u).catch(()=>u([])),Ce("/api/twilio/status").then(f).catch(()=>f({running:!1,tunnelUrl:null})),Ce("/api/mcp-servers").then(S=>y(S.servers)).catch(()=>y([])),Ce("/api/providers/elevenlabs/validate").then(S=>v(S.status)).catch(()=>v("missing"))},[]),p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column"},children:[p.jsx("div",{className:"page-header",style:{padding:"48px 64px 24px"},children:p.jsxs("div",{children:[p.jsx("h1",{children:"Getting started"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Set up your environment to get started."})]})}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"0 64px 48px"},children:[l!==!0&&p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Connect your Claude Code"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"VoiceCC needs an authenticated Claude Code session to work. The check below verifies your local CLI is logged in."}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:l===null?"#666":"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:l===null?"var(--text-secondary)":"#d73a49"},children:l===null?"Checking authentication...":"Claude Code is not authenticated"})]}),l===!1&&p.jsx("div",{className:"settings-actions",children:p.jsx("button",{onClick:()=>h(!0),children:"Set up authentication"})})]}),m&&p.jsx(Dg,{onClose:()=>h(!1),onAuthenticated:()=>i(!0)}),g!=="valid"&&p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Set up ElevenLabs"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"An ElevenLabs API key is required for text-to-speech and speech-to-text. Add your key in the Voice settings."}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:g===null?"#666":"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:g===null?"var(--text-secondary)":"#d73a49"},children:g===null?"Checking ElevenLabs API key...":"ElevenLabs API key is not configured"})]}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=voice",style:{textDecoration:"none"},children:p.jsx("button",{children:"Configure in Voice Settings"})})})]}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Your Voice Agents"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Create and manage your voice agents."}),r===null&&p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#666",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Checking..."})]}),r!==null&&r.length===0&&p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/agents",style:{textDecoration:"none"},children:p.jsx("button",{children:"Create Agent"})})}),r!==null&&r.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:r.map(S=>p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:S.enabled?"var(--accent-color)":"#666",flexShrink:0}}),p.jsx(_t,{to:`/agents/${S.id}`,style:{fontSize:13,color:"var(--text-primary)",textDecoration:"none"},children:S.id})]},S.id))}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/agents",style:{textDecoration:"none"},children:p.jsx("button",{children:"Manage Agents"})})})]})]}),c!==null&&!c.running&&p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Call your agents over the phone"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Connect a Twilio phone number to call your voice agents from any phone. Requires a Twilio account and a purchased phone number."}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=integrations",style:{textDecoration:"none"},children:p.jsx("button",{children:"Set up Twilio"})})})]}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"MCP Integrations"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Connect external tools and services via MCP servers."}),d===null&&p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#666",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Checking..."})]}),d!==null&&d.length===0&&p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=integrations",style:{textDecoration:"none"},children:p.jsx("button",{children:"Set up in Settings"})})}),d!==null&&d.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:d.map(S=>p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:S.status==="connected"?"var(--accent-color)":S.status==="needs_auth"?"#d29922":"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:"var(--text-primary)"},children:S.name})]},S.name))}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=integrations",style:{textDecoration:"none"},children:p.jsx("button",{children:"Add more in Settings"})})})]})]})]})]})}const V0=5e3;function I0({twilioRunning:l}){const[i,r]=w.useState(""),[u,c]=w.useState(""),[f,d]=w.useState(""),[y,m]=w.useState(!1),[h,g]=w.useState({running:!1,url:null}),[v,S]=w.useState(!1),[b,R]=w.useState(""),[A,z]=w.useState(null),[k,D]=w.useState(!1),[_,I]=w.useState(!1),W=w.useCallback(()=>{Ce("/api/auth").then(z).catch(()=>z(null))},[]);w.useEffect(()=>{Ce("/api/settings").then(V=>{r(V.MAX_CONCURRENT_SESSIONS||""),c(V.USER_PHONE_NUMBER||"")}).catch(()=>d("Error loading settings")),W()},[W]),w.useEffect(()=>{const V=()=>{Ce("/api/tunnel/status").then(g).catch(()=>{})};V();const ee=setInterval(V,V0);return()=>clearInterval(ee)},[]);const B=w.useCallback(async()=>{m(!0),d("Saving...");try{await lt("/api/settings",{MAX_CONCURRENT_SESSIONS:i,USER_PHONE_NUMBER:u}),d("Saved!"),setTimeout(()=>d(V=>V==="Saved!"?"":V),2e3)}catch{d("Error saving settings")}m(!1)},[i,u]),Q=w.useCallback(async()=>{S(!0),R("");try{h.running?await lt("/api/tunnel/stop"):await lt("/api/tunnel/start");const V=await Ce("/api/tunnel/status");g(V)}catch(V){const ee=V instanceof Error?V.message:V?.message||"Failed";R(ee),setTimeout(()=>R(""),5e3)}finally{S(!1)}},[h.running]);return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"page-header",style:{borderBottom:"none",padding:0,marginBottom:24},children:p.jsxs("div",{children:[p.jsx("h1",{children:"General Settings"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Manage your workspace settings and core behavior."})]})}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Authentication"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Claude Code authentication status for this server."}),A===null&&p.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Checking..."}),A&&!A.authenticated&&p.jsxs("div",{children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:"Not authenticated"})]}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16},children:"Claude Code is not logged in. Sign in to enable voice sessions."}),p.jsx("button",{onClick:()=>D(!0),style:{background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,padding:"8px 16px",fontSize:13,fontWeight:500,fontFamily:"inherit",cursor:"pointer",transition:"all 0.2s"},children:"Sign in"})]}),A&&A.authenticated&&p.jsxs("div",{children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#22c55e",flexShrink:0}}),p.jsxs("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:["Authenticated",A.authMethod==="claude.ai"&&p.jsx("span",{style:{fontSize:11,fontWeight:600,color:"var(--accent-color)",background:"color-mix(in srgb, var(--accent-color) 12%, transparent)",padding:"2px 6px",borderRadius:4,marginLeft:8},children:"Claude.ai OAuth"}),A.authMethod!=="claude.ai"&&A.authMethod!=="none"&&p.jsx("span",{style:{fontSize:11,fontWeight:600,color:"var(--text-secondary)",background:"color-mix(in srgb, var(--text-secondary) 12%, transparent)",padding:"2px 6px",borderRadius:4,marginLeft:8},children:A.authMethod})]})]}),A.email&&p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:8},children:A.email}),A.authMethod!=="claude.ai"&&p.jsxs("div",{style:{fontSize:12,color:"var(--text-secondary)",background:"color-mix(in srgb, var(--warning-color, #f59e0b) 8%, transparent)",border:"1px solid color-mix(in srgb, var(--warning-color, #f59e0b) 20%, transparent)",padding:"8px 12px",borderRadius:6,marginTop:8,lineHeight:1.5},children:["Authenticated via token. Cloud MCP servers (Gmail, Google Calendar, Slack, etc.) are not available with this method."," ",p.jsx("button",{onClick:()=>D(!0),style:{background:"none",border:"none",color:"var(--accent-color)",cursor:"pointer",padding:0,fontSize:12,fontWeight:600,textDecoration:"underline"},children:"Switch to Claude.ai login"})]}),p.jsx("button",{disabled:_,onClick:async()=>{I(!0);try{const V=await lt("/api/auth/logout");z(V)}catch{W()}finally{I(!1)}},style:{marginTop:16,background:"none",border:"1px solid var(--border-color)",color:"var(--text-secondary)",cursor:_?"wait":"pointer",padding:"6px 14px",fontSize:13},children:_?"Logging out...":"Log out"})]})]}),k&&p.jsx(Dg,{onClose:()=>D(!1),onAuthenticated:()=>{D(!1),W()}}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Public Tunnel"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Exposes your voice server via a Cloudflare tunnel. Required if you want to access VoiceCC on a remote server, and/or want to make use of phone calling."}),p.jsx("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12},children:p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:v?"wait":"pointer"},children:[p.jsx("input",{type:"checkbox",checked:h.running,disabled:v,onChange:Q,style:{width:16,height:16,cursor:v?"wait":"pointer"}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:v?h.running?"Stopping...":"Starting...":h.running?"Enabled":"Disabled"})]})}),h.running&&h.url&&p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)"},children:["URL: ",p.jsx("code",{style:{userSelect:"all",cursor:"text"},children:h.url})]}),b&&p.jsx("div",{style:{color:"#d73a49",marginTop:8,fontSize:12},children:b})]}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"General Options"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Configure the core behavior of your voice assistant instance."}),p.jsxs("div",{className:"settings-row",children:[p.jsx("label",{htmlFor:"setting-max-sessions",style:{fontWeight:500,color:"var(--text-primary)"},children:"Max Concurrent Sessions"}),p.jsx("input",{type:"text",id:"setting-max-sessions",placeholder:"2",value:i,onChange:V=>r(V.target.value)})]}),p.jsxs("div",{className:"settings-row",children:[p.jsx("label",{htmlFor:"setting-user-phone",style:{fontWeight:500,color:"var(--text-primary)"},children:"Your Phone Number"}),p.jsx("input",{type:"text",id:"setting-user-phone",placeholder:"+15551234567",value:u,onChange:V=>c(V.target.value)})]}),p.jsxs("div",{className:"settings-actions",style:{marginTop:20},children:[p.jsx("button",{disabled:y,onClick:B,children:"Save changes"}),p.jsx("span",{className:"settings-status",children:f})]})]})]})}const G0="eleven_turbo_v2_5",Q0="scribe_v1";async function X0(){return Ce("/api/providers/tts")}async function Z0(){return Ce("/api/providers/stt")}async function K0(){return Ce("/api/settings")}function F0({status:l}){let i,r,u;return l.ready?(i="Ready",r="rgba(34, 197, 94, 0.15)",u="#22c55e"):l.reason==="missing_api_key"?(i="Missing API Key",r="rgba(239, 68, 68, 0.15)",u="#ef4444"):(i="Unknown",r="rgba(156, 163, 175, 0.15)",u="#9ca3af"),p.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:"4px",fontSize:"11px",fontWeight:600,background:r,color:u},children:i})}function Cm({provider:l,selected:i,onSelect:r,onAction:u,actionLabel:c,actionDisabled:f}){const d=!l.status.ready;return p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 12px",border:i?"1px solid var(--btn-primary-bg)":"1px solid var(--border-color)",borderRadius:"4px",background:i?"rgba(59, 130, 246, 0.05)":"var(--bg-main)",cursor:d?"default":"pointer",transition:"all 0.15s ease"},onClick:d?void 0:r,children:[p.jsx("input",{type:"radio",checked:i,disabled:d,onChange:d?void 0:r,style:{margin:0,cursor:d?"default":"pointer"}}),p.jsxs("div",{style:{flex:1,minWidth:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[p.jsx("span",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-primary)"},children:l.name}),p.jsx(F0,{status:l.status})]}),p.jsx("div",{style:{fontSize:"12px",color:"var(--text-secondary)",marginTop:"2px"},children:l.description})]}),u&&c&&p.jsx("button",{disabled:f,onClick:y=>{y.stopPropagation(),u()},style:{padding:"4px 12px",fontSize:"12px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:"4px",cursor:f?"default":"pointer",opacity:f?.6:1},children:c})]})}const Eu={marginBottom:14},Cu={display:"block",fontSize:12,fontWeight:500,color:"var(--text-primary)",marginBottom:4},Tu={width:"100%",boxSizing:"border-box"},Lg={display:"flex",justifyContent:"flex-end",gap:8,marginTop:8},Bg={padding:"6px 16px",fontSize:"13px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:"4px",cursor:"pointer"},Ug={padding:"6px 16px",fontSize:"13px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:"4px",cursor:"pointer"};function J0({apiKey:l,modelId:i,onSave:r,onClose:u}){const[c,f]=w.useState(l),d=()=>{r({apiKey:c}),u()};return p.jsx("div",{className:"modal-overlay visible",onClick:y=>{y.target===y.currentTarget&&u()},children:p.jsxs("div",{className:"modal",style:{width:480},children:[p.jsx("button",{className:"modal-close",onClick:u,children:"×"}),p.jsx("h2",{children:"ElevenLabs TTS"}),p.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginBottom:16},children:"Configure API key for ElevenLabs text-to-speech."}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"API Key"}),p.jsx("input",{type:"password",value:c,onChange:y=>f(y.target.value),placeholder:"Enter your ElevenLabs API key",style:Tu})]}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"TTS Model ID"}),p.jsx("input",{type:"text",value:i,disabled:!0,style:{...Tu,opacity:.5,cursor:"not-allowed"}})]}),p.jsxs("div",{style:Lg,children:[p.jsx("button",{onClick:u,style:Bg,children:"Cancel"}),p.jsx("button",{onClick:d,style:Ug,children:"Apply"})]})]})})}function P0({apiKey:l,sttModelId:i,onSave:r,onClose:u}){const[c,f]=w.useState(l),d=()=>{r({apiKey:c}),u()};return p.jsx("div",{className:"modal-overlay visible",onClick:y=>{y.target===y.currentTarget&&u()},children:p.jsxs("div",{className:"modal",style:{width:480},children:[p.jsx("button",{className:"modal-close",onClick:u,children:"×"}),p.jsx("h2",{children:"ElevenLabs STT"}),p.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginBottom:16},children:"Configure API key for ElevenLabs speech-to-text."}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"API Key"}),p.jsx("input",{type:"password",value:c,onChange:y=>f(y.target.value),placeholder:"Enter your ElevenLabs API key",style:Tu})]}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"STT Model ID"}),p.jsx("input",{type:"text",value:i,disabled:!0,style:{...Tu,opacity:.5,cursor:"not-allowed"}})]}),p.jsxs("div",{style:Lg,children:[p.jsx("button",{onClick:u,style:Bg,children:"Cancel"}),p.jsx("button",{onClick:d,style:Ug,children:"Apply"})]})]})})}function $0(){const[l,i]=w.useState([]),[r,u]=w.useState([]),[c,f]=w.useState("elevenlabs"),[d,y]=w.useState("elevenlabs"),[m,h]=w.useState(""),[g,v]=w.useState(G0),[S,b]=w.useState(Q0),[R,A]=w.useState(null),z=w.useCallback(async I=>{try{await lt("/api/settings",I)}catch{}},[]);w.useEffect(()=>{X0().then(I=>{i(I.providers),f(I.active)}).catch(()=>{}),Z0().then(I=>{u(I.providers),y(I.active)}).catch(()=>{}),K0().then(I=>{I.ELEVENLABS_API_KEY&&h(I.ELEVENLABS_API_KEY),I.ELEVENLABS_MODEL_ID&&v(I.ELEVENLABS_MODEL_ID),I.ELEVENLABS_STT_MODEL_ID&&b(I.ELEVENLABS_STT_MODEL_ID)}).catch(()=>{})},[]);const k=w.useCallback(I=>{f(I),z({TTS_PROVIDER:I})},[z]),D=w.useCallback(I=>{y(I),z({STT_PROVIDER:I})},[z]),_=(I,W,B)=>{const Q=B==="tts"?"elevenlabs-tts":"elevenlabs-stt";return{label:"Configure",onAction:()=>A({kind:Q})}};return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"page-header",style:{borderBottom:"none",padding:0,marginBottom:24},children:p.jsxs("div",{children:[p.jsx("h1",{children:"Voice Providers"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Select and configure TTS and STT providers. Changes take effect on the next voice session."})]})}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24},children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"TTS Provider"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16},children:"Choose which text-to-speech engine to use."}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:l.map(I=>{const W=_(I.type,I.status,"tts");return p.jsx(Cm,{provider:I,selected:c===I.type,onSelect:()=>k(I.type),onAction:W.onAction,actionLabel:W.label},I.type)})})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24},children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"STT Provider"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16},children:"Choose which speech-to-text engine to use."}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map(I=>{const W=_(I.type,I.status,"stt");return p.jsx(Cm,{provider:I,selected:d===I.type,onSelect:()=>D(I.type),onAction:W.onAction,actionLabel:W.label},I.type)})})]}),R?.kind==="elevenlabs-tts"&&p.jsx(J0,{apiKey:m,modelId:g,onSave:I=>{h(I.apiKey),z({ELEVENLABS_API_KEY:I.apiKey})},onClose:()=>A(null)}),R?.kind==="elevenlabs-stt"&&p.jsx(P0,{apiKey:m,sttModelId:S,onSave:I=>{h(I.apiKey),z({ELEVENLABS_API_KEY:I.apiKey})},onClose:()=>A(null)})]})}function W0({onClose:l}){const[i,r]=w.useState(""),[u,c]=w.useState(""),[f,d]=w.useState(null),[y,m]=w.useState(""),[h,g]=w.useState(!1),[v,S]=w.useState(!1),[b,R]=w.useState(""),[A,z]=w.useState(""),[k,D]=w.useState([]),[_,I]=w.useState(""),[W,B]=w.useState(!1),Q=w.useCallback(async()=>{B(!0);try{const P=await Ce("/api/twilio/phone-numbers");D(P.numbers)}catch{D([])}finally{B(!1)}},[]);w.useEffect(()=>{Ce("/api/settings").then(F=>{F.TWILIO_ACCOUNT_SID&&r(F.TWILIO_ACCOUNT_SID),F.TWILIO_AUTH_TOKEN&&c(F.TWILIO_AUTH_TOKEN),F.USER_PHONE_NUMBER&&R(F.USER_PHONE_NUMBER),F.TWILIO_PHONE_NUMBER&&I(F.TWILIO_PHONE_NUMBER)}).catch(()=>{}),Ce("/api/integrations").then(F=>g(F.twilio.enabled)).catch(()=>{}),V();const P=setInterval(V,5e3);return()=>clearInterval(P)},[]),w.useEffect(()=>{i.trim()&&u.trim()&&Q()},[i,u,Q]);const V=()=>{Ce("/api/twilio/status").then(d).catch(()=>{})},ee=w.useCallback(async(P,F)=>{try{return await lt("/api/settings",{[P]:F}),h&&(await lt("/api/integrations/twilio",{enabled:!1}),await lt("/api/integrations/twilio",{enabled:!0}),V()),!0}catch{return!1}},[h]),oe=w.useCallback(async()=>{const P=!h;S(!0);try{await lt("/api/integrations/twilio",{enabled:P}),g(P),V()}catch(F){const U=F instanceof Error?F.message:F?.message||"Failed";m(U),setTimeout(()=>m(""),4e3)}finally{S(!1)}},[h]),ne=P=>{P.target===P.currentTarget&&l()},re=f?.running??!1,he=!!(i.trim()&&u.trim()&&b.trim()&&_.trim());return p.jsx("div",{className:"modal-overlay visible",onClick:ne,children:p.jsxs("div",{className:"modal",children:[p.jsx("button",{className:"modal-close",onClick:l,children:"×"}),p.jsx("h2",{children:"Twilio Voice Setup"}),p.jsx("div",{className:"setup-warning-banner",children:"For now, only Twilio Trial Accounts are supported. Non-trial accounts might work but have not been tested."}),p.jsx("div",{className:"setup-warning-banner",children:"Read thoroughly! Twilio requires many steps and it is easy to miss something."}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"1"}),"Create a Twilio account"]}),p.jsxs("div",{className:"setup-step-desc",children:["Sign up at ",p.jsx("a",{href:"https://www.twilio.com/try-twilio",target:"_blank",rel:"noreferrer",children:"twilio.com/try-twilio"}),". Copy your Account SID and Auth Token from the ",p.jsx("a",{href:"https://console.twilio.com/",target:"_blank",rel:"noreferrer",children:"console dashboard"}),"."]}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsx("input",{type:"text",placeholder:"Account SID (ACxxxxxxxx...)",value:i,onChange:P=>r(P.target.value)}),p.jsx(hu,{onClick:()=>ee("TWILIO_ACCOUNT_SID",i.trim())})]}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsx("input",{type:"text",placeholder:"Auth Token",value:u,onChange:P=>c(P.target.value)}),p.jsx(hu,{onClick:()=>ee("TWILIO_AUTH_TOKEN",u.trim())})]})]}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"2"}),"Get a phone number"]}),p.jsxs("div",{className:"setup-step-desc",children:["In the Twilio console, go to ",p.jsx("strong",{children:"Phone Numbers"})," → ",p.jsx("strong",{children:"Buy a Number"}),". Pick any number with voice capability. Then select it below."]}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsxs("select",{value:_,onChange:P=>I(P.target.value),disabled:!i.trim()||!u.trim(),style:{flex:1},children:[p.jsx("option",{value:"",children:!i.trim()||!u.trim()?"Enter credentials first":W?"Loading...":k.length===0?"No numbers found":"Select a phone number"}),k.map(P=>p.jsxs("option",{value:P.phoneNumber,children:[P.phoneNumber," (",P.friendlyName,")"]},P.phoneNumber))]}),p.jsx("button",{onClick:Q,disabled:!i.trim()||!u.trim()||W,title:"Refresh phone numbers",style:{minWidth:"auto",padding:"6px 10px"},children:W?"...":"Refresh"}),p.jsx(hu,{onClick:()=>ee("TWILIO_PHONE_NUMBER",_)})]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"3"}),"Add your personal phone number to Twilio"]}),p.jsxs("div",{className:"setup-step-desc",children:["Add your personal phone number as a verified caller in the Twilio console at"," ",p.jsx("a",{href:"https://console.twilio.com/us1/develop/phone-numbers/manage/verified",target:"_blank",rel:"noreferrer",children:"Verified Caller IDs"}),". This is required for Twilio to be able to call your phone."]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"4"}),"Enter your personal phone number"]}),p.jsx("div",{className:"setup-step-desc",children:"Enter the same phone number you verified on Twilio in the previous step."}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsx("input",{type:"tel",placeholder:"+1234567890",value:b,onChange:P=>R(P.target.value)}),p.jsx(hu,{onClick:()=>ee("USER_PHONE_NUMBER",b.trim())})]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"5"}),re?"Server running":"Enable integration"]}),p.jsxs("div",{className:"setup-step-desc",children:[re?p.jsxs(p.Fragment,{children:["Server is running.",f?.tunnelUrl&&p.jsxs(p.Fragment,{children:[" Tunnel URL: ",p.jsx("code",{children:f.tunnelUrl})]})]}):he?"Enable to start the Twilio server and auto-start on boot.":"Complete all previous steps before enabling.",y&&p.jsx("div",{style:{color:"#d73a49",marginTop:4,fontSize:12},children:y})]}),p.jsx("div",{className:"setup-paste-row",children:p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:v||!he?"not-allowed":"pointer"},children:[p.jsx("input",{type:"checkbox",checked:h,disabled:v||!h&&!he,onChange:oe,style:{width:16,height:16,cursor:v||!he?"not-allowed":"pointer"}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:v?h?"Stopping...":"Starting...":"Enabled"})]})})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"6"}),"Test your setup"]}),p.jsxs("div",{className:"setup-step-desc",children:["We'll call your personal phone number with a test message.",A&&p.jsx("div",{style:{color:A.startsWith("Error")?"#d73a49":"#2ea043",marginTop:4,fontSize:12},children:A})]}),p.jsx("div",{className:"setup-paste-row",children:p.jsx("button",{disabled:!h||!b.trim()||A==="Calling...",onClick:async()=>{z("Calling...");try{await lt("/api/twilio/test-call",{to:b.trim()}),z('Success! Go to an agent and click "Call via Phone"!')}catch(P){const F=P instanceof Error?P.message:P?.message||"Failed";z(`Error: ${F}`)}setTimeout(()=>z(""),6e3)},children:"Test Call"})})]})]})})}function hu({onClick:l}){const[i,r]=w.useState("Apply"),[u,c]=w.useState(!1),f=async()=>{r("Saving...");const d=await l();r(d?"Saved":"Error"),c(d),setTimeout(()=>{r("Apply"),c(!1)},1500)};return p.jsx("button",{className:u?"applied":"",onClick:f,children:i})}var eb=Object.defineProperty,wu=Object.getOwnPropertySymbols,Hg=Object.prototype.hasOwnProperty,qg=Object.prototype.propertyIsEnumerable,Tm=(l,i,r)=>i in l?eb(l,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[i]=r,Ac=(l,i)=>{for(var r in i||(i={}))Hg.call(i,r)&&Tm(l,r,i[r]);if(wu)for(var r of wu(i))qg.call(i,r)&&Tm(l,r,i[r]);return l},zc=(l,i)=>{var r={};for(var u in l)Hg.call(l,u)&&i.indexOf(u)<0&&(r[u]=l[u]);if(l!=null&&wu)for(var u of wu(l))i.indexOf(u)<0&&qg.call(l,u)&&(r[u]=l[u]);return r};var Bl;(l=>{const i=class Ae{constructor(m,h,g,v){if(this.version=m,this.errorCorrectionLevel=h,this.modules=[],this.isFunction=[],m<Ae.MIN_VERSION||m>Ae.MAX_VERSION)throw new RangeError("Version value out of range");if(v<-1||v>7)throw new RangeError("Mask value out of range");this.size=m*4+17;let S=[];for(let R=0;R<this.size;R++)S.push(!1);for(let R=0;R<this.size;R++)this.modules.push(S.slice()),this.isFunction.push(S.slice());this.drawFunctionPatterns();const b=this.addEccAndInterleave(g);if(this.drawCodewords(b),v==-1){let R=1e9;for(let A=0;A<8;A++){this.applyMask(A),this.drawFormatBits(A);const z=this.getPenaltyScore();z<R&&(v=A,R=z),this.applyMask(A)}}c(0<=v&&v<=7),this.mask=v,this.applyMask(v),this.drawFormatBits(v),this.isFunction=[]}static encodeText(m,h){const g=l.QrSegment.makeSegments(m);return Ae.encodeSegments(g,h)}static encodeBinary(m,h){const g=l.QrSegment.makeBytes(m);return Ae.encodeSegments([g],h)}static encodeSegments(m,h,g=1,v=40,S=-1,b=!0){if(!(Ae.MIN_VERSION<=g&&g<=v&&v<=Ae.MAX_VERSION)||S<-1||S>7)throw new RangeError("Invalid value");let R,A;for(R=g;;R++){const _=Ae.getNumDataCodewords(R,h)*8,I=d.getTotalBits(m,R);if(I<=_){A=I;break}if(R>=v)throw new RangeError("Data too long")}for(const _ of[Ae.Ecc.MEDIUM,Ae.Ecc.QUARTILE,Ae.Ecc.HIGH])b&&A<=Ae.getNumDataCodewords(R,_)*8&&(h=_);let z=[];for(const _ of m){r(_.mode.modeBits,4,z),r(_.numChars,_.mode.numCharCountBits(R),z);for(const I of _.getData())z.push(I)}c(z.length==A);const k=Ae.getNumDataCodewords(R,h)*8;c(z.length<=k),r(0,Math.min(4,k-z.length),z),r(0,(8-z.length%8)%8,z),c(z.length%8==0);for(let _=236;z.length<k;_^=253)r(_,8,z);let D=[];for(;D.length*8<z.length;)D.push(0);return z.forEach((_,I)=>D[I>>>3]|=_<<7-(I&7)),new Ae(R,h,D,S)}getModule(m,h){return 0<=m&&m<this.size&&0<=h&&h<this.size&&this.modules[h][m]}getModules(){return this.modules}drawFunctionPatterns(){for(let g=0;g<this.size;g++)this.setFunctionModule(6,g,g%2==0),this.setFunctionModule(g,6,g%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const m=this.getAlignmentPatternPositions(),h=m.length;for(let g=0;g<h;g++)for(let v=0;v<h;v++)g==0&&v==0||g==0&&v==h-1||g==h-1&&v==0||this.drawAlignmentPattern(m[g],m[v]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(m){const h=this.errorCorrectionLevel.formatBits<<3|m;let g=h;for(let S=0;S<10;S++)g=g<<1^(g>>>9)*1335;const v=(h<<10|g)^21522;c(v>>>15==0);for(let S=0;S<=5;S++)this.setFunctionModule(8,S,u(v,S));this.setFunctionModule(8,7,u(v,6)),this.setFunctionModule(8,8,u(v,7)),this.setFunctionModule(7,8,u(v,8));for(let S=9;S<15;S++)this.setFunctionModule(14-S,8,u(v,S));for(let S=0;S<8;S++)this.setFunctionModule(this.size-1-S,8,u(v,S));for(let S=8;S<15;S++)this.setFunctionModule(8,this.size-15+S,u(v,S));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let m=this.version;for(let g=0;g<12;g++)m=m<<1^(m>>>11)*7973;const h=this.version<<12|m;c(h>>>18==0);for(let g=0;g<18;g++){const v=u(h,g),S=this.size-11+g%3,b=Math.floor(g/3);this.setFunctionModule(S,b,v),this.setFunctionModule(b,S,v)}}drawFinderPattern(m,h){for(let g=-4;g<=4;g++)for(let v=-4;v<=4;v++){const S=Math.max(Math.abs(v),Math.abs(g)),b=m+v,R=h+g;0<=b&&b<this.size&&0<=R&&R<this.size&&this.setFunctionModule(b,R,S!=2&&S!=4)}}drawAlignmentPattern(m,h){for(let g=-2;g<=2;g++)for(let v=-2;v<=2;v++)this.setFunctionModule(m+v,h+g,Math.max(Math.abs(v),Math.abs(g))!=1)}setFunctionModule(m,h,g){this.modules[h][m]=g,this.isFunction[h][m]=!0}addEccAndInterleave(m){const h=this.version,g=this.errorCorrectionLevel;if(m.length!=Ae.getNumDataCodewords(h,g))throw new RangeError("Invalid argument");const v=Ae.NUM_ERROR_CORRECTION_BLOCKS[g.ordinal][h],S=Ae.ECC_CODEWORDS_PER_BLOCK[g.ordinal][h],b=Math.floor(Ae.getNumRawDataModules(h)/8),R=v-b%v,A=Math.floor(b/v);let z=[];const k=Ae.reedSolomonComputeDivisor(S);for(let _=0,I=0;_<v;_++){let W=m.slice(I,I+A-S+(_<R?0:1));I+=W.length;const B=Ae.reedSolomonComputeRemainder(W,k);_<R&&W.push(0),z.push(W.concat(B))}let D=[];for(let _=0;_<z[0].length;_++)z.forEach((I,W)=>{(_!=A-S||W>=R)&&D.push(I[_])});return c(D.length==b),D}drawCodewords(m){if(m.length!=Math.floor(Ae.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let h=0;for(let g=this.size-1;g>=1;g-=2){g==6&&(g=5);for(let v=0;v<this.size;v++)for(let S=0;S<2;S++){const b=g-S,A=(g+1&2)==0?this.size-1-v:v;!this.isFunction[A][b]&&h<m.length*8&&(this.modules[A][b]=u(m[h>>>3],7-(h&7)),h++)}}c(h==m.length*8)}applyMask(m){if(m<0||m>7)throw new RangeError("Mask value out of range");for(let h=0;h<this.size;h++)for(let g=0;g<this.size;g++){let v;switch(m){case 0:v=(g+h)%2==0;break;case 1:v=h%2==0;break;case 2:v=g%3==0;break;case 3:v=(g+h)%3==0;break;case 4:v=(Math.floor(g/3)+Math.floor(h/2))%2==0;break;case 5:v=g*h%2+g*h%3==0;break;case 6:v=(g*h%2+g*h%3)%2==0;break;case 7:v=((g+h)%2+g*h%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[h][g]&&v&&(this.modules[h][g]=!this.modules[h][g])}}getPenaltyScore(){let m=0;for(let S=0;S<this.size;S++){let b=!1,R=0,A=[0,0,0,0,0,0,0];for(let z=0;z<this.size;z++)this.modules[S][z]==b?(R++,R==5?m+=Ae.PENALTY_N1:R>5&&m++):(this.finderPenaltyAddHistory(R,A),b||(m+=this.finderPenaltyCountPatterns(A)*Ae.PENALTY_N3),b=this.modules[S][z],R=1);m+=this.finderPenaltyTerminateAndCount(b,R,A)*Ae.PENALTY_N3}for(let S=0;S<this.size;S++){let b=!1,R=0,A=[0,0,0,0,0,0,0];for(let z=0;z<this.size;z++)this.modules[z][S]==b?(R++,R==5?m+=Ae.PENALTY_N1:R>5&&m++):(this.finderPenaltyAddHistory(R,A),b||(m+=this.finderPenaltyCountPatterns(A)*Ae.PENALTY_N3),b=this.modules[z][S],R=1);m+=this.finderPenaltyTerminateAndCount(b,R,A)*Ae.PENALTY_N3}for(let S=0;S<this.size-1;S++)for(let b=0;b<this.size-1;b++){const R=this.modules[S][b];R==this.modules[S][b+1]&&R==this.modules[S+1][b]&&R==this.modules[S+1][b+1]&&(m+=Ae.PENALTY_N2)}let h=0;for(const S of this.modules)h=S.reduce((b,R)=>b+(R?1:0),h);const g=this.size*this.size,v=Math.ceil(Math.abs(h*20-g*10)/g)-1;return c(0<=v&&v<=9),m+=v*Ae.PENALTY_N4,c(0<=m&&m<=2568888),m}getAlignmentPatternPositions(){if(this.version==1)return[];{const m=Math.floor(this.version/7)+2,h=this.version==32?26:Math.ceil((this.version*4+4)/(m*2-2))*2;let g=[6];for(let v=this.size-7;g.length<m;v-=h)g.splice(1,0,v);return g}}static getNumRawDataModules(m){if(m<Ae.MIN_VERSION||m>Ae.MAX_VERSION)throw new RangeError("Version number out of range");let h=(16*m+128)*m+64;if(m>=2){const g=Math.floor(m/7)+2;h-=(25*g-10)*g-55,m>=7&&(h-=36)}return c(208<=h&&h<=29648),h}static getNumDataCodewords(m,h){return Math.floor(Ae.getNumRawDataModules(m)/8)-Ae.ECC_CODEWORDS_PER_BLOCK[h.ordinal][m]*Ae.NUM_ERROR_CORRECTION_BLOCKS[h.ordinal][m]}static reedSolomonComputeDivisor(m){if(m<1||m>255)throw new RangeError("Degree out of range");let h=[];for(let v=0;v<m-1;v++)h.push(0);h.push(1);let g=1;for(let v=0;v<m;v++){for(let S=0;S<h.length;S++)h[S]=Ae.reedSolomonMultiply(h[S],g),S+1<h.length&&(h[S]^=h[S+1]);g=Ae.reedSolomonMultiply(g,2)}return h}static reedSolomonComputeRemainder(m,h){let g=h.map(v=>0);for(const v of m){const S=v^g.shift();g.push(0),h.forEach((b,R)=>g[R]^=Ae.reedSolomonMultiply(b,S))}return g}static reedSolomonMultiply(m,h){if(m>>>8||h>>>8)throw new RangeError("Byte out of range");let g=0;for(let v=7;v>=0;v--)g=g<<1^(g>>>7)*285,g^=(h>>>v&1)*m;return c(g>>>8==0),g}finderPenaltyCountPatterns(m){const h=m[1];c(h<=this.size*3);const g=h>0&&m[2]==h&&m[3]==h*3&&m[4]==h&&m[5]==h;return(g&&m[0]>=h*4&&m[6]>=h?1:0)+(g&&m[6]>=h*4&&m[0]>=h?1:0)}finderPenaltyTerminateAndCount(m,h,g){return m&&(this.finderPenaltyAddHistory(h,g),h=0),h+=this.size,this.finderPenaltyAddHistory(h,g),this.finderPenaltyCountPatterns(g)}finderPenaltyAddHistory(m,h){h[0]==0&&(m+=this.size),h.pop(),h.unshift(m)}};i.MIN_VERSION=1,i.MAX_VERSION=40,i.PENALTY_N1=3,i.PENALTY_N2=3,i.PENALTY_N3=40,i.PENALTY_N4=10,i.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],i.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],l.QrCode=i;function r(y,m,h){if(m<0||m>31||y>>>m)throw new RangeError("Value out of range");for(let g=m-1;g>=0;g--)h.push(y>>>g&1)}function u(y,m){return(y>>>m&1)!=0}function c(y){if(!y)throw new Error("Assertion error")}const f=class et{constructor(m,h,g){if(this.mode=m,this.numChars=h,this.bitData=g,h<0)throw new RangeError("Invalid argument");this.bitData=g.slice()}static makeBytes(m){let h=[];for(const g of m)r(g,8,h);return new et(et.Mode.BYTE,m.length,h)}static makeNumeric(m){if(!et.isNumeric(m))throw new RangeError("String contains non-numeric characters");let h=[];for(let g=0;g<m.length;){const v=Math.min(m.length-g,3);r(parseInt(m.substring(g,g+v),10),v*3+1,h),g+=v}return new et(et.Mode.NUMERIC,m.length,h)}static makeAlphanumeric(m){if(!et.isAlphanumeric(m))throw new RangeError("String contains unencodable characters in alphanumeric mode");let h=[],g;for(g=0;g+2<=m.length;g+=2){let v=et.ALPHANUMERIC_CHARSET.indexOf(m.charAt(g))*45;v+=et.ALPHANUMERIC_CHARSET.indexOf(m.charAt(g+1)),r(v,11,h)}return g<m.length&&r(et.ALPHANUMERIC_CHARSET.indexOf(m.charAt(g)),6,h),new et(et.Mode.ALPHANUMERIC,m.length,h)}static makeSegments(m){return m==""?[]:et.isNumeric(m)?[et.makeNumeric(m)]:et.isAlphanumeric(m)?[et.makeAlphanumeric(m)]:[et.makeBytes(et.toUtf8ByteArray(m))]}static makeEci(m){let h=[];if(m<0)throw new RangeError("ECI assignment value out of range");if(m<128)r(m,8,h);else if(m<16384)r(2,2,h),r(m,14,h);else if(m<1e6)r(6,3,h),r(m,21,h);else throw new RangeError("ECI assignment value out of range");return new et(et.Mode.ECI,0,h)}static isNumeric(m){return et.NUMERIC_REGEX.test(m)}static isAlphanumeric(m){return et.ALPHANUMERIC_REGEX.test(m)}getData(){return this.bitData.slice()}static getTotalBits(m,h){let g=0;for(const v of m){const S=v.mode.numCharCountBits(h);if(v.numChars>=1<<S)return 1/0;g+=4+S+v.bitData.length}return g}static toUtf8ByteArray(m){m=encodeURI(m);let h=[];for(let g=0;g<m.length;g++)m.charAt(g)!="%"?h.push(m.charCodeAt(g)):(h.push(parseInt(m.substring(g+1,g+3),16)),g+=2);return h}};f.NUMERIC_REGEX=/^[0-9]*$/,f.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,f.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let d=f;l.QrSegment=f})(Bl||(Bl={}));(l=>{(i=>{const r=class{constructor(c,f){this.ordinal=c,this.formatBits=f}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),i.Ecc=r})(l.QrCode||(l.QrCode={}))})(Bl||(Bl={}));(l=>{(i=>{const r=class{constructor(c,f){this.modeBits=c,this.numBitsCharCount=f}numCharCountBits(c){return this.numBitsCharCount[Math.floor((c+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),i.Mode=r})(l.QrSegment||(l.QrSegment={}))})(Bl||(Bl={}));var Na=Bl;var tb={L:Na.QrCode.Ecc.LOW,M:Na.QrCode.Ecc.MEDIUM,Q:Na.QrCode.Ecc.QUARTILE,H:Na.QrCode.Ecc.HIGH},Yg=128,Vg="L",Ig="#FFFFFF",Gg="#000000",Qg=!1,Xg=1,nb=4,lb=0,ab=.1;function Zg(l,i=0){const r=[];return l.forEach(function(u,c){let f=null;u.forEach(function(d,y){if(!d&&f!==null){r.push(`M${f+i} ${c+i}h${y-f}v1H${f+i}z`),f=null;return}if(y===u.length-1){if(!d)return;f===null?r.push(`M${y+i},${c+i} h1v1H${y+i}z`):r.push(`M${f+i},${c+i} h${y+1-f}v1H${f+i}z`);return}d&&f===null&&(f=y)})}),r.join("")}function Kg(l,i){return l.slice().map((r,u)=>u<i.y||u>=i.y+i.h?r:r.map((c,f)=>f<i.x||f>=i.x+i.w?c:!1))}function ib(l,i,r,u){if(u==null)return null;const c=l.length+r*2,f=Math.floor(i*ab),d=c/i,y=(u.width||f)*d,m=(u.height||f)*d,h=u.x==null?l.length/2-y/2:u.x*d,g=u.y==null?l.length/2-m/2:u.y*d,v=u.opacity==null?1:u.opacity;let S=null;if(u.excavate){let R=Math.floor(h),A=Math.floor(g),z=Math.ceil(y+h-R),k=Math.ceil(m+g-A);S={x:R,y:A,w:z,h:k}}const b=u.crossOrigin;return{x:h,y:g,h:m,w:y,excavation:S,opacity:v,crossOrigin:b}}function rb(l,i){return i!=null?Math.max(Math.floor(i),0):l?nb:lb}function Fg({value:l,level:i,minVersion:r,includeMargin:u,marginSize:c,imageSettings:f,size:d,boostLevel:y}){let m=ft.useMemo(()=>{const R=(Array.isArray(l)?l:[l]).reduce((A,z)=>(A.push(...Na.QrSegment.makeSegments(z)),A),[]);return Na.QrCode.encodeSegments(R,tb[i],r,void 0,void 0,y)},[l,i,r,y]);const{cells:h,margin:g,numCells:v,calculatedImageSettings:S}=ft.useMemo(()=>{let b=m.getModules();const R=rb(u,c),A=b.length+R*2,z=ib(b,d,R,f);return{cells:b,margin:R,numCells:A,calculatedImageSettings:z}},[m,d,f,u,c]);return{qrcode:m,margin:g,cells:h,numCells:v,calculatedImageSettings:S}}var ub=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),ob=ft.forwardRef(function(i,r){const u=i,{value:c,size:f=Yg,level:d=Vg,bgColor:y=Ig,fgColor:m=Gg,includeMargin:h=Qg,minVersion:g=Xg,boostLevel:v,marginSize:S,imageSettings:b}=u,A=zc(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:z}=A,k=zc(A,["style"]),D=b?.src,_=ft.useRef(null),I=ft.useRef(null),W=ft.useCallback(P=>{_.current=P,typeof r=="function"?r(P):r&&(r.current=P)},[r]),[B,Q]=ft.useState(!1),{margin:V,cells:ee,numCells:oe,calculatedImageSettings:ne}=Fg({value:c,level:d,minVersion:g,boostLevel:v,includeMargin:h,marginSize:S,imageSettings:b,size:f});ft.useEffect(()=>{if(_.current!=null){const P=_.current,F=P.getContext("2d");if(!F)return;let U=ee;const $=I.current,se=ne!=null&&$!==null&&$.complete&&$.naturalHeight!==0&&$.naturalWidth!==0;se&&ne.excavation!=null&&(U=Kg(ee,ne.excavation));const ae=window.devicePixelRatio||1;P.height=P.width=f*ae;const T=f/oe*ae;F.scale(T,T),F.fillStyle=y,F.fillRect(0,0,oe,oe),F.fillStyle=m,ub?F.fill(new Path2D(Zg(U,V))):ee.forEach(function(j,O){j.forEach(function(C,te){C&&F.fillRect(te+V,O+V,1,1)})}),ne&&(F.globalAlpha=ne.opacity),se&&F.drawImage($,ne.x+V,ne.y+V,ne.w,ne.h)}}),ft.useEffect(()=>{Q(!1)},[D]);const re=Ac({height:f,width:f},z);let he=null;return D!=null&&(he=ft.createElement("img",{src:D,key:D,style:{display:"none"},onLoad:()=>{Q(!0)},ref:I,crossOrigin:ne?.crossOrigin})),ft.createElement(ft.Fragment,null,ft.createElement("canvas",Ac({style:re,height:f,width:f,ref:W,role:"img"},k)),he)});ob.displayName="QRCodeCanvas";var Xc=ft.forwardRef(function(i,r){const u=i,{value:c,size:f=Yg,level:d=Vg,bgColor:y=Ig,fgColor:m=Gg,includeMargin:h=Qg,minVersion:g=Xg,boostLevel:v,title:S,marginSize:b,imageSettings:R}=u,A=zc(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:z,cells:k,numCells:D,calculatedImageSettings:_}=Fg({value:c,level:d,minVersion:g,boostLevel:v,includeMargin:h,marginSize:b,imageSettings:R,size:f});let I=k,W=null;R!=null&&_!=null&&(_.excavation!=null&&(I=Kg(k,_.excavation)),W=ft.createElement("image",{href:R.src,height:_.h,width:_.w,x:_.x+z,y:_.y+z,preserveAspectRatio:"none",opacity:_.opacity,crossOrigin:_.crossOrigin}));const B=Zg(I,z);return ft.createElement("svg",Ac({height:f,width:f,viewBox:`0 0 ${D} ${D}`,ref:r,role:"img"},A),!!S&&ft.createElement("title",null,S),ft.createElement("path",{fill:y,d:`M0,0 h${D}v${D}H0z`,shapeRendering:"crispEdges"}),ft.createElement("path",{fill:m,d:B,shapeRendering:"crispEdges"}),W)});Xc.displayName="QRCodeSVG";const sb=2e3,cb=5e3;function fb({onClose:l}){const[i,r]=w.useState(null),[u,c]=w.useState(!1),[f,d]=w.useState(!1),[y,m]=w.useState(""),[h,g]=w.useState([]),v=w.useCallback(()=>{Ce("/api/whatsapp/status").then(r).catch(()=>{})},[]),S=w.useCallback(()=>{Ce("/api/whatsapp/groups").then(z=>g(z.groups)).catch(()=>{})},[]),b=w.useCallback(async()=>{const z=!u;d(!0);try{await lt("/api/integrations/whatsapp",{enabled:z}),c(z),v()}catch(k){const D=k instanceof Error?k.message:k?.message||"Failed";m(D),setTimeout(()=>m(""),4e3)}finally{d(!1)}},[u,v]),R=z=>{z.target===z.currentTarget&&l()};w.useEffect(()=>{Ce("/api/integrations").then(z=>c(z.whatsapp.enabled)).catch(()=>{}),v(),S()},[v,S]),w.useEffect(()=>{const z=i?.status==="qr_pending"?sb:cb,k=setInterval(()=>{v(),S()},z);return()=>clearInterval(k)},[i?.status,v,S]);const A=i?.status==="connected";return p.jsx("div",{className:"modal-overlay visible",onClick:R,children:p.jsxs("div",{className:"modal",children:[p.jsx("button",{className:"modal-close",onClick:l,children:"×"}),p.jsx("h2",{children:"WhatsApp Setup"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"1"}),"Enable integration"]}),p.jsxs("div",{className:"setup-step-desc",children:[u?"WhatsApp integration is enabled. It will auto-start on boot.":"Enable to start the WhatsApp connection.",y&&p.jsx("div",{style:{color:"#d73a49",marginTop:4,fontSize:12},children:y})]}),p.jsx("div",{className:"setup-paste-row",children:p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:f?"not-allowed":"pointer"},children:[p.jsx("input",{type:"checkbox",checked:u,disabled:f,onChange:b,style:{width:16,height:16,cursor:f?"not-allowed":"pointer"}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:f?u?"Stopping...":"Starting...":"Enabled"})]})})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"2"}),"Link WhatsApp"]}),p.jsxs("div",{className:"setup-step-desc",children:[!u&&"Enable the integration above to get started.",u&&i?.status==="disconnected"&&"Waiting for connection...",u&&i?.status==="connecting"&&"Connecting to WhatsApp...",u&&i?.status==="qr_pending"&&"Scan this QR code with WhatsApp on your phone (Settings > Linked Devices > Link a Device).",u&&A&&"WhatsApp is connected."]}),u&&i?.status==="qr_pending"&&i.qrCode&&p.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"16px 0"},children:p.jsx(Xc,{value:i.qrCode,size:256})}),u&&p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[p.jsx("span",{className:`integration-dot${A?" running":""}`}),p.jsxs("span",{style:{fontSize:13,color:"var(--text-secondary)"},children:[i?.status==="connected"&&"Connected",i?.status==="qr_pending"&&"Waiting for QR scan",i?.status==="connecting"&&"Connecting...",i?.status==="disconnected"&&"Disconnected",!i&&"Loading..."]})]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"3"}),"Agent groups"]}),p.jsx("div",{className:"setup-step-desc",children:"Each agent gets a WhatsApp group named [VoiceCC] <agentId>. Groups are created automatically when WhatsApp connects. Send messages in a group to chat with that agent."}),h.length===0&&p.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:8},children:A?"No groups created yet. Groups sync automatically when agents exist.":"Connect WhatsApp to see agent groups."}),h.length>0&&p.jsx("div",{style:{marginTop:8},children:h.map(z=>p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 0",borderBottom:"1px solid var(--border-color)"},children:[p.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:["[VoiceCC] ",z.agentId]}),p.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)",marginLeft:"auto"},children:z.groupJid})]},z.groupJid))})]}),p.jsx("div",{style:{marginTop:16,padding:"10px 12px",background:"var(--bg-tertiary)",borderRadius:6,fontSize:12,color:"var(--text-secondary)",lineHeight:1.5},children:"Baileys is a reverse-engineered WhatsApp Web protocol. Use a separate phone number -- WhatsApp may throttle or block accounts used for automated messaging."})]})})}const db=[{name:"notion",description:"Connect to Notion workspaces, pages, and databases.",url:"https://mcp.notion.com/mcp",transport:"http"},{name:"figma",description:"Read Figma designs, components, and design tokens.",url:"https://mcp.figma.com/mcp",transport:"http"},{name:"sentry",description:"Access Sentry issues, events, and project data.",url:"https://mcp.sentry.dev/mcp",transport:"http"},{name:"context7",description:"Fetch up-to-date library docs and code examples.",url:"https://mcp.context7.com/mcp",transport:"http"},{name:"langfuse",description:"Search Langfuse documentation and API references.",url:"https://langfuse.com/api/mcp",transport:"http"},{name:"slack",description:"Send messages, create canvases, and fetch Slack data.",url:"https://mcp.slack.com/mcp",transport:"http"},{name:"atlassian",description:"Access Jira & Confluence from Claude.",url:"https://mcp.atlassian.com/v1/mcp",transport:"http"},{name:"linear",description:"Manage issues, projects & team workflows in Linear.",url:"https://mcp.linear.app/mcp",transport:"http"},{name:"gamma",description:"Create presentations, docs, socials, and sites with AI.",url:"https://mcp.gamma.app/mcp",transport:"http"},{name:"granola",description:"The AI notepad for meetings.",url:"https://mcp.granola.ai/mcp",transport:"http"}];function Jg({message:l,onDismiss:i,timeout:r=4e3}){return w.useEffect(()=>{if(!l)return;const u=setTimeout(i,r);return()=>clearTimeout(u)},[l,i,r]),l?p.jsxs("div",{className:"toast",children:[p.jsx("span",{children:l}),p.jsx("button",{className:"toast-close",onClick:i,children:"×"})]}):null}function hb({servers:l,onClose:i,onAdded:r}){const[u,c]=w.useState("claudeai"),[f,d]=w.useState(null),[y,m]=w.useState(null),h=l===null,g=b=>l?.find(R=>R.url===b),v=b=>{b.target===b.currentTarget&&i()},S=async b=>{d(b.name);try{await lt("/api/mcp-servers/add",{name:b.name,url:b.url,transport:b.transport,scope:"user"}),await r()}catch(R){const A=R?.message||"Failed to add server";m(A)}d(null)};return p.jsxs("div",{className:"modal-overlay visible",onClick:v,children:[p.jsxs("div",{className:"modal",style:{width:620},children:[p.jsx("button",{className:"modal-close",onClick:i,children:"×"}),p.jsx("h2",{children:"Add MCP Server"}),p.jsxs("div",{className:"mcp-add-tabs",children:[p.jsxs("button",{className:`mcp-add-tab${u==="claudeai"?" active":""}`,onClick:()=>c("claudeai"),children:["claude.ai",p.jsx("span",{className:"mcp-tab-rec",children:"Recommended"})]}),p.jsx("button",{className:`mcp-add-tab${u==="local"?" active":""}`,onClick:()=>c("local"),children:"Local"})]}),u==="claudeai"&&p.jsxs("div",{className:"mcp-add-claudeai",children:[p.jsx("p",{children:"Add MCP servers through your claude.ai account. Servers added there automatically sync to Claude Code -- no local configuration needed."}),p.jsx("a",{className:"mcp-add-claudeai-link",href:"https://claude.ai/settings/connectors",target:"_blank",rel:"noopener noreferrer",children:"Open claude.ai Connectors ↗"})]}),u==="local"&&p.jsxs(p.Fragment,{children:[p.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginBottom:16},children:"Select a server to add locally. Authentication is handled automatically via your browser."}),p.jsx("div",{className:"mcp-add-grid",children:db.map(b=>{const R=g(b.url),A=R?.status==="needs_auth",z=R?.status==="connected",k=f===b.name;return p.jsxs("div",{className:`mcp-add-card${z?" installed":""}`,children:[p.jsxs("div",{className:"mcp-add-card-header",children:[p.jsx("span",{className:"mcp-add-card-name",children:b.name}),z&&p.jsx("span",{className:"mcp-add-card-badge",children:"Installed"}),A&&p.jsx("span",{className:"mcp-add-card-badge needs-auth",children:"Needs authentication"})]}),p.jsx("p",{className:"mcp-add-card-desc",children:b.description}),p.jsxs("div",{className:"mcp-add-card-footer",children:[p.jsx("span",{className:"mcp-add-card-url",children:b.url}),h?p.jsx("span",{style:{fontSize:11,color:"var(--text-secondary)"},children:"Loading..."}):!R&&p.jsx("button",{className:"mcp-add-card-btn",disabled:k,onClick:()=>S(b),children:k?"Adding...":"Add"})]})]},b.url)})})]})]}),p.jsx(Jg,{message:y,onDismiss:()=>m(null)})]})}function pb({twilioRunning:l,whatsappStatus:i}){const[r,u]=w.useState(null),[c,f]=w.useState(!1),[d,y]=w.useState(!1),[m,h]=w.useState(!1),[g,v]=w.useState(!1),[S,b]=w.useState(null),R=w.useCallback(async()=>{try{const D=await Ce("/api/mcp-servers");u(D.servers)}catch{f(!0)}},[]);w.useEffect(()=>{R()},[R]);const A=D=>D==="connected"?"connected":D==="needs_auth"?"needs-auth":"failed",z=D=>D==="connected"?"Connected":D==="needs_auth"?"Needs auth":D==="pending"?"Pending":D==="disabled"?"Disabled":"Failed",k=D=>D==="claudeai"?{label:"claude.ai",className:"scope-claudeai"}:D==="managed"?{label:"Managed",className:"scope-managed"}:D==="user"?{label:"Local (user)",className:"scope-local"}:D==="project"?{label:"Local (project)",className:"scope-local"}:{label:"Local (local)",className:"scope-local"};return p.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[p.jsx("div",{className:"page-header",style:{borderBottom:"none",padding:0,marginBottom:24},children:p.jsxs("div",{children:[p.jsx("h1",{children:"Integrations & MCP"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Connect external services and configure MCP servers."})]})}),p.jsxs("div",{className:"integrations-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Integrations"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Connect external services to enable voice calling capabilities."}),p.jsxs("div",{style:{display:"flex",gap:12},children:[p.jsxs("button",{className:"btn-integration",onClick:()=>y(!0),children:[p.jsx("span",{className:`integration-dot${l?" running":""}`}),"Twilio"]}),p.jsxs("button",{className:"btn-integration",onClick:()=>h(!0),children:[p.jsx("span",{className:`integration-dot${i==="connected"?" running":""}`}),"WhatsApp"]})]})]}),p.jsxs("div",{className:"mcp-panel",children:[p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:4},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"MCP Servers"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Configure Model Context Protocol servers to provide external tools to Claude."})]}),p.jsx("button",{className:"mcp-add-btn",onClick:()=>v(!0),children:"+ Add MCP Server"})]}),p.jsxs("div",{className:"mcp-server-list",children:[!r&&!c&&p.jsx("div",{className:"mcp-loading",children:"Loading..."}),c&&p.jsx("div",{className:"mcp-error",children:"Failed to load MCP servers."}),r&&r.length===0&&p.jsx("div",{className:"mcp-loading",style:{color:"var(--text-secondary)",fontSize:13},children:"No MCP servers configured."}),r?.map(D=>{const _=D.scope==="claudeai"||D.scope==="managed"||D.scope==="user",I=k(D.scope),W=D.scope==="claudeai"?"Managed by claude.ai":D.scope==="user"?"Globally installed, please delete through Claude Code":`Remove ${D.name}`;return p.jsxs("div",{className:"mcp-server-row",children:[p.jsx("span",{className:`mcp-dot ${A(D.status)}`}),p.jsx("span",{className:"mcp-server-name",children:D.name}),p.jsx("span",{className:"mcp-server-url",title:D.url,children:D.url}),p.jsx("span",{className:`mcp-scope-badge ${I.className}`,children:I.label}),p.jsx("span",{className:"mcp-server-badge",children:D.type.toUpperCase()}),p.jsx("span",{className:`mcp-server-status ${A(D.status)}`,children:z(D.status)}),p.jsxs("span",{className:"mcp-delete-wrap",children:[p.jsx("button",{className:`mcp-delete-btn${_?" disabled":""}`,onClick:()=>{_||Og(`/api/mcp-servers/${D.name}`).then(R).catch(B=>{b(B?.message||"Failed to remove server")})},children:"×"}),p.jsx("span",{className:"mcp-delete-tooltip",children:W})]})]},D.name)})]})]}),d&&p.jsx(W0,{onClose:()=>y(!1)}),m&&p.jsx(fb,{onClose:()=>h(!1)}),g&&p.jsx(hb,{servers:r,onClose:()=>v(!1),onAdded:R}),p.jsx(Jg,{message:S,onDismiss:()=>b(null)})]})}function mb(){const[l]=_g(),i=l.get("tab"),[r,u]=w.useState(i==="voice"||i==="integrations"?i:"general"),[c,f]=w.useState({running:!1,url:null}),[d,y]=w.useState({running:!1,tunnelUrl:null}),[m,h]=w.useState({status:"disconnected",qrCode:null});w.useEffect(()=>{const v=()=>{Ce("/api/tunnel/status").then(f).catch(()=>{}),Ce("/api/twilio/status").then(y).catch(()=>{}),Ce("/api/whatsapp/status").then(h).catch(()=>{})};v();const S=setInterval(v,5e3);return()=>clearInterval(S)},[]);const g=v=>({padding:"6px 14px",background:r===v?"var(--btn-primary-bg)":"var(--bg-main)",border:"1px solid "+(r===v?"transparent":"var(--border-color)"),borderRadius:"0",color:r===v?"var(--btn-primary-text)":"var(--text-primary)",fontWeight:500,cursor:"pointer",fontSize:"13px",transition:"all 0.1s ease"});return p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:[p.jsxs("div",{style:{display:"flex",gap:"8px",padding:"24px 32px 16px",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[p.jsx("button",{style:g("general"),onClick:()=>u("general"),children:"General"}),p.jsx("button",{style:g("voice"),onClick:()=>u("voice"),children:"Voice"}),p.jsx("button",{style:g("integrations"),onClick:()=>u("integrations"),children:"Integrations & MCP"})]}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"48px 64px"},children:[r==="general"&&p.jsx(I0,{twilioRunning:d.running}),r==="voice"&&p.jsx($0,{}),r==="integrations"&&p.jsx(pb,{twilioRunning:d.running,whatsappStatus:m.status})]})]})}const oc={id:""};function gb(){const l=Ru(),[i,r]=w.useState([]),[u,c]=w.useState(!1),[f,d]=w.useState(oc),[y,m]=w.useState(!1),[h,g]=w.useState(null),[v,S]=w.useState(!1);w.useEffect(()=>{Ce("/api/agents").then(r).catch(()=>{})},[]);const b=async()=>{g(null),m(!0);try{await lt("/api/agents",{id:f.id});const z=await Ce("/api/agents");r(z),d(oc),c(!1)}catch(z){const k=z?.message||"Failed to create agent";g(k)}finally{m(!1)}},R=()=>{d(oc),c(!1),g(null)},A=async z=>{const k=window.prompt("Enter an ID for the imported agent:",z.name.replace(/\.zip$/i,""));if(k){S(!0),g(null);try{const D=new FormData;D.append("file",z),D.append("id",k);const _=await fetch("/api/agents/import",{method:"POST",body:D});if(!_.ok){const W=await _.json().catch(()=>({error:"Import failed"}));throw new Error(W.error||"Import failed")}const I=await Ce("/api/agents");r(I)}catch(D){const _=D?.message||"Failed to import agent";g(_)}finally{S(!1)}}};return p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"24px 32px 16px",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[p.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600,color:"var(--text-primary)"},children:"Agents"}),!u&&p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsxs("label",{style:{padding:"6px 14px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,fontWeight:500,fontSize:13,cursor:v?"not-allowed":"pointer",opacity:v?.6:1},children:[v?"Importing...":"Import",p.jsx("input",{type:"file",accept:".zip",style:{display:"none"},onChange:z=>{const k=z.target.files?.[0];k&&A(k),z.target.value=""},disabled:v})]}),p.jsx("button",{onClick:()=>c(!0),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Create Agent"})]})]}),h&&!u&&p.jsx("div",{style:{margin:"16px 32px 0",padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:h}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"48px 64px"},children:[u&&p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:{margin:"0 0 16px",fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:"New Agent"}),h&&p.jsx("div",{style:{marginBottom:12,padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:h}),p.jsxs("div",{style:{marginBottom:16},children:[p.jsx("label",{style:{display:"block",marginBottom:4,fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:"ID"}),p.jsx("input",{type:"text",value:f.id,onChange:z=>d({...f,id:z.target.value}),placeholder:"my-agent",style:{width:"100%",padding:"6px 10px",fontSize:13,background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,boxSizing:"border-box"}})]}),p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsx("button",{onClick:b,disabled:y||!f.id.trim(),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:y?"not-allowed":"pointer",opacity:y||!f.id.trim()?.6:1},children:y?"Creating...":"Create"}),p.jsx("button",{onClick:R,style:{padding:"6px 14px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Cancel"})]})]}),p.jsxs("div",{className:"settings-panel",style:{padding:0},children:[i.length===0&&!u&&p.jsx("div",{style:{padding:20,fontSize:13,color:"var(--text-secondary)"},children:'No agents yet. Click "Create Agent" to get started.'}),i.map(z=>p.jsxs("div",{onClick:()=>l(`/agents/${z.id}`),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px",borderBottom:"1px solid var(--border-color)",cursor:"pointer",transition:"background 0.1s ease"},onMouseEnter:k=>k.currentTarget.style.background="var(--bg-tertiary)",onMouseLeave:k=>k.currentTarget.style.background="transparent",children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:z.enabled?"#2ea043":"#8b949e",flexShrink:0}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:z.id})]}),p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)"},children:["every ",z.heartbeatIntervalMinutes,"m"]})]},z.id))]})]})]})}function yb({callBaseUrl:l,agentId:i,onClose:r}){const[u,c]=w.useState(null),[f,d]=w.useState(0),[y,m]=w.useState(""),[h,g]=w.useState(null),[v,S]=w.useState(!1),[b,R]=w.useState(!1),A=w.useRef(null),z=w.useRef(null),k=w.useRef(null),D=l.includes("localhost")||l.includes("127.0.0.1"),_=u?`${l}/call?code=${u}&agentId=${i}`:`${l}/call`,I=w.useCallback(async()=>{c(null),m(""),g(null),S(!1);try{const V=await lt("/api/webrtc/generate-code",{agentId:i});c(V.code),d(V.expiresAt)}catch(V){const ee=V instanceof Error?V.message:V?.message||"Failed to generate code";g(ee)}},[i]);w.useEffect(()=>(I(),D||Ce("/api/tunnel/status").then(V=>{if(V.startedAt){const ee=Date.now()-V.startedAt;ee<6e4&&(R(!0),k.current=setTimeout(()=>R(!1),6e4-ee))}}).catch(()=>{}),()=>{A.current&&clearInterval(A.current),z.current&&clearInterval(z.current),k.current&&clearTimeout(k.current)}),[I]),w.useEffect(()=>{if(!f||v)return;const V=()=>{const ee=Math.max(0,Math.floor((f-Date.now())/1e3));if(ee<=0){m("Code expired"),A.current&&(clearInterval(A.current),A.current=null);return}const oe=Math.floor(ee/60),ne=ee%60;m(`Expires in ${oe}:${String(ne).padStart(2,"0")}`)};return V(),A.current=setInterval(V,1e3),()=>{A.current&&clearInterval(A.current)}},[f,v]),w.useEffect(()=>{if(!(!u||v))return z.current=setInterval(async()=>{try{!(await Ce(`/api/webrtc/code-status?code=${u}`)).active&&Date.now()<f&&(S(!0),A.current&&(clearInterval(A.current),A.current=null),z.current&&(clearInterval(z.current),z.current=null))}catch{}},2e3),()=>{z.current&&clearInterval(z.current)}},[u,f,v]);const W=V=>{V.target===V.currentTarget&&r()},B=u?`${u.slice(0,3)} ${u.slice(3)}`:"------",Q=y==="Code expired";return p.jsx("div",{className:"modal-overlay visible",onClick:W,children:p.jsxs("div",{className:"modal",style:{textAlign:"center"},children:[p.jsx("button",{className:"modal-close",onClick:r,children:"×"}),p.jsx("h2",{children:"Call via Browser"}),p.jsx("p",{style:{fontSize:12,color:"#999",marginBottom:12},children:"Scan the QR code or open the link on any device, then enter the pairing code."}),p.jsx("div",{className:"qr-container",children:_&&p.jsx(Xc,{value:_,size:160,level:"M"})}),p.jsx("div",{className:"call-url",children:p.jsx("a",{href:_,target:"_blank",rel:"noreferrer",children:_})}),b&&p.jsx("div",{style:{fontSize:11,color:"#d29922",marginBottom:8},children:"Tunnel is warming up -- link may take a moment to become reachable"}),D&&p.jsx("div",{style:{fontSize:11,color:"#d29922",marginBottom:8},children:"No tunnel active -- this link only works on this machine. Enable the tunnel in Settings to call from other devices."}),v?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"pairing-code",style:{color:"#2ea043"},children:"Paired"}),p.jsx("div",{className:"pairing-countdown",style:{color:"#2ea043"},children:"Device connected successfully"})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"pairing-code",style:{opacity:Q?.4:1},children:h?"Error":B}),p.jsx("div",{className:"pairing-countdown",children:h||y})]}),p.jsx("button",{className:"btn-regenerate",onClick:I,children:v?"New Code":"Regenerate Code"})]})})}const pu={margin:0,padding:12,fontSize:13,fontFamily:"monospace",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0},Aa={margin:"0 0 8px",fontSize:14,fontWeight:600,color:"var(--text-primary)"};function vb(){const{id:l}=wg(),i=Ru(),{browserCallStatus:r}=Tg(),[u,c]=w.useState(null),[f,d]=w.useState(!1),[y,m]=w.useState(null),[h,g]=w.useState(!1),[v,S]=w.useState(null),[b,R]=w.useState([]),[A,z]=w.useState(null),[k,D]=w.useState(!1),[_,I]=w.useState(!1),[W,B]=w.useState(!1),[Q,V]=w.useState(!1),[ee,oe]=w.useState(!1),[ne,re]=w.useState(!1);w.useEffect(()=>{l&&Ce(`/api/agents/${l}`).then(c).catch(()=>{})},[l]),w.useEffect(()=>{Ce("/api/twilio/status").then(ae=>V(ae.running)).catch(()=>{}),Ce("/api/whatsapp/status").then(ae=>oe(ae.status==="connected")).catch(()=>{})},[]),w.useEffect(()=>{Ce("/api/providers/tts").then(ae=>(S(ae.active),Ce(`/api/providers/tts/${ae.active}/voices`))).then(ae=>R(ae.voices)).catch(ae=>z(ae?.message||"Failed to load voices"))},[]);const he=async ae=>{if(!(!l||!u||!v)){D(!0);try{const T=v,O={...u.config.voice??{},[T]:{id:ae,name:b.find(C=>C.id===ae)?.name??""}};await bm(`/api/agents/${l}`,{config:{voice:O}}),c({...u,config:{...u.config,voice:O}})}finally{D(!1)}}},P=async ae=>{if(!(!l||!u)){re(!0);try{await bm(`/api/agents/${l}`,{config:{outboundChannel:ae}}),c({...u,config:{...u.config,outboundChannel:ae}})}finally{re(!1)}}},F=async()=>{if(l){d(!0),m(null);try{await lt(`/api/agents/${l}/call`)}catch(ae){const T=ae?.message||"Failed to initiate call";m(T)}finally{d(!1)}}},U=async()=>{if(l)try{console.log(`[export-ui] Fetching /api/agents/${l}/export`);const ae=await fetch(`/api/agents/${l}/export`);if(console.log(`[export-ui] Response status: ${ae.status}, content-type: ${ae.headers.get("content-type")}`),!ae.ok){const C=await ae.text();console.error(`[export-ui] Export failed: ${ae.status} - ${C}`),alert(`Export failed: ${C}`);return}const T=await ae.blob();console.log(`[export-ui] Blob size: ${T.size}, type: ${T.type}`);const j=URL.createObjectURL(T),O=document.createElement("a");O.href=j,O.download=`${l}.zip`,O.click(),URL.revokeObjectURL(j),console.log(`[export-ui] Download triggered for ${l}.zip`)}catch(ae){console.error("[export-ui] Export error:",ae),alert(`Export failed: ${ae}`)}},$=async()=>{if(l&&window.confirm(`Delete agent "${l}"? This cannot be undone.`)){g(!0);try{await Og(`/api/agents/${l}`),i("/agents")}catch{g(!1)}}},se=async()=>{if(l){B(!0);try{const ae=await lt("/api/webrtc/generate-code",{agentId:l});window.open(`/chat?code=${ae.code}&agentId=${encodeURIComponent(l)}`,"_blank")}catch(ae){const T=ae?.message||"Failed to generate pairing code";m(T)}finally{B(!1)}}};return u?p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"24px 32px 16px",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[p.jsx(_t,{to:"/agents",style:{fontSize:13,color:"var(--text-secondary)",textDecoration:"none"},children:"Agents"}),p.jsx("span",{style:{color:"var(--text-secondary)",fontSize:13},children:"/"}),p.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600,color:"var(--text-primary)"},children:u.id})]}),p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsx("button",{onClick:U,style:{padding:"6px 14px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer",display:"inline-flex",alignItems:"center"},children:"Export"}),p.jsx("button",{onClick:F,disabled:f,style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:f?"not-allowed":"pointer",opacity:f?.6:1},children:f?"Calling...":"Call via Phone"}),p.jsx("button",{onClick:()=>I(!0),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Call via Browser"}),p.jsx("button",{onClick:se,disabled:W,style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:W?"not-allowed":"pointer",opacity:W?.6:1},children:W?"Opening...":"Chat via Text"}),p.jsx("button",{onClick:$,disabled:h,style:{padding:"6px 14px",background:"transparent",color:"#d73a49",border:"1px solid #d73a49",borderRadius:0,fontWeight:500,fontSize:13,cursor:h?"not-allowed":"pointer",opacity:h?.6:1},children:h?"Deleting...":"Delete"})]})]}),y&&p.jsx("div",{style:{margin:"16px 32px 0",padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:y}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"48px 64px"},children:[p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"SOUL.md"}),p.jsx("pre",{style:pu,children:u.soulMd||"(empty)"})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"MEMORY.md"}),p.jsx("pre",{style:pu,children:u.memoryMd||"(empty)"})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"HEARTBEAT.md"}),p.jsx("pre",{style:pu,children:u.heartbeatMd||"(empty)"})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"Voice"}),v&&b.length>0?p.jsxs("div",{children:[p.jsx("label",{style:{display:"block",fontSize:13,color:"var(--text-secondary)",marginBottom:6},children:"ElevenLabs voice"}),p.jsx("select",{value:u.config.voice?.[v]?.id??"",onChange:ae=>he(ae.target.value),disabled:k,style:{padding:"6px 10px",fontSize:13,background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,cursor:k?"not-allowed":"pointer",opacity:k?.6:1,minWidth:200},children:b.map(ae=>p.jsx("option",{value:ae.id,children:ae.name},ae.id))})]}):A?p.jsx("p",{style:{margin:0,fontSize:13,color:"#d73a49"},children:A}):p.jsx("p",{style:{margin:0,fontSize:13,color:"var(--text-secondary)"},children:"Loading voices..."})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"Outbound Channel"}),p.jsx("p",{style:{margin:"0 0 8px",fontSize:13,color:"var(--text-secondary)"},children:"When a heartbeat decides to reach out, use this channel."}),p.jsxs("select",{value:u.config.outboundChannel??"call",onChange:ae=>P(ae.target.value),disabled:ne,style:{padding:"6px 10px",fontSize:13,background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,cursor:ne?"not-allowed":"pointer",opacity:ne?.6:1,minWidth:200},children:[p.jsxs("option",{value:"call",disabled:!Q,children:["Phone Call",Q?"":" (Twilio not running)"]}),p.jsxs("option",{value:"whatsapp",disabled:!ee,children:["WhatsApp",ee?"":" (not connected)"]})]})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"Config"}),p.jsx("pre",{style:pu,children:JSON.stringify(u.config,null,2)})]})]}),_&&r.callBaseUrl&&l&&p.jsx(yb,{agentId:l,callBaseUrl:r.callBaseUrl,onClose:()=>I(!1)})]}):p.jsx("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:p.jsx("div",{style:{padding:"24px 32px",color:"var(--text-secondary)",fontSize:14},children:"Loading..."})})}const xb={Read:"Read",Edit:"Edit",Write:"Write",Bash:"Bash",Glob:"Glob",Grep:"Grep",WebSearch:"WebSearch",WebFetch:"WebFetch"};function bb(l,i){const r=xb[l]||l;try{const u=JSON.parse(i);if(l==="Read"&&u.file_path)return`${r} ${u.file_path}`;if(l==="Bash"&&u.description)return`${r}: ${u.description}`;if(l==="Bash"&&u.command){const c=u.command.length>60?u.command.slice(0,60)+"...":u.command;return`${r}: ${c}`}if(l==="Edit"&&u.file_path)return`${r} ${u.file_path}`;if(l==="Write"&&u.file_path)return`${r} ${u.file_path}`;if(l==="Grep"&&u.pattern)return`${r}: ${u.pattern}`;if(l==="Glob"&&u.pattern)return`${r}: ${u.pattern}`}catch{}return r}function Sb({data:l,onClose:i}){return p.jsx("div",{className:"tool-modal-overlay",onClick:i,children:p.jsxs("div",{className:"tool-modal",onClick:r=>r.stopPropagation(),children:[p.jsxs("div",{className:"tool-modal-header",children:[p.jsx("span",{className:"tool-modal-title",children:l.toolName}),p.jsx("button",{className:"tool-modal-close",onClick:i,children:"x"})]}),p.jsxs("div",{className:"tool-modal-section",children:[p.jsx("div",{className:"tool-modal-label",children:"Input"}),p.jsx("pre",{className:"tool-modal-code",children:l.toolInput})]}),l.toolResult!==void 0&&p.jsxs("div",{className:"tool-modal-section",children:[p.jsxs("div",{className:"tool-modal-label",children:["Output",l.toolIsError?" (error)":""]}),p.jsx("pre",{className:`tool-modal-code${l.toolIsError?" tool-modal-error":""}`,children:l.toolResult})]})]})})}function Eb({data:l,onClose:i}){return p.jsx("div",{className:"tool-modal-overlay",onClick:i,children:p.jsxs("div",{className:"tool-modal",onClick:r=>r.stopPropagation(),children:[p.jsxs("div",{className:"tool-modal-header",children:[p.jsxs("span",{className:"tool-modal-title",children:["Subagent",l.type?` (${l.type})`:""]}),p.jsx("button",{className:"tool-modal-close",onClick:i,children:"x"})]}),l.prompt&&p.jsxs("div",{className:"tool-modal-section",children:[p.jsx("div",{className:"tool-modal-label",children:"Prompt"}),p.jsx("pre",{className:"tool-modal-code",children:l.prompt})]}),l.result&&p.jsxs("div",{className:"tool-modal-section",children:[p.jsx("div",{className:"tool-modal-label",children:"Response"}),p.jsx("pre",{className:"tool-modal-code",children:l.result})]})]})})}function Cb({sessionId:l,agentId:i}){const[r,u]=w.useState([]),[c,f]=w.useState("Loading..."),[d,y]=w.useState(null),[m,h]=w.useState(null),[g,v]=w.useState(null),S=w.useRef(null);w.useEffect(()=>{f("Loading..."),y(null),u([]);const A=i?`?agentId=${i}`:"";Ce(`/api/conversations/${l}${A}`).then(z=>{u(z);const k=i?`[${i}] `:"";f(`${k}Conversation (${z.length} messages)`)}).catch(()=>{y("Error loading conversation."),f("Conversation")})},[l,i]),w.useEffect(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight)},[r]);function b(A){A.toolName&&A.toolInput&&h({toolName:A.toolName,toolInput:A.toolInput,toolResult:A.toolResult,toolIsError:A.toolIsError})}function R(A){v({description:A.subagentDescription||"Subagent",type:A.subagentType,prompt:A.subagentPrompt,result:A.subagentResult})}return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"page-header",style:{padding:"48px 64px 24px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[p.jsx("div",{children:p.jsx("h1",{children:c})}),i&&p.jsx("button",{onClick:()=>window.open(`/chat?agentId=${encodeURIComponent(i)}&sessionId=${encodeURIComponent(l)}`,"_blank"),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Resume"})]}),p.jsxs("div",{className:"conversation-messages",ref:S,style:{padding:"0 64px 48px"},children:[d&&p.jsx("div",{className:"conversation-empty",children:d}),!d&&r.length===0&&!c.includes("Loading")&&p.jsx("div",{className:"conversation-empty",children:"No messages in this session."}),r.map((A,z)=>A.role==="tool_use"?p.jsxs("div",{className:"tool-call-line",onClick:()=>b(A),title:"Click to view details",children:[p.jsx("span",{className:"tool-call-icon",children:">"}),p.jsx("span",{className:"tool-call-summary",children:bb(A.toolName||"",A.toolInput||"{}")}),A.toolIsError&&p.jsx("span",{className:"tool-call-error-badge",children:"err"})]},z):A.role==="subagent"?p.jsxs("div",{className:"subagent-line",onClick:()=>R(A),title:"Click to view subagent details",children:[p.jsx("span",{className:"subagent-icon",children:"</>"}),p.jsxs("span",{className:"subagent-summary",children:[A.subagentType?`${A.subagentType}: `:"",A.subagentDescription||"Subagent"]}),!A.subagentResult&&p.jsx("span",{className:"subagent-pending-badge",children:"pending"})]},z):p.jsxs("div",{className:`msg msg-${A.role}`,children:[p.jsxs("div",{className:"msg-header",children:[p.jsx("span",{className:"msg-role",children:A.role==="user"?"User":"VoiceCC"}),p.jsx("span",{className:"msg-time",children:new Date(A.timestamp).toLocaleTimeString()})]}),p.jsx("div",{className:"msg-content",children:A.content})]},z))]}),m&&p.jsx(Sb,{data:m,onClose:()=>h(null)}),g&&p.jsx(Eb,{data:g,onClose:()=>v(null)})]})}function Tb(){const{id:l}=wg(),[i]=_g(),r=i.get("agentId")??void 0;return l?p.jsx("div",{className:"page active",children:p.jsx(Cb,{sessionId:l,agentId:r})}):p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column"},children:[p.jsx("div",{className:"page-header",style:{padding:"48px 64px 24px"},children:p.jsx("div",{children:p.jsx("h1",{children:"Error"})})}),p.jsx("div",{className:"conversation-messages",style:{padding:"0 64px 48px"},children:p.jsx("div",{className:"conversation-empty",children:"No conversation ID provided."})})]})}const qn=6,sc="claude-voice-device-token",wm="claude-voice-agent-";function wb(){const[l,i]=w.useState("pairing"),[r,u]=w.useState(""),[c,f]=w.useState(""),[d,y]=w.useState(Array(qn).fill("")),m=w.useRef([]),h=w.useRef(localStorage.getItem(sc)||""),g=w.useRef(""),v=w.useRef(null),S=w.useRef(null),b=w.useCallback(()=>d.join(""),[d]),R=()=>{y(Array(qn).fill("")),m.current[0]?.focus()},A=w.useCallback(async B=>{const Q=B||b();if(Q.length!==qn){u("Enter all 6 digits");return}u("");try{const V=await lt("/api/webrtc/pair",{code:Q});h.current=V.token,localStorage.setItem(sc,V.token),g.current&&localStorage.setItem(`${wm}${V.token}`,g.current),i("ready")}catch(V){const ee=V?.message||"Pairing failed";u(ee),R()}},[b]);w.useEffect(()=>{const B=h.current,Q=new URLSearchParams(window.location.search),V=Q.get("code"),ee=Q.get("agentId");if(ee&&(g.current=ee),V&&V.length===qn&&!B){A(V);return}if(!B){m.current[0]?.focus();return}if(!ee){const oe=localStorage.getItem(`${wm}${B}`);oe&&(g.current=oe)}fetch("/api/webrtc/validate",{headers:{Authorization:`Bearer ${B}`}}).then(oe=>oe.json()).then(oe=>{oe.valid?i("ready"):(localStorage.removeItem(sc),h.current="",V&&V.length===qn?A(V):m.current[0]?.focus())}).catch(()=>{m.current[0]?.focus()})},[]);const z=(B,Q)=>{const V=Q.replace(/\D/g,"").slice(0,1),ee=[...d];ee[B]=V,y(ee),V&&B<qn-1&&m.current[B+1]?.focus(),V&&ee.every(oe=>oe!=="")&&A(ee.join(""))},k=(B,Q)=>{Q.key==="Backspace"&&!d[B]&&B>0&&m.current[B-1]?.focus()},D=B=>{B.preventDefault();const Q=(B.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,qn),V=[...d];for(let ee=0;ee<Q.length;ee++)V[ee]=Q[ee];y(V),Q.length===qn?A(Q):Q.length>0&&m.current[Math.min(Q.length,qn-1)]?.focus()},_=w.useCallback(()=>{v.current&&(v.current.close(),v.current=null),S.current&&(S.current.getTracks().forEach(B=>B.stop()),S.current=null)},[]),I=w.useCallback(async()=>{f(""),i("connecting");try{let B;try{B=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{f("Microphone access denied. Please allow microphone access and try again."),i("ready");return}S.current=B;const Q=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]});v.current=Q,B.getTracks().forEach(he=>{Q.addTrack(he,B)}),Q.ontrack=he=>{const P=new Audio;P.srcObject=he.streams[0],P.play().catch(()=>{})},Q.oniceconnectionstatechange=()=>{(Q.iceConnectionState==="disconnected"||Q.iceConnectionState==="failed")&&(console.log("[Call] ICE connection state:",Q.iceConnectionState),_(),i("ready"))};const V=await Q.createOffer();await Q.setLocalDescription(V),await new Promise(he=>{if(Q.iceGatheringState==="complete"){he();return}const P=()=>{Q.iceGatheringState==="complete"&&(Q.removeEventListener("icegatheringstatechange",P),he())};Q.addEventListener("icegatheringstatechange",P),setTimeout(he,5e3)});const ee=g.current?`&agentId=${encodeURIComponent(g.current)}`:"",oe=`/api/voice/offer?token=${encodeURIComponent(h.current)}${ee}`,ne=await fetch(oe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sdp:Q.localDescription?.sdp,type:Q.localDescription?.type})});if(!ne.ok)throw new Error(`Signaling failed: ${ne.status}`);const re=await ne.json();await Q.setRemoteDescription(new RTCSessionDescription(re)),i("active")}catch(B){const Q=B instanceof Error?B.message:"Connection failed";f(`Connection failed: ${Q}`),_(),i("ready")}},[_]),W=w.useCallback(()=>{_(),i("ready")},[_]);return p.jsxs("div",{className:"call-container",children:[p.jsx("h1",{children:"Claude Voice"}),p.jsx("p",{className:"subtitle",children:"Enter the pairing code shown on the dashboard"}),l==="pairing"&&p.jsxs("div",{className:"call-state",children:[p.jsx("div",{className:"pin-inputs",children:d.map((B,Q)=>p.jsx("input",{ref:V=>{m.current[Q]=V},type:"text",inputMode:"numeric",maxLength:1,value:B,onChange:V=>z(Q,V.target.value),onKeyDown:V=>k(Q,V),onPaste:Q===0?D:void 0},Q))}),p.jsx("button",{className:"btn btn-pair",onClick:()=>A(),children:"Pair Device"}),p.jsx("div",{className:"error-msg",children:r})]}),l==="ready"&&p.jsxs("div",{className:"call-state",children:[p.jsx("p",{className:"status-msg",style:{marginBottom:24},children:"Device paired. Ready to call."}),p.jsx("button",{className:"btn btn-call",onClick:I,children:"Start Call"}),p.jsx("div",{className:"error-msg",children:c})]}),l==="connecting"&&p.jsx("div",{className:"call-state",children:p.jsx("p",{className:"status-msg",children:"Connecting..."})}),l==="active"&&p.jsxs("div",{className:"call-state",children:[p.jsx("div",{className:"pulse-ring"}),p.jsx("div",{className:"call-label",children:"Call in progress"}),p.jsx("button",{className:"btn btn-hangup",onClick:W,children:"Hang Up"})]})]})}function jb(l,i){const r={};return(l[l.length-1]===""?[...l,""]:l).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Ab=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rb={};function jm(l,i){return(Rb.jsx?zb:Ab).test(l)}const Nb=/[ \t\n\f\r]/g;function kb(l){return typeof l=="object"?l.type==="text"?Am(l.value):!1:Am(l)}function Am(l){return l.replace(Nb,"")===""}class Qi{constructor(i,r,u){this.normal=r,this.property=i,u&&(this.space=u)}}Qi.prototype.normal={};Qi.prototype.property={};Qi.prototype.space=void 0;function Pg(l,i){const r={},u={};for(const c of l)Object.assign(r,c.property),Object.assign(u,c.normal);return new Qi(r,u,i)}function Rc(l){return l.toLowerCase()}class Dt{constructor(i,r){this.attribute=r,this.property=i}}Dt.prototype.attribute="";Dt.prototype.booleanish=!1;Dt.prototype.boolean=!1;Dt.prototype.commaOrSpaceSeparated=!1;Dt.prototype.commaSeparated=!1;Dt.prototype.defined=!1;Dt.prototype.mustUseProperty=!1;Dt.prototype.number=!1;Dt.prototype.overloadedBoolean=!1;Dt.prototype.property="";Dt.prototype.spaceSeparated=!1;Dt.prototype.space=void 0;let Mb=0;const Ee=Ul(),ot=Ul(),Nc=Ul(),le=Ul(),Xe=Ul(),ka=Ul(),Gt=Ul();function Ul(){return 2**++Mb}const kc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:ot,commaOrSpaceSeparated:Gt,commaSeparated:ka,number:le,overloadedBoolean:Nc,spaceSeparated:Xe},Symbol.toStringTag,{value:"Module"})),cc=Object.keys(kc);class Zc extends Dt{constructor(i,r,u,c){let f=-1;if(super(i,r),zm(this,"space",c),typeof u=="number")for(;++f<cc.length;){const d=cc[f];zm(this,cc[f],(u&kc[d])===kc[d])}}}Zc.prototype.defined=!0;function zm(l,i,r){r&&(l[i]=r)}function Da(l){const i={},r={};for(const[u,c]of Object.entries(l.properties)){const f=new Zc(u,l.transform(l.attributes||{},u),c,l.space);l.mustUseProperty&&l.mustUseProperty.includes(u)&&(f.mustUseProperty=!0),i[u]=f,r[Rc(u)]=u,r[Rc(f.attribute)]=u}return new Qi(i,r,l.space)}const $g=Da({properties:{ariaActiveDescendant:null,ariaAtomic:ot,ariaAutoComplete:null,ariaBusy:ot,ariaChecked:ot,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Xe,ariaCurrent:null,ariaDescribedBy:Xe,ariaDetails:null,ariaDisabled:ot,ariaDropEffect:Xe,ariaErrorMessage:null,ariaExpanded:ot,ariaFlowTo:Xe,ariaGrabbed:ot,ariaHasPopup:null,ariaHidden:ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xe,ariaLevel:le,ariaLive:null,ariaModal:ot,ariaMultiLine:ot,ariaMultiSelectable:ot,ariaOrientation:null,ariaOwns:Xe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:ot,ariaReadOnly:ot,ariaRelevant:null,ariaRequired:ot,ariaRoleDescription:Xe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:ot,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(l,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function Wg(l,i){return i in l?l[i]:i}function ey(l,i){return Wg(l,i.toLowerCase())}const _b=Da({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ka,acceptCharset:Xe,accessKey:Xe,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Xe,autoFocus:Ee,autoPlay:Ee,blocking:Xe,capture:null,charSet:null,checked:Ee,cite:null,className:Xe,cols:le,colSpan:null,content:null,contentEditable:ot,controls:Ee,controlsList:Xe,coords:le|ka,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Nc,draggable:ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Xe,height:le,hidden:Nc,high:le,href:null,hrefLang:null,htmlFor:Xe,httpEquiv:Xe,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Xe,itemRef:Xe,itemScope:Ee,itemType:Xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,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:Ee,optimum:le,pattern:null,ping:Xe,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Xe,required:Ee,reversed:Ee,rows:le,rowSpan:le,sandbox:Xe,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:ot,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:ot,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:ey}),Ob=Da({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:Gt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Xe,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:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:ka,g2:ka,glyphName:ka,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Gt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,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:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gt,rev:Gt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gt,requiredFeatures:Gt,requiredFonts:Gt,requiredFormats:Gt,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Gt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Wg}),ty=Da({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(l,i){return"xlink:"+i.slice(5).toLowerCase()}}),ny=Da({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ey}),ly=Da({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(l,i){return"xml:"+i.slice(3).toLowerCase()}}),Db={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"},Lb=/[A-Z]/g,Rm=/-[a-z]/g,Bb=/^data[-\w.:]+$/i;function Ub(l,i){const r=Rc(i);let u=i,c=Dt;if(r in l.normal)return l.property[l.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Bb.test(i)){if(i.charAt(4)==="-"){const f=i.slice(5).replace(Rm,qb);u="data"+f.charAt(0).toUpperCase()+f.slice(1)}else{const f=i.slice(4);if(!Rm.test(f)){let d=f.replace(Lb,Hb);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}c=Zc}return new c(u,i)}function Hb(l){return"-"+l.toLowerCase()}function qb(l){return l.charAt(1).toUpperCase()}const Yb=Pg([$g,_b,ty,ny,ly],"html"),Kc=Pg([$g,Ob,ty,ny,ly],"svg");function Vb(l){return l.join(" ").trim()}var za={},fc,Nm;function Ib(){if(Nm)return fc;Nm=1;var l=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,f=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,y=/^\s+|\s+$/g,m=`
12
+ `,h="/",g="*",v="",S="comment",b="declaration";function R(z,k){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];k=k||{};var D=1,_=1;function I(P){var F=P.match(i);F&&(D+=F.length);var U=P.lastIndexOf(m);_=~U?P.length-U:_+P.length}function W(){var P={line:D,column:_};return function(F){return F.position=new B(P),ee(),F}}function B(P){this.start=P,this.end={line:D,column:_},this.source=k.source}B.prototype.content=z;function Q(P){var F=new Error(k.source+":"+D+":"+_+": "+P);if(F.reason=P,F.filename=k.source,F.line=D,F.column=_,F.source=z,!k.silent)throw F}function V(P){var F=P.exec(z);if(F){var U=F[0];return I(U),z=z.slice(U.length),F}}function ee(){V(r)}function oe(P){var F;for(P=P||[];F=ne();)F!==!1&&P.push(F);return P}function ne(){var P=W();if(!(h!=z.charAt(0)||g!=z.charAt(1))){for(var F=2;v!=z.charAt(F)&&(g!=z.charAt(F)||h!=z.charAt(F+1));)++F;if(F+=2,v===z.charAt(F-1))return Q("End of comment missing");var U=z.slice(2,F-2);return _+=2,I(U),z=z.slice(F),_+=2,P({type:S,comment:U})}}function re(){var P=W(),F=V(u);if(F){if(ne(),!V(c))return Q("property missing ':'");var U=V(f),$=P({type:b,property:A(F[0].replace(l,v)),value:U?A(U[0].replace(l,v)):v});return V(d),$}}function he(){var P=[];oe(P);for(var F;F=re();)F!==!1&&(P.push(F),oe(P));return P}return ee(),he()}function A(z){return z?z.replace(y,v):v}return fc=R,fc}var km;function Gb(){if(km)return za;km=1;var l=za&&za.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(za,"__esModule",{value:!0}),za.default=r;const i=l(Ib());function r(u,c){let f=null;if(!u||typeof u!="string")return f;const d=(0,i.default)(u),y=typeof c=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:g}=m;y?c(h,g,m):g&&(f=f||{},f[h]=g)}),f}return za}var _i={},Mm;function Qb(){if(Mm)return _i;Mm=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.camelCase=void 0;var l=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,f=function(h){return!h||r.test(h)||l.test(h)},d=function(h,g){return g.toUpperCase()},y=function(h,g){return"".concat(g,"-")},m=function(h,g){return g===void 0&&(g={}),f(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(c,y):h=h.replace(u,y),h.replace(i,d))};return _i.camelCase=m,_i}var Oi,_m;function Xb(){if(_m)return Oi;_m=1;var l=Oi&&Oi.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},i=l(Gb()),r=Qb();function u(c,f){var d={};return!c||typeof c!="string"||(0,i.default)(c,function(y,m){y&&m&&(d[(0,r.camelCase)(y,f)]=m)}),d}return u.default=u,Oi=u,Oi}var Zb=Xb();const Kb=Hc(Zb),ay=iy("end"),Fc=iy("start");function iy(l){return i;function i(r){const u=r&&r.position&&r.position[l]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function Fb(l){const i=Fc(l),r=ay(l);if(i&&r)return{start:i,end:r}}function Bi(l){return!l||typeof l!="object"?"":"position"in l||"type"in l?Om(l.position):"start"in l||"end"in l?Om(l):"line"in l||"column"in l?Mc(l):""}function Mc(l){return Dm(l&&l.line)+":"+Dm(l&&l.column)}function Om(l){return Mc(l&&l.start)+"-"+Mc(l&&l.end)}function Dm(l){return l&&typeof l=="number"?l:1}class bt extends Error{constructor(i,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let c="",f={},d=!1;if(r&&("line"in r&&"column"in r?f={place:r}:"start"in r&&"end"in r?f={place:r}:"type"in r?f={ancestors:[r],place:r.position}:f={...r}),typeof i=="string"?c=i:!f.cause&&i&&(d=!0,c=i.message,f.cause=i),!f.ruleId&&!f.source&&typeof u=="string"){const m=u.indexOf(":");m===-1?f.ruleId=u:(f.source=u.slice(0,m),f.ruleId=u.slice(m+1))}if(!f.place&&f.ancestors&&f.ancestors){const m=f.ancestors[f.ancestors.length-1];m&&(f.place=m.position)}const y=f.place&&"start"in f.place?f.place.start:f.place;this.ancestors=f.ancestors||void 0,this.cause=f.cause||void 0,this.column=y?y.column:void 0,this.fatal=void 0,this.file="",this.message=c,this.line=y?y.line:void 0,this.name=Bi(f.place)||"1:1",this.place=f.place||void 0,this.reason=this.message,this.ruleId=f.ruleId||void 0,this.source=f.source||void 0,this.stack=d&&f.cause&&typeof f.cause.stack=="string"?f.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 Jc={}.hasOwnProperty,Jb=new Map,Pb=/[A-Z]/g,$b=new Set(["table","tbody","thead","tfoot","tr"]),Wb=new Set(["td","th"]),ry="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eS(l,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let u;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=oS(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=uS(r,i.jsx,i.jsxs)}const c={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:u,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Kc:Yb,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},f=uy(c,l,void 0);return f&&typeof f!="string"?f:c.create(l,c.Fragment,{children:f||void 0},void 0)}function uy(l,i,r){if(i.type==="element")return tS(l,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return nS(l,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return aS(l,i,r);if(i.type==="mdxjsEsm")return lS(l,i);if(i.type==="root")return iS(l,i,r);if(i.type==="text")return rS(l,i)}function tS(l,i,r){const u=l.schema;let c=u;i.tagName.toLowerCase()==="svg"&&u.space==="html"&&(c=Kc,l.schema=c),l.ancestors.push(i);const f=sy(l,i.tagName,!1),d=sS(l,i);let y=$c(l,i);return $b.has(i.tagName)&&(y=y.filter(function(m){return typeof m=="string"?!kb(m):!0})),oy(l,d,f,i),Pc(d,y),l.ancestors.pop(),l.schema=u,l.create(i,f,d,r)}function nS(l,i){if(i.data&&i.data.estree&&l.evaluater){const u=i.data.estree.body[0];return u.type,l.evaluater.evaluateExpression(u.expression)}Yi(l,i.position)}function lS(l,i){if(i.data&&i.data.estree&&l.evaluater)return l.evaluater.evaluateProgram(i.data.estree);Yi(l,i.position)}function aS(l,i,r){const u=l.schema;let c=u;i.name==="svg"&&u.space==="html"&&(c=Kc,l.schema=c),l.ancestors.push(i);const f=i.name===null?l.Fragment:sy(l,i.name,!0),d=cS(l,i),y=$c(l,i);return oy(l,d,f,i),Pc(d,y),l.ancestors.pop(),l.schema=u,l.create(i,f,d,r)}function iS(l,i,r){const u={};return Pc(u,$c(l,i)),l.create(i,l.Fragment,u,r)}function rS(l,i){return i.value}function oy(l,i,r,u){typeof r!="string"&&r!==l.Fragment&&l.passNode&&(i.node=u)}function Pc(l,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(l.children=r)}}function uS(l,i,r){return u;function u(c,f,d,y){const h=Array.isArray(d.children)?r:i;return y?h(f,d,y):h(f,d)}}function oS(l,i){return r;function r(u,c,f,d){const y=Array.isArray(f.children),m=Fc(u);return i(c,f,d,y,{columnNumber:m?m.column-1:void 0,fileName:l,lineNumber:m?m.line:void 0},void 0)}}function sS(l,i){const r={};let u,c;for(c in i.properties)if(c!=="children"&&Jc.call(i.properties,c)){const f=fS(l,c,i.properties[c]);if(f){const[d,y]=f;l.tableCellAlignToStyle&&d==="align"&&typeof y=="string"&&Wb.has(i.tagName)?u=y:r[d]=y}}if(u){const f=r.style||(r.style={});f[l.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function cS(l,i){const r={};for(const u of i.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&l.evaluater){const f=u.data.estree.body[0];f.type;const d=f.expression;d.type;const y=d.properties[0];y.type,Object.assign(r,l.evaluater.evaluateExpression(y.argument))}else Yi(l,i.position);else{const c=u.name;let f;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&l.evaluater){const y=u.value.data.estree.body[0];y.type,f=l.evaluater.evaluateExpression(y.expression)}else Yi(l,i.position);else f=u.value===null?!0:u.value;r[c]=f}return r}function $c(l,i){const r=[];let u=-1;const c=l.passKeys?new Map:Jb;for(;++u<i.children.length;){const f=i.children[u];let d;if(l.passKeys){const m=f.type==="element"?f.tagName:f.type==="mdxJsxFlowElement"||f.type==="mdxJsxTextElement"?f.name:void 0;if(m){const h=c.get(m)||0;d=m+"-"+h,c.set(m,h+1)}}const y=uy(l,f,d);y!==void 0&&r.push(y)}return r}function fS(l,i,r){const u=Ub(l.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?jb(r):Vb(r)),u.property==="style"){let c=typeof r=="object"?r:dS(l,String(r));return l.stylePropertyNameCase==="css"&&(c=hS(c)),["style",c]}return[l.elementAttributeNameCase==="react"&&u.space?Db[u.property]||u.property:u.attribute,r]}}function dS(l,i){try{return Kb(i,{reactCompat:!0})}catch(r){if(l.ignoreInvalidStyle)return{};const u=r,c=new bt("Cannot parse `style` attribute",{ancestors:l.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=l.filePath||void 0,c.url=ry+"#cannot-parse-style-attribute",c}}function sy(l,i,r){let u;if(!r)u={type:"Literal",value:i};else if(i.includes(".")){const c=i.split(".");let f=-1,d;for(;++f<c.length;){const y=jm(c[f])?{type:"Identifier",name:c[f]}:{type:"Literal",value:c[f]};d=d?{type:"MemberExpression",object:d,property:y,computed:!!(f&&y.type==="Literal"),optional:!1}:y}u=d}else u=jm(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(u.type==="Literal"){const c=u.value;return Jc.call(l.components,c)?l.components[c]:c}if(l.evaluater)return l.evaluater.evaluateExpression(u);Yi(l)}function Yi(l,i){const r=new bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:l.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=l.filePath||void 0,r.url=ry+"#cannot-handle-mdx-estrees-without-createevaluater",r}function hS(l){const i={};let r;for(r in l)Jc.call(l,r)&&(i[pS(r)]=l[r]);return i}function pS(l){let i=l.replace(Pb,mS);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function mS(l){return"-"+l.toLowerCase()}const dc={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"]},gS={};function yS(l,i){const r=gS,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,c=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return cy(l,u,c)}function cy(l,i,r){if(vS(l)){if("value"in l)return l.type==="html"&&!r?"":l.value;if(i&&"alt"in l&&l.alt)return l.alt;if("children"in l)return Lm(l.children,i,r)}return Array.isArray(l)?Lm(l,i,r):""}function Lm(l,i,r){const u=[];let c=-1;for(;++c<l.length;)u[c]=cy(l[c],i,r);return u.join("")}function vS(l){return!!(l&&typeof l=="object")}const Bm=document.createElement("i");function Wc(l){const i="&"+l+";";Bm.innerHTML=i;const r=Bm.textContent;return r.charCodeAt(r.length-1)===59&&l!=="semi"||r===i?!1:r}function vn(l,i,r,u){const c=l.length;let f=0,d;if(i<0?i=-i>c?0:c+i:i=i>c?c:i,r=r>0?r:0,u.length<1e4)d=Array.from(u),d.unshift(i,r),l.splice(...d);else for(r&&l.splice(i,r);f<u.length;)d=u.slice(f,f+1e4),d.unshift(i,0),l.splice(...d),f+=1e4,i+=1e4}function ln(l,i){return l.length>0?(vn(l,l.length,0,i),l):i}const Um={}.hasOwnProperty;function xS(l){const i={};let r=-1;for(;++r<l.length;)bS(i,l[r]);return i}function bS(l,i){let r;for(r in i){const c=(Um.call(l,r)?l[r]:void 0)||(l[r]={}),f=i[r];let d;if(f)for(d in f){Um.call(c,d)||(c[d]=[]);const y=f[d];SS(c[d],Array.isArray(y)?y:y?[y]:[])}}}function SS(l,i){let r=-1;const u=[];for(;++r<i.length;)(i[r].add==="after"?l:u).push(i[r]);vn(l,0,0,u)}function fy(l,i){const r=Number.parseInt(l,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Ma(l){return l.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yn=vl(/[A-Za-z]/),Qt=vl(/[\dA-Za-z]/),ES=vl(/[#-'*+\--9=?A-Z^-~]/);function _c(l){return l!==null&&(l<32||l===127)}const Oc=vl(/\d/),CS=vl(/[\dA-Fa-f]/),TS=vl(/[!-/:-@[-`{-~]/);function ye(l){return l!==null&&l<-2}function Ot(l){return l!==null&&(l<0||l===32)}function De(l){return l===-2||l===-1||l===32}const wS=vl(new RegExp("\\p{P}|\\p{S}","u")),jS=vl(/\s/);function vl(l){return i;function i(r){return r!==null&&r>-1&&l.test(String.fromCharCode(r))}}function La(l){const i=[];let r=-1,u=0,c=0;for(;++r<l.length;){const f=l.charCodeAt(r);let d="";if(f===37&&Qt(l.charCodeAt(r+1))&&Qt(l.charCodeAt(r+2)))c=2;else if(f<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(f))||(d=String.fromCharCode(f));else if(f>55295&&f<57344){const y=l.charCodeAt(r+1);f<56320&&y>56319&&y<57344?(d=String.fromCharCode(f,y),c=1):d="�"}else d=String.fromCharCode(f);d&&(i.push(l.slice(u,r),encodeURIComponent(d)),u=r+c+1,d=""),c&&(r+=c,c=0)}return i.join("")+l.slice(u)}function Ze(l,i,r,u){const c=u?u-1:Number.POSITIVE_INFINITY;let f=0;return d;function d(m){return De(m)?(l.enter(r),y(m)):i(m)}function y(m){return De(m)&&f++<c?(l.consume(m),y):(l.exit(r),i(m))}}const AS={tokenize:zS};function zS(l){const i=l.attempt(this.parser.constructs.contentInitial,u,c);let r;return i;function u(y){if(y===null){l.consume(y);return}return l.enter("lineEnding"),l.consume(y),l.exit("lineEnding"),Ze(l,i,"linePrefix")}function c(y){return l.enter("paragraph"),f(y)}function f(y){const m=l.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,d(y)}function d(y){if(y===null){l.exit("chunkText"),l.exit("paragraph"),l.consume(y);return}return ye(y)?(l.consume(y),l.exit("chunkText"),f):(l.consume(y),d)}}const RS={tokenize:NS},Hm={tokenize:kS};function NS(l){const i=this,r=[];let u=0,c,f,d;return y;function y(_){if(u<r.length){const I=r[u];return i.containerState=I[1],l.attempt(I[0].continuation,m,h)(_)}return h(_)}function m(_){if(u++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,c&&D();const I=i.events.length;let W=I,B;for(;W--;)if(i.events[W][0]==="exit"&&i.events[W][1].type==="chunkFlow"){B=i.events[W][1].end;break}k(u);let Q=I;for(;Q<i.events.length;)i.events[Q][1].end={...B},Q++;return vn(i.events,W+1,0,i.events.slice(I)),i.events.length=Q,h(_)}return y(_)}function h(_){if(u===r.length){if(!c)return S(_);if(c.currentConstruct&&c.currentConstruct.concrete)return R(_);i.interrupt=!!(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return i.containerState={},l.check(Hm,g,v)(_)}function g(_){return c&&D(),k(u),S(_)}function v(_){return i.parser.lazy[i.now().line]=u!==r.length,d=i.now().offset,R(_)}function S(_){return i.containerState={},l.attempt(Hm,b,R)(_)}function b(_){return u++,r.push([i.currentConstruct,i.containerState]),S(_)}function R(_){if(_===null){c&&D(),k(0),l.consume(_);return}return c=c||i.parser.flow(i.now()),l.enter("chunkFlow",{_tokenizer:c,contentType:"flow",previous:f}),A(_)}function A(_){if(_===null){z(l.exit("chunkFlow"),!0),k(0),l.consume(_);return}return ye(_)?(l.consume(_),z(l.exit("chunkFlow")),u=0,i.interrupt=void 0,y):(l.consume(_),A)}function z(_,I){const W=i.sliceStream(_);if(I&&W.push(null),_.previous=f,f&&(f.next=_),f=_,c.defineSkip(_.start),c.write(W),i.parser.lazy[_.start.line]){let B=c.events.length;for(;B--;)if(c.events[B][1].start.offset<d&&(!c.events[B][1].end||c.events[B][1].end.offset>d))return;const Q=i.events.length;let V=Q,ee,oe;for(;V--;)if(i.events[V][0]==="exit"&&i.events[V][1].type==="chunkFlow"){if(ee){oe=i.events[V][1].end;break}ee=!0}for(k(u),B=Q;B<i.events.length;)i.events[B][1].end={...oe},B++;vn(i.events,V+1,0,i.events.slice(Q)),i.events.length=B}}function k(_){let I=r.length;for(;I-- >_;){const W=r[I];i.containerState=W[1],W[0].exit.call(i,l)}r.length=_}function D(){c.write([null]),f=void 0,c=void 0,i.containerState._closeFlow=void 0}}function kS(l,i,r){return Ze(l,l.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qm(l){if(l===null||Ot(l)||jS(l))return 1;if(wS(l))return 2}function ef(l,i,r){const u=[];let c=-1;for(;++c<l.length;){const f=l[c].resolveAll;f&&!u.includes(f)&&(i=f(i,r),u.push(f))}return i}const Dc={name:"attention",resolveAll:MS,tokenize:_S};function MS(l,i){let r=-1,u,c,f,d,y,m,h,g;for(;++r<l.length;)if(l[r][0]==="enter"&&l[r][1].type==="attentionSequence"&&l[r][1]._close){for(u=r;u--;)if(l[u][0]==="exit"&&l[u][1].type==="attentionSequence"&&l[u][1]._open&&i.sliceSerialize(l[u][1]).charCodeAt(0)===i.sliceSerialize(l[r][1]).charCodeAt(0)){if((l[u][1]._close||l[r][1]._open)&&(l[r][1].end.offset-l[r][1].start.offset)%3&&!((l[u][1].end.offset-l[u][1].start.offset+l[r][1].end.offset-l[r][1].start.offset)%3))continue;m=l[u][1].end.offset-l[u][1].start.offset>1&&l[r][1].end.offset-l[r][1].start.offset>1?2:1;const v={...l[u][1].end},S={...l[r][1].start};Ym(v,-m),Ym(S,m),d={type:m>1?"strongSequence":"emphasisSequence",start:v,end:{...l[u][1].end}},y={type:m>1?"strongSequence":"emphasisSequence",start:{...l[r][1].start},end:S},f={type:m>1?"strongText":"emphasisText",start:{...l[u][1].end},end:{...l[r][1].start}},c={type:m>1?"strong":"emphasis",start:{...d.start},end:{...y.end}},l[u][1].end={...d.start},l[r][1].start={...y.end},h=[],l[u][1].end.offset-l[u][1].start.offset&&(h=ln(h,[["enter",l[u][1],i],["exit",l[u][1],i]])),h=ln(h,[["enter",c,i],["enter",d,i],["exit",d,i],["enter",f,i]]),h=ln(h,ef(i.parser.constructs.insideSpan.null,l.slice(u+1,r),i)),h=ln(h,[["exit",f,i],["enter",y,i],["exit",y,i],["exit",c,i]]),l[r][1].end.offset-l[r][1].start.offset?(g=2,h=ln(h,[["enter",l[r][1],i],["exit",l[r][1],i]])):g=0,vn(l,u-1,r-u+3,h),r=u+h.length-g-2;break}}for(r=-1;++r<l.length;)l[r][1].type==="attentionSequence"&&(l[r][1].type="data");return l}function _S(l,i){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,c=qm(u);let f;return d;function d(m){return f=m,l.enter("attentionSequence"),y(m)}function y(m){if(m===f)return l.consume(m),y;const h=l.exit("attentionSequence"),g=qm(m),v=!g||g===2&&c||r.includes(m),S=!c||c===2&&g||r.includes(u);return h._open=!!(f===42?v:v&&(c||!S)),h._close=!!(f===42?S:S&&(g||!v)),i(m)}}function Ym(l,i){l.column+=i,l.offset+=i,l._bufferIndex+=i}const OS={name:"autolink",tokenize:DS};function DS(l,i,r){let u=0;return c;function c(b){return l.enter("autolink"),l.enter("autolinkMarker"),l.consume(b),l.exit("autolinkMarker"),l.enter("autolinkProtocol"),f}function f(b){return yn(b)?(l.consume(b),d):b===64?r(b):h(b)}function d(b){return b===43||b===45||b===46||Qt(b)?(u=1,y(b)):h(b)}function y(b){return b===58?(l.consume(b),u=0,m):(b===43||b===45||b===46||Qt(b))&&u++<32?(l.consume(b),y):(u=0,h(b))}function m(b){return b===62?(l.exit("autolinkProtocol"),l.enter("autolinkMarker"),l.consume(b),l.exit("autolinkMarker"),l.exit("autolink"),i):b===null||b===32||b===60||_c(b)?r(b):(l.consume(b),m)}function h(b){return b===64?(l.consume(b),g):ES(b)?(l.consume(b),h):r(b)}function g(b){return Qt(b)?v(b):r(b)}function v(b){return b===46?(l.consume(b),u=0,g):b===62?(l.exit("autolinkProtocol").type="autolinkEmail",l.enter("autolinkMarker"),l.consume(b),l.exit("autolinkMarker"),l.exit("autolink"),i):S(b)}function S(b){if((b===45||Qt(b))&&u++<63){const R=b===45?S:v;return l.consume(b),R}return r(b)}}const ku={partial:!0,tokenize:LS};function LS(l,i,r){return u;function u(f){return De(f)?Ze(l,c,"linePrefix")(f):c(f)}function c(f){return f===null||ye(f)?i(f):r(f)}}const dy={continuation:{tokenize:US},exit:HS,name:"blockQuote",tokenize:BS};function BS(l,i,r){const u=this;return c;function c(d){if(d===62){const y=u.containerState;return y.open||(l.enter("blockQuote",{_container:!0}),y.open=!0),l.enter("blockQuotePrefix"),l.enter("blockQuoteMarker"),l.consume(d),l.exit("blockQuoteMarker"),f}return r(d)}function f(d){return De(d)?(l.enter("blockQuotePrefixWhitespace"),l.consume(d),l.exit("blockQuotePrefixWhitespace"),l.exit("blockQuotePrefix"),i):(l.exit("blockQuotePrefix"),i(d))}}function US(l,i,r){const u=this;return c;function c(d){return De(d)?Ze(l,f,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):f(d)}function f(d){return l.attempt(dy,i,r)(d)}}function HS(l){l.exit("blockQuote")}const hy={name:"characterEscape",tokenize:qS};function qS(l,i,r){return u;function u(f){return l.enter("characterEscape"),l.enter("escapeMarker"),l.consume(f),l.exit("escapeMarker"),c}function c(f){return TS(f)?(l.enter("characterEscapeValue"),l.consume(f),l.exit("characterEscapeValue"),l.exit("characterEscape"),i):r(f)}}const py={name:"characterReference",tokenize:YS};function YS(l,i,r){const u=this;let c=0,f,d;return y;function y(v){return l.enter("characterReference"),l.enter("characterReferenceMarker"),l.consume(v),l.exit("characterReferenceMarker"),m}function m(v){return v===35?(l.enter("characterReferenceMarkerNumeric"),l.consume(v),l.exit("characterReferenceMarkerNumeric"),h):(l.enter("characterReferenceValue"),f=31,d=Qt,g(v))}function h(v){return v===88||v===120?(l.enter("characterReferenceMarkerHexadecimal"),l.consume(v),l.exit("characterReferenceMarkerHexadecimal"),l.enter("characterReferenceValue"),f=6,d=CS,g):(l.enter("characterReferenceValue"),f=7,d=Oc,g(v))}function g(v){if(v===59&&c){const S=l.exit("characterReferenceValue");return d===Qt&&!Wc(u.sliceSerialize(S))?r(v):(l.enter("characterReferenceMarker"),l.consume(v),l.exit("characterReferenceMarker"),l.exit("characterReference"),i)}return d(v)&&c++<f?(l.consume(v),g):r(v)}}const Vm={partial:!0,tokenize:IS},Im={concrete:!0,name:"codeFenced",tokenize:VS};function VS(l,i,r){const u=this,c={partial:!0,tokenize:W};let f=0,d=0,y;return m;function m(B){return h(B)}function h(B){const Q=u.events[u.events.length-1];return f=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,y=B,l.enter("codeFenced"),l.enter("codeFencedFence"),l.enter("codeFencedFenceSequence"),g(B)}function g(B){return B===y?(d++,l.consume(B),g):d<3?r(B):(l.exit("codeFencedFenceSequence"),De(B)?Ze(l,v,"whitespace")(B):v(B))}function v(B){return B===null||ye(B)?(l.exit("codeFencedFence"),u.interrupt?i(B):l.check(Vm,A,I)(B)):(l.enter("codeFencedFenceInfo"),l.enter("chunkString",{contentType:"string"}),S(B))}function S(B){return B===null||ye(B)?(l.exit("chunkString"),l.exit("codeFencedFenceInfo"),v(B)):De(B)?(l.exit("chunkString"),l.exit("codeFencedFenceInfo"),Ze(l,b,"whitespace")(B)):B===96&&B===y?r(B):(l.consume(B),S)}function b(B){return B===null||ye(B)?v(B):(l.enter("codeFencedFenceMeta"),l.enter("chunkString",{contentType:"string"}),R(B))}function R(B){return B===null||ye(B)?(l.exit("chunkString"),l.exit("codeFencedFenceMeta"),v(B)):B===96&&B===y?r(B):(l.consume(B),R)}function A(B){return l.attempt(c,I,z)(B)}function z(B){return l.enter("lineEnding"),l.consume(B),l.exit("lineEnding"),k}function k(B){return f>0&&De(B)?Ze(l,D,"linePrefix",f+1)(B):D(B)}function D(B){return B===null||ye(B)?l.check(Vm,A,I)(B):(l.enter("codeFlowValue"),_(B))}function _(B){return B===null||ye(B)?(l.exit("codeFlowValue"),D(B)):(l.consume(B),_)}function I(B){return l.exit("codeFenced"),i(B)}function W(B,Q,V){let ee=0;return oe;function oe(F){return B.enter("lineEnding"),B.consume(F),B.exit("lineEnding"),ne}function ne(F){return B.enter("codeFencedFence"),De(F)?Ze(B,re,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):re(F)}function re(F){return F===y?(B.enter("codeFencedFenceSequence"),he(F)):V(F)}function he(F){return F===y?(ee++,B.consume(F),he):ee>=d?(B.exit("codeFencedFenceSequence"),De(F)?Ze(B,P,"whitespace")(F):P(F)):V(F)}function P(F){return F===null||ye(F)?(B.exit("codeFencedFence"),Q(F)):V(F)}}}function IS(l,i,r){const u=this;return c;function c(d){return d===null?r(d):(l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),f)}function f(d){return u.parser.lazy[u.now().line]?r(d):i(d)}}const hc={name:"codeIndented",tokenize:QS},GS={partial:!0,tokenize:XS};function QS(l,i,r){const u=this;return c;function c(h){return l.enter("codeIndented"),Ze(l,f,"linePrefix",5)(h)}function f(h){const g=u.events[u.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?d(h):r(h)}function d(h){return h===null?m(h):ye(h)?l.attempt(GS,d,m)(h):(l.enter("codeFlowValue"),y(h))}function y(h){return h===null||ye(h)?(l.exit("codeFlowValue"),d(h)):(l.consume(h),y)}function m(h){return l.exit("codeIndented"),i(h)}}function XS(l,i,r){const u=this;return c;function c(d){return u.parser.lazy[u.now().line]?r(d):ye(d)?(l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),c):Ze(l,f,"linePrefix",5)(d)}function f(d){const y=u.events[u.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?i(d):ye(d)?c(d):r(d)}}const ZS={name:"codeText",previous:FS,resolve:KS,tokenize:JS};function KS(l){let i=l.length-4,r=3,u,c;if((l[r][1].type==="lineEnding"||l[r][1].type==="space")&&(l[i][1].type==="lineEnding"||l[i][1].type==="space")){for(u=r;++u<i;)if(l[u][1].type==="codeTextData"){l[r][1].type="codeTextPadding",l[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(u=r-1,i++;++u<=i;)c===void 0?u!==i&&l[u][1].type!=="lineEnding"&&(c=u):(u===i||l[u][1].type==="lineEnding")&&(l[c][1].type="codeTextData",u!==c+2&&(l[c][1].end=l[u-1][1].end,l.splice(c+2,u-c-2),i-=u-c-2,u=c+2),c=void 0);return l}function FS(l){return l!==96||this.events[this.events.length-1][1].type==="characterEscape"}function JS(l,i,r){let u=0,c,f;return d;function d(v){return l.enter("codeText"),l.enter("codeTextSequence"),y(v)}function y(v){return v===96?(l.consume(v),u++,y):(l.exit("codeTextSequence"),m(v))}function m(v){return v===null?r(v):v===32?(l.enter("space"),l.consume(v),l.exit("space"),m):v===96?(f=l.enter("codeTextSequence"),c=0,g(v)):ye(v)?(l.enter("lineEnding"),l.consume(v),l.exit("lineEnding"),m):(l.enter("codeTextData"),h(v))}function h(v){return v===null||v===32||v===96||ye(v)?(l.exit("codeTextData"),m(v)):(l.consume(v),h)}function g(v){return v===96?(l.consume(v),c++,g):c===u?(l.exit("codeTextSequence"),l.exit("codeText"),i(v)):(f.type="codeTextData",h(v))}}class PS{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const u=r??Number.POSITIVE_INFINITY;return u<this.left.length?this.left.slice(i,u):i>this.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(i,r,u){const c=r||0;this.setCursor(Math.trunc(i));const f=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return u&&Di(this.left,u),f.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Di(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Di(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Di(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Di(this.left,r.reverse())}}}function Di(l,i){let r=0;if(i.length<1e4)l.push(...i);else for(;r<i.length;)l.push(...i.slice(r,r+1e4)),r+=1e4}function my(l){const i={};let r=-1,u,c,f,d,y,m,h;const g=new PS(l);for(;++r<g.length;){for(;r in i;)r=i[r];if(u=g.get(r),r&&u[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(m=u[1]._tokenizer.events,f=0,f<m.length&&m[f][1].type==="lineEndingBlank"&&(f+=2),f<m.length&&m[f][1].type==="content"))for(;++f<m.length&&m[f][1].type!=="content";)m[f][1].type==="chunkText"&&(m[f][1]._isInFirstContentOfListItem=!0,f++);if(u[0]==="enter")u[1].contentType&&(Object.assign(i,$S(g,r)),r=i[r],h=!0);else if(u[1]._container){for(f=r,c=void 0;f--;)if(d=g.get(f),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(c&&(g.get(c)[1].type="lineEndingBlank"),d[1].type="lineEnding",c=f);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;c&&(u[1].end={...g.get(c)[1].start},y=g.slice(c,r),y.unshift(u),g.splice(c,r-c+1,y))}}return vn(l,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function $S(l,i){const r=l.get(i)[1],u=l.get(i)[2];let c=i-1;const f=[];let d=r._tokenizer;d||(d=u.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const y=d.events,m=[],h={};let g,v,S=-1,b=r,R=0,A=0;const z=[A];for(;b;){for(;l.get(++c)[1]!==b;);f.push(c),b._tokenizer||(g=u.sliceStream(b),b.next||g.push(null),v&&d.defineSkip(b.start),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(g),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),v=b,b=b.next}for(b=r;++S<y.length;)y[S][0]==="exit"&&y[S-1][0]==="enter"&&y[S][1].type===y[S-1][1].type&&y[S][1].start.line!==y[S][1].end.line&&(A=S+1,z.push(A),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(d.events=[],b?(b._tokenizer=void 0,b.previous=void 0):z.pop(),S=z.length;S--;){const k=y.slice(z[S],z[S+1]),D=f.pop();m.push([D,D+k.length-1]),l.splice(D,2,k)}for(m.reverse(),S=-1;++S<m.length;)h[R+m[S][0]]=R+m[S][1],R+=m[S][1]-m[S][0]-1;return h}const WS={resolve:t2,tokenize:n2},e2={partial:!0,tokenize:l2};function t2(l){return my(l),l}function n2(l,i){let r;return u;function u(y){return l.enter("content"),r=l.enter("chunkContent",{contentType:"content"}),c(y)}function c(y){return y===null?f(y):ye(y)?l.check(e2,d,f)(y):(l.consume(y),c)}function f(y){return l.exit("chunkContent"),l.exit("content"),i(y)}function d(y){return l.consume(y),l.exit("chunkContent"),r.next=l.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,c}}function l2(l,i,r){const u=this;return c;function c(d){return l.exit("chunkContent"),l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),Ze(l,f,"linePrefix")}function f(d){if(d===null||ye(d))return r(d);const y=u.events[u.events.length-1];return!u.parser.constructs.disable.null.includes("codeIndented")&&y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?i(d):l.interrupt(u.parser.constructs.flow,r,i)(d)}}function gy(l,i,r,u,c,f,d,y,m){const h=m||Number.POSITIVE_INFINITY;let g=0;return v;function v(k){return k===60?(l.enter(u),l.enter(c),l.enter(f),l.consume(k),l.exit(f),S):k===null||k===32||k===41||_c(k)?r(k):(l.enter(u),l.enter(d),l.enter(y),l.enter("chunkString",{contentType:"string"}),A(k))}function S(k){return k===62?(l.enter(f),l.consume(k),l.exit(f),l.exit(c),l.exit(u),i):(l.enter(y),l.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(l.exit("chunkString"),l.exit(y),S(k)):k===null||k===60||ye(k)?r(k):(l.consume(k),k===92?R:b)}function R(k){return k===60||k===62||k===92?(l.consume(k),b):b(k)}function A(k){return!g&&(k===null||k===41||Ot(k))?(l.exit("chunkString"),l.exit(y),l.exit(d),l.exit(u),i(k)):g<h&&k===40?(l.consume(k),g++,A):k===41?(l.consume(k),g--,A):k===null||k===32||k===40||_c(k)?r(k):(l.consume(k),k===92?z:A)}function z(k){return k===40||k===41||k===92?(l.consume(k),A):A(k)}}function yy(l,i,r,u,c,f){const d=this;let y=0,m;return h;function h(b){return l.enter(u),l.enter(c),l.consume(b),l.exit(c),l.enter(f),g}function g(b){return y>999||b===null||b===91||b===93&&!m||b===94&&!y&&"_hiddenFootnoteSupport"in d.parser.constructs?r(b):b===93?(l.exit(f),l.enter(c),l.consume(b),l.exit(c),l.exit(u),i):ye(b)?(l.enter("lineEnding"),l.consume(b),l.exit("lineEnding"),g):(l.enter("chunkString",{contentType:"string"}),v(b))}function v(b){return b===null||b===91||b===93||ye(b)||y++>999?(l.exit("chunkString"),g(b)):(l.consume(b),m||(m=!De(b)),b===92?S:v)}function S(b){return b===91||b===92||b===93?(l.consume(b),y++,v):v(b)}}function vy(l,i,r,u,c,f){let d;return y;function y(S){return S===34||S===39||S===40?(l.enter(u),l.enter(c),l.consume(S),l.exit(c),d=S===40?41:S,m):r(S)}function m(S){return S===d?(l.enter(c),l.consume(S),l.exit(c),l.exit(u),i):(l.enter(f),h(S))}function h(S){return S===d?(l.exit(f),m(d)):S===null?r(S):ye(S)?(l.enter("lineEnding"),l.consume(S),l.exit("lineEnding"),Ze(l,h,"linePrefix")):(l.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===d||S===null||ye(S)?(l.exit("chunkString"),h(S)):(l.consume(S),S===92?v:g)}function v(S){return S===d||S===92?(l.consume(S),g):g(S)}}function Ui(l,i){let r;return u;function u(c){return ye(c)?(l.enter("lineEnding"),l.consume(c),l.exit("lineEnding"),r=!0,u):De(c)?Ze(l,u,r?"linePrefix":"lineSuffix")(c):i(c)}}const a2={name:"definition",tokenize:r2},i2={partial:!0,tokenize:u2};function r2(l,i,r){const u=this;let c;return f;function f(b){return l.enter("definition"),d(b)}function d(b){return yy.call(u,l,y,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function y(b){return c=Ma(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),b===58?(l.enter("definitionMarker"),l.consume(b),l.exit("definitionMarker"),m):r(b)}function m(b){return Ot(b)?Ui(l,h)(b):h(b)}function h(b){return gy(l,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return l.attempt(i2,v,v)(b)}function v(b){return De(b)?Ze(l,S,"whitespace")(b):S(b)}function S(b){return b===null||ye(b)?(l.exit("definition"),u.parser.defined.push(c),i(b)):r(b)}}function u2(l,i,r){return u;function u(y){return Ot(y)?Ui(l,c)(y):r(y)}function c(y){return vy(l,f,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(y)}function f(y){return De(y)?Ze(l,d,"whitespace")(y):d(y)}function d(y){return y===null||ye(y)?i(y):r(y)}}const o2={name:"hardBreakEscape",tokenize:s2};function s2(l,i,r){return u;function u(f){return l.enter("hardBreakEscape"),l.consume(f),c}function c(f){return ye(f)?(l.exit("hardBreakEscape"),i(f)):r(f)}}const c2={name:"headingAtx",resolve:f2,tokenize:d2};function f2(l,i){let r=l.length-2,u=3,c,f;return l[u][1].type==="whitespace"&&(u+=2),r-2>u&&l[r][1].type==="whitespace"&&(r-=2),l[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&l[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(c={type:"atxHeadingText",start:l[u][1].start,end:l[r][1].end},f={type:"chunkText",start:l[u][1].start,end:l[r][1].end,contentType:"text"},vn(l,u,r-u+1,[["enter",c,i],["enter",f,i],["exit",f,i],["exit",c,i]])),l}function d2(l,i,r){let u=0;return c;function c(g){return l.enter("atxHeading"),f(g)}function f(g){return l.enter("atxHeadingSequence"),d(g)}function d(g){return g===35&&u++<6?(l.consume(g),d):g===null||Ot(g)?(l.exit("atxHeadingSequence"),y(g)):r(g)}function y(g){return g===35?(l.enter("atxHeadingSequence"),m(g)):g===null||ye(g)?(l.exit("atxHeading"),i(g)):De(g)?Ze(l,y,"whitespace")(g):(l.enter("atxHeadingText"),h(g))}function m(g){return g===35?(l.consume(g),m):(l.exit("atxHeadingSequence"),y(g))}function h(g){return g===null||g===35||Ot(g)?(l.exit("atxHeadingText"),y(g)):(l.consume(g),h)}}const h2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gm=["pre","script","style","textarea"],p2={concrete:!0,name:"htmlFlow",resolveTo:y2,tokenize:v2},m2={partial:!0,tokenize:b2},g2={partial:!0,tokenize:x2};function y2(l){let i=l.length;for(;i--&&!(l[i][0]==="enter"&&l[i][1].type==="htmlFlow"););return i>1&&l[i-2][1].type==="linePrefix"&&(l[i][1].start=l[i-2][1].start,l[i+1][1].start=l[i-2][1].start,l.splice(i-2,2)),l}function v2(l,i,r){const u=this;let c,f,d,y,m;return h;function h(C){return g(C)}function g(C){return l.enter("htmlFlow"),l.enter("htmlFlowData"),l.consume(C),v}function v(C){return C===33?(l.consume(C),S):C===47?(l.consume(C),f=!0,A):C===63?(l.consume(C),c=3,u.interrupt?i:T):yn(C)?(l.consume(C),d=String.fromCharCode(C),z):r(C)}function S(C){return C===45?(l.consume(C),c=2,b):C===91?(l.consume(C),c=5,y=0,R):yn(C)?(l.consume(C),c=4,u.interrupt?i:T):r(C)}function b(C){return C===45?(l.consume(C),u.interrupt?i:T):r(C)}function R(C){const te="CDATA[";return C===te.charCodeAt(y++)?(l.consume(C),y===te.length?u.interrupt?i:re:R):r(C)}function A(C){return yn(C)?(l.consume(C),d=String.fromCharCode(C),z):r(C)}function z(C){if(C===null||C===47||C===62||Ot(C)){const te=C===47,fe=d.toLowerCase();return!te&&!f&&Gm.includes(fe)?(c=1,u.interrupt?i(C):re(C)):h2.includes(d.toLowerCase())?(c=6,te?(l.consume(C),k):u.interrupt?i(C):re(C)):(c=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(C):f?D(C):_(C))}return C===45||Qt(C)?(l.consume(C),d+=String.fromCharCode(C),z):r(C)}function k(C){return C===62?(l.consume(C),u.interrupt?i:re):r(C)}function D(C){return De(C)?(l.consume(C),D):oe(C)}function _(C){return C===47?(l.consume(C),oe):C===58||C===95||yn(C)?(l.consume(C),I):De(C)?(l.consume(C),_):oe(C)}function I(C){return C===45||C===46||C===58||C===95||Qt(C)?(l.consume(C),I):W(C)}function W(C){return C===61?(l.consume(C),B):De(C)?(l.consume(C),W):_(C)}function B(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(l.consume(C),m=C,Q):De(C)?(l.consume(C),B):V(C)}function Q(C){return C===m?(l.consume(C),m=null,ee):C===null||ye(C)?r(C):(l.consume(C),Q)}function V(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Ot(C)?W(C):(l.consume(C),V)}function ee(C){return C===47||C===62||De(C)?_(C):r(C)}function oe(C){return C===62?(l.consume(C),ne):r(C)}function ne(C){return C===null||ye(C)?re(C):De(C)?(l.consume(C),ne):r(C)}function re(C){return C===45&&c===2?(l.consume(C),U):C===60&&c===1?(l.consume(C),$):C===62&&c===4?(l.consume(C),j):C===63&&c===3?(l.consume(C),T):C===93&&c===5?(l.consume(C),ae):ye(C)&&(c===6||c===7)?(l.exit("htmlFlowData"),l.check(m2,O,he)(C)):C===null||ye(C)?(l.exit("htmlFlowData"),he(C)):(l.consume(C),re)}function he(C){return l.check(g2,P,O)(C)}function P(C){return l.enter("lineEnding"),l.consume(C),l.exit("lineEnding"),F}function F(C){return C===null||ye(C)?he(C):(l.enter("htmlFlowData"),re(C))}function U(C){return C===45?(l.consume(C),T):re(C)}function $(C){return C===47?(l.consume(C),d="",se):re(C)}function se(C){if(C===62){const te=d.toLowerCase();return Gm.includes(te)?(l.consume(C),j):re(C)}return yn(C)&&d.length<8?(l.consume(C),d+=String.fromCharCode(C),se):re(C)}function ae(C){return C===93?(l.consume(C),T):re(C)}function T(C){return C===62?(l.consume(C),j):C===45&&c===2?(l.consume(C),T):re(C)}function j(C){return C===null||ye(C)?(l.exit("htmlFlowData"),O(C)):(l.consume(C),j)}function O(C){return l.exit("htmlFlow"),i(C)}}function x2(l,i,r){const u=this;return c;function c(d){return ye(d)?(l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),f):r(d)}function f(d){return u.parser.lazy[u.now().line]?r(d):i(d)}}function b2(l,i,r){return u;function u(c){return l.enter("lineEnding"),l.consume(c),l.exit("lineEnding"),l.attempt(ku,i,r)}}const S2={name:"htmlText",tokenize:E2};function E2(l,i,r){const u=this;let c,f,d;return y;function y(T){return l.enter("htmlText"),l.enter("htmlTextData"),l.consume(T),m}function m(T){return T===33?(l.consume(T),h):T===47?(l.consume(T),W):T===63?(l.consume(T),_):yn(T)?(l.consume(T),V):r(T)}function h(T){return T===45?(l.consume(T),g):T===91?(l.consume(T),f=0,R):yn(T)?(l.consume(T),D):r(T)}function g(T){return T===45?(l.consume(T),b):r(T)}function v(T){return T===null?r(T):T===45?(l.consume(T),S):ye(T)?(d=v,$(T)):(l.consume(T),v)}function S(T){return T===45?(l.consume(T),b):v(T)}function b(T){return T===62?U(T):T===45?S(T):v(T)}function R(T){const j="CDATA[";return T===j.charCodeAt(f++)?(l.consume(T),f===j.length?A:R):r(T)}function A(T){return T===null?r(T):T===93?(l.consume(T),z):ye(T)?(d=A,$(T)):(l.consume(T),A)}function z(T){return T===93?(l.consume(T),k):A(T)}function k(T){return T===62?U(T):T===93?(l.consume(T),k):A(T)}function D(T){return T===null||T===62?U(T):ye(T)?(d=D,$(T)):(l.consume(T),D)}function _(T){return T===null?r(T):T===63?(l.consume(T),I):ye(T)?(d=_,$(T)):(l.consume(T),_)}function I(T){return T===62?U(T):_(T)}function W(T){return yn(T)?(l.consume(T),B):r(T)}function B(T){return T===45||Qt(T)?(l.consume(T),B):Q(T)}function Q(T){return ye(T)?(d=Q,$(T)):De(T)?(l.consume(T),Q):U(T)}function V(T){return T===45||Qt(T)?(l.consume(T),V):T===47||T===62||Ot(T)?ee(T):r(T)}function ee(T){return T===47?(l.consume(T),U):T===58||T===95||yn(T)?(l.consume(T),oe):ye(T)?(d=ee,$(T)):De(T)?(l.consume(T),ee):U(T)}function oe(T){return T===45||T===46||T===58||T===95||Qt(T)?(l.consume(T),oe):ne(T)}function ne(T){return T===61?(l.consume(T),re):ye(T)?(d=ne,$(T)):De(T)?(l.consume(T),ne):ee(T)}function re(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(l.consume(T),c=T,he):ye(T)?(d=re,$(T)):De(T)?(l.consume(T),re):(l.consume(T),P)}function he(T){return T===c?(l.consume(T),c=void 0,F):T===null?r(T):ye(T)?(d=he,$(T)):(l.consume(T),he)}function P(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Ot(T)?ee(T):(l.consume(T),P)}function F(T){return T===47||T===62||Ot(T)?ee(T):r(T)}function U(T){return T===62?(l.consume(T),l.exit("htmlTextData"),l.exit("htmlText"),i):r(T)}function $(T){return l.exit("htmlTextData"),l.enter("lineEnding"),l.consume(T),l.exit("lineEnding"),se}function se(T){return De(T)?Ze(l,ae,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ae(T)}function ae(T){return l.enter("htmlTextData"),d(T)}}const tf={name:"labelEnd",resolveAll:j2,resolveTo:A2,tokenize:z2},C2={tokenize:R2},T2={tokenize:N2},w2={tokenize:k2};function j2(l){let i=-1;const r=[];for(;++i<l.length;){const u=l[i][1];if(r.push(l[i]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){const c=u.type==="labelImage"?4:2;u.type="data",i+=c}}return l.length!==r.length&&vn(l,0,l.length,r),l}function A2(l,i){let r=l.length,u=0,c,f,d,y;for(;r--;)if(c=l[r][1],f){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;l[r][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(d){if(l[r][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(f=r,c.type!=="labelLink")){u=2;break}}else c.type==="labelEnd"&&(d=r);const m={type:l[f][1].type==="labelLink"?"link":"image",start:{...l[f][1].start},end:{...l[l.length-1][1].end}},h={type:"label",start:{...l[f][1].start},end:{...l[d][1].end}},g={type:"labelText",start:{...l[f+u+2][1].end},end:{...l[d-2][1].start}};return y=[["enter",m,i],["enter",h,i]],y=ln(y,l.slice(f+1,f+u+3)),y=ln(y,[["enter",g,i]]),y=ln(y,ef(i.parser.constructs.insideSpan.null,l.slice(f+u+4,d-3),i)),y=ln(y,[["exit",g,i],l[d-2],l[d-1],["exit",h,i]]),y=ln(y,l.slice(d+1)),y=ln(y,[["exit",m,i]]),vn(l,f,l.length,y),l}function z2(l,i,r){const u=this;let c=u.events.length,f,d;for(;c--;)if((u.events[c][1].type==="labelImage"||u.events[c][1].type==="labelLink")&&!u.events[c][1]._balanced){f=u.events[c][1];break}return y;function y(S){return f?f._inactive?v(S):(d=u.parser.defined.includes(Ma(u.sliceSerialize({start:f.end,end:u.now()}))),l.enter("labelEnd"),l.enter("labelMarker"),l.consume(S),l.exit("labelMarker"),l.exit("labelEnd"),m):r(S)}function m(S){return S===40?l.attempt(C2,g,d?g:v)(S):S===91?l.attempt(T2,g,d?h:v)(S):d?g(S):v(S)}function h(S){return l.attempt(w2,g,v)(S)}function g(S){return i(S)}function v(S){return f._balanced=!0,r(S)}}function R2(l,i,r){return u;function u(v){return l.enter("resource"),l.enter("resourceMarker"),l.consume(v),l.exit("resourceMarker"),c}function c(v){return Ot(v)?Ui(l,f)(v):f(v)}function f(v){return v===41?g(v):gy(l,d,y,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(v)}function d(v){return Ot(v)?Ui(l,m)(v):g(v)}function y(v){return r(v)}function m(v){return v===34||v===39||v===40?vy(l,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(v):g(v)}function h(v){return Ot(v)?Ui(l,g)(v):g(v)}function g(v){return v===41?(l.enter("resourceMarker"),l.consume(v),l.exit("resourceMarker"),l.exit("resource"),i):r(v)}}function N2(l,i,r){const u=this;return c;function c(y){return yy.call(u,l,f,d,"reference","referenceMarker","referenceString")(y)}function f(y){return u.parser.defined.includes(Ma(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?i(y):r(y)}function d(y){return r(y)}}function k2(l,i,r){return u;function u(f){return l.enter("reference"),l.enter("referenceMarker"),l.consume(f),l.exit("referenceMarker"),c}function c(f){return f===93?(l.enter("referenceMarker"),l.consume(f),l.exit("referenceMarker"),l.exit("reference"),i):r(f)}}const M2={name:"labelStartImage",resolveAll:tf.resolveAll,tokenize:_2};function _2(l,i,r){const u=this;return c;function c(y){return l.enter("labelImage"),l.enter("labelImageMarker"),l.consume(y),l.exit("labelImageMarker"),f}function f(y){return y===91?(l.enter("labelMarker"),l.consume(y),l.exit("labelMarker"),l.exit("labelImage"),d):r(y)}function d(y){return y===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(y):i(y)}}const O2={name:"labelStartLink",resolveAll:tf.resolveAll,tokenize:D2};function D2(l,i,r){const u=this;return c;function c(d){return l.enter("labelLink"),l.enter("labelMarker"),l.consume(d),l.exit("labelMarker"),l.exit("labelLink"),f}function f(d){return d===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(d):i(d)}}const pc={name:"lineEnding",tokenize:L2};function L2(l,i){return r;function r(u){return l.enter("lineEnding"),l.consume(u),l.exit("lineEnding"),Ze(l,i,"linePrefix")}}const bu={name:"thematicBreak",tokenize:B2};function B2(l,i,r){let u=0,c;return f;function f(h){return l.enter("thematicBreak"),d(h)}function d(h){return c=h,y(h)}function y(h){return h===c?(l.enter("thematicBreakSequence"),m(h)):u>=3&&(h===null||ye(h))?(l.exit("thematicBreak"),i(h)):r(h)}function m(h){return h===c?(l.consume(h),u++,m):(l.exit("thematicBreakSequence"),De(h)?Ze(l,y,"whitespace")(h):y(h))}}const Mt={continuation:{tokenize:Y2},exit:I2,name:"list",tokenize:q2},U2={partial:!0,tokenize:G2},H2={partial:!0,tokenize:V2};function q2(l,i,r){const u=this,c=u.events[u.events.length-1];let f=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,d=0;return y;function y(b){const R=u.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(R==="listUnordered"?!u.containerState.marker||b===u.containerState.marker:Oc(b)){if(u.containerState.type||(u.containerState.type=R,l.enter(R,{_container:!0})),R==="listUnordered")return l.enter("listItemPrefix"),b===42||b===45?l.check(bu,r,h)(b):h(b);if(!u.interrupt||b===49)return l.enter("listItemPrefix"),l.enter("listItemValue"),m(b)}return r(b)}function m(b){return Oc(b)&&++d<10?(l.consume(b),m):(!u.interrupt||d<2)&&(u.containerState.marker?b===u.containerState.marker:b===41||b===46)?(l.exit("listItemValue"),h(b)):r(b)}function h(b){return l.enter("listItemMarker"),l.consume(b),l.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||b,l.check(ku,u.interrupt?r:g,l.attempt(U2,S,v))}function g(b){return u.containerState.initialBlankLine=!0,f++,S(b)}function v(b){return De(b)?(l.enter("listItemPrefixWhitespace"),l.consume(b),l.exit("listItemPrefixWhitespace"),S):r(b)}function S(b){return u.containerState.size=f+u.sliceSerialize(l.exit("listItemPrefix"),!0).length,i(b)}}function Y2(l,i,r){const u=this;return u.containerState._closeFlow=void 0,l.check(ku,c,f);function c(y){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Ze(l,i,"listItemIndent",u.containerState.size+1)(y)}function f(y){return u.containerState.furtherBlankLines||!De(y)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,d(y)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,l.attempt(H2,i,d)(y))}function d(y){return u.containerState._closeFlow=!0,u.interrupt=void 0,Ze(l,l.attempt(Mt,i,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y)}}function V2(l,i,r){const u=this;return Ze(l,c,"listItemIndent",u.containerState.size+1);function c(f){const d=u.events[u.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===u.containerState.size?i(f):r(f)}}function I2(l){l.exit(this.containerState.type)}function G2(l,i,r){const u=this;return Ze(l,c,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(f){const d=u.events[u.events.length-1];return!De(f)&&d&&d[1].type==="listItemPrefixWhitespace"?i(f):r(f)}}const Qm={name:"setextUnderline",resolveTo:Q2,tokenize:X2};function Q2(l,i){let r=l.length,u,c,f;for(;r--;)if(l[r][0]==="enter"){if(l[r][1].type==="content"){u=r;break}l[r][1].type==="paragraph"&&(c=r)}else l[r][1].type==="content"&&l.splice(r,1),!f&&l[r][1].type==="definition"&&(f=r);const d={type:"setextHeading",start:{...l[u][1].start},end:{...l[l.length-1][1].end}};return l[c][1].type="setextHeadingText",f?(l.splice(c,0,["enter",d,i]),l.splice(f+1,0,["exit",l[u][1],i]),l[u][1].end={...l[f][1].end}):l[u][1]=d,l.push(["exit",d,i]),l}function X2(l,i,r){const u=this;let c;return f;function f(h){let g=u.events.length,v;for(;g--;)if(u.events[g][1].type!=="lineEnding"&&u.events[g][1].type!=="linePrefix"&&u.events[g][1].type!=="content"){v=u.events[g][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||v)?(l.enter("setextHeadingLine"),c=h,d(h)):r(h)}function d(h){return l.enter("setextHeadingLineSequence"),y(h)}function y(h){return h===c?(l.consume(h),y):(l.exit("setextHeadingLineSequence"),De(h)?Ze(l,m,"lineSuffix")(h):m(h))}function m(h){return h===null||ye(h)?(l.exit("setextHeadingLine"),i(h)):r(h)}}const Z2={tokenize:K2};function K2(l){const i=this,r=l.attempt(ku,u,l.attempt(this.parser.constructs.flowInitial,c,Ze(l,l.attempt(this.parser.constructs.flow,c,l.attempt(WS,c)),"linePrefix")));return r;function u(f){if(f===null){l.consume(f);return}return l.enter("lineEndingBlank"),l.consume(f),l.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function c(f){if(f===null){l.consume(f);return}return l.enter("lineEnding"),l.consume(f),l.exit("lineEnding"),i.currentConstruct=void 0,r}}const F2={resolveAll:by()},J2=xy("string"),P2=xy("text");function xy(l){return{resolveAll:by(l==="text"?$2:void 0),tokenize:i};function i(r){const u=this,c=this.parser.constructs[l],f=r.attempt(c,d,y);return d;function d(g){return h(g)?f(g):y(g)}function y(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),m}function m(g){return h(g)?(r.exit("data"),f(g)):(r.consume(g),m)}function h(g){if(g===null)return!0;const v=c[g];let S=-1;if(v)for(;++S<v.length;){const b=v[S];if(!b.previous||b.previous.call(u,u.previous))return!0}return!1}}}function by(l){return i;function i(r,u){let c=-1,f;for(;++c<=r.length;)f===void 0?r[c]&&r[c][1].type==="data"&&(f=c,c++):(!r[c]||r[c][1].type!=="data")&&(c!==f+2&&(r[f][1].end=r[c-1][1].end,r.splice(f+2,c-f-2),c=f+2),f=void 0);return l?l(r,u):r}}function $2(l,i){let r=0;for(;++r<=l.length;)if((r===l.length||l[r][1].type==="lineEnding")&&l[r-1][1].type==="data"){const u=l[r-1][1],c=i.sliceStream(u);let f=c.length,d=-1,y=0,m;for(;f--;){const h=c[f];if(typeof h=="string"){for(d=h.length;h.charCodeAt(d-1)===32;)y++,d--;if(d)break;d=-1}else if(h===-2)m=!0,y++;else if(h!==-1){f++;break}}if(i._contentTypeTextTrailing&&r===l.length&&(y=0),y){const h={type:r===l.length||m||y<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:f?d:u.start._bufferIndex+d,_index:u.start._index+f,line:u.end.line,column:u.end.column-y,offset:u.end.offset-y},end:{...u.end}};u.end={...h.start},u.start.offset===u.end.offset?Object.assign(u,h):(l.splice(r,0,["enter",h,i],["exit",h,i]),r+=2)}r++}return l}const W2={42:Mt,43:Mt,45:Mt,48:Mt,49:Mt,50:Mt,51:Mt,52:Mt,53:Mt,54:Mt,55:Mt,56:Mt,57:Mt,62:dy},eE={91:a2},tE={[-2]:hc,[-1]:hc,32:hc},nE={35:c2,42:bu,45:[Qm,bu],60:p2,61:Qm,95:bu,96:Im,126:Im},lE={38:py,92:hy},aE={[-5]:pc,[-4]:pc,[-3]:pc,33:M2,38:py,42:Dc,60:[OS,S2],91:O2,92:[o2,hy],93:tf,95:Dc,96:ZS},iE={null:[Dc,F2]},rE={null:[42,95]},uE={null:[]},oE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rE,contentInitial:eE,disable:uE,document:W2,flow:nE,flowInitial:tE,insideSpan:iE,string:lE,text:aE},Symbol.toStringTag,{value:"Module"}));function sE(l,i,r){let u={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const c={},f=[];let d=[],y=[];const m={attempt:Q(W),check:Q(B),consume:D,enter:_,exit:I,interrupt:Q(B,{interrupt:!0})},h={code:null,containerState:{},defineSkip:A,events:[],now:R,parser:l,previous:null,sliceSerialize:S,sliceStream:b,write:v};let g=i.tokenize.call(h,m);return i.resolveAll&&f.push(i),h;function v(ne){return d=ln(d,ne),z(),d[d.length-1]!==null?[]:(V(i,0),h.events=ef(f,h.events,h),h.events)}function S(ne,re){return fE(b(ne),re)}function b(ne){return cE(d,ne)}function R(){const{_bufferIndex:ne,_index:re,line:he,column:P,offset:F}=u;return{_bufferIndex:ne,_index:re,line:he,column:P,offset:F}}function A(ne){c[ne.line]=ne.column,oe()}function z(){let ne;for(;u._index<d.length;){const re=d[u._index];if(typeof re=="string")for(ne=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===ne&&u._bufferIndex<re.length;)k(re.charCodeAt(u._bufferIndex));else k(re)}}function k(ne){g=g(ne)}function D(ne){ye(ne)?(u.line++,u.column=1,u.offset+=ne===-3?2:1,oe()):ne!==-1&&(u.column++,u.offset++),u._bufferIndex<0?u._index++:(u._bufferIndex++,u._bufferIndex===d[u._index].length&&(u._bufferIndex=-1,u._index++)),h.previous=ne}function _(ne,re){const he=re||{};return he.type=ne,he.start=R(),h.events.push(["enter",he,h]),y.push(he),he}function I(ne){const re=y.pop();return re.end=R(),h.events.push(["exit",re,h]),re}function W(ne,re){V(ne,re.from)}function B(ne,re){re.restore()}function Q(ne,re){return he;function he(P,F,U){let $,se,ae,T;return Array.isArray(P)?O(P):"tokenize"in P?O([P]):j(P);function j(ue){return xe;function xe(qe){const Le=qe!==null&&ue[qe],Xt=qe!==null&&ue.null,xn=[...Array.isArray(Le)?Le:Le?[Le]:[],...Array.isArray(Xt)?Xt:Xt?[Xt]:[]];return O(xn)(qe)}}function O(ue){return $=ue,se=0,ue.length===0?U:C(ue[se])}function C(ue){return xe;function xe(qe){return T=ee(),ae=ue,ue.partial||(h.currentConstruct=ue),ue.name&&h.parser.constructs.disable.null.includes(ue.name)?fe():ue.tokenize.call(re?Object.assign(Object.create(h),re):h,m,te,fe)(qe)}}function te(ue){return ne(ae,T),F}function fe(ue){return T.restore(),++se<$.length?C($[se]):U}}}function V(ne,re){ne.resolveAll&&!f.includes(ne)&&f.push(ne),ne.resolve&&vn(h.events,re,h.events.length-re,ne.resolve(h.events.slice(re),h)),ne.resolveTo&&(h.events=ne.resolveTo(h.events,h))}function ee(){const ne=R(),re=h.previous,he=h.currentConstruct,P=h.events.length,F=Array.from(y);return{from:P,restore:U};function U(){u=ne,h.previous=re,h.currentConstruct=he,h.events.length=P,y=F,oe()}}function oe(){u.line in c&&u.column<2&&(u.column=c[u.line],u.offset+=c[u.line]-1)}}function cE(l,i){const r=i.start._index,u=i.start._bufferIndex,c=i.end._index,f=i.end._bufferIndex;let d;if(r===c)d=[l[r].slice(u,f)];else{if(d=l.slice(r,c),u>-1){const y=d[0];typeof y=="string"?d[0]=y.slice(u):d.shift()}f>0&&d.push(l[c].slice(0,f))}return d}function fE(l,i){let r=-1;const u=[];let c;for(;++r<l.length;){const f=l[r];let d;if(typeof f=="string")d=f;else switch(f){case-5:{d="\r";break}case-4:{d=`
13
+ `;break}case-3:{d=`\r
14
+ `;break}case-2:{d=i?" ":" ";break}case-1:{if(!i&&c)continue;d=" ";break}default:d=String.fromCharCode(f)}c=f===-2,u.push(d)}return u.join("")}function dE(l){const u={constructs:xS([oE,...(l||{}).extensions||[]]),content:c(AS),defined:[],document:c(RS),flow:c(Z2),lazy:{},string:c(J2),text:c(P2)};return u;function c(f){return d;function d(y){return sE(u,f,y)}}}function hE(l){for(;!my(l););return l}const Xm=/[\0\t\n\r]/g;function pE(){let l=1,i="",r=!0,u;return c;function c(f,d,y){const m=[];let h,g,v,S,b;for(f=i+(typeof f=="string"?f.toString():new TextDecoder(d||void 0).decode(f)),v=0,i="",r&&(f.charCodeAt(0)===65279&&v++,r=void 0);v<f.length;){if(Xm.lastIndex=v,h=Xm.exec(f),S=h&&h.index!==void 0?h.index:f.length,b=f.charCodeAt(S),!h){i=f.slice(v);break}if(b===10&&v===S&&u)m.push(-3),u=void 0;else switch(u&&(m.push(-5),u=void 0),v<S&&(m.push(f.slice(v,S)),l+=S-v),b){case 0:{m.push(65533),l++;break}case 9:{for(g=Math.ceil(l/4)*4,m.push(-2);l++<g;)m.push(-1);break}case 10:{m.push(-4),l=1;break}default:u=!0,l=1}v=S+1}return y&&(u&&m.push(-5),i&&m.push(i),m.push(null)),m}}const mE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gE(l){return l.replace(mE,yE)}function yE(l,i,r){if(i)return i;if(r.charCodeAt(0)===35){const c=r.charCodeAt(1),f=c===120||c===88;return fy(r.slice(f?2:1),f?16:10)}return Wc(r)||l}const Sy={}.hasOwnProperty;function vE(l,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),xE(r)(hE(dE(r).document().write(pE()(l,i,!0))))}function xE(l){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:f(Yl),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:f(Hl),blockQuote:f(Xt),characterEscape:ee,characterReference:ee,codeFenced:f(xn),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:f(xn,d),codeText:f(Ba,d),codeTextData:ee,data:ee,codeFlowValue:ee,definition:f(Zi),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:f(bn),hardBreakEscape:f(ql),hardBreakTrailing:f(ql),htmlFlow:f(Ki,d),htmlFlowData:ee,htmlText:f(Ki,d),htmlTextData:ee,image:f(Fi),label:d,link:f(Yl),listItem:f(Ua),listItemValue:S,listOrdered:f(Vl,v),listUnordered:f(Vl),paragraph:f(Ou),reference:C,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:f(Hl),strong:f(Du),thematicBreak:f(Lu)},exit:{atxHeading:m(),atxHeadingSequence:W,autolink:m(),autolinkEmail:Le,autolinkProtocol:qe,blockQuote:m(),characterEscapeValue:oe,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ue,characterReference:xe,codeFenced:m(z),codeFencedFence:A,codeFencedFenceInfo:b,codeFencedFenceMeta:R,codeFlowValue:oe,codeIndented:m(k),codeText:m(F),codeTextData:oe,data:oe,definition:m(),definitionDestinationString:I,definitionLabelString:D,definitionTitleString:_,emphasis:m(),hardBreakEscape:m(re),hardBreakTrailing:m(re),htmlFlow:m(he),htmlFlowData:oe,htmlText:m(P),htmlTextData:oe,image:m($),label:ae,labelText:se,lineEnding:ne,link:m(U),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:te,resourceDestinationString:T,resourceTitleString:j,resource:O,setextHeading:m(V),setextHeadingLineSequence:Q,setextHeadingText:B,strong:m(),thematicBreak:m()}};Ey(i,(l||{}).mdastExtensions||[]);const r={};return u;function u(Z){let ie={type:"root",children:[]};const ge={stack:[ie],tokenStack:[],config:i,enter:y,exit:h,buffer:d,resume:g,data:r},Te=[];let Be=-1;for(;++Be<Z.length;)if(Z[Be][1].type==="listOrdered"||Z[Be][1].type==="listUnordered")if(Z[Be][0]==="enter")Te.push(Be);else{const Lt=Te.pop();Be=c(Z,Lt,Be)}for(Be=-1;++Be<Z.length;){const Lt=i[Z[Be][0]];Sy.call(Lt,Z[Be][1].type)&&Lt[Z[Be][1].type].call(Object.assign({sliceSerialize:Z[Be][2].sliceSerialize},ge),Z[Be][1])}if(ge.tokenStack.length>0){const Lt=ge.tokenStack[ge.tokenStack.length-1];(Lt[1]||Zm).call(ge,void 0,Lt[0])}for(ie.position={start:yl(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:yl(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<i.transforms.length;)ie=i.transforms[Be](ie)||ie;return ie}function c(Z,ie,ge){let Te=ie-1,Be=-1,Lt=!1,Sn,Et,st,Tt;for(;++Te<=ge;){const Ge=Z[Te];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?Be++:Be--,Tt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Sn&&!Tt&&!Be&&!st&&(st=Te),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!Be&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||Be===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Sn){let Xn=Te;for(Et=void 0;Xn--;){const rn=Z[Xn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;Et&&(Z[Et][1].type="lineEndingBlank",Lt=!0),rn[1].type="lineEnding",Et=Xn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}st&&(!Et||st<Et)&&(Sn._spread=!0),Sn.end=Object.assign({},Et?Z[Et][1].start:Ge[1].end),Z.splice(Et||Te,0,["exit",Sn,Ge[2]]),Te++,ge++}if(Ge[1].type==="listItemPrefix"){const Xn={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Sn=Xn,Z.splice(Te,0,["enter",Xn,Ge[2]]),Te++,ge++,st=void 0,Tt=!0}}}return Z[ie][1]._spread=Lt,ge}function f(Z,ie){return ge;function ge(Te){y.call(this,Z(Te),Te),ie&&ie.call(this,Te)}}function d(){this.stack.push({type:"fragment",children:[]})}function y(Z,ie,ge){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ie,ge||void 0]),Z.position={start:yl(ie.start),end:void 0}}function m(Z){return ie;function ie(ge){Z&&Z.call(this,ge),h.call(this,ge)}}function h(Z,ie){const ge=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==Z.type&&(ie?ie.call(this,Z,Te[0]):(Te[1]||Zm).call(this,Z,Te[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Bi({start:Z.start,end:Z.end})+"): it’s not open");ge.position.end=yl(Z.end)}function g(){return yS(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function S(Z){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=Z}function R(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=Z}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function z(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Z.replace(/(\r?\n|\r)$/g,"")}function D(Z){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ie,ge.identifier=Ma(this.sliceSerialize(Z)).toLowerCase()}function _(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Z}function I(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Z}function W(Z){const ie=this.stack[this.stack.length-1];if(!ie.depth){const ge=this.sliceSerialize(Z).length;ie.depth=ge}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function Q(Z){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(Z){const ge=this.stack[this.stack.length-1].children;let Te=ge[ge.length-1];(!Te||Te.type!=="text")&&(Te=St(),Te.position={start:yl(Z.start),end:void 0},ge.push(Te)),this.stack.push(Te)}function oe(Z){const ie=this.stack.pop();ie.value+=this.sliceSerialize(Z),ie.position.end=yl(Z.end)}function ne(Z){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ie.children[ie.children.length-1];ge.position.end=yl(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ie.type)&&(ee.call(this,Z),oe.call(this,Z))}function re(){this.data.atHardBreak=!0}function he(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Z}function P(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Z}function F(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Z}function U(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ie,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function $(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ie,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function se(Z){const ie=this.sliceSerialize(Z),ge=this.stack[this.stack.length-2];ge.label=gE(ie),ge.identifier=Ma(ie).toLowerCase()}function ae(){const Z=this.stack[this.stack.length-1],ie=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Te=Z.children;ge.children=Te}else ge.alt=ie}function T(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Z}function j(){const Z=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Z}function O(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function te(Z){const ie=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ie,ge.identifier=Ma(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function fe(Z){this.data.characterReferenceType=Z.type}function ue(Z){const ie=this.sliceSerialize(Z),ge=this.data.characterReferenceType;let Te;ge?(Te=fy(ie,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=Wc(ie);const Be=this.stack[this.stack.length-1];Be.value+=Te}function xe(Z){const ie=this.stack.pop();ie.position.end=yl(Z.end)}function qe(Z){oe.call(this,Z);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(Z)}function Le(Z){oe.call(this,Z);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(Z)}function Xt(){return{type:"blockquote",children:[]}}function xn(){return{type:"code",lang:null,meta:null,value:""}}function Ba(){return{type:"inlineCode",value:""}}function Zi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function bn(){return{type:"emphasis",children:[]}}function Hl(){return{type:"heading",depth:0,children:[]}}function ql(){return{type:"break"}}function Ki(){return{type:"html",value:""}}function Fi(){return{type:"image",title:null,url:"",alt:null}}function Yl(){return{type:"link",title:null,url:"",children:[]}}function Vl(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Ua(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Ou(){return{type:"paragraph",children:[]}}function Du(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function Lu(){return{type:"thematicBreak"}}}function yl(l){return{line:l.line,column:l.column,offset:l.offset}}function Ey(l,i){let r=-1;for(;++r<i.length;){const u=i[r];Array.isArray(u)?Ey(l,u):bE(l,u)}}function bE(l,i){let r;for(r in i)if(Sy.call(i,r))switch(r){case"canContainEols":{const u=i[r];u&&l[r].push(...u);break}case"transforms":{const u=i[r];u&&l[r].push(...u);break}case"enter":case"exit":{const u=i[r];u&&Object.assign(l[r],u);break}}}function Zm(l,i){throw l?new Error("Cannot close `"+l.type+"` ("+Bi({start:l.start,end:l.end})+"): a different token (`"+i.type+"`, "+Bi({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Bi({start:i.start,end:i.end})+") is still open")}function SE(l){const i=this;i.parser=r;function r(u){return vE(u,{...i.data("settings"),...l,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function EE(l,i){const r={type:"element",tagName:"blockquote",properties:{},children:l.wrap(l.all(i),!0)};return l.patch(i,r),l.applyData(i,r)}function CE(l,i){const r={type:"element",tagName:"br",properties:{},children:[]};return l.patch(i,r),[l.applyData(i,r),{type:"text",value:`
15
+ `}]}function TE(l,i){const r=i.value?i.value+`
16
+ `:"",u={},c=i.lang?i.lang.split(/\s+/):[];c.length>0&&(u.className=["language-"+c[0]]);let f={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return i.meta&&(f.data={meta:i.meta}),l.patch(i,f),f=l.applyData(i,f),f={type:"element",tagName:"pre",properties:{},children:[f]},l.patch(i,f),f}function wE(l,i){const r={type:"element",tagName:"del",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function jE(l,i){const r={type:"element",tagName:"em",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function AE(l,i){const r=typeof l.options.clobberPrefix=="string"?l.options.clobberPrefix:"user-content-",u=String(i.identifier).toUpperCase(),c=La(u.toLowerCase()),f=l.footnoteOrder.indexOf(u);let d,y=l.footnoteCounts.get(u);y===void 0?(y=0,l.footnoteOrder.push(u),d=l.footnoteOrder.length):d=f+1,y+=1,l.footnoteCounts.set(u,y);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+c,id:r+"fnref-"+c+(y>1?"-"+y:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};l.patch(i,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return l.patch(i,h),l.applyData(i,h)}function zE(l,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function RE(l,i){if(l.options.allowDangerousHtml){const r={type:"raw",value:i.value};return l.patch(i,r),l.applyData(i,r)}}function Cy(l,i){const r=i.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+u}];const c=l.all(i),f=c[0];f&&f.type==="text"?f.value="["+f.value:c.unshift({type:"text",value:"["});const d=c[c.length-1];return d&&d.type==="text"?d.value+=u:c.push({type:"text",value:u}),c}function NE(l,i){const r=String(i.identifier).toUpperCase(),u=l.definitionById.get(r);if(!u)return Cy(l,i);const c={src:La(u.url||""),alt:i.alt};u.title!==null&&u.title!==void 0&&(c.title=u.title);const f={type:"element",tagName:"img",properties:c,children:[]};return l.patch(i,f),l.applyData(i,f)}function kE(l,i){const r={src:La(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"img",properties:r,children:[]};return l.patch(i,u),l.applyData(i,u)}function ME(l,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};l.patch(i,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return l.patch(i,u),l.applyData(i,u)}function _E(l,i){const r=String(i.identifier).toUpperCase(),u=l.definitionById.get(r);if(!u)return Cy(l,i);const c={href:La(u.url||"")};u.title!==null&&u.title!==void 0&&(c.title=u.title);const f={type:"element",tagName:"a",properties:c,children:l.all(i)};return l.patch(i,f),l.applyData(i,f)}function OE(l,i){const r={href:La(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"a",properties:r,children:l.all(i)};return l.patch(i,u),l.applyData(i,u)}function DE(l,i,r){const u=l.all(i),c=r?LE(r):Ty(i),f={},d=[];if(typeof i.checked=="boolean"){const g=u[0];let v;g&&g.type==="element"&&g.tagName==="p"?v=g:(v={type:"element",tagName:"p",properties:{},children:[]},u.unshift(v)),v.children.length>0&&v.children.unshift({type:"text",value:" "}),v.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),f.className=["task-list-item"]}let y=-1;for(;++y<u.length;){const g=u[y];(c||y!==0||g.type!=="element"||g.tagName!=="p")&&d.push({type:"text",value:`
17
+ `}),g.type==="element"&&g.tagName==="p"&&!c?d.push(...g.children):d.push(g)}const m=u[u.length-1];m&&(c||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
18
+ `});const h={type:"element",tagName:"li",properties:f,children:d};return l.patch(i,h),l.applyData(i,h)}function LE(l){let i=!1;if(l.type==="list"){i=l.spread||!1;const r=l.children;let u=-1;for(;!i&&++u<r.length;)i=Ty(r[u])}return i}function Ty(l){const i=l.spread;return i??l.children.length>1}function BE(l,i){const r={},u=l.all(i);let c=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++c<u.length;){const d=u[c];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const f={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:l.wrap(u,!0)};return l.patch(i,f),l.applyData(i,f)}function UE(l,i){const r={type:"element",tagName:"p",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function HE(l,i){const r={type:"root",children:l.wrap(l.all(i))};return l.patch(i,r),l.applyData(i,r)}function qE(l,i){const r={type:"element",tagName:"strong",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function YE(l,i){const r=l.all(i),u=r.shift(),c=[];if(u){const d={type:"element",tagName:"thead",properties:{},children:l.wrap([u],!0)};l.patch(i.children[0],d),c.push(d)}if(r.length>0){const d={type:"element",tagName:"tbody",properties:{},children:l.wrap(r,!0)},y=Fc(i.children[1]),m=ay(i.children[i.children.length-1]);y&&m&&(d.position={start:y,end:m}),c.push(d)}const f={type:"element",tagName:"table",properties:{},children:l.wrap(c,!0)};return l.patch(i,f),l.applyData(i,f)}function VE(l,i,r){const u=r?r.children:void 0,f=(u?u.indexOf(i):1)===0?"th":"td",d=r&&r.type==="table"?r.align:void 0,y=d?d.length:i.children.length;let m=-1;const h=[];for(;++m<y;){const v=i.children[m],S={},b=d?d[m]:void 0;b&&(S.align=b);let R={type:"element",tagName:f,properties:S,children:[]};v&&(R.children=l.all(v),l.patch(v,R),R=l.applyData(v,R)),h.push(R)}const g={type:"element",tagName:"tr",properties:{},children:l.wrap(h,!0)};return l.patch(i,g),l.applyData(i,g)}function IE(l,i){const r={type:"element",tagName:"td",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}const Km=9,Fm=32;function GE(l){const i=String(l),r=/\r?\n|\r/g;let u=r.exec(i),c=0;const f=[];for(;u;)f.push(Jm(i.slice(c,u.index),c>0,!0),u[0]),c=u.index+u[0].length,u=r.exec(i);return f.push(Jm(i.slice(c),c>0,!1)),f.join("")}function Jm(l,i,r){let u=0,c=l.length;if(i){let f=l.codePointAt(u);for(;f===Km||f===Fm;)u++,f=l.codePointAt(u)}if(r){let f=l.codePointAt(c-1);for(;f===Km||f===Fm;)c--,f=l.codePointAt(c-1)}return c>u?l.slice(u,c):""}function QE(l,i){const r={type:"text",value:GE(String(i.value))};return l.patch(i,r),l.applyData(i,r)}function XE(l,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return l.patch(i,r),l.applyData(i,r)}const ZE={blockquote:EE,break:CE,code:TE,delete:wE,emphasis:jE,footnoteReference:AE,heading:zE,html:RE,imageReference:NE,image:kE,inlineCode:ME,linkReference:_E,link:OE,listItem:DE,list:BE,paragraph:UE,root:HE,strong:qE,table:YE,tableCell:IE,tableRow:VE,text:QE,thematicBreak:XE,toml:mu,yaml:mu,definition:mu,footnoteDefinition:mu};function mu(){}const wy=-1,Mu=0,Hi=1,ju=2,nf=3,lf=4,af=5,rf=6,jy=7,Ay=8,Pm=typeof self=="object"?self:globalThis,KE=(l,i)=>{const r=(c,f)=>(l.set(f,c),c),u=c=>{if(l.has(c))return l.get(c);const[f,d]=i[c];switch(f){case Mu:case wy:return r(d,c);case Hi:{const y=r([],c);for(const m of d)y.push(u(m));return y}case ju:{const y=r({},c);for(const[m,h]of d)y[u(m)]=u(h);return y}case nf:return r(new Date(d),c);case lf:{const{source:y,flags:m}=d;return r(new RegExp(y,m),c)}case af:{const y=r(new Map,c);for(const[m,h]of d)y.set(u(m),u(h));return y}case rf:{const y=r(new Set,c);for(const m of d)y.add(u(m));return y}case jy:{const{name:y,message:m}=d;return r(new Pm[y](m),c)}case Ay:return r(BigInt(d),c);case"BigInt":return r(Object(BigInt(d)),c);case"ArrayBuffer":return r(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:y}=new Uint8Array(d);return r(new DataView(y),d)}}return r(new Pm[f](d),c)};return u},$m=l=>KE(new Map,l)(0),Ra="",{toString:FE}={},{keys:JE}=Object,Li=l=>{const i=typeof l;if(i!=="object"||!l)return[Mu,i];const r=FE.call(l).slice(8,-1);switch(r){case"Array":return[Hi,Ra];case"Object":return[ju,Ra];case"Date":return[nf,Ra];case"RegExp":return[lf,Ra];case"Map":return[af,Ra];case"Set":return[rf,Ra];case"DataView":return[Hi,r]}return r.includes("Array")?[Hi,r]:r.includes("Error")?[jy,r]:[ju,r]},gu=([l,i])=>l===Mu&&(i==="function"||i==="symbol"),PE=(l,i,r,u)=>{const c=(d,y)=>{const m=u.push(d)-1;return r.set(y,m),m},f=d=>{if(r.has(d))return r.get(d);let[y,m]=Li(d);switch(y){case Mu:{let g=d;switch(m){case"bigint":y=Ay,g=d.toString();break;case"function":case"symbol":if(l)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return c([wy],d)}return c([y,g],d)}case Hi:{if(m){let S=d;return m==="DataView"?S=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(S=new Uint8Array(d)),c([m,[...S]],d)}const g=[],v=c([y,g],d);for(const S of d)g.push(f(S));return v}case ju:{if(m)switch(m){case"BigInt":return c([m,d.toString()],d);case"Boolean":case"Number":case"String":return c([m,d.valueOf()],d)}if(i&&"toJSON"in d)return f(d.toJSON());const g=[],v=c([y,g],d);for(const S of JE(d))(l||!gu(Li(d[S])))&&g.push([f(S),f(d[S])]);return v}case nf:return c([y,d.toISOString()],d);case lf:{const{source:g,flags:v}=d;return c([y,{source:g,flags:v}],d)}case af:{const g=[],v=c([y,g],d);for(const[S,b]of d)(l||!(gu(Li(S))||gu(Li(b))))&&g.push([f(S),f(b)]);return v}case rf:{const g=[],v=c([y,g],d);for(const S of d)(l||!gu(Li(S)))&&g.push(f(S));return v}}const{message:h}=d;return c([y,{name:m,message:h}],d)};return f},Wm=(l,{json:i,lossy:r}={})=>{const u=[];return PE(!(i||r),!!i,new Map,u)(l),u},Au=typeof structuredClone=="function"?(l,i)=>i&&("json"in i||"lossy"in i)?$m(Wm(l,i)):structuredClone(l):(l,i)=>$m(Wm(l,i));function $E(l,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function WE(l,i){return"Back to reference "+(l+1)+(i>1?"-"+i:"")}function eC(l){const i=typeof l.options.clobberPrefix=="string"?l.options.clobberPrefix:"user-content-",r=l.options.footnoteBackContent||$E,u=l.options.footnoteBackLabel||WE,c=l.options.footnoteLabel||"Footnotes",f=l.options.footnoteLabelTagName||"h2",d=l.options.footnoteLabelProperties||{className:["sr-only"]},y=[];let m=-1;for(;++m<l.footnoteOrder.length;){const h=l.footnoteById.get(l.footnoteOrder[m]);if(!h)continue;const g=l.all(h),v=String(h.identifier).toUpperCase(),S=La(v.toLowerCase());let b=0;const R=[],A=l.footnoteCounts.get(v);for(;A!==void 0&&++b<=A;){R.length>0&&R.push({type:"text",value:" "});let D=typeof r=="string"?r:r(m,b);typeof D=="string"&&(D={type:"text",value:D}),R.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+S+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(m,b),className:["data-footnote-backref"]},children:Array.isArray(D)?D:[D]})}const z=g[g.length-1];if(z&&z.type==="element"&&z.tagName==="p"){const D=z.children[z.children.length-1];D&&D.type==="text"?D.value+=" ":z.children.push({type:"text",value:" "}),z.children.push(...R)}else g.push(...R);const k={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:l.wrap(g,!0)};l.patch(h,k),y.push(k)}if(y.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:f,properties:{...Au(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
19
+ `},{type:"element",tagName:"ol",properties:{},children:l.wrap(y,!0)},{type:"text",value:`
20
+ `}]}}const zy=(function(l){if(l==null)return aC;if(typeof l=="function")return _u(l);if(typeof l=="object")return Array.isArray(l)?tC(l):nC(l);if(typeof l=="string")return lC(l);throw new Error("Expected function, string, or object as test")});function tC(l){const i=[];let r=-1;for(;++r<l.length;)i[r]=zy(l[r]);return _u(u);function u(...c){let f=-1;for(;++f<i.length;)if(i[f].apply(this,c))return!0;return!1}}function nC(l){const i=l;return _u(r);function r(u){const c=u;let f;for(f in l)if(c[f]!==i[f])return!1;return!0}}function lC(l){return _u(i);function i(r){return r&&r.type===l}}function _u(l){return i;function i(r,u,c){return!!(iC(r)&&l.call(this,r,typeof u=="number"?u:void 0,c||void 0))}}function aC(){return!0}function iC(l){return l!==null&&typeof l=="object"&&"type"in l}const Ry=[],rC=!0,eg=!1,uC="skip";function oC(l,i,r,u){let c;typeof i=="function"&&typeof r!="function"?(u=r,r=i):c=i;const f=zy(c),d=u?-1:1;y(l,void 0,[])();function y(m,h,g){const v=m&&typeof m=="object"?m:{};if(typeof v.type=="string"){const b=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return S;function S(){let b=Ry,R,A,z;if((!i||f(m,h,g[g.length-1]||void 0))&&(b=sC(r(m,g)),b[0]===eg))return b;if("children"in m&&m.children){const k=m;if(k.children&&b[0]!==uC)for(A=(u?k.children.length:-1)+d,z=g.concat(k);A>-1&&A<k.children.length;){const D=k.children[A];if(R=y(D,A,z)(),R[0]===eg)return R;A=typeof R[1]=="number"?R[1]:A+d}}return b}}}function sC(l){return Array.isArray(l)?l:typeof l=="number"?[rC,l]:l==null?Ry:[l]}function Ny(l,i,r,u){let c,f,d;typeof i=="function"&&typeof r!="function"?(f=void 0,d=i,c=r):(f=i,d=r,c=u),oC(l,f,y,c);function y(m,h){const g=h[h.length-1],v=g?g.children.indexOf(m):void 0;return d(m,v,g)}}const Lc={}.hasOwnProperty,cC={};function fC(l,i){const r=i||cC,u=new Map,c=new Map,f=new Map,d={...ZE,...r.handlers},y={all:h,applyData:hC,definitionById:u,footnoteById:c,footnoteCounts:f,footnoteOrder:[],handlers:d,one:m,options:r,patch:dC,wrap:mC};return Ny(l,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const v=g.type==="definition"?u:c,S=String(g.identifier).toUpperCase();v.has(S)||v.set(S,g)}}),y;function m(g,v){const S=g.type,b=y.handlers[S];if(Lc.call(y.handlers,S)&&b)return b(y,g,v);if(y.options.passThrough&&y.options.passThrough.includes(S)){if("children"in g){const{children:A,...z}=g,k=Au(z);return k.children=y.all(g),k}return Au(g)}return(y.options.unknownHandler||pC)(y,g,v)}function h(g){const v=[];if("children"in g){const S=g.children;let b=-1;for(;++b<S.length;){const R=y.one(S[b],g);if(R){if(b&&S[b-1].type==="break"&&(!Array.isArray(R)&&R.type==="text"&&(R.value=tg(R.value)),!Array.isArray(R)&&R.type==="element")){const A=R.children[0];A&&A.type==="text"&&(A.value=tg(A.value))}Array.isArray(R)?v.push(...R):v.push(R)}}}return v}}function dC(l,i){l.position&&(i.position=Fb(l))}function hC(l,i){let r=i;if(l&&l.data){const u=l.data.hName,c=l.data.hChildren,f=l.data.hProperties;if(typeof u=="string")if(r.type==="element")r.tagName=u;else{const d="children"in r?r.children:[r];r={type:"element",tagName:u,properties:{},children:d}}r.type==="element"&&f&&Object.assign(r.properties,Au(f)),"children"in r&&r.children&&c!==null&&c!==void 0&&(r.children=c)}return r}function pC(l,i){const r=i.data||{},u="value"in i&&!(Lc.call(r,"hProperties")||Lc.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:l.all(i)};return l.patch(i,u),l.applyData(i,u)}function mC(l,i){const r=[];let u=-1;for(i&&r.push({type:"text",value:`
21
+ `});++u<l.length;)u&&r.push({type:"text",value:`
22
+ `}),r.push(l[u]);return i&&l.length>0&&r.push({type:"text",value:`
23
+ `}),r}function tg(l){let i=0,r=l.charCodeAt(i);for(;r===9||r===32;)i++,r=l.charCodeAt(i);return l.slice(i)}function ng(l,i){const r=fC(l,i),u=r.one(l,void 0),c=eC(r),f=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return c&&f.children.push({type:"text",value:`
24
+ `},c),f}function gC(l,i){return l&&"run"in l?async function(r,u){const c=ng(r,{file:u,...i});await l.run(c,u)}:function(r,u){return ng(r,{file:u,...l||i})}}function lg(l){if(l)throw l}var mc,ag;function yC(){if(ag)return mc;ag=1;var l=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=function(h){return typeof Array.isArray=="function"?Array.isArray(h):i.call(h)==="[object Array]"},f=function(h){if(!h||i.call(h)!=="[object Object]")return!1;var g=l.call(h,"constructor"),v=h.constructor&&h.constructor.prototype&&l.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!v)return!1;var S;for(S in h);return typeof S>"u"||l.call(h,S)},d=function(h,g){r&&g.name==="__proto__"?r(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},y=function(h,g){if(g==="__proto__")if(l.call(h,g)){if(u)return u(h,g).value}else return;return h[g]};return mc=function m(){var h,g,v,S,b,R,A=arguments[0],z=1,k=arguments.length,D=!1;for(typeof A=="boolean"&&(D=A,A=arguments[1]||{},z=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});z<k;++z)if(h=arguments[z],h!=null)for(g in h)v=y(A,g),S=y(h,g),A!==S&&(D&&S&&(f(S)||(b=c(S)))?(b?(b=!1,R=v&&c(v)?v:[]):R=v&&f(v)?v:{},d(A,{name:g,newValue:m(D,R,S)})):typeof S<"u"&&d(A,{name:g,newValue:S}));return A},mc}var vC=yC();const gc=Hc(vC);function Bc(l){if(typeof l!="object"||l===null)return!1;const i=Object.getPrototypeOf(l);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in l)&&!(Symbol.iterator in l)}function xC(){const l=[],i={run:r,use:u};return i;function r(...c){let f=-1;const d=c.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);y(null,...c);function y(m,...h){const g=l[++f];let v=-1;if(m){d(m);return}for(;++v<c.length;)(h[v]===null||h[v]===void 0)&&(h[v]=c[v]);c=h,g?bC(g,y)(...h):d(null,...h)}}function u(c){if(typeof c!="function")throw new TypeError("Expected `middelware` to be a function, not "+c);return l.push(c),i}}function bC(l,i){let r;return u;function u(...d){const y=l.length>d.length;let m;y&&d.push(c);try{m=l.apply(this,d)}catch(h){const g=h;if(y&&r)throw g;return c(g)}y||(m&&m.then&&typeof m.then=="function"?m.then(f,c):m instanceof Error?c(m):f(m))}function c(d,...y){r||(r=!0,i(d,...y))}function f(d){c(null,d)}}const gn={basename:SC,dirname:EC,extname:CC,join:TC,sep:"/"};function SC(l,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Xi(l);let r=0,u=-1,c=l.length,f;if(i===void 0||i.length===0||i.length>l.length){for(;c--;)if(l.codePointAt(c)===47){if(f){r=c+1;break}}else u<0&&(f=!0,u=c+1);return u<0?"":l.slice(r,u)}if(i===l)return"";let d=-1,y=i.length-1;for(;c--;)if(l.codePointAt(c)===47){if(f){r=c+1;break}}else d<0&&(f=!0,d=c+1),y>-1&&(l.codePointAt(c)===i.codePointAt(y--)?y<0&&(u=c):(y=-1,u=d));return r===u?u=d:u<0&&(u=l.length),l.slice(r,u)}function EC(l){if(Xi(l),l.length===0)return".";let i=-1,r=l.length,u;for(;--r;)if(l.codePointAt(r)===47){if(u){i=r;break}}else u||(u=!0);return i<0?l.codePointAt(0)===47?"/":".":i===1&&l.codePointAt(0)===47?"//":l.slice(0,i)}function CC(l){Xi(l);let i=l.length,r=-1,u=0,c=-1,f=0,d;for(;i--;){const y=l.codePointAt(i);if(y===47){if(d){u=i+1;break}continue}r<0&&(d=!0,r=i+1),y===46?c<0?c=i:f!==1&&(f=1):c>-1&&(f=-1)}return c<0||r<0||f===0||f===1&&c===r-1&&c===u+1?"":l.slice(c,r)}function TC(...l){let i=-1,r;for(;++i<l.length;)Xi(l[i]),l[i]&&(r=r===void 0?l[i]:r+"/"+l[i]);return r===void 0?".":wC(r)}function wC(l){Xi(l);const i=l.codePointAt(0)===47;let r=jC(l,!i);return r.length===0&&!i&&(r="."),r.length>0&&l.codePointAt(l.length-1)===47&&(r+="/"),i?"/"+r:r}function jC(l,i){let r="",u=0,c=-1,f=0,d=-1,y,m;for(;++d<=l.length;){if(d<l.length)y=l.codePointAt(d);else{if(y===47)break;y=47}if(y===47){if(!(c===d-1||f===1))if(c!==d-1&&f===2){if(r.length<2||u!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",u=0):(r=r.slice(0,m),u=r.length-1-r.lastIndexOf("/")),c=d,f=0;continue}}else if(r.length>0){r="",u=0,c=d,f=0;continue}}i&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+l.slice(c+1,d):r=l.slice(c+1,d),u=d-c-1;c=d,f=0}else y===46&&f>-1?f++:f=-1}return r}function Xi(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}const AC={cwd:zC};function zC(){return"/"}function Uc(l){return!!(l!==null&&typeof l=="object"&&"href"in l&&l.href&&"protocol"in l&&l.protocol&&l.auth===void 0)}function RC(l){if(typeof l=="string")l=new URL(l);else if(!Uc(l)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+l+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(l.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return NC(l)}function NC(l){if(l.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const i=l.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const u=i.codePointAt(r+2);if(u===70||u===102){const c=new TypeError("File URL path must not include encoded / characters");throw c.code="ERR_INVALID_FILE_URL_PATH",c}}return decodeURIComponent(i)}const yc=["history","path","basename","stem","extname","dirname"];class ky{constructor(i){let r;i?Uc(i)?r={path:i}:typeof i=="string"||kC(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":AC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<yc.length;){const f=yc[u];f in r&&r[f]!==void 0&&r[f]!==null&&(this[f]=f==="history"?[...r[f]]:r[f])}let c;for(c in r)yc.includes(c)||(this[c]=r[c])}get basename(){return typeof this.path=="string"?gn.basename(this.path):void 0}set basename(i){xc(i,"basename"),vc(i,"basename"),this.path=gn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?gn.dirname(this.path):void 0}set dirname(i){ig(this.basename,"dirname"),this.path=gn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?gn.extname(this.path):void 0}set extname(i){if(vc(i,"extname"),ig(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=gn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Uc(i)&&(i=RC(i)),xc(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?gn.basename(this.path,this.extname):void 0}set stem(i){xc(i,"stem"),vc(i,"stem"),this.path=gn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,u){const c=this.message(i,r,u);throw c.fatal=!0,c}info(i,r,u){const c=this.message(i,r,u);return c.fatal=void 0,c}message(i,r,u){const c=new bt(i,r,u);return this.path&&(c.name=this.path+":"+c.name,c.file=this.path),c.fatal=!1,this.messages.push(c),c}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function vc(l,i){if(l&&l.includes(gn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+gn.sep+"`")}function xc(l,i){if(!l)throw new Error("`"+i+"` cannot be empty")}function ig(l,i){if(!l)throw new Error("Setting `"+i+"` requires `path` to be set too")}function kC(l){return!!(l&&typeof l=="object"&&"byteLength"in l&&"byteOffset"in l)}const MC=(function(l){const u=this.constructor.prototype,c=u[l],f=function(){return c.apply(f,arguments)};return Object.setPrototypeOf(f,u),f}),_C={}.hasOwnProperty;class uf extends MC{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=xC()}copy(){const i=new uf;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];i.use(...u)}return i.data(gc(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Ec("data",this.frozen),this.namespace[i]=r,this):_C.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Ec("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...u]=this.attachers[this.freezeIndex];if(u[0]===!1)continue;u[0]===!0&&(u[0]=void 0);const c=r.call(i,...u);typeof c=="function"&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=yu(i),u=this.parser||this.Parser;return bc("parse",u),u(String(r),r)}process(i,r){const u=this;return this.freeze(),bc("process",this.parser||this.Parser),Sc("process",this.compiler||this.Compiler),r?c(void 0,r):new Promise(c);function c(f,d){const y=yu(i),m=u.parse(y);u.run(m,y,function(g,v,S){if(g||!v||!S)return h(g);const b=v,R=u.stringify(b,S);LC(R)?S.value=R:S.result=R,h(g,S)});function h(g,v){g||!v?d(g):f?f(v):r(void 0,v)}}}processSync(i){let r=!1,u;return this.freeze(),bc("processSync",this.parser||this.Parser),Sc("processSync",this.compiler||this.Compiler),this.process(i,c),ug("processSync","process",r),u;function c(f,d){r=!0,lg(f),u=d}}run(i,r,u){rg(i),this.freeze();const c=this.transformers;return!u&&typeof r=="function"&&(u=r,r=void 0),u?f(void 0,u):new Promise(f);function f(d,y){const m=yu(r);c.run(i,m,h);function h(g,v,S){const b=v||i;g?y(g):d?d(b):u(void 0,b,S)}}}runSync(i,r){let u=!1,c;return this.run(i,r,f),ug("runSync","run",u),c;function f(d,y){lg(d),c=y,u=!0}}stringify(i,r){this.freeze();const u=yu(r),c=this.compiler||this.Compiler;return Sc("stringify",c),rg(i),c(i,u)}use(i,...r){const u=this.attachers,c=this.namespace;if(Ec("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?y(i):d(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function f(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...v]=h;m(g,v)}else d(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function d(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");y(h.plugins),h.settings&&(c.settings=gc(!0,c.settings,h.settings))}function y(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const v=h[g];f(v)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,g){let v=-1,S=-1;for(;++v<u.length;)if(u[v][0]===h){S=v;break}if(S===-1)u.push([h,...g]);else if(g.length>0){let[b,...R]=g;const A=u[S][1];Bc(A)&&Bc(b)&&(b=gc(!0,A,b)),u[S]=[h,b,...R]}}}}const OC=new uf().freeze();function bc(l,i){if(typeof i!="function")throw new TypeError("Cannot `"+l+"` without `parser`")}function Sc(l,i){if(typeof i!="function")throw new TypeError("Cannot `"+l+"` without `compiler`")}function Ec(l,i){if(i)throw new Error("Cannot call `"+l+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rg(l){if(!Bc(l)||typeof l.type!="string")throw new TypeError("Expected node, got `"+l+"`")}function ug(l,i,r){if(!r)throw new Error("`"+l+"` finished async. Use `"+i+"` instead")}function yu(l){return DC(l)?l:new ky(l)}function DC(l){return!!(l&&typeof l=="object"&&"message"in l&&"messages"in l)}function LC(l){return typeof l=="string"||BC(l)}function BC(l){return!!(l&&typeof l=="object"&&"byteLength"in l&&"byteOffset"in l)}const UC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",og=[],sg={allowDangerousHtml:!0},HC=/^(https?|ircs?|mailto|xmpp)$/i,qC=[{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 YC(l){const i=VC(l),r=IC(l);return GC(i.runSync(i.parse(r),r),l)}function VC(l){const i=l.rehypePlugins||og,r=l.remarkPlugins||og,u=l.remarkRehypeOptions?{...l.remarkRehypeOptions,...sg}:sg;return OC().use(SE).use(r).use(gC,u).use(i)}function IC(l){const i=l.children||"",r=new ky;return typeof i=="string"&&(r.value=i),r}function GC(l,i){const r=i.allowedElements,u=i.allowElement,c=i.components,f=i.disallowedElements,d=i.skipHtml,y=i.unwrapDisallowed,m=i.urlTransform||QC;for(const g of qC)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+UC+g.id,void 0);return Ny(l,h),eS(l,{Fragment:p.Fragment,components:c,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function h(g,v,S){if(g.type==="raw"&&S&&typeof v=="number")return d?S.children.splice(v,1):S.children[v]={type:"text",value:g.value},v;if(g.type==="element"){let b;for(b in dc)if(Object.hasOwn(dc,b)&&Object.hasOwn(g.properties,b)){const R=g.properties[b],A=dc[b];(A===null||A.includes(g.tagName))&&(g.properties[b]=m(String(R||""),b,g))}}if(g.type==="element"){let b=r?!r.includes(g.tagName):f?f.includes(g.tagName):!1;if(!b&&u&&typeof v=="number"&&(b=!u(g,v,S)),b&&S&&typeof v=="number")return y&&g.children?S.children.splice(v,1,...g.children):S.children.splice(v,1),v}}}function QC(l){const i=l.indexOf(":"),r=l.indexOf("?"),u=l.indexOf("#"),c=l.indexOf("/");return i===-1||c!==-1&&i>c||r!==-1&&i>r||u!==-1&&i>u||HC.test(l.slice(0,i))?l:""}const Yn=6,Cc="claude-voice-device-token",cg="claude-voice-agent-";function XC(){const[l,i]=w.useState("pairing"),[r,u]=w.useState(""),[c,f]=w.useState(""),[d,y]=w.useState(Array(Yn).fill("")),[m,h]=w.useState([]),[g,v]=w.useState(""),[S,b]=w.useState(!1),R=w.useRef([]),A=w.useRef(localStorage.getItem(Cc)||""),z=w.useRef(""),k=w.useRef(null),D=w.useRef(null),_=w.useRef(null),I=w.useRef(null),W=()=>`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,B=T=>T==="tool_use"?"tool":T,Q=()=>{k.current?.scrollIntoView({behavior:"smooth"})},V=w.useCallback(()=>d.join(""),[d]),ee=()=>{y(Array(Yn).fill("")),R.current[0]?.focus()},oe=w.useCallback(()=>{i("connected"),console.log("[Chat] Connected (HTTP + SSE mode)")},[]),ne=w.useCallback(async T=>{const j=T||V();if(j.length!==Yn){u("Enter all 6 digits");return}u("");try{const O=await lt("/api/webrtc/pair",{code:j});A.current=O.token,localStorage.setItem(Cc,O.token),z.current&&localStorage.setItem(`${cg}${O.token}`,z.current),oe()}catch(O){const C=O?.message||"Pairing failed";u(C),ee()}},[V,oe]);w.useEffect(()=>{const T=A.current,j=new URLSearchParams(window.location.search),O=j.get("code"),C=j.get("agentId"),te=j.get("sessionId");if(C&&(z.current=C),te&&(I.current=te),te&&C){T||(A.current=`resume-${te}`),oe();return}if(O&&O.length===Yn&&!T){ne(O);return}if(!T){R.current[0]?.focus();return}if(!C){const fe=localStorage.getItem(`${cg}${T}`);fe&&(z.current=fe)}fetch("/api/webrtc/validate",{headers:{Authorization:`Bearer ${T}`}}).then(fe=>fe.json()).then(fe=>{fe.valid?oe():(localStorage.removeItem(Cc),A.current="",O&&O.length===Yn?ne(O):R.current[0]?.focus())}).catch(()=>{R.current[0]?.focus()})},[]),w.useEffect(()=>{if(l!=="connected")return;const T=I.current,j=z.current;if(!T||!j)return;let O=!1;const C=new AbortController;return fetch(`/api/conversations/${T}?agentId=${j}`,{signal:C.signal}).then(te=>{if(!te.ok)throw new Error(`HTTP ${te.status}`);return te.json()}).then(te=>{O||h(fe=>fe.length>0?fe:te.filter(ue=>ue.role!=="subagent").map(ue=>({id:W(),role:B(ue.role),content:ue.role==="tool_use"?ue.toolName||"tool":ue.content,timestamp:new Date(ue.timestamp).getTime(),isStreaming:!1})))}).catch(te=>{te.name!=="AbortError"&&console.error("[Chat] Failed to load conversation history:",te)}),()=>{O=!0,C.abort()}},[l]),w.useEffect(()=>{if(l!=="connected")return;const T=()=>{const j=A.current;if(!j)return;const O=new Blob([JSON.stringify({token:j})],{type:"application/json"});navigator.sendBeacon("/api/chat/close",O)};return window.addEventListener("beforeunload",T),()=>window.removeEventListener("beforeunload",T)},[l]),w.useEffect(()=>{Q()},[m]);const re=T=>{switch(T.type){case"text_delta":h(j=>{const O=j[j.length-1];return O&&O.role==="assistant"&&O.isStreaming?[...j.slice(0,-1),{...O,content:O.content+T.content}]:[...j,{id:W(),role:"assistant",content:T.content,timestamp:Date.now(),isStreaming:!0}]});break;case"tool_start":h(j=>{const O=[...j],C=O[O.length-1];return C&&C.role==="assistant"&&C.isStreaming&&(O[O.length-1]={...C,isStreaming:!1}),O.push({id:W(),role:"tool",content:T.toolName||"tool",timestamp:Date.now(),isStreaming:!0}),O});break;case"tool_end":h(j=>{const O=j[j.length-1];return O&&O.role==="tool"&&O.isStreaming?[...j.slice(0,-1),{...O,isStreaming:!1}]:j});break;case"result":if(T.sessionId){I.current=T.sessionId;const j=new URL(window.location.href);j.search="",z.current&&j.searchParams.set("agentId",z.current),j.searchParams.set("sessionId",T.sessionId),window.history.replaceState(null,"",j.toString())}h(j=>{const O=j[j.length-1];return O&&O.isStreaming?[...j.slice(0,-1),{...O,isStreaming:!1}]:j}),b(!1);break;case"error":f(T.content),b(!1);break}},he=(T,j)=>{const C=(j+T).split(`
25
+
26
+ `),te=C.pop()??"";for(const fe of C){const ue=fe.trim();if(ue.startsWith("data: "))try{const xe=ue.slice(6),qe=JSON.parse(xe);re(qe)}catch{}}return te},P=(T,j)=>{const O=j.replace(/\D/g,"").slice(0,1),C=[...d];C[T]=O,y(C),O&&T<Yn-1&&R.current[T+1]?.focus(),O&&C.every(te=>te!=="")&&ne(C.join(""))},F=(T,j)=>{j.key==="Backspace"&&!d[T]&&T>0&&R.current[T-1]?.focus()},U=T=>{T.preventDefault();const j=(T.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,Yn),O=[...d];for(let C=0;C<j.length;C++)O[C]=j[C];y(O),j.length===Yn?ne(j):j.length>0&&R.current[Math.min(j.length,Yn-1)]?.focus()},$=async T=>{const j=T.trim();if(!(!j||S)){h(O=>[...O,{id:W(),role:"user",content:j,timestamp:Date.now(),isStreaming:!1}]),v(""),b(!0);try{const O=new AbortController;_.current=O;const C=await fetch("/api/chat/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:A.current,agentId:z.current||void 0,text:j,resumeSessionId:I.current||void 0}),signal:O.signal});if(!C.ok){const xe=await C.json().catch(()=>({error:"Request failed"}));throw new Error(xe.error||`HTTP ${C.status}`)}if(!C.body)throw new Error("No response body");const te=C.body.getReader(),fe=new TextDecoder;let ue="";for(;;){const{done:xe,value:qe}=await te.read();if(xe)break;const Le=fe.decode(qe,{stream:!0});ue=he(Le,ue)}ue.trim()&&he(ue+`
27
+
28
+ `,""),b(!1),_.current=null}catch(O){if(O.name==="AbortError"){b(!1),_.current=null;return}const C=O.message||"Failed to send message";f(C),b(!1),_.current=null}}},se=async()=>{fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:A.current})}).catch(()=>{}),_.current?.abort(),h(T=>{const j=T[T.length-1];return j&&j.role==="assistant"&&j.isStreaming?[...T.slice(0,-1),{...j,isStreaming:!1}]:T}),b(!1)},ae=T=>{T.preventDefault(),$(g)};return l==="pairing"?p.jsx("div",{style:ke.container,children:p.jsxs("div",{style:ke.pairingContainer,children:[p.jsx("h1",{style:ke.title,children:"Claude Chat"}),p.jsx("p",{style:ke.subtitle,children:"Enter the pairing code shown on the dashboard"}),p.jsx("div",{style:ke.pinInputs,children:d.map((T,j)=>p.jsx("input",{ref:O=>{R.current[j]=O},type:"text",inputMode:"numeric",maxLength:1,value:T,onChange:O=>P(j,O.target.value),onKeyDown:O=>F(j,O),onPaste:j===0?U:void 0,style:ke.pinInput},j))}),p.jsx("button",{onClick:()=>ne(),style:ke.pairButton,children:"Pair Device"}),r&&p.jsx("div",{style:ke.errorText,children:r})]})}):l==="error"?p.jsx("div",{style:ke.container,children:p.jsxs("div",{style:ke.pairingContainer,children:[p.jsx("h1",{style:ke.title,children:"Connection Error"}),p.jsx("p",{style:ke.errorText,children:c}),p.jsx("button",{onClick:()=>window.location.reload(),style:ke.pairButton,children:"Retry"})]})}):p.jsxs("div",{style:ke.container,children:[p.jsx("div",{style:ke.header,children:p.jsxs("div",{style:ke.headerLeft,children:[p.jsx("h1",{style:ke.headerTitle,children:z.current||"Claude Chat"}),p.jsx("span",{style:ke.connectedBadge,children:"Connected"})]})}),c&&p.jsxs("div",{style:ke.errorBanner,children:[p.jsx("span",{children:c}),p.jsx("button",{onClick:()=>f(""),style:ke.errorDismiss,children:"×"})]}),p.jsxs("div",{style:ke.messageList,children:[m.length===0&&p.jsx("div",{style:ke.emptyState,children:"Send a message to start the conversation."}),m.map(T=>T.role==="tool"?p.jsx("div",{style:ke.messageBubbleWrapper,children:p.jsx("div",{style:ke.toolBubble,children:T.isStreaming?`Using ${T.content}...`:`Used ${T.content}`})},T.id):p.jsx("div",{style:{...ke.messageBubbleWrapper,justifyContent:T.role==="user"?"flex-end":"flex-start"},children:p.jsx("div",{style:{...ke.messageBubble,...T.role==="user"?ke.userBubble:ke.assistantBubble},children:p.jsx("div",{style:{wordBreak:"break-word"},children:T.role==="assistant"?p.jsxs("div",{className:"chat-markdown",children:[p.jsx(YC,{children:T.content}),T.isStreaming&&p.jsx("span",{style:ke.cursor,children:"|"})]}):p.jsx("div",{style:{whiteSpace:"pre-wrap"},children:T.content})})})},T.id)),p.jsx("div",{ref:k})]}),p.jsxs("form",{onSubmit:ae,style:ke.inputBar,children:[p.jsx("input",{ref:D,type:"text",value:g,onChange:T=>v(T.target.value),placeholder:"Type a message...",disabled:!1,style:ke.textInput,autoFocus:!0}),S?p.jsx("button",{type:"button",onClick:se,style:ke.stopButton,children:"Stop"}):p.jsx("button",{type:"submit",disabled:!g.trim(),style:{...ke.sendButton,opacity:g.trim()?1:.5,cursor:g.trim()?"pointer":"not-allowed"},children:"Send"})]})]})}const ke={container:{display:"flex",flexDirection:"column",height:"100vh",width:"100vw",background:"var(--bg-main)",color:"var(--text-primary)"},pairingContainer:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,gap:16},title:{fontSize:24,fontWeight:600,margin:0},subtitle:{fontSize:14,color:"var(--text-secondary)",margin:0},pinInputs:{display:"flex",gap:8,marginTop:8},pinInput:{width:40,height:48,textAlign:"center",fontSize:20,fontWeight:600,border:"1px solid var(--border-color)",borderRadius:0,background:"var(--bg-secondary)",color:"var(--text-primary)",outline:"none"},pairButton:{padding:"8px 24px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:14,cursor:"pointer"},errorText:{fontSize:13,color:"#d73a49"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",borderBottom:"1px solid var(--border-color)",flexShrink:0},headerLeft:{display:"flex",alignItems:"center",gap:12},headerTitle:{margin:0,fontSize:16,fontWeight:600},connectedBadge:{fontSize:11,fontWeight:500,padding:"2px 8px",borderRadius:10,background:"#2ea04333",color:"#2ea043"},messageList:{flex:1,overflowY:"auto",padding:"16px 20px",display:"flex",flexDirection:"column",gap:8},emptyState:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-secondary)",fontSize:14},messageBubbleWrapper:{display:"flex"},messageBubble:{maxWidth:"70%",padding:"10px 14px",fontSize:14,lineHeight:"1.5",borderRadius:8},userBubble:{background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",borderBottomRightRadius:2},assistantBubble:{background:"var(--bg-secondary)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderBottomLeftRadius:2},cursor:{opacity:.5,animation:"blink 1s step-end infinite"},toolBubble:{fontSize:12,color:"var(--text-secondary)",fontStyle:"italic",padding:"6px 12px",background:"var(--bg-secondary)",border:"1px dashed var(--border-color)",borderRadius:6},inputBar:{display:"flex",gap:8,padding:"12px 20px",borderTop:"1px solid var(--border-color)",flexShrink:0,background:"var(--bg-main)"},textInput:{flex:1,padding:"10px 14px",fontSize:14,border:"1px solid var(--border-color)",borderRadius:0,background:"var(--bg-secondary)",color:"var(--text-primary)",outline:"none"},sendButton:{padding:"10px 20px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:14},stopButton:{padding:"10px 20px",background:"#d73a49",color:"#ffffff",border:"none",borderRadius:0,fontWeight:500,fontSize:14,cursor:"pointer"},errorBanner:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",background:"#d73a4922",borderBottom:"1px solid #d73a4955",color:"#d73a49",fontSize:13,flexShrink:0},errorDismiss:{background:"none",border:"none",color:"#d73a49",fontSize:18,cursor:"pointer",padding:"0 4px",lineHeight:1}};function ZC(){return p.jsx(j0,{children:p.jsxs(t0,{children:[p.jsxs(Vn,{element:p.jsx(B0,{}),children:[p.jsx(Vn,{path:"/",element:p.jsx(Y0,{})}),p.jsx(Vn,{path:"/settings",element:p.jsx(mb,{})}),p.jsx(Vn,{path:"/agents",element:p.jsx(gb,{})}),p.jsx(Vn,{path:"/agents/:id",element:p.jsx(vb,{})}),p.jsx(Vn,{path:"/c/:id",element:p.jsx(Tb,{})})]}),p.jsx(Vn,{path:"/call",element:p.jsx(wb,{})}),p.jsx(Vn,{path:"/chat",element:p.jsx(XC,{})})]})})}const My=document.getElementById("root");if(!My)throw new Error("Root element #root not found");n1.createRoot(My).render(p.jsx(w.StrictMode,{children:p.jsx(ZC,{})}));