@celilo/console-server 0.2.0 → 0.3.0

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,26 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=ee(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=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&&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)},I={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=I,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var P=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function ie(e){return{current:e}}function ae(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function L(e,t){re++,ne[re]=e.current,e.current=t}var oe=ie(null),se=ie(null),ce=ie(null),le=ie(null);function ue(e,t){switch(L(ce,t),L(se,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(oe),L(oe,e)}function de(){ae(oe),ae(se),ae(ce)}function fe(e){e.memoizedState!==null&&L(le,e);var t=oe.current,n=Hd(t,e.type);t!==n&&(L(se,e),L(oe,n))}function pe(e){se.current===e&&(ae(oe),ae(se)),le.current===e&&(ae(le),Qf._currentValue=te)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(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 Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(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 Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=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 s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(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 rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=I.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function at(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[st])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[mt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=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]*$`),Tt={},Et={};function Dt(e){return xe.call(Et,e)?!0:xe.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function kt(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 At(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function It(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+jt(s):e.removeAttribute(`name`)}function Bt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(P(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=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 qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(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 Xt=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`]]),Zt=/^[\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 Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(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="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));zt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(vu(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=h({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=h({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(h({},Dn,{dataTransfer:0})),An=yn(h({},Sn,{relatedTarget:0})),jn=yn(h({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(h({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(h({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(h({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(h({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(h({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(h({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(h({},Dn,{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})),Wn=yn(h({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function z(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Td(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){vd(e,0)}function cr(e){if(Ft(R(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(ln){var dr;if(ln){var fr=`oninput`in document;if(!fr){var B=document.createElement(`div`);B.setAttribute(`oninput`,`return;`),fr=typeof B.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function pr(){ar&&(ar.detachEvent(`onpropertychange`,mr),or=ar=null)}function mr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,tn(e)),sn(sr,t)}}function hr(e,t,n){e===`focusin`?(pr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function _r(e,t){if(e===`click`)return cr(t)}function vr(e,t){if(e===`input`||e===`change`)return cr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function V(e,t){if(br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xe.call(t,i)||!br(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(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=It(e.document)}return t}function Tr(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 Er=ln&&`documentMode`in document&&11>=document.documentMode,Dr=null,Or=null,kr=null,Ar=!1;function jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ar||Dr==null||Dr!==It(r)||(r=Dr,`selectionStart`in r&&Tr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),kr&&V(kr,r)||(kr=r,r=Td(Or,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Dr)))}function Mr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Nr={animationend:Mr(`Animation`,`AnimationEnd`),animationiteration:Mr(`Animation`,`AnimationIteration`),animationstart:Mr(`Animation`,`AnimationStart`),transitionrun:Mr(`Transition`,`TransitionRun`),transitionstart:Mr(`Transition`,`TransitionStart`),transitioncancel:Mr(`Transition`,`TransitionCancel`),transitionend:Mr(`Transition`,`TransitionEnd`)},Pr={},Fr={};ln&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),`TransitionEvent`in window||delete Nr.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!Nr[e])return e;var t=Nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var H=Ir(`animationend`),Lr=Ir(`animationiteration`),Rr=Ir(`animationstart`),zr=Ir(`transitionrun`),Br=Ir(`transitionstart`),U=Ir(`transitioncancel`),Vr=Ir(`transitionend`),Hr=new Map,Ur=`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(` `);Ur.push(`scrollEnd`);function Wr(e,t){Hr.set(e,t),St(t,[e])}var Gr=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&&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)},Kr=[],qr=0,Jr=0;function Yr(){for(var e=qr,t=Jr=qr=0;t<e;){var n=Kr[t];Kr[t++]=null;var r=Kr[t];Kr[t++]=null;var i=Kr[t];Kr[t++]=null;var a=Kr[t];if(Kr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&$r(n,i,a)}}function Xr(e,t,n,r){Kr[qr++]=e,Kr[qr++]=t,Kr[qr++]=n,Kr[qr++]=r,Jr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Zr(e,t,n,r){return Xr(e,t,n,r),ei(e)}function Qr(e,t){return Xr(e,null,null,t),ei(e)}function $r(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ei(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ti={};function ni(e,t,n,r){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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ri(e,t,n,r){return new ni(e,t,n,r)}function ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ai(e,t){var n=e.alternate;return n===null?(n=ri(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 oi(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 si(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ii(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ri(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ci(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ri(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ri(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ri(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ri(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ci(e,t,n,r){return e=ri(7,e,r,t),e.lanes=n,e}function li(e,t,n){return e=ri(6,e,null,t),e.lanes=n,e}function ui(e){var t=ri(18,null,null,0);return t.stateNode=e,t}function di(e,t,n){return t=ri(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fi=new WeakMap;function pi(e,t){if(typeof e==`object`&&e){var n=fi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},fi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var mi=[],hi=0,gi=null,_i=0,vi=[],yi=0,bi=null,xi=1,Si=``;function Ci(e,t){mi[hi++]=_i,mi[hi++]=gi,gi=e,_i=t}function wi(e,t,n){vi[yi++]=xi,vi[yi++]=Si,vi[yi++]=bi,bi=e;var r=xi;e=Si;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xi=1<<32-Re(t)+i|n<<i|r,Si=a+e}else xi=1<<a|n<<i|r,Si=e}function Ti(e){e.return!==null&&(Ci(e,1),wi(e,1,0))}function Ei(e){for(;e===gi;)gi=mi[--hi],mi[hi]=null,_i=mi[--hi],mi[hi]=null;for(;e===bi;)bi=vi[--yi],vi[yi]=null,Si=vi[--yi],vi[yi]=null,xi=vi[--yi],vi[yi]=null}function Di(e,t){vi[yi++]=xi,vi[yi++]=Si,vi[yi++]=bi,xi=t.id,Si=t.overflow,bi=e}var Oi=null,ki=null,Ai=!1,ji=null,Mi=!1,Ni=Error(i(519));function Pi(e){throw Bi(pi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ni}function Fi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Wt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Pi(e,!0)}function Ii(e){for(Oi=e.return;Oi;)switch(Oi.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:Oi=Oi.return}}function Li(e){if(e!==Oi)return!1;if(!Ai)return Ii(e),Ai=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Ud(e.type,e.memoizedProps)),n=!n),n&&ki&&Pi(e),Ii(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ki=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ki=uf(e)}else t===27?(t=ki,Zd(e.type)?(e=lf,lf=null,ki=e):ki=t):ki=Oi?cf(e.stateNode.nextSibling):null;return!0}function Ri(){ki=Oi=null,Ai=!1}function zi(){var e=ji;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),ji=null),e}function Bi(e){ji===null?ji=[e]:ji.push(e)}var Vi=ie(null),Hi=null,Ui=null;function Wi(e,t,n){L(Vi,t._currentValue),t._currentValue=n}function Gi(e){e._currentValue=Vi.current,ae(Vi)}function Ki(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ki(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ki(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ji(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===le.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&qi(t,e,n,r),t.flags|=262144}function Yi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Hi=e,Ui=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zi(e){return $i(Hi,e)}function Qi(e,t){return Hi===null&&Xi(e),$i(e,t)}function $i(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ui===null){if(e===null)throw Error(i(308));Ui=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ui=Ui.next=t;return n}var W=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ea=t.unstable_scheduleCallback,ta=t.unstable_NormalPriority,na={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ra(){return{controller:new W,data:new Map,refCount:0}}function ia(e){e.refCount--,e.refCount===0&&ea(ta,function(){e.controller.abort()})}var aa=null,oa=0,sa=0,ca=null;function la(e,t){if(aa===null){var n=aa=[];oa=0,sa=ud(),ca={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return oa++,t.then(ua,ua),t}function ua(){if(--oa===0&&aa!==null){ca!==null&&(ca.status=`fulfilled`);var e=aa;aa=null,sa=0,ca=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function da(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var fa=F.S;F.S=function(e,t){Ql=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&la(e,t),fa!==null&&fa(e,t)};var pa=ie(null);function ma(){var e=pa.current;return e===null?Fl.pooledCache:e}function ha(e,t){t===null?L(pa,pa.current):L(pa,t.pool)}function ga(){var e=ma();return e===null?null:{parent:na._currentValue,pool:e}}var _a=Error(i(460)),va=Error(i(474)),ya=Error(i(542)),ba={then:function(){}};function xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Sa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Fl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ea(e),e}throw wa=t,_a}}function Ca(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(wa=e,_a):e}}var wa=null;function Ta(){if(wa===null)throw Error(i(459));var e=wa;return wa=null,e}function Ea(e){if(e===_a||e===ya)throw Error(i(483))}var Da=null,Oa=0;function ka(e){var t=Oa;return Oa+=1,Da===null&&(Da=[]),Sa(Da,e,t)}function Aa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ja(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ma(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ai(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=li(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ca(i)===t.type)?(t=a(t,n.props),Aa(t,n),t.return=e,t):(t=si(n.type,n.key,n.props,null,e.mode,r),Aa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=di(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ci(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=li(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=si(t.type,t.key,t.props,null,e.mode,n),Aa(n,t),n.return=e,n;case v:return t=di(t,e.mode,n),t.return=e,t;case O:return t=Ca(t),f(e,t,n)}if(P(t)||M(t))return t=ci(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ka(t),n);if(t.$$typeof===C)return f(e,Qi(e,t),n);ja(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ca(n),p(e,t,n,r)}if(P(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ka(n),r);if(n.$$typeof===C)return p(e,t,Qi(e,n),r);ja(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ca(r),m(e,t,n,r,i)}if(P(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ka(r),i);if(r.$$typeof===C)return m(e,t,n,Qi(t,r),i);ja(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ai&&Ci(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ai&&Ci(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ai&&Ci(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ai&&Ci(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ai&&Ci(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ai&&Ci(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=si(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=di(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ca(o),b(e,r,o,c)}if(P(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ka(o),c);if(o.$$typeof===C)return b(e,r,Qi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=b(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ri(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ei(e),$r(e,null,n),t}return Xr(e,r,t,n),ei(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Q&f)===f:(r&f)===f){f!==0&&f===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Fa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ga(n[e],t)}var qa=ie(null),Ja=ie(0);function Ya(e,t){e=Vl,L(Ja,e),L(qa,t),Vl=e|t.baseLanes}function Xa(){L(Ja,Vl),L(qa,qa.current)}function Za(){Vl=Ja.current,ae(qa),ae(Ja)}var Qa=ie(null),$a=null;function eo(e){var t=e.alternate;L(ao,ao.current&1),L(Qa,e),$a===null&&(t===null||qa.current!==null||t.memoizedState!==null)&&($a=e)}function to(e){L(ao,ao.current),L(Qa,e),$a===null&&($a=e)}function no(e){e.tag===22?(L(ao,ao.current),L(Qa,e),$a===null&&($a=e)):ro(e)}function ro(){L(ao,ao.current),L(Qa,Qa.current)}function io(e){ae(Qa),$a===e&&($a=null),ae(ao)}var ao=ie(0);function oo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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)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 so=0,G=null,co=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return so=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){F.H=Is;var t=co!==null&&co.next!==null;if(so=0,lo=co=G=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||tc||(e=e.dependencies,e!==null&&Yi(e)&&(tc=!0))}function So(e,t,n,r){G=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=co=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(co===null?null:co.memoizedState)!==e&&(G.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}so=0,lo=co=G=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?G.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(co===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=co.next;var t=lo===null?G.memoizedState:lo.next;if(t!==null)lo=t,co=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));co=e,e={memoizedState:co.memoizedState,baseState:co.baseState,baseQueue:co.baseQueue,queue:co.queue,next:null},lo===null?G.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Sa(go,e,t),t=G,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return Zi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),G.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),co,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(so&f)===f:(Q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===sa&&(d=!0);else if((so&p)===p){u=u.next,p===sa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,G.lanes|=p,Ul|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,G.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(tc=!0,d&&(n=ca,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);br(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=G,a=Oo(),o=Ai;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((co||a).memoizedState,n);if(s&&(a.memoizedState=n,tc=!0),a=a.queue,cs(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||so&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=ko(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Ho(e){var t=Qr(e,2);t!==null&&pu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,co,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ns(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(Ai){var n=Fl.formState;if(n!==null){a:{var r=G;if(Ai){if(ki){b:{for(var i=ki,a=Mi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ki=cf(i.nextSibling),r=i.data===`F!`;break a}}Pi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,G,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,G,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),co,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===_a?ya:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=co;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=ko(),G.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();G.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;co!==null&&r!==null&&yo(r,co.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(G.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=ko(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(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 ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||so&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),G.lanes|=e,Ul|=e,n)}function ys(e,t,n,r){return br(n,t)?n:qa.current===null?!(so&42)||so&1073741824&&!(Q&261930)?(tc=!0,e.memoizedState=n):(e=fu(),G.lanes|=e,Ul|=e,t):(e=vs(e,n,r),br(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,Ms(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,da(c,r),du(e)):js(e,t,r,du(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Cs(e).queue;bs(e,a,t,te,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},du())}function Ts(){return Zi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Ra(n);var r=za(t,e,n);r!==null&&(pu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=Zr(e,t,n,r),n!==null&&(pu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,du())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return Xr(e,t,i,0),Fl===null&&Yr(),!1}catch{}if(n=Zr(e,t,i,r),n!==null)return pu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(i(479))}else t=Zr(e,n,r,2),t!==null&&pu(t,e,2)}function Ns(e){var t=e.alternate;return e===G||t!==null&&t===G}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Is={readContext:Zi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Zi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,G,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=Do();if(Ai){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Fl.identifierPrefix;if(Ai){var n=Si,r=xi;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,G)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Zi,use:jo,useCallback:gs,useContext:Zi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),co.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Zi,use:jo,useCallback:gs,useContext:Zi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return co===null?vs(n,e,t):ys(n,co.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return co===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Ra(r);i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(pu(t,e,r),Ba(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Ra(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=za(e,i,r),t!==null&&(pu(t,e,r),Ba(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Ra(n);r.tag=2,t!=null&&(r.callback=t),t=za(e,r,n),t!==null&&(pu(t,e,n),Ba(t,e,n))}};function Hs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!V(n,r)||!V(i,a):!0}function Us(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){Gr(e)}function Ks(e){console.error(e)}function qs(e){Gr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){return n=Ra(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=Ra(e),e.tag=3,e}function Qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ji(t,n,a,!0),n=Qa.current,n!==null){switch(n.tag){case 31:case 13:return $a===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ba?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(Ai)return t=Qa.current,t===null?(r!==Ni&&(t=Error(i(423),{cause:r}),Bi(pi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=pi(r,n),a=Xs(e.stateNode,r,a),Va(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ni&&(e=Error(i(422),{cause:r}),Bi(pi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=pi(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=pi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Xs(n.stateNode,r,e),Va(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Zs(a),Qs(a,e,n,r),Va(n,a),!1}n=n.return}while(n!==null);return!1}var ec=Error(i(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(t,e.child,n,r)}function rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Xi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(Ai&&s&&Ti(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=si(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?V:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=ai(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(V(a,r)&&e.ref===t.ref){if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}}return pc(e,t,n,r,i)}function oc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ha(t,a===null?null:a.cachePool),a===null?Xa():Ya(t,a),no(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ha(t,null),Xa(),ro(t)):(ha(t,a.cachePool),Ya(t,a),ro(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ma();return a=a===null?null:{parent:na._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ha(t,null),Xa(),no(t),e!==null&&Ji(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Na(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ai){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(to(t),(e=ki)?(e=rf(e,Mi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bi===null?null:{id:xi,overflow:Si},retryLane:536870912,hydrationErrors:null},n=ui(e),n.return=t,t.child=n,Oi=t,ki=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(to(t),a){if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(tc||Ji(e,t,n,!1),a=(n&e.childLanes)!==0,tc||a){if(r=Fl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Qr(e,s),pu(r,e,s),ec;Tu(),t=uc(e,t,n)}else e=o.treeContext,ki=cf(s.nextSibling),Oi=t,Ai=!0,ji=null,Mi=!1,e!==null&&Di(t,e),t=lc(t,r),t.flags|=4096;return t}return e=ai(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Xi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(Ai&&r&&Ti(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Xi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(Ai&&r&&Ti(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Xi(t),t.stateNode===null){var a=ti,o=n.contextType;typeof o==`object`&&o&&(a=Zi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ia(t),o=n.contextType,a.context=typeof o==`object`&&o?Zi(o):ti,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Vs.enqueueReplaceState(a,a.state,null),Wa(t,r,a,i),Ua(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ti,typeof u==`object`&&u&&(o=Zi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Us(t,a,r,o),Fa=!1;var f=t.memoizedState;a.state=f,Wa(t,r,a,i),Ua(),l=t.memoizedState,s||f!==l||Fa?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Fa||Hs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,La(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ti,typeof l==`object`&&l&&(c=Zi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Us(t,a,r,c),Fa=!1,f=t.memoizedState,a.state=f,Wa(t,r,a,i),Ua();var p=t.memoizedState;o!==d||f!==p||Fa||e!==null&&e.dependencies!==null&&Yi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Fa||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Yi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Na(t,e.child,null,i),t.child=Na(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Ri(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:ga()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function bc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(ao.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Ai){if(a?eo(t):ro(t),(e=ki)?(e=rf(e,Mi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bi===null?null:{id:xi,overflow:Si},retryLane:536870912,hydrationErrors:null},n=ui(e),n.return=t,t.child=n,Oi=t,ki=null)):e=null,e===null)throw Pi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ro(t),a=t.mode,c=Sc({mode:`hidden`,children:c},a),r=ci(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(null,r)):(eo(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(eo(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,a=t.mode,r=Sc({mode:`visible`,children:r.children},a),c=ci(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Na(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=sc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(eo(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Bi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||Ji(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=Fl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Qr(e,r),pu(s,e,r),ec;af(c)||Tu(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,ki=cf(c.nextSibling),Oi=t,Ai=!0,ji=null,Mi=!1,e!==null&&Di(t,e),t=xc(t,r.children),t.flags|=4096);return t}return a?(ro(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ai(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ci(c,a,n,null),c.flags|=2):c=ai(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(a=c.cachePool,a===null?a=ga():(l=na._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,sc(e.child,r)):(eo(t),n=e.child,e=n.sibling,n=ai(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=ri(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Na(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ki(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=ao.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,L(ao,o),nc(e,t,r,n),r=Ai?_i:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&oo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ji(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ai(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ai(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Yi(e)))}function kc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Wi(t,na,e.memoizedState.cache),Ri();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Wi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(eo(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(eo(t),t.flags|=128,null);eo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Ji(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(ao,ao.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Wi(t,na,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}}else tc=!1,Ai&&t.flags&1048576&&wi(t,_i,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ca(t.elementType),t.type=e,typeof e==`function`)ii(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=rc(null,t,e,r,n);break a}if(a===D){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=N(e)||e,Error(i(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ws(r,t.pendingProps),hc(e,t,r,a,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,La(e,t),Wa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Wi(t,na,r),r!==o.cache&&qi(t,[na],n,!0),Ua(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=gc(e,t,r,n);break a}if(r!==a){a=pi(Error(i(424)),t),Bi(a),t=gc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ki=cf(e.firstChild),Oi=t,Ai=!0,ji=null,Mi=!0,n=Pa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ri(),r===a){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ai||(n=t.type,e=t.pendingProps,r=Bd(ce.current).createElement(n),r[st]=t,r[ct]=e,Pd(r,n,e),yt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&Ai&&(r=t.stateNode=ff(t.type,t.pendingProps,ce.current),Oi=t,Mi=!0,a=ki,Zd(t.type)?(lf=a,ki=cf(r.firstChild)):ki=a),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ai&&((a=r=ki)&&(r=tf(r,t.type,t.pendingProps,Mi),r===null?a=!1:(t.stateNode=r,Oi=t,ki=cf(r.firstChild),Mi=!1,a=!0)),a||Pi(t)),fe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&Ai&&((e=n=ki)&&(n=nf(n,t.pendingProps,Mi),n===null?e=!1:(t.stateNode=n,Oi=t,ki=null,e=!0)),e||Pi(t)),null;case 13:return bc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Na(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wi(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Xi(t),a=Zi(a),r=r(a),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Xi(t),r=Zi(na),e===null?(a=ma(),a===null&&(a=Fl,o=ra(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ia(t),Wi(t,na,a)):((e.lanes&n)!==0&&(La(e,t),Wa(t,null,null,n),Ua()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Wi(t,na,r),r!==a.cache&&qi(t,[na],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wi(t,na,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw wa=ba,va}}else e.flags&=-16777217}function K(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t)){if(Su())e.flags|=8192;else throw wa=ba,va}}function Nc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,ql|=t)}function Pc(e,t){if(!Ai)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function q(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Ei(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return q(t),null;case 1:return q(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Gi(na),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Li(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zi())),q(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(q(t),Mc(t,a,null,r,n)):(q(t),K(t,o))):o?o===e.memoizedState?(q(t),t.flags&=-16777217):(jc(t),q(t),K(t,o)):(e=e.memoizedProps,e!==r&&jc(t),q(t),Mc(t,a,e,r,n)),null;case 27:if(pe(t),n=ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return q(t),null}e=oe.current,Li(t)?Fi(t,e):(e=ff(a,r,n),t.stateNode=e,jc(t))}return q(t),null;case 5:if(pe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return q(t),null}if(o=oe.current,Li(t))Fi(t,o);else{var s=Bd(ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return q(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ce.current,Li(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Oi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Pi(t,!0)}else e=Bd(e).createTextNode(r),e[st]=t,t.stateNode=e}return q(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Li(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;q(t),e=!1}else n=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return q(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Li(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;q(t),a=!1}else a=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nc(t,t.updateQueue),q(t),null);case 4:return de(),e===null&&xd(t.stateNode.containerInfo),q(t),null;case 10:return Gi(t.type),q(t),null;case 19:if(ae(ao),r=t.memoizedState,r===null)return q(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Pc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Pc(r,!1),e=o.updateQueue,t.updateQueue=e,Nc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)oi(n,e),n=n.sibling;return L(ao,ao.current&1|2),Ai&&Ci(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>$l&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Nc(t,e),Pc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ai)return q(t),null}else 2*Ee()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Pc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(q(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=ao.current,L(ao,a?n&1|2:n&1),Ai&&Ci(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(q(t),t.subtreeFlags&6&&(t.flags|=8192)):q(t),n=t.updateQueue,n!==null&&Nc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ae(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gi(na),q(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Ei(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gi(na),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(ao),null;case 4:return de(),null;case 10:return Gi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&ae(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gi(na),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ei(t),t.tag){case 3:Gi(na),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:ae(ao);break;case 10:Gi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&ae(pa);break;case 24:Gi(na)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Uu(e,e.return,t)}}}function Vc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ct]=t}catch(t){Uu(e,e.return,t)}}function J(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||J(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===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=$t));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Y(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[st]=e,t[ct]=n}catch(t){Uu(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Rd=sp,e=wr(e),Tr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ws(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,$c=e;break}$c=t.return}}function tl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Rc(5,n);break;case 1:if(hl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(hl(e,n),r&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{Ka(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Y(n);case 26:case 5:hl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Yc,!r){t=t!==null&&t.memoizedState!==null||Xc,i=Yc;var a=Xc;Yc=r,(Xc=t)&&!a?_l(e,n,!!(n.subtreeFlags&8772)):hl(e,n),Yc=i,Xc=a}break;case 30:break;default:hl(e,n)}}function nl(e){var t=e.alternate;t!==null&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(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 X=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:Xc||Uc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xc||Uc(n,t);var r=X,i=rl;Zd(n.type)&&(X=n.stateNode,rl=!1),il(e,t,n),pf(n.stateNode),X=r,rl=i;break;case 5:Xc||Uc(n,t);case 6:if(r=X,i=rl,X=null,il(e,t,n),X=r,rl=i,X!==null){if(rl)try{(X.nodeType===9?X.body:X.nodeName===`HTML`?X.ownerDocument.body:X).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{X.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}}break;case 18:X!==null&&(rl?(e=X,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(X,n.stateNode));break;case 4:r=X,i=rl,X=n.stateNode.containerInfo,rl=!0,il(e,t,n),X=r,rl=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Xc||zc(4,n,t),il(e,t,n);break;case 1:Xc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Xc=(r=Xc)||n.memoizedState!==null,il(e,t,n),Xc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){X=c.stateNode,rl=!1;break a}break;case 5:X=c.stateNode,rl=!1;break a;case 3:case 4:X=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(X===null)throw Error(i(160));al(o,s,a),X=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Xc||n===null||Uc(n,n.return)),r&64&&Yc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=dl;if(ul(t,e),pl(e),r&512&&(Xc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[st]=e,yt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,yt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode)}else e.stateNode=If(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Xc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Xc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Gt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Zc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=gf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Zc&&(Zc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Yc,d=Xc;if(Yc=u||a,Xc=d||l,ul(t,e),Xc=d,Yc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Yc||Xc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(J(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Gt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tl(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),gl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Uc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Rc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ga(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Y(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),Hc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(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&&ia(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ia(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&zc(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;$c!==null;){var n=$c;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,$c=r;else a:for(n=e;$c!==null;){r=$c;var i=r.sibling,a=r.return;if(nl(r),r===n){$c=null;break a}if(i!==null){i.return=a,$c=i;break a}$c=a}}}var Ml={getCacheForType:function(e){var t=Zi(na),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Zi(na).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:F.T===null?it():ud()}function fu(){if(Kl===0){if(!(Q&536870912)||Ai){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),Kl=e}else Kl=536870912}return e=Qa.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),Ze(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||qe(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}if(n=e.current.alternate,o&&!gu(n)){a=Eu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-Ee(),10<a)){if(_u(r,t,Kl,!Rl),Ke(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Kd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},El(t,a,d);var m=(a&62914560)===a?Zl-Ee():(a&4194048)===a?Ql-Ee():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(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 r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!br(a(),i))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 _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Ui=Hi=null,Eo(e),Da=null,Oa=0,e=Z;for(;e!==null;)Lc(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=ai(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=qe(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Yr(),n}function xu(e,t){G=null,F.H=Is,t===_a||t===ya?(t=Ta(),Il=3):t===va?(t=Ta(),Il=4):Il=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Js(e,pi(t,e.current)))}function Su(){var e=Qa.current;return e===null?!0:(Q&4194048)===Q?$a===null:(Q&62914560)===Q||Q&536870912?e===$a:!1}function Cu(){var e=F.H;return F.H=Is,e===null?Is:e}function wu(){var e=F.A;return F.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&Qa.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Qa.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ui=Hi=null,Pl=r,F.H=i,F.A=a,Z===null&&(Fl=null,Q=0,Yr()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=Ee()+500,bu(e,t)):zl=qe(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(xa(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:xa(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Ui=Hi=null,F.H=r,F.A=a,Pl=n,Z===null?(Fl=null,Q=0,Yr(),Hl):0}function ku(){for(;Z!==null&&!we();)Au(Z)}function Au(e){var t=Ac(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:Eo(t);default:Lc(n,t),t=Z=oi(t,Vl),t=Ac(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Ui=Hi=null,Eo(t),Da=null,Oa=0;var i=t.return;try{if($s(e,i,t,n,Q)){Hl=1,Js(e,pi(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Js(e,pi(n,e.current)),Z=null;return}t.flags&32768?(Ai||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Fc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Jr,Qe(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Ae,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=F.T,F.T=null,a=I.p,I.p=2,s=Pl,Pl|=4;try{el(e,t,n)}finally{Pl=s,I.p=a,F.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=zd,o=wr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Cr(s.ownerDocument.documentElement,s)){if(c!==null&&Tr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Sr(s,h),v=Sr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Pl=i,I.p=r,F.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Pl;Pl|=4;try{tl(e,t.alternate,t)}finally{Pl=i,I.p=r,F.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,Te();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ia(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=rt(au),r=F.T,a=I.p;try{I.p=32>n?32:n,F.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{I.p=a,F.T=r,zu(e,t)}}function Hu(e,t,n){t=pi(n,t),t=Xs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Ze(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=pi(n,e),n=Zs(2),r=za(t,n,2),r!==null&&(Qs(n,r,t,e),Ze(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>Ee()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=Ye()),e=Qr(e,t),e!==null&&(Ze(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return Se(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Q,a=Ke(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,cd(r,a))}r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Ee(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=sd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=Ke(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){Pl&6?Se(Oe,id):ad()})}function ud(){if(td===0){var e=sa;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function fd(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 pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Ur.length;md++){var hd=Ur[md];Wr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Wr(H,`onAnimationEnd`),Wr(Lr,`onAnimationIteration`),Wr(Rr,`onAnimationStart`),Wr(`dblclick`,`onDoubleClick`),Wr(`focusin`,`onFocus`),Wr(`focusout`,`onBlur`),Wr(zr,`onTransitionRun`),Wr(Br,`onTransitionStart`),Wr(U,`onTransitionCancel`),Wr(Vr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Gr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Gr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,bt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!un||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=tn(n),s=[];a:{var c=Hr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case H:case Lr:case Rr:l=jn;break;case Vr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=cn(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:R(l),h=u==null?c:R(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?R(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c)){if(ur)v=vr;else{v=gr;var y=hr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=lr):v=_r;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Vt(c,`number`,c.value)}switch(y=r?R(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(Dr=y,Or=r,kr=null);break;case`focusout`:kr=Or=Dr=null;break;case`mousedown`:Ar=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ar=!1,jr(s,n,i);break;case`selectionchange`:if(Er)break;case`keydown`:case`keyup`:jr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Td(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):z(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=cn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=cn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=cn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
9
+ `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Qt(``+r),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`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Xt.get(n)||n,Ot(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Jt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ot(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Bt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ht(e,!!r,n,!0):Ht(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Wt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Yt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}zt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Ut(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Yt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e!==Wd&&(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body)}n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=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||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function ef(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`:ef(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=I.d;I.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=vt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);yt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=vt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),yt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=vt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),yt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ce.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=vt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=vt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Rt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),yt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Rt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,yt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),yt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){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=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ri(3,null,null,t),e.current=a,a.stateNode=e,t=ra(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ia(a),e}function tp(e){return e?(e=ti,e):ti}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ra(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=za(e,r,t),n!==null&&(pu(n,e,t),Ba(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Qr(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=nt(t);var n=Qr(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,up(e,t,n,r)}finally{I.p=a,F.T=i}}function lp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,up(e,t,n,r)}finally{I.p=a,F.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=Ee()+500,rd(0,!1))}}break;case 31:case 13:s=Qr(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=tn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 fp=e,null}function mp(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(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);en=r,n.target.dispatchEvent(r),en=null}else return t=_t(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[lt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.8`)throw Error(i(527,Lp,`19.2.8`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Fe=zp.inject(Rp),Ie=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Gs,s=Ks,c=qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[lt]=t.current,xd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g();function y(e){return JSON.parse(e)}var b=e=>JSON.stringify(e);Array.prototype,Boolean.prototype,Number.prototype,String.prototype;var x=class{Subscriber;subscribers=new Map;subscribe(e,t){return this.subscribers.set(e,t),()=>{this.unsubscribe(e)}}unsubscribe(e){this.subscribers.delete(e)}next(e){let t=this.subscribers.values();for(let n of t)n(e)}},S=class extends x{state;constructor(e){super(),this.state=e}next(e){this.state=e,super.next(e)}},C=class extends Map{deleted=new Set;changed=new Set;source;appendedSource=new Set;sourceCleared=!1;constructor(e){super(),this.source=e}get(e){if(super.has(e))return super.get(e);if(!this.deleted.has(e)&&this.source.has(e))return this.source.get(e)}getOrInsert(e,t){return this.has(e)?this.get(e):(this.set(e,t),t)}getOrInsertComputed(e,t){if(this.has(e))return this.get(e);let n=t(e);return this.set(e,n),n}set(e,t){let n=this.appendedSource.has(e)||this.sourceCleared&&this.deleted.has(e);return this.source.has(e)&&n?(this.deleted.delete(e),this.changed.delete(e),this.appendedSource.add(e)):this.source.has(e)&&(this.deleted.delete(e),this.appendedSource.delete(e),this.changed.add(e)),super.set(e,t)}hasOwn(e){return super.has(e)}has(e){return super.has(e)?!0:!this.deleted.has(e)&&this.source.has(e)}delete(e){return this.source.has(e)?(this.deleted.add(e),this.changed.delete(e),this.appendedSource.delete(e),super.delete(e),!0):super.delete(e)}clear(){this.deleted=new Set(this.source.keys()),this.appendedSource.clear(),this.changed.clear(),this.sourceCleared=!0,super.clear()}*[Symbol.iterator](){for(let[e,t]of this.source)this.deleted.has(e)||this.appendedSource.has(e)||(this.changed.has(e)?yield[e,super.get(e)]:yield[e,t]);for(let e of super[Symbol.iterator]())this.changed.has(e[0])||(yield e)}*entries(){yield*this[Symbol.iterator]()}*keys(){for(let e of this.source.keys())!this.deleted.has(e)&&!this.appendedSource.has(e)&&(yield e);for(let e of super.keys())this.changed.has(e)||(yield e)}*values(){for(let[,e]of this[Symbol.iterator]())yield e}forEach(e,t){for(let[n,r]of this[Symbol.iterator]())e.call(t,r,n,this)}get size(){return super.size+this.source.size-this.changed.size-this.deleted.size-this.appendedSource.size}};function*w(e){let t=e.keys();for(let e=t.next();!e.done;e=t.next())yield e.value}var T=class extends Set{deleted=new Set;source;appendedSource=new Set;sourceCleared=!1;constructor(e){super(),this.source=e}add(e){let t=this.appendedSource.has(e)||this.sourceCleared&&this.deleted.has(e);return this.source.has(e)&&t?(this.deleted.delete(e),this.appendedSource.add(e),super.add(e)):this.source.has(e)?(this.deleted.delete(e),this.appendedSource.delete(e),this):super.add(e)}hasOwn(e){return super.has(e)}has(e){return super.has(e)||!this.deleted.has(e)&&this.source.has(e)}delete(e){return this.source.has(e)?(this.deleted.add(e),this.appendedSource.delete(e),super.delete(e),!0):super.delete(e)}clear(){this.deleted=new Set(this.source),this.appendedSource.clear(),this.sourceCleared=!0,super.clear()}*[Symbol.iterator](){for(let e of this.source)!this.deleted.has(e)&&!this.appendedSource.has(e)&&(yield e);yield*super[Symbol.iterator]()}*keys(){yield*this[Symbol.iterator]()}*values(){yield*this[Symbol.iterator]()}*entries(){for(let e of this[Symbol.iterator]())yield[e,e]}forEach(e,t){for(let n of this[Symbol.iterator]())e.call(t,n,n,this)}union(e){let t=new Set(this);for(let n of w(e))t.add(n);return t}intersection(e){let t=new Set,n=e,r=this;if(this.size<=e.size)for(let e of this)n.has(e)&&t.add(e);else for(let n of w(e))r.has(n)&&t.add(n);return t}difference(e){let t=new Set,n=e;if(this.size<=e.size)for(let e of this)n.has(e)||t.add(e);else{for(let e of this)t.add(e);for(let n of w(e))t.delete(n)}return t}symmetricDifference(e){let t=new Set(this);for(let n of w(e))t.has(n)?t.delete(n):t.add(n);return t}isSubsetOf(e){if(this.size>e.size)return!1;for(let t of this)if(!e.has(t))return!1;return!0}isSupersetOf(e){if(this.size<e.size)return!1;for(let t of w(e))if(!this.has(t))return!1;return!0}isDisjointFrom(e){if(this.size<=e.size){for(let t of this)if(e.has(t))return!1}else for(let t of w(e))if(this.has(t))return!1;return!0}*iterateOwn(){yield*super[Symbol.iterator]()}get size(){return super.size+this.source.size-this.deleted.size-this.appendedSource.size}},E=class extends Promise{fate;resolve;reject;done=!1;constructor(e){let t,n;super((e,r)=>{t=e,n=r}),this.resolve=t,this.reject=n,this.use(e instanceof Promise?e:new Promise(e))}pass(e,t){e===this.fate&&(this.resolve(t),this.done=!0)}fail(e,t){e===this.fate&&(this.reject(t),this.done=!0)}use(e){if(this!==e){if(e instanceof Promise){let t=e;this.fate=t,t.then(e=>{this.pass(t,e)},e=>{this.fail(t,e)})}else this.resolve(e),this.fate=void 0}}};function D(e){return ht(we.STORE,e,void 0)}var O={atom_family:`atom family`,atom:`atom`,key:`key`,mutable_atom_family:`atom family [m]`,mutable_atom:`atom [m]`,readonly_held_selector_family:`selector family [h]`,readonly_held_selector:`selector [h]`,readonly_pure_selector_family:`selector family`,readonly_pure_selector:`selector`,socket:`socket`,state:`state`,timeline:`timeline`,timeline_family:`timeline family`,transaction:`transaction`,unknown:`unknown`,user:`👤`,writable_held_selector_family:`selector family [wh]`,writable_held_selector:`selector [wh]`,writable_pure_selector_family:`selector family [w]`,writable_pure_selector:`selector [w]`},k=(e,t)=>(n,r,i,a,...o)=>{console[e](`${t?`${t} `:``}${n} ${O[r]} \`${i}\` ${a}`,...o)},A={error:k(`error`),info:k(`info`),warn:k(`warn`)},j=class{logLevel;filter;logger;constructor(e,t,n=A){this.logLevel=e,this.filter=t,this.logger=n}error=(...e)=>{if(this.logLevel!==null){let t=this.filter?.(...e)??!0;t===!0?this.logger.error(...e):t&&this.logger.error(...t)}};info=(...e)=>{if(this.logLevel===`info`){let t=this.filter?.(...e)??!0;t===!0?this.logger.info(...e):t&&this.logger.info(...t)}};warn=(...e)=>{if(this.logLevel!==`error`&&this.logLevel!==null){let t=this.filter?.(...e)??!0;t===!0?this.logger.warn(...e):t&&this.logger.warn(...t)}}},M=class extends Error{constructor(e,t){super(`${O[e.type]} ${b(e.key)} not found in store "${t}".`)}},ee=class extends Map{deleted=new Set;source;constructor(e){super(),this.source=e}get(e){if(super.has(e))return super.get(e);if(!this.deleted.has(e)&&this.source.has(e)){let t=new T(this.source.get(e));return super.set(e,t),t}}set(e,t){return this.deleted.delete(e),super.set(e,t)}has(e){return!this.deleted.has(e)&&(super.has(e)||this.source.has(e))}delete(e){return this.deleted.add(e),super.delete(e)}},N=class e{a;b;cardinality;relations=new Map;contents=new Map;isAType;isBType;isContent;makeContentKey=(e,t)=>`${e}:${t}`;warn;getRelatedKeys(e){return this.relations.get(e)}addRelation(e,t){let n=this.relations.get(e),r=this.relations.get(t);n?n.add(t):(n=new Set([t]),this.relations.set(e,n)),r?r.add(e):(r=new Set([e]),this.relations.set(t,r))}deleteRelation(e,t){let n=this.relations.get(e);if(n){n.delete(t),n.size===0&&this.relations.delete(e);let r=this.relations.get(t);r&&(r.delete(e),r.size===0&&this.relations.delete(t))}}replaceRelationsUnsafely(e,t){this.relations.set(e,new Set(t));for(let n of t){let t=new Set().add(e);this.relations.set(n,t)}}replaceRelationsSafely(e,t){let n=this.relations.get(e),r=this.isAType?.(e)?e:void 0,i=r===void 0?e:void 0;if(n)for(let t of n){r??=t,i??=t;let n=this.relations.get(t);n&&(n.size===1?this.relations.delete(t):n.delete(e),this.contents.delete(this.makeContentKey(r,i)))}this.relations.set(e,new Set(t));for(let n of t){let t=this.relations.get(n);t?t.add(e):(t=new Set().add(e),this.relations.set(n,t))}}getContentInternal(e){return this.contents.get(e)}setContent(e,t){this.contents.set(e,t)}deleteContent(e){this.contents.delete(e)}constructor(e,t){if(this.a=e.between[0],this.b=e.between[1],this.cardinality=e.cardinality,this.isAType=t?.isAType??null,this.isBType=t?.isBType??null,this.isContent=t?.isContent??null,t?.makeContentKey&&(this.makeContentKey=t.makeContentKey),!t?.externalStore){let n=t?.source;n===void 0&&(this.relations=new Map(e.relations?.map(([e,t])=>[e,new Set(t)])),this.contents=new Map(e.contents)),n&&(this.relations=new ee(n.relations),this.contents=new C(n.contents))}if(t?.externalStore){let n=t.externalStore;this.has=(e,t)=>n.has(e,t),this.addRelation=(e,t)=>{n.addRelation(e,t)},this.deleteRelation=(e,t)=>{n.deleteRelation(e,t)},this.replaceRelationsSafely=(e,t)=>{n.replaceRelationsSafely(e,t)},this.replaceRelationsUnsafely=(e,t)=>{n.replaceRelationsUnsafely(e,t)},this.getRelatedKeys=(e=>n.getRelatedKeys(e)),n.getContent&&(this.getContentInternal=e=>n.getContent(e),this.setContent=(e,t)=>{n.setContent(e,t)},this.deleteContent=e=>{n.deleteContent(e)});for(let[t,n]of e.relations??[]){let e=this.isAType?.(t)?t:void 0,r=e===void 0?t:void 0;for(let t of n)e??=t,r??=t,this.addRelation(e,r)}for(let[t,n]of e.contents??[])this.setContent(t,n)}t?.warn&&(this.warn=t.warn)}toJSON(){return{between:[this.a,this.b],cardinality:this.cardinality,relations:[...this.relations.entries()].map(([e,t])=>[e,[...t]]),contents:[...this.contents.entries()]}}set(...e){let t,n,r;switch(e.length){case 1:{let i=e[0];t=i[this.a],n=i[this.b],r=void 0;break}case 2:{let i=e[0];typeof i==`string`?[t,n]=e:(t=i[this.a],n=i[this.b],r=e[1]);break}default:t=e[0],n=e[1],r=e[2]}switch(this.cardinality){case`1:1`:{let e=this.getRelatedKey(t);e&&e!==n&&this.delete(t,e)}case`1:n`:{let e=this.getRelatedKey(n);e&&e!==t&&this.delete(e,n)}}if(r){let e=this.makeContentKey(t,n);this.setContent(e,r)}return this.addRelation(t,n),this}delete(e,t){t=typeof t==`string`?t:e[this.b];let n=typeof e==`string`?e:e[this.a];if(n===void 0&&typeof t==`string`){let e=this.getRelatedKeys(t);if(e)for(let n of e)this.delete(n,t)}else if(typeof n==`string`&&t===void 0){let e=this.getRelatedKeys(n);if(e)for(let t of e)this.delete(n,t)}else if(typeof n==`string`&&typeof t==`string`){this.deleteRelation(n,t);let e=this.makeContentKey(n,t);this.deleteContent(e)}return this}getRelatedKey(e){let t=this.getRelatedKeys(e);if(t){t.size>1&&this.warn?.(`${t.size} related keys were found for key "${e}": (${[...t].map(e=>`"${e}"`).join(`, `)}). Only one related key was expected.`);let n;for(let e of t){n=e;break}return n}}replaceRelations(e,t,n){let r=!Array.isArray(t),i=r?Object.keys(t):t;if(n?.reckless?this.replaceRelationsUnsafely(e,i):this.replaceRelationsSafely(e,i),r)for(let n of i){let r=this.makeContentKey(e,n),i=t[n];this.setContent(r,i)}return this}getContent(e,t){let n=this.makeContentKey(e,t);return this.getContentInternal(n)}getRelationEntries(e){let t=e[this.a],n=e[this.b];if(t!==void 0&&n===void 0){let e=this.getRelatedKeys(t);if(e)return[...e].map(e=>[e,this.getContent(t,e)])}if(t===void 0&&n!==void 0){let e=this.getRelatedKeys(n);if(e)return[...e].map(e=>[e,this.getContent(e,n)])}return[]}has(e,t){return t?this.getRelatedKeys(e)?.has(t)??!1:this.relations.has(e)}overlay(){let t={source:this,makeContentKey:this.makeContentKey};return this.isAType&&(t.isAType=this.isAType),this.isBType&&(t.isBType=this.isBType),this.isContent&&(t.isContent=this.isContent),this.warn&&(t.warn=this.warn),new e({between:[this.a,this.b],cardinality:this.cardinality},t)}incorporate(e){let{relations:t,contents:n}=e;for(let[e,n]of t)if(n instanceof T){let{source:e}=n;for(let t of n.iterateOwn())e.add(t)}else this.relations.set(e,n);for(let e of t.deleted)this.relations.delete(e);for(let[e,t]of n)this.contents.set(e,t);for(let e of n.deleted)this.contents.delete(e)}};function P(e){let t=e;for(;t.child!==null;)t=t.child;return t}function F(e){let t=e;for(;t.parent!==null;)t=t.parent;return t}var I=/^\[object (?:Async|Generator|AsyncGenerator)?Function\]$/;function te(e){let t=Object.prototype.toString.call(e);return I.test(t)}function ne(e,t){return te(e)?e(t):e}var re=class e{_buffer;_index=0;constructor(e){let t;t=typeof e==`number`?e:e.length,this._buffer=Array.from({length:t})}get buffer(){return this._buffer}get index(){return this._index}add(e){this._buffer[this._index]=e,this._index=(this._index+1)%this._buffer.length}copy(){let t=new e([...this._buffer]);return t._index=this._index,t}};function ie(e){let t={key:e.key,type:e.type};return`family`in e&&(t.family=e.family),t}function ae(e){return e.startsWith(`🔍 `)}function L(e,t){return Te(e,{key:t.family.key,type:`${t.type}_family`})}var oe={atom_family:`atom`,molecule_family:`molecule`,mutable_atom_family:`mutable_atom`,readonly_held_selector_family:`readonly_held_selector`,readonly_pure_selector_family:`readonly_pure_selector`,writable_held_selector_family:`writable_held_selector`,writable_pure_selector_family:`writable_pure_selector`},se=Symbol(`MUST_CREATE`),ce=Symbol(`DO_NOT_CREATE`);function le(e,t,n,r){let i=b(r),a=t.molecules.get(i);if(!a&&t.config.lifespan===`immortal`){let{type:e,key:r}=n;return t.logger.warn(`💣`,`key`,i,`was used to mint a counterfeit token for`,e,`"${r}"`),{counterfeit:!0,key:`${r}(${i})`,type:oe[e],family:{key:r,subKey:i}}}let o;if(e===se)t.logger.info(`👪`,n.type,n.key,`adds member`,typeof r==`string`?`\`${r}\``:r),o=n.create(r),a&&t.moleculeData.set(i,n.key);else{let{type:e,key:t}=n;return{key:`${t}(${i})`,type:oe[e],family:{key:t,subKey:i}}}return o}function ue(e,...t){let n,r,i,a,o;if(t.length===1){if(o=t[0],`family`in o){let t=L(e,o);if(i=Te(e,t),a=y(o.family.subKey),n=Ae(e,t,a),`counterfeit`in o)return{token:o,family:i,subKey:a};n?o=n:(r=le(se,e,t,a),o=r)}}else i=Te(e,t[0]),a=t[1],n=Ae(e,i,a),n?o=n:(r=le(se,e,i,a),o=r);let s=`counterfeit`in o;if(r&&s===!1&&i){o.type;let t={type:`atom_creation`,token:o,timestamp:Date.now()};`subject`in i&&i.subject.next(t);let n=P(e);if(o.family){if(xe(n))switch(o.type){case`atom`:case`mutable_atom`:e.on.atomCreation.next(o);break;case`writable_pure_selector`:case`readonly_pure_selector`:case`writable_held_selector`:case`readonly_held_selector`:e.on.selectorCreation.next(o)}else`subject`in i&&Se(n)&&n.on.transactionApplying.state===null&&n.transactionMeta.update.subEvents.push(t)}}return{token:o,family:i,subKey:a}}var de=new WeakMap,fe=new WeakMap,pe=new WeakMap;function me(e,t,n,r){let i=de.get(e);if(i?.phase!==`collecting`)return!1;let a=i.stateNotifications.get(t);return a&&`oldValue`in a.update?a.update={oldValue:a.update.oldValue,newValue:r.newValue}:a?a.update={newValue:r.newValue}:i.stateNotifications.set(t,{subject:n,update:r}),!0}function he(e,t,n){let r=de.get(e);return r?.phase===`state`&&(r.selectorNotifications.set(t,n),!0)}function ge(e,t,n){return de.get(e)?.phase===`collecting`&&(pe.get(e)?.set(t,n),!0)}function _e(e,t,n){let r=de.get(e);r?.phase!==`collecting`||r.previousValues.has(t)||r.previousValues.set(t,n)}function ve(e,t){let n=de.get(e)?.previousValues;return n?.has(t)?{found:!0,value:n.get(t)}:{found:!1,value:void 0}}function ye(e,t,n){let r=fe.get(e);if(!r){t.next(n);return}be(t,n,r)}function be(e,t,n){for(let r of e.subscribers.values())try{r(t)}catch(e){n.push(e)}}function xe(e){return e.transactionMeta.phase===`idle`}function Se(e){return e.transactionMeta.phase!==`idle`}var Ce=class{parent=null;child=null;valueMap=new Map;defaults=new Map;atoms=new Map;writableSelectors=new Map;readonlySelectors=new Map;atomsThatAreDefault=new Set;selectorAtoms=new N({between:[`selectorKey`,`atomKey`],cardinality:`n:n`});selectorGraph=new N({between:[`upstreamSelectorKey`,`downstreamSelectorKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});trackers=new Map;families=new Map;joins=new Map;transactions=new Map;transactionMeta={phase:`idle`};timelines=new Map;timelineFamilies=new Map;timelineTopics=new N({between:[`timelineKey`,`topicKey`],cardinality:`1:n`});disposalTraces=new re(100);molecules=new Map;moleculeGraph=new N({between:[`upstreamMoleculeKey`,`downstreamMoleculeKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});moleculeData=new N({between:[`moleculeKey`,`stateFamilyKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});keyRefsInJoins=new N({between:[`moleculeKey`,`joinKey`],cardinality:`n:n`},{makeContentKey:(...e)=>e.sort().join(`:`)});miscResources=new Map;on={atomCreation:new x,atomDisposal:new x,selectorCreation:new x,selectorDisposal:new x,timelineCreation:new x,timelineDisposal:new x,transactionCreation:new x,transactionApplying:new S(null),operationClose:new x,moleculeCreation:new x,moleculeDisposal:new x};operation={open:!1};config={name:`IMPLICIT_STORE`,lifespan:`ephemeral`,isProduction:!0};loggers=[new j(`warn`,(e,t,n)=>!ae(n))];logger={error:(...e)=>{for(let t of this.loggers)t.error(...e)},info:(...e)=>{for(let t of this.loggers)t.info(...e)},warn:(...e)=>{for(let t of this.loggers)t.warn(...e)}};constructor(e,t=null){if(this.config={...t?.config,...e},t!==null){this.operation={...t?.operation},xe(t)&&(this.transactionMeta={phase:`idle`});for(let[,e]of t.families)e.internalRoles?.includes(`mutable`)||e.internalRoles?.includes(`join`)||e.install(this);let e=new Set;for(let[,n]of t.atoms)if(!e.has(n.key)&&(n.install(this),n.type===`mutable_atom`)){let r=st(t,n),i=ct(n);e.add(r.key),e.add(i.key)}for(let[,e]of t.readonlySelectors)e.install(this);for(let[,n]of t.writableSelectors)e.has(n.key)||n.install(this);for(let[,e]of t.transactions)e.install(this);for(let[,e]of t.timelineFamilies)e.install(this);for(let[,e]of t.timelines)e.install(this)}}},we={get STORE(){return globalThis.ATOM_IO_IMPLICIT_STORE??=new Ce({name:`IMPLICIT_STORE`,lifespan:`ephemeral`,isProduction:!0}),globalThis.ATOM_IO_IMPLICIT_STORE}};function Te(e,t){let n,r=e;for(;r!==null;){switch(t.type){case`atom`:case`mutable_atom`:n=r.atoms.get(t.key);break;case`writable_pure_selector`:case`writable_held_selector`:n=r.writableSelectors.get(t.key);break;case`readonly_pure_selector`:case`readonly_held_selector`:n=r.readonlySelectors.get(t.key);break;case`atom_family`:case`mutable_atom_family`:case`writable_pure_selector_family`:case`readonly_pure_selector_family`:case`writable_held_selector_family`:case`readonly_held_selector_family`:n=r.families.get(t.key);break;case`timeline`:n=r.timelines.get(t.key);break;case`timeline_family`:n=r.timelineFamilies.get(t.key);break;case`transaction`:n=r.transactions.get(t.key)}if(n)return n;r=r.child}throw new M(t,e.config.name)}function Ee(e,t,n,r){let i=e.disposalTraces.buffer.find(e=>e?.key===b(r));switch(e.logger.error(`❌`,t.type,t.key,`gets a fallback value because key`,r,`is not allocated`,i?`This key was previously disposed:\n${i.trace}`:`(no previous disposal trace found)`),n.type){case`mutable_atom_family`:{if(e.defaults.has(n.key))return e.defaults.get(n.key);let t=new n.class;return e.defaults.set(n.key,t),t.READONLY_VIEW}case`atom_family`:{if(e.defaults.has(n.key))return e.defaults.get(n.key);let t=n.default,i=t(r);return e.defaults.set(n.key,i),i}case`readonly_pure_selector_family`:case`writable_pure_selector_family`:case`readonly_held_selector_family`:case`writable_held_selector_family`:{if(e.defaults.has(n.key))return e.defaults.get(n.key);let t=n.default(r);return e.defaults.set(n.key,t),t}}}function De(e,t){let{type:n,key:r,catch:i}=t;switch(n){case`readonly_pure_selector`:case`writable_pure_selector`:{let a;e.logger.info(`🧮`,n,r,`computing value`);try{a=t.getFrom(e),a instanceof Promise&&(a=a.catch(t=>{if(e.logger.error(`💥`,n,r,`rejected:`,t),i){for(let e of i)if(t instanceof e)return t}throw t}))}catch(a){if(e.logger.error(`💥`,n,r,`rejected:`,a),i){for(let n of i)if(a instanceof n)return ut(e,t,a)}throw a}return ut(e,t,a)}case`atom`:{let a;if(te(t.default))try{a=t.default(),a instanceof Promise&&(a=a.catch(t=>{if(e.logger.error(`💥`,n,r,`rejected:`,t),i){for(let e of i)if(t instanceof e)return t}throw t}))}catch(o){if(e.logger.error(`💥`,n,r,`rejected:`,o),i){for(let n of i)if(o instanceof n)return a=ut(e,t,o),e.logger.info(`✨`,t.type,r,`computed default`,a),a}throw o}else a=t.default,e.logger.info(`✨`,t.type,r,`using static default`,a);return ut(e,t,a)}}}function Oe(e,t,n){if(e.valueMap.has(t.key))return dt(e,t,n);e.logger.info(`❔`,t.type,t.key,`value not found in cache`);let{key:r}=t;switch(t.type){case`readonly_held_selector`:case`writable_held_selector`:return e.logger.info(`🧮`,t.type,r,`computing value`),t.getFrom(e);case`writable_pure_selector`:case`readonly_pure_selector`:case`atom`:return De(e,t);case`mutable_atom`:{let n=new t.class;return e.logger.info(`✨`,t.type,r,`created new instance`,n),ut(e,t,n)}}}function ke(e,...t){let{token:n,family:r,subKey:i}=ue(e,...t);return`counterfeit`in n&&r&&i?Ee(e,n,r,i):Oe(e,Te(e,n))}function Ae(e,t,n){let r=b(n),i=`${t.key}(${r})`,a=P(e),o;switch(t.type){case`atom_family`:case`mutable_atom_family`:o=a.atoms.get(i);break;case`writable_held_selector_family`:case`writable_pure_selector_family`:o=a.writableSelectors.get(i);break;case`readonly_held_selector_family`:case`readonly_pure_selector_family`:o=a.readonlySelectors.get(i)}return o&&ie(o)}function je(e,t,n){let r=Te(e,t);return Ae(e,t,n)||le(ce,e,r,n)}function Me(e,t){if(e.operation.open){let n=performance.now();return e.logger.info(`🚫`,t.type,t.key,`deferring setState at T-${n} until setState for "${e.operation.token.key}" is done`),n}return e.operation={open:!0,done:new Set,prev:new Map,timestamp:Date.now(),token:t,subEvents:[]},e.logger.info(`⭕`,t.type,t.key,`operation start in store "${e.config.name}"${Se(e)?` ${e.transactionMeta.phase} "${e.transactionMeta.update.token.key}"`:``}`),e}function Ne(e){e.operation.open&&e.logger.info(`🔴`,e.operation.token.type,e.operation.token.key,`operation done in store "${e.config.name}"`),e.operation={open:!1},e.on.operationClose.next(e.operation)}function Pe(e,t){return e.operation.open?e.operation.done.has(t):(e.logger.error(`🐞`,`unknown`,t,`isDone called outside of an operation. This is probably a bug in AtomIO.`),!0)}function Fe(e,t){if(!e.operation.open){e.logger.error(`🐞`,`unknown`,t,`markDone called outside of an operation. This is probably a bug in AtomIO.`);return}e.operation.done.add(t)}function Ie(e,t,n,r,i){let{oldValue:a,newValue:o}=n,s=`oldValue`in n,c=ie(t);if(r&&i){t.subject.next({newValue:o});let n=P(e);if(c.family)switch(c.type){case`atom`:case`mutable_atom`:let t={checkpoint:!0,type:`atom_creation`,token:c,timestamp:Date.now(),value:o};e.operation.subEvents.push(t),i.subject.next(t),xe(n)?e.on.atomCreation.next(c):Se(n)&&n.on.transactionApplying.state===null&&n.transactionMeta.update.subEvents.push(t);break;case`writable_pure_selector`:case`writable_held_selector`:e.on.selectorCreation.next(c)}return}let{key:l,subject:u,type:d}=t,f;if(f=s?{oldValue:lt(a)?a.READONLY_VIEW:a,newValue:lt(o)?o.READONLY_VIEW:o}:{newValue:lt(o)?o.READONLY_VIEW:o},xe(e)){switch(d){case`mutable_atom`:e.logger.info(`📢`,d,l,`is now (`,o,`) subscribers:`,u.subscribers.keys());break;case`atom`:case`writable_pure_selector`:case`writable_held_selector`:e.logger.info(`📢`,d,l,`went (`,a,`->`,o,`) subscribers:`,u.subscribers.keys())}(!(d!==`mutable_atom`&&(d!==`atom`||!gt(t,`tracker:signal`)))||!me(e,l,u,f))&&ye(e,u,f)}if(Se(e)&&(d===`mutable_atom`||d===`atom`)){if(e.on.transactionApplying.state===null){if(lt(o))return;let{timestamp:t}=e.operation,n={type:`atom_update`,token:c,timestamp:t,update:f};e.transactionMeta.update.subEvents.push(n),e.logger.info(`📁`,`atom`,l,`stowed (`,a,`->`,o,`)`);return}if(gt(t,`tracker:signal`)){let t=l.slice(1),n=e.atoms.get(t);Oe(e,n,`mut`).do(f.newValue)===null&&pt(e,n)}}}var Le=Symbol(`UNSET`);function Re(e,t,n){let r,i;if(te(n)){let a=Oe(e,t,`mut`);r=a,i=n(a)}else r=e.valueMap.has(t.key)?dt(e,t,`mut`):t.type===`atom`&&!te(t.default)?t.default:Le,i=n;return e.logger.info(`⭐`,`atom`,t.key,`setting value`,i),i=ut(e,t,i),Fe(e,t.key),pt(e,t),r===Le?{newValue:i}:{oldValue:r,newValue:i}}function ze(e,t){switch(t.type){case`mutable_atom`:return Re(e,t,new t.class);case`atom`:{let n;return n=te(t.default)?De(e,t):t.default,Re(e,t,n)}}}function Be(e,t){let n;switch(t.type){case`atom`:case`mutable_atom`:n=ze(e,t);break;case`writable_held_selector`:{let r=et(e,t.key);for(let n of r.values())Ie(e,t,ze(e,n),!1);let i=t.getFrom(e);n={oldValue:i,newValue:i}}break;case`writable_pure_selector`:{let r=De(e,t),i=et(e,t.key);for(let n of i.values())Ie(e,t,ze(e,n),!1);n={oldValue:r,newValue:De(e,t)}}}return n}function Ve(e,...t){Je(Ke,e,...t)}var He=Symbol(`RESET`);function Ue(e,...t){Ve(e,...t,He)}function We(e,t,n){let r,i,a,{type:o,key:s}=t;switch(t.type){case`writable_pure_selector`:r=Oe(e,t,`mut`),i=ne(n,r),i=ut(e,t,i);break;case`writable_held_selector`:a=t.const,ne(n,a),r=a,i=a}return e.logger.info(`⭐`,o,s,`setting to`,i),Fe(e,s),t.setSelf(i),{oldValue:r,newValue:i}}function Ge(e,t,n){let r;switch(t.type){case`atom`:case`mutable_atom`:r=Re(e,t,n);break;case`writable_pure_selector`:case`writable_held_selector`:r=We(e,t,n)}return r}var Ke=Symbol(`OWN_OP`),qe=Symbol(`JOIN_OP`);function Je(e,t,...n){let r,i,a,o,s,c;n.length===2?(a=n[0],c=n[1],`family`in a&&(o=L(t,a),s=y(a.family.subKey),r=Ae(t,o,s),a=r||(i=le(se,t,o,s)))):(o=Te(t,n[0]),s=n[1],c=n[2],r=Ae(t,o,s),a=r||(i=le(se,t,o,s)));let l=c===He?`reset`:`set`,u;if(e===Ke){let n=Me(t,a);if(typeof n==`number`){let r=n,i=t.on.operationClose.subscribe(`waiting to ${l} "${a.key}" at T-${r}`,function(){i(),t.logger.info(`🟢`,a.type,a.key,`resuming deferred`,l,`from T-${r}`),Je(e,t,a,c)});return}u=n}else u=t;if(`counterfeit`in a&&`family`in a){let e=a.family.subKey,n=t.disposalTraces.buffer.find(t=>t?.key===e);t.logger.error(`❌`,a.type,a.key,`could not be`,l,`because key`,e,`is not allocated.`,n?`this key was previously disposed:${n.trace}`:`(no previous disposal trace found)`);return}let d=Te(u,a),f;f=c===He?Be(u,d):Ge(u,d,c),Ie(u,d,f,!!i,o),e===Ke&&Ne(u)}var Ye=(e,t)=>P(e).atoms.has(t),Xe=(e,t)=>P(e).writableSelectors.has(t),Ze=(e,t)=>P(e).readonlySelectors.has(t),Qe=(e,t)=>Ye(e,t)||Xe(e,t)||Ze(e,t);function $e(e,t){return P(e).selectorGraph.getRelationEntries({downstreamSelectorKey:t}).filter(([e,{source:n}])=>n!==t).map(([e,{source:t}])=>t).filter(t=>Qe(e,t))}function et(e,t,n=new Set){let r=P(e),i=$e(r,t),a=new Map;for(;i.length>0;){let e=i.pop();if(n.has(e))continue;n.add(e);let t=r.atoms.get(e);t?a.set(t.key,t):i.push(...$e(r,e))}return a}function tt(e,t){let n=P(e);if(n.operation.open)return n.operation.prev.get(t.key);let r=ve(n,t.key);return r.found?r.value:n.valueMap.get(t.key)}function nt(e,t,n){return n.subject.subscribe(`${t.type}:${t.key}`,r=>{he(e,t.key,()=>{rt(e,t,n,r)})||rt(e,t,n,r)})}function rt(e,t,n,r){e.logger.info(`📢`,t.type,t.key,`root`,n.key,`went`,r.oldValue,`->`,r.newValue);let i=tt(e,t),a=Oe(e,t);e.logger.info(`✨`,t.type,t.key,`went`,i,`->`,a),ye(e,t.subject,{newValue:a,oldValue:i})}function it(e,t,n,r){function i(n){e.operation.open&&a?.type===`atom`&&gt(a,`tracker:signal`)&&`*`+e.operation.token.key===t.key&&`inboundTracker`in r||r(n)}ue(e,t);let a=Te(e,t);e.logger.info(`👀`,a.type,a.key,`Adding subscription "${n}"`);let o=a.type===`writable_pure_selector`||a.type===`readonly_pure_selector`,s=new Map,c=i;if(o){Oe(e,a);for(let[t,n]of et(e,a.key))s.set(t,nt(e,a,n));c=function(t){let n=et(e,a.key);for(let[e,t]of s)n.get(e)?n.delete(e):(t(),s.delete(e));for(let[t,r]of n)s.set(t,nt(e,a,r));i(t)}}let l=a.subject.subscribe(n,c);return()=>{e.logger.info(`🙈`,a.type,a.key,`Removing subscription "${n}"`),l();for(let e of s.values())e()}}function at(e,t,n,r){let i=Te(e,t);e.logger.info(`👀`,`timeline`,t.key,`Adding subscription "${n}"`);let a=i.subject.subscribe(n,r);return()=>{e.logger.info(`🙈`,`timeline`,t.key,`Removing subscription "${n}" from timeline`),a()}}var ot=class{initializeSignalAtom(e,t){let n=`*${e.key}`;t.atoms.delete(n),t.valueMap.delete(n);let r=e.family?{key:`*${e.family.key}`,subKey:e.family.subKey}:void 0,i=ht(t,{key:n,default:null},r,[`tracker:signal`]);if(t.parent?.valueMap.has(n)){let e=t.parent.valueMap.get(n);t.valueMap.set(n,e)}return i}unsubscribeFromInnerValue;unsubscribeFromState;captureSignalsFromCore(e,t,n){let r=e.key,i=`tracker-from-core:${n.config.name}:${Se(n)?n.transactionMeta.update.token.key:`main`}:${r}`,a=e=>{Je(qe,n,t,e)},o=ke(n,e);this.unsubscribeFromInnerValue=o.subscribe(i,a),this.unsubscribeFromState=it(n,e,i,function(e){e.newValue!==e.oldValue&&(this.unsubscribeFromInnerValue(),this.unsubscribeFromInnerValue=e.newValue.subscribe(i,a))}.bind(this))}supplySignalsToCore(e,t,n){let r=e.key,i=`tracker-to-core:${n.config.name}:${Se(n)?n.transactionMeta.update.token.key:`main`}:${r}`;it(n,t,i,Object.assign(function({newValue:r,oldValue:a}){let o=n.timelineTopics.getRelatedKey(t.key);if(o&&n.timelines.get(o)?.timeTraveling){let t=at(n,{key:o,type:`timeline`},i,function(i){t(),Ve(n,e,e=>(i.event===`redo`&&r?e.do(r):i.event===`undo`&&a&&e.undo(a),e))});return}Ve(n,e,e=>(e.do(r),e))},{inboundTracker:!0}))}mutableAtomToken;latestSignalToken;[Symbol.dispose];constructor(e,t){let n=P(t),r=this.initializeSignalAtom(e,n);this.mutableAtomToken=e,this.latestSignalToken=r,this.captureSignalsFromCore(e,r,n),this.supplySignalsToCore(e,r,n),n.trackers.set(e.key,this),this[Symbol.dispose]=()=>{this.unsubscribeFromInnerValue(),this.unsubscribeFromState(),n.trackers.delete(e.key)}}},st=(e,t)=>t.family?je(e,Te(P(e),{key:`${t.family.key}:JSON`,type:`writable_pure_selector_family`}),y(t.family.subKey)):{type:`writable_pure_selector`,key:`${t.key}:JSON`};function ct(e){let t={type:`atom`,key:`*${e.key}`};return e.family&&(t.family={key:`*${e.family.key}`,subKey:e.family.subKey}),t}function lt(e){return typeof e==`object`&&!!e&&`do`in e&&`undo`in e&&`subscribe`in e&&`READONLY_VIEW`in e&&`toJSON`in e}function ut(e,t,n){let{key:r,subject:i,type:a}=t,o=e.valueMap.get(r);if(o instanceof E&&!o.done){let t=o;return n instanceof Promise?(t.use(n),t):(e.valueMap.set(r,n),n)}if(n instanceof Promise){let o=new E(n);return e.valueMap.set(r,o),o.then(function(n){if(e.valueMap.get(r)===o){switch(Me(e,t),ut(e,t,n),a){case`atom`:pt(e,t);break;case`readonly_pure_selector`:case`writable_pure_selector`:mt(e,r)}Ne(e),i.next({newValue:n,oldValue:o})}}).catch(n=>{e.logger.error(`💥`,t.type,r,`rejected:`,n)}),o}return e.logger.info(`📝`,t.type,t.key,`writing to cache`,n),e.valueMap.set(r,n),n}function dt(e,t,n){e.logger.info(`📖`,t.type,t.key,`reading cached value`);let r=e.valueMap.get(t.key);if(n===`mut`&&t.type===`mutable_atom`&&Se(e)){let n=t,{parent:i}=e;if(e.valueMap.hasOwn(n.key))return r;let a=i.valueMap.get(n.key);e.logger.info(`📃`,`atom`,n.key,`copying`);let o=a.toJSON(),s=n.class.fromJSON(o);e.valueMap.set(n.key,s),new ot(n,i),r=s}return r}function ft(e,t){let n=e.valueMap.get(t);if(n instanceof E){if(Se(e)&&!e.valueMap.hasOwn(t)){e.operation.open&&e.operation.prev.set(t,n),e.valueMap.delete(t),e.logger.info(`🗑`,`state`,t,`evicted from child store`);return}let r=e.readonlySelectors.get(t),i=e.writableSelectors.get(t),a=r??i,o=()=>{let t=De(e,a);n.use(t)};if(ge(e,t,o))return;o();return}e.operation.open&&e.operation.prev.set(t,n),_e(e,t,n),e.valueMap.delete(t),e.logger.info(`🗑`,`state`,t,`evicted`)}function pt(e,t){let n=P(e),{key:r,type:i}=t,a=n.selectorAtoms.getRelatedKeys(r);if(n.logger.info(`🧹`,i,r,a?`evicting ${a.size} states downstream:`:`no downstream states`,a??`to evict`),a){n.operation.open&&n.logger.info(`🧹`,i,r,`[ ${[...n.operation.done].join(`, `)} ] already done`);for(let e of a)Pe(n,e)||(ft(n,e),Fe(n,e))}}function mt(e,t){let n=P(e),r=n.selectorGraph.getRelationEntries({upstreamSelectorKey:t}).filter(([e,{source:n}])=>n===t);for(let[t]of r)Pe(n,t)||(ft(n,t),Fe(n,t),mt(e,t))}function ht(e,t,n,r){let i=`atom`,{key:a}=t;e.logger.info(`🔨`,i,a,`is being created`);let o=P(e),s=o.atoms.get(a);if(s?.type===i&&e.config.isProduction===!0)return e.logger.error(`❌`,`atom`,a,`Tried to create atom, but it already exists in the store.`),ie(s);let c=new x,l={...t,type:i,install:e=>(e.logger.info(`🛠️`,i,a,`installing in store "${e.config.name}"`),ht(e,t,n)),subject:c};n&&(l.family=n),r&&(l.internalRoles=r),o.atoms.set(a,l);let u=ie(l);if(t.effects){let n=0,r=[];for(let i of t.effects){let t=i({resetSelf:()=>{Ue(e,u)},setSelf:t=>{Ve(e,u,t)},onSet:t=>it(e,u,`effect[${n}]`,t),token:u,store:F(e)});t&&r.push(t),++n}l.cleanup=()=>{for(let e of r)e instanceof Promise?e.then(e=>e?.()):e()}}return e.on.atomCreation.next(u),u}function gt(e,t){return`internalRoles`in e&&e.internalRoles.includes(t)}var _t=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),R=o(((e,t)=>{t.exports=_t()}))(),vt=(0,_.createContext)(we.STORE);function yt(e,...t){let n;if(t.length===2){let r=t[0],i=t[1];n=je(e,r,i)}else n=t[0];return n}function bt(...e){let t=(0,_.useContext)(vt),n=yt(t,...e);return(0,_.useCallback)(e=>{Ve(t,n,e)},[t,n.key])}function xt(...e){let t=(0,_.useContext)(vt),n=yt(t,...e),r=(0,_.useId)();if(n.type===`mutable_atom`||n.type===`readonly_held_selector`||n.type===`writable_held_selector`){let[,e]=(0,_.useState)(0),i=(0,_.useRef)(null),a=i.current;return(a===null||a.store!==t||a.tokenKey!==n.key)&&(a={store:t,tokenKey:n.key,value:ke(t,n)},i.current=a),(0,_.useEffect)(()=>it(t,n,`use-o:${r}`,({newValue:t})=>{a.value=t,e(e=>e+1)}),[t,n.key]),a.value}let i=(0,_.useCallback)(e=>it(t,n,`use-o:${r}`,e),[t,n.key]),a=(0,_.useCallback)(()=>ke(t,n),[t,n.key]);return(0,_.useSyncExternalStore)(i,a,a)}[[1,0],[-1,0],[0,1],[0,-1],[1,1],[1,-1],[-1,1],[-1,-1]].map(([e,t])=>({dx:e,dy:t,ux:e/Math.hypot(e,t),uy:t/Math.hypot(e,t)}));function St(e){let t=new Map,n=new Map,r=(r,i)=>{let a=e.laneOf.get(r);if(a===void 0)return;let o=n.get(a)??new Set,s=Math.max(0,i);for(;o.has(s);)s+=1;o.add(s),n.set(a,o),t.set(r,s)},i=new Map;for(let t of e.edges){let e=i.get(t.fromModuleId)??[];e.includes(t.toModuleId)||e.push(t.toModuleId),i.set(t.fromModuleId,e)}let a=n=>{if(t.has(n))return;r(n,0);let a=[n];for(;a.length>0;){let n=a.shift();if(n===void 0)continue;let o=t.get(n)??0;for(let s of i.get(n)??[])t.has(s)||e.laneOf.has(s)&&(r(s,o),a.push(s))}};for(let[t,n]of e.pinned??[])e.laneOf.has(t)&&r(t,n);e.rootModuleId&&a(e.rootModuleId);let o=new Map;for(let t of e.edges)o.set(t.toModuleId,(o.get(t.toModuleId)??0)+1);let s=[...e.moduleIds].filter(n=>!t.has(n)&&e.laneOf.has(n)).sort((e,t)=>(o.get(t)??0)-(o.get(e)??0)||e.localeCompare(t));for(let e of s)a(e);let c=0;for(let e of t.values())c=Math.max(c,e+1);return{columnOf:t,columnCount:c}}var Ct=`"IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace`,wt=`Theia, "Helvetica Neue", Arial, sans-serif`,Tt={mode:`bands`,type:{zone:{family:wt,size:17.5,weight:500,tracking:1.4},module:{family:wt,size:14.5,weight:500,tracking:0},detail:{family:Ct,size:11,weight:400,tracking:0},roster:{family:wt,size:13.5,weight:400,tracking:0}},color:{ground:`#000000`,outlinePrimary:`#a72a97`,outlineSecondary:`#8da6d3`,outlineTertiary:`#3a3f47`,fillPrimary:`#000000`,fillSecondary:`#000000`,fillTertiary:`#000000`,textPrimary:`#ffffff`,textSecondary:`#c7ccd4`,textTertiary:`#6b7078`,rule:`#23262b`,dockGround:`#130b0b`,actionText:`#e8c9e2`,actionGround:`#1c1016`,actionBorder:`#a72a97`,edge:`#6b6eb8`,firing:`#ff5f4d`,stale:`#8a5d14`,unobserved:`#ac0c24`,zoneAccents:[`#8b7fd4`,`#e2603f`,`#e0a13a`,`#4bb6c9`,`#3fb98a`,`#7f8fd4`,`#8a8f98`,`#4a4f57`]},space:{width:1100,laneHeight:100,laneGap:14,padding:24,labelGutter:168,moduleWidth:160,moduleHeight:56,moduleGap:56,rowGap:16,modulePadding:9,rosterWidth:300,rosterRowGap:12},edge:{tiers:[{color:`#6b6eb8`,width:3.6,dash:null},{color:`#6b6eb8`,width:2,dash:null},{color:`#5b5c71`,width:.8,dash:[6,5]}],optionalDash:[5,4],traceSeparation:4,delegationArrow:!0,capabilityLabels:!1,hopBadges:!1,groupMultiProvider:!0,showDeclaredUnbound:!1,showUnrelated:!1},effect:{corner:0,fillOpacity:.38,glow:1.5,laneWash:.02,laneRule:!0,showEmptyZones:!1,statusLight:!0,lampDim:.45,lampGlow:9,lampScale:1.15,drawIn:!0,drawInMs:420,flow:!0,flowSpeed:140,flowLength:10},hopWeight:{base:1,decay:.36,floor:.18},unrelatedWeight:.6};function Et(e,t){if(e===null)return t.unrelatedWeight;let{base:n,decay:r,floor:i}=t.hopWeight;if(e<=0)return n;let a=Math.min(n,Math.max(i,t.unrelatedWeight+Dt));return a+(n-a)*r**e}var Dt=.08;function Ot(e,t){let{tiers:n}=t.edge,r=n[n.length-1];if(!r)return{color:`#6b6eb8`,width:2,dash:null};let i=Math.max(0,(e??1)-1);return n[Math.min(i,n.length-1)]??r}var kt=Tt,At=`no system`;function jt(e,t,n,r,i,a=0,o=0){let[s,c]=e,[l,u]=t,{laneGap:d,moduleGap:f}=n.space,p=[],m=o!==0,h=a!==0,g=(e,t,n)=>n===0||(e-t)*n>=3,_=e=>{let t=[(s+l)/2,s+(o||-1),l+(a||-1)],r=[];for(let i of t){let t=Nt(i,n,e);r.includes(t)||r.push(t);for(let e of[3,-3]){let i=Math.max(Ft(n),t+e);r.includes(i)||r.push(i)}}return r.filter(e=>g(e,s,o)&&g(e,l,a))};if(Math.abs(s-l)<1&&!m&&!h&&p.push([e,t]),Math.abs(c-u)<1&&p.push([e,[l,c]]),h&&!m){p.push([[s,c],[s,u],[l,u]]);for(let e of[0,1,-1,2,-2,3,-3,4,-4,5,-5]){let t=c+Math.sign(u-c||1)*(d/2+Math.abs(e)*2);for(let n of _(e))p.push([[s,c],[s,t],[n,t],[n,u],[l,u]])}}if(m)for(let e of[0,1,-1,2,-2,3,-3,4,-4,5,-5])for(let t of _(e))if(h)p.push([[s,c],[t,c],[t,u],[l,u]]);else{let n=u-Math.sign(u-c||1)*(d/2+Math.abs(e)*2);p.push([[s,c],[t,c],[t,n],[l,n],[l,u]])}let v=u-c,y=Math.min(c,u),b=Math.max(c,u);if(b-y>2){let e=c+v/2+(r%5-2)*Math.min(6,Math.abs(v)/10),t=Math.min(b-1,Math.max(y+1,e));p.push([[s,c],[s,t],[l,t],[l,u]])}for(let e of[0,1,-1,2,-2,3,-3,4,-4,5,-5]){let t=Nt((s+l)/2,n,e),r=c+Math.sign(v||1)*(d/2+Math.abs(e)*2),i=u-Math.sign(v||1)*(d/2+Math.abs(e)*2);p.push([[s,c],[s,r],[t,r],[t,i],[l,i],[l,u]])}for(let e of Mt(i,n))for(let t of[0,1,-1,2,-2])p.push([[s,c],[s,e+t*Math.max(3,d/4)],[l,e+t*Math.max(3,d/4)],[l,u]]);return p}function Mt(e,t){let n=[];for(let r of e){n.push(r.y-t.space.laneGap/2);let e=t.space.moduleHeight+t.space.rowGap,i=r.rows*e-t.space.rowGap,a=r.y+(r.height-i)/2;for(let i=1;i<r.rows;i+=1)n.push(a+i*e-t.space.rowGap/2)}let r=e[e.length-1];return r&&n.push(r.y+r.height+t.space.laneGap/2),n}function Nt(e,t,n){let{moduleWidth:r,moduleGap:i}=t.space,a=Pt(t),o=r+i,s=Math.max(0,Math.round((e-a)/o)+n);return Math.min(t.space.width-t.space.padding,Math.max(Ft(t),a+s*o-i/2))}function Pt(e){return e.space.padding+e.space.labelGutter}function Ft(e){return Pt(e)-Math.min(e.space.moduleGap,vn)}function It(e,t,n){let r=Math.min(e[0],t[0]),i=Math.max(e[0],t[0]),a=Math.min(e[1],t[1]),o=Math.max(e[1],t[1]);return i>n[0]&&r<n[2]&&o>n[1]&&a<n[3]}function Lt(e,t){return`${e}:${Math.round(t)}`}function Rt(e,t){return Math.max(e[0],t[0])<Math.min(e[1],t[1])}function zt(e,t,n){return(e.get(t)??[]).filter(e=>Rt(e,n)).length}function Bt(e,t,n){e.set(t,[...e.get(t)??[],n])}function Vt(e,t,n,r,i,a,o){if(zt(e,Lt(t,n),r)===0)return n;for(let s=1;s<=12;s+=1)for(let c of[1,-1]){let l=n+c*s*i;if(!(t===`x`&&(l<a||l>o))&&zt(e,Lt(t,l),r)===0)return l}return n}function Ht(e,t,n,r,i,a,o=[]){if(n<=0||e.length<4)return[...e];let s=e.map(e=>[e[0],e[1]]);for(let e=1;e<s.length-2;e+=1){let r=s[e],o=s[e+1];if(!r||!o)continue;let c=Math.abs(r[0]-o[0])<.5,l=Math.abs(r[1]-o[1])<.5;if(!c&&!l)continue;let u=c?`x`:`y`,d=c?r[0]:r[1],f=c?[Math.min(r[1],o[1]),Math.max(r[1],o[1])]:[Math.min(r[0],o[0]),Math.max(r[0],o[0])],p=Vt(t,u,d,f,n,i,a);if(p===d){Bt(t,Lt(u,d),f);continue}c?(r[0]=p,o[0]=p):(r[1]=p,o[1]=p),Bt(t,Lt(u,p),f)}return on(s,r)&&!$t(s,o)?s:[...e]}function Ut(e,t){let n=0;for(let r=1;r<e.length;r+=1){let i=e[r-1],a=e[r];if(!(!i||!a))for(let e of t)for(let t=1;t<e.length;t+=1){let r=e[t-1],o=e[t];r&&o&&Wt(i,a,r,o)&&(n+=1)}}return n}function Wt(e,t,n,r){let i=Math.abs(e[0]-t[0])<.5;if(i===Math.abs(n[0]-r[0])<.5)return!1;let[a,o,s,c]=i?[e,t,n,r]:[n,r,e,t];if(!a||!o||!s||!c)return!1;let l=a[0],u=s[1];return l>Math.min(s[0],c[0])&&l<Math.max(s[0],c[0])&&u>Math.min(a[1],o[1])&&u<Math.max(a[1],o[1])}function Gt(e,t){return rn(e)+Ut(e,t)*Xt+Kt(e,t)*qt+Jt(e)*Yt}function Kt(e,t){let n=0;for(let r=1;r<e.length;r+=1){let i=e[r-1],a=e[r];if(!i||!a)continue;let o=Math.abs(i[0]-a[0])<.5;for(let e of t)for(let t=1;t<e.length;t+=1){let r=e[t-1],s=e[t];if(!r||!s||o!==Math.abs(r[0]-s[0])<.5)continue;let c=+!o,l=+!!o;if(Math.abs(i[c]-r[c])>1)continue;let u=Math.min(Math.max(i[l],a[l]),Math.max(r[l],s[l]))-Math.max(Math.min(i[l],a[l]),Math.min(r[l],s[l]));u>0&&(n+=u)}}return n}var qt=3;function Jt(e){let t=e[0],n=e[e.length-1];if(!t||!n)return 0;let r=Math.min(t[0],n[0]),i=Math.max(t[0],n[0]),a=0;for(let t of e)a=Math.max(a,r-t[0],t[0]-i);return Math.max(0,a)}var Yt=1.5,Xt=400;function Zt(e,t,n,r,i=[void 0,void 0]){let a=e.map(e=>[e[0],e[1]]);for(let e=0;e<4;e+=1){let e=a.length;if(a=Qt(a,t,n,r,i),a=nn(a),a.length===e)break}return a}function Qt(e,t,n,r,i){for(let a=1;a<e.length-2;a+=1){let o=e[a],s=e[a+1];if(!o||!s)continue;let c=Math.abs(o[0]-s[0]),l=Math.abs(o[1]-s[1]),u=c+l;if(u===0||u>t)continue;let d=c>l?0:1,f=e[e.length-1];if(!f)continue;let p=Math.abs(f[d]-s[d])<=Math.abs(f[d]-o[d])?s[d]:o[d],m=e.map(e=>[e[0],e[1]]),h=o[d],g=s[d];for(let e=a;e>=0;--e){let t=m[e];if(!t||Math.abs(t[d]-h)>.5)break;t[d]=p}for(let e=a+1;e<m.length;e+=1){let t=m[e];if(!t||Math.abs(t[d]-g)>.5)break;t[d]=p}if(en(m,i)&&!$t(m,i)&&on(m,n)&&tn(m,a,d,r))return m}return e}function $t(e,t){for(let n of t){if(!n)continue;let[t,r,i,a]=n;for(let n=1;n<e.length;n+=1){let o=e[n-1],s=e[n];if(!(!o||!s)&&(Math.abs(o[0]-s[0])<.5&&(Math.abs(o[0]-t)<.5||Math.abs(o[0]-i)<.5)&&Math.min(Math.max(o[1],s[1]),a)-Math.max(Math.min(o[1],s[1]),r)>1||Math.abs(o[1]-s[1])<.5&&(Math.abs(o[1]-r)<.5||Math.abs(o[1]-a)<.5)&&Math.min(Math.max(o[0],s[0]),i)-Math.max(Math.min(o[0],s[0]),t)>1))return!0}}return!1}function en(e,t){let n=[[e[0],t[0]],[e[e.length-1],t[1]]];for(let[e,t]of n){if(!e||!t)continue;let[n,r,i,a]=t,o=Math.abs(e[0]-n)<.5||Math.abs(e[0]-i)<.5,s=Math.abs(e[1]-r)<.5||Math.abs(e[1]-a)<.5;if(!o&&!s||e[0]<n-.5||e[0]>i+.5||e[1]<r-.5||e[1]>a+.5)return!1}return!0}function tn(e,t,n,r){let i=e[t],a=e[t+1];if(!i||!a)return!1;let o=+(n===0),s=i[n],c=[Math.min(e[t-1]?.[o]??i[o],a[o]),Math.max(e[t+2]?.[o]??a[o],i[o])];return zt(r,Lt(n===0?`x`:`y`,s),c)<=1}function nn(e){let t=[];for(let n=0;n<e.length;n+=1){let r=t[t.length-1],i=e[n],a=e[n+1];if(i){if(r&&a){let e=Math.abs(r[0]-i[0])<.5&&Math.abs(i[0]-a[0])<.5,t=Math.abs(r[1]-i[1])<.5&&Math.abs(i[1]-a[1])<.5;if(e||t)continue}t.push([i[0],i[1]])}}return t}function rn(e){let t=0;for(let n=1;n<e.length;n+=1){let r=e[n-1],i=e[n];!r||!i||(t+=Math.abs(i[0]-r[0])+Math.abs(i[1]-r[1]))}return t}var an=2;function on(e,t){for(let n=1;n<e.length;n+=1){let r=e[n-1],i=e[n];if(!(!r||!i)){for(let e of t)if(It(r,i,e))return!1}}return!0}function sn(e,t=kt){let n=pn(e,t.mode),r=n.some(e=>e.hop!==null),i=new Map;for(let e of n){let n=e.systems[0];i.set(e.id,n?cn(e,n,t.mode):At)}let{columnOf:a}=St({moduleIds:n.map(e=>e.id),laneOf:i,edges:e.edges,rootModuleId:n.find(e=>e.hop===0)?.id,pinned:new Map(n.filter(e=>e.spanning).map(e=>[e.id,0]))}),o=dn(t),s=new Map;for(let[e,t]of a){let n=i.get(e);if(n===void 0)continue;let r=Math.floor(t/o)+1;s.set(n,Math.max(s.get(n)??1,r))}let c=fn(e,t,s),l=new Map(c.map(e=>[e.zone,e])),u=[],d=new Set;for(let e of n){let n=r?Et(e.hop,t):t.hopWeight.base;if(e.systems.length===0){let i=l.get(At);if(!i)continue;u.push(mn(e.id,e.id,null,At,i,a.get(e.id)??0,t,n,{optional:e.optional===!0,unplaced:!0,hop:e.hop,tier:r?void 0:`primary`,state:e.state,providesInClosure:e.providesInClosure,lifecycle:e.lifecycle,unwatched:e.unwatched,pagesNobody:e.pagesNobody,backupOverdue:e.backupOverdue})),d.add(e.id);continue}for(let i of e.systems){let o=l.get(cn(e,i,t.mode));o&&(u.push(mn(e.id,i.hostname,i.address,o.zone,o,a.get(e.id)??0,t,n,{optional:e.optional===!0,unplaced:!1,hop:e.hop,tier:r?void 0:`primary`,state:e.state,providesInClosure:e.providesInClosure,lifecycle:e.lifecycle,unwatched:e.unwatched,pagesNobody:e.pagesNobody,backupOverdue:e.backupOverdue})),d.add(e.id))}}let f=new Map(e.modules.map(e=>[e.id,e.hop])),p=_n(u),m=[...p.values()],h=new Map,g=new Map,_=new Map;for(let t of e.edges)!p.has(t.fromModuleId)||!p.has(t.toModuleId)||(g.set(t.fromModuleId,(g.get(t.fromModuleId)??0)+1),_.set(t.toModuleId,(_.get(t.toModuleId)??0)+1));let v=new Map;{let t=e=>{let t=p.get(e);return t?(t[0]+t[2])/2:0},n=e.edges.filter(e=>p.has(e.fromModuleId)&&p.has(e.toModuleId)),r=e=>`${e.fromModuleId}->${e.toModuleId}:${e.capability??``}`;for(let e of new Set(n.map(e=>e.fromModuleId)))n.filter(t=>t.fromModuleId===e).sort((e,n)=>t(e.toModuleId)-t(n.toModuleId)).forEach((e,t)=>{v.set(r(e),{...v.get(r(e))??{from:0,to:0},from:t})});for(let e of new Set(n.map(e=>e.toModuleId)))n.filter(t=>t.toModuleId===e).sort((e,n)=>t(e.fromModuleId)-t(n.fromModuleId)).forEach((e,t)=>{v.set(r(e),{...v.get(r(e))??{from:0,to:0},to:t})})}let y=new Map,b=1;{let e=new Map;for(let[t,n]of p){let r=Math.round(n[1]);e.set(r,[...e.get(r)??[],t])}for(let t of e.values())t.sort((e,t)=>(p.get(e)?.[0]??0)-(p.get(t)?.[0]??0)).forEach((e,t)=>y.set(e,t)),b=Math.max(b,t.length)}let x=e=>`${e.fromModuleId}->${e.toModuleId}:${e.capability??``}`,S=[],C=[],w=[],T=0,E=0,D=new Set(e.modules.map(e=>e.id)),O=new Set(pn(e,t.mode).map(e=>e.id)),k=e=>e.observed===!1&&!t.edge.showDeclaredUnbound?!1:(f.get(e.fromModuleId)??null)!==null&&(f.get(e.toModuleId)??null)!==null||t.edge.showUnrelated,A=[...e.edges].sort((e,t)=>{let n=e=>{let t=p.get(e.fromModuleId),n=p.get(e.toModuleId);return!t||!n?1/0:Math.abs((t[0]+t[2])/2-(n[0]+n[2])/2)+Math.abs((t[1]+t[3])/2-(n[1]+n[3])/2)};return Number(k(t))-Number(k(e))||n(e)-n(t)||e.fromModuleId.localeCompare(t.fromModuleId)||e.toModuleId.localeCompare(t.toModuleId)});for(let e of A){let n=[e.fromModuleId,e.toModuleId];if(n.some(e=>!D.has(e))){T+=1;continue}if(n.some(e=>!O.has(e)))continue;let i=p.get(e.fromModuleId),a=p.get(e.toModuleId);if(!i||!a){T+=1;continue}let o=v.get(x(e))??{from:0,to:0},s=xn(i,a,{fromIndex:o.from,fromCount:g.get(e.fromModuleId)??1,toIndex:o.to,toCount:_.get(e.toModuleId)??1,toRank:y.get(e.toModuleId)??0,rankCount:b}),l=m,u=s[0]??{start:[0,0],end:[0,0],startOutward:0,endOutward:0},d=u,A,j=1/0,M,ee=1/0,N;for(let e of s){let n=jt(e.start,e.end,t,S.length,c,e.endOutward,e.startOutward);N??=n[n.length-1];for(let t of n){if(!on(t,l))continue;let n=Gt(t,C);if($t(t,[i,a])){n<ee&&(ee=n,d=e,M=t);continue}n<j&&(j=n,u=e,A=t)}}!A&&M&&(A=M,u=d);let P=u.start,F=u.end,I=u.endOutward,te=u.startOutward;A||(E+=1);let ne=f.get(e.fromModuleId)??null,re=f.get(e.toModuleId)??null,ie=re??1,ae=r?Math.min(Et(ne,t),Et(re,t)):t.hopWeight.base,L=A??N??[P,F],oe=Zt(k(e)?Ht(L,h,t.edge.traceSeparation,l,Ft(t),t.space.width-t.space.padding,[i,a]):L,Math.max(t.edge.traceSeparation*2,8),l,h,[i,a]);k(e)&&C.push(oe),w.push({index:S.length,from:P,to:F,obstacles:l,drawn:k(e),endOutward:I,startOutward:te,endpointBoxes:[i,a]}),S.push({fromModuleId:e.fromModuleId,toModuleId:e.toModuleId,from:oe[0]??P,to:oe[oe.length-1]??F,points:oe,optional:e.optional===!0,delegation:e.delegation===!0,capability:e.capability,observed:e.observed!==!1,inClosure:ne!==null&&re!==null,hop:ie,weight:ae})}for(let e=0;e<an;e+=1)for(let e of w){if(!e.drawn)continue;let n=S[e.index];if(!n)continue;let r=w.filter(t=>t.drawn&&t.index!==e.index).map(e=>S[e.index]?.points).filter(e=>e!==void 0),i=jt(e.from,e.to,t,e.index,c,e.endOutward,e.startOutward).filter(t=>on(t,e.obstacles)&&!$t(t,e.endpointBoxes)),a=n.points;for(let e of i)Gt(e,r)<Gt(a,r)&&(a=e);a!==n.points&&(n.points=Zt(a,Math.max(t.edge.traceSeparation*2,8),e.obstacles,h,e.endpointBoxes))}let j=c[c.length-1],M=Math.min(dn(t),Math.max(1,a.size)),ee=Pt(t)+t.space.padding+M*t.space.moduleWidth+Math.max(0,M-1)*t.space.moduleGap;return{width:Math.max(t.space.width,ee),height:j?j.y+j.height+t.space.padding:t.space.padding*2,lanes:c,nodes:u,edges:S,report:{modulesRequested:pn(e,t.mode).length,modulesPlaced:d.size,tracesConsidered:C.length,dropped:pn(e,t.mode).map(e=>e.id).filter(e=>!d.has(e)),edgesDropped:T,edgesOverlapping:E}}}function cn(e,t,n){return n===`panel`?ln(e.hop):t.zone}function ln(e){return e===null?`unrelated`:e===0?`selected`:`hop ${e}`}function un(e){return e.state!==void 0&&e.state!==`ok`}function dn(e){let t=e.space.width-Pt(e)-e.space.padding,n=e.space.moduleWidth+e.space.moduleGap;return Math.max(1,Math.floor((t+e.space.moduleGap)/n))}function fn(e,t,n){let r=t.mode,i=e.zones.map(e=>typeof e==`string`?{name:e}:e),a;if(r===`panel`)a=[...new Set(e.modules.map(e=>e.hop))].filter(e=>e!==null).sort((e,t)=>e-t).map(e=>({name:ln(e)})),e.modules.some(e=>e.hop===null)&&a.push({name:`unrelated`});else if(r===`triage`){let t=new Set(e.modules.filter(un).flatMap(e=>e.systems.map(e=>e.zone)));a=i.filter(e=>t.has(e.name))}else a=[...i];let o=pn(e,r);o.some(e=>e.systems.length===0)&&a.push({name:At});let s=new Set(o.flatMap(e=>e.systems.length===0?[At]:e.systems.map(t=>cn(e,t,r)))),c=t.effect.showEmptyZones?a:a.filter(e=>s.has(e.name)),l=new Map(i.map((e,t)=>[e.name,t])),u=new Map(i.filter(e=>!!e.accent).map(e=>[e.name,e.accent])),d=t.space.padding;return c.map(e=>{let r=!s.has(e.name),a=n.get(e.name)??1,o=r?t.space.laneGap:t.space.laneHeight+(a-1)*(t.space.moduleHeight+t.space.rowGap),c={zone:e.name,description:e.description,accent:l.get(e.name)??i.length,accentColor:u.get(e.name),y:d,height:o,noSystem:e.name===At,rows:a,empty:r};return d+=o+t.space.laneGap,c})}function pn(e,t){return t===`triage`?e.modules.filter(un):[...e.modules]}function mn(e,t,n,r,i,a,o,s,c){let l=dn(o),u=Math.floor(a/l),d=a%l,f=Pt(o)+d*(o.space.moduleWidth+o.space.moduleGap),p=o.space.moduleHeight+o.space.rowGap,m=i.rows*p-o.space.rowGap,h=i.y+(i.height-m)/2+u*p,g=[f,h,f+o.space.moduleWidth,h+o.space.moduleHeight];return{moduleId:e,hostname:t,address:n,zone:r,body:g,center:[(g[0]+g[2])/2,(g[1]+g[3])/2],weight:s,optional:c.optional,unplaced:c.unplaced,hop:c.hop,hopTier:hn(c.hop),state:c.state,providesInClosure:c.providesInClosure,lifecycle:c.lifecycle,unwatched:c.unwatched,pagesNobody:c.pagesNobody,backupOverdue:c.backupOverdue}}function hn(e){return e===0?`primary`:e===1?`secondary`:`tertiary`}function gn(e,t,n,r){return e+(t-e)*(n+1)/(r+1)}function _n(e){let t=new Map;for(let n of e)t.has(n.moduleId)||t.set(n.moduleId,n.body);return t}var vn=16,yn=6;function bn(e,t,n){let r=Math.min(yn,(t-e)/4),i=e+r,a=t-r,o=gn(i,a,n.toIndex,n.toCount),s=(a-i)/Math.max(1,n.toCount),c=n.toRank%Math.max(1,n.rankCount)/Math.max(1,n.rankCount);return Math.min(a,o+c*s*.9)}function xn(e,t,n){let r=Sn(e,t,n),[i,a,o,s]=e,[c,l,u,d]=t,f=gn(a,s,n.fromIndex,n.fromCount),p=bn(l,d,n),m=[r,{start:r.start,end:[c,p],startOutward:0,endOutward:-1},{start:r.start,end:[u,p],startOutward:0,endOutward:1},{start:[i,f],end:[c,p],startOutward:-1,endOutward:-1},{start:[o,f],end:[u,p],startOutward:1,endOutward:1},{start:[i,f],end:[u,p],startOutward:-1,endOutward:1},{start:[o,f],end:[c,p],startOutward:1,endOutward:-1}],h=new Set;return m.filter(e=>{let t=`${e.start.join()}|${e.end.join()}|${e.startOutward}|${e.endOutward}`;return!h.has(t)&&(h.add(t),!0)})}function Sn(e,t,n){let[r,i,a,o]=e,[s,c,l,u]=t,d=Math.max(r,s),f=Math.min(a,l),p=f-d>2?gn(d,f,n.fromIndex,n.fromCount):null,m=p??gn(r,a,n.fromIndex,n.fromCount),h=p??gn(s,l,n.toIndex,n.toCount),g=l<r||s>a,_=bn(c,u,n),v=l<r?[l,_]:[s,_],y=l<r?1:-1;if(c>=o)return{start:[m,o],end:g?v:[h,c],startOutward:0,endOutward:g?y:0};if(u<=i)return{start:[m,i],end:g?v:[h,u],startOutward:0,endOutward:g?y:0};let b=gn(i,o,n.fromIndex,n.fromCount);return h>=m?{start:[a,b],end:[s,_],startOutward:1,endOutward:-1}:{start:[r,b],end:[l,_],startOutward:-1,endOutward:1}}function Cn(e){return e.state===`resolved`?`resolved`:e.state===`acked`||e.ackedBy?`acked`:e.suppressedByAlertId?`suppressed-by-alert`:e.suppressedByWindow?`suppressed-by-window`:e.silencedForSeconds&&e.silencedForSeconds>0?`silenced`:e.awaitingConfirmation?`awaiting-confirmation`:e.state===`pending`?`grace`:null}function wn(e,t){let n=Number(t.quiet===null)-Number(e.quiet===null);if(n!==0)return n;let r=e=>e.alert.nextEscalationInSeconds??2**53-1,i=r(e)-r(t);if(i!==0)return i;let a=Number(t.alert.severity===`critical`)-Number(e.alert.severity===`critical`);return a===0?t.alert.firedSecondsAgo-e.alert.firedSecondsAgo||e.alert.key.localeCompare(t.alert.key):a}function Tn(e){let{rowPadding:t}=e.space,{message:n,detail:r}=e.type;return Math.ceil(t*2+n.size*1.25+r.size*1.25)}function En(e,t){let{space:n,effect:r,clock:i}=t,a=new Set(e.alerts.map(e=>e.suppressedByAlertId).filter(e=>!!e)),o=e.alerts.map(e=>({alert:e,body:[0,0,0,0],depth:0,quiet:Cn(e),isRootCause:a.has(e.id)})),s=o.filter(e=>r.showResolved||e.quiet!==`resolved`).filter(e=>r.showQuiet||e.quiet===null),c={};for(let e of o)e.quiet&&(c[e.quiet]=(c[e.quiet]??0)+1);let l={total:o.length,notifying:o.filter(e=>e.quiet===null).length,quietBy:c,rootCauses:o.filter(e=>e.isRootCause).length},u=n.padding,d=n.width-n.padding,f=Math.max(n.rowHeight,Tn(t)),p=f+n.rowGap;if(t.mode===`cascade`||t.mode===`ledger`&&r.groupCascade){let e=new Map(s.map(e=>[e.alert.id,e])),r=new Map;for(let t of s){let n=t.alert.suppressedByAlertId;n&&e.has(n)&&r.set(n,[...r.get(n)??[],t])}let i=[],a=(e,t)=>{e.depth=t,i.push(e);for(let n of(r.get(e.alert.id)??[]).sort(wn))a(n,t+1)};for(let t of s.filter(t=>!t.alert.suppressedByAlertId||!e.has(t.alert.suppressedByAlertId)).sort(wn))a(t,0);let o=[];i.forEach((e,t)=>{let r=n.padding+t*p;e.body=[u+e.depth*n.indent,r,d,r+f]});let c=new Map(i.map(e=>[e.alert.id,e]));for(let e of i){let t=e.alert.suppressedByAlertId&&c.get(e.alert.suppressedByAlertId);if(!t)continue;let r=t.body[0]+n.indent/2;o.push({fromId:t.alert.id,toId:e.alert.id,points:[[r,t.body[3]],[r,e.body[1]+n.rowHeight/2],[e.body[0],e.body[1]+n.rowHeight/2]]})}return{mode:t.mode,width:n.width,height:n.padding*2+i.length*p,alerts:i,cascade:o,futures:[],nowX:0,report:l}}let m=[...s].sort(wn);if(m.forEach((e,t)=>{let r=n.padding+t*p;e.body=[u,r,d,r+f]}),t.mode!==`clock`)return{mode:t.mode,width:n.width,height:n.padding*2+m.length*p,alerts:m,cascade:[],futures:[],nowX:0,report:l};let h=u+n.keyColumn,g=d-h,_=i.pastSeconds+i.futureSeconds,v=e=>{let t=Math.max(-i.pastSeconds,Math.min(i.futureSeconds,e));return h+(t+i.pastSeconds)/_*g},y=m.map(e=>{let t=e.body[1]+f/2,n=v(-e.alert.firedSecondsAgo),r=v(0);return{alertId:e.alert.id,start:[n,t],now:[r,t],next:e.alert.nextEscalationInSeconds===null?null:[Math.max(r,v(e.alert.nextEscalationInSeconds)),t],stepsTaken:e.alert.escalationStep,clampedStart:e.alert.firedSecondsAgo>i.pastSeconds,overdue:e.alert.nextEscalationInSeconds!==null&&e.alert.nextEscalationInSeconds<-600,deferred:!!e.alert.deferredForSeconds}});return{mode:t.mode,width:n.width,height:n.padding*2+m.length*p,alerts:m,cascade:[],futures:y,nowX:v(0),report:l}}var Dn={mode:`ledger`,type:{message:{family:`Theia, "Helvetica Neue", Arial, sans-serif`,size:14,weight:500,tracking:0},detail:{family:`"IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace`,size:11,weight:400,tracking:0},label:{family:`Theia, "Helvetica Neue", Arial, sans-serif`,size:10,weight:500,tracking:1.2}},color:{ground:`#000000`,text:`#ffffff`,textDim:`#6b7078`,rule:`#23262b`,critical:`#ff5f4d`,warning:`#e0a13a`,grace:`#4bb6c9`,suppressedByAlert:`#8b7fd4`,suppressedByWindow:`#7f8fd4`,silenced:`#6b7078`,awaitingConfirmation:`#3fb98a`,acked:`#4a8f6a`,resolved:`#3a3f47`,cascade:`#6b6eb8`,future:`#3a3f47`},space:{width:1100,padding:24,rowHeight:44,rowGap:6,stateGutter:132,iconColumn:30,keyColumn:300,indent:26,rowPadding:6},clock:{pastSeconds:21600,futureSeconds:7200,barHeight:10},effect:{corner:0,chipOpacity:1,rowWash:.03,showQuiet:!0,showResolved:!1,groupCascade:!0}};function On(e,t,n){return e===null?t===`critical`?n.color.critical:n.color.warning:{grace:n.color.grace,"suppressed-by-alert":n.color.suppressedByAlert,"suppressed-by-window":n.color.suppressedByWindow,silenced:n.color.silenced,"awaiting-confirmation":n.color.awaitingConfirmation,acked:n.color.acked,resolved:n.color.resolved}[e]??n.color.textDim}function kn(e,t){return e===null?t===`critical`?`PAGING`:`WARNING`:{grace:`IN GRACE`,"suppressed-by-alert":`SUPPRESSED`,"suppressed-by-window":`IN WINDOW`,silenced:`SILENCED`,"awaiting-confirmation":`CONFIRMING`,acked:`ACKED`,resolved:`RESOLVED`}[e]??`QUIET`}var An={firewall:`⛨`,dhcp_server:`⇄`,dns_registrar:`⌂`,dns_internal:`⌖`,public_web:`◍`,private_web:`◉`,external_web:`◌`,idp:`⚿`,control_plane_vpn:`⟜`,source_forge:`⑂`,registry_publish:`⬡`,apt_publish:`⬢`,notification:`✆`,celilo_event_bus:`⁘`},jn={caddy:`◍`,"caddy-internal":`◉`,"forgejo-runner":`▷`,"forgejo-builder":`⎔`,"celilo-mgmt":`✦`,"celilo-web-console":`▦`,"celilo-canary":`⚑`,"celilo-website":`❏`,"celilo-registry":`⬡`,"celilo-apt-repo":`⬢`,"npm-cache-node":`⬣`,"wireguard-manager":`⎈`,lunacycle:`☾`,"tango-nexus":`♪`,"dj-incarnadine-org":`♫`,"peterbanka-org":`❏`,byoi:`❏`,technitium:`⌖`,"knot-unbound-internal":`◎`,"knot-unbound-secondary":`⧉`,namecheap:`⌂`,homebridge:`⋈`,signal:`✆`,axon:`⇄`,greenwave:`⇌`,"dnsmasq-dhcp":`⇢`,iptables:`⛨`,wireguard:`⟜`,authentik:`⚿`,forgejo:`⑂`,"generic-cpanel-hosting-provider":`◌`},Mn=`⬚`;function Nn(e,t=[]){let n=jn[e];if(n)return n;for(let e of t){let t=An[e];if(t)return t}return Mn}var Pn=`◈`,Fn=`▤`,In=`⬚`;function Ln(e){let[t=``]=e.split(`/`),n=t.indexOf(`:`);return n<0?{kind:``,subject:t}:{kind:t.slice(0,n),subject:t.slice(n+1)}}function Rn(e,t=[],n=Nn){let{kind:r,subject:i}=Ln(e);return r===`builtin`?Pn:r===`system`||r===`machine`?Fn:r===`module`?n(i,t):In}function zn(e,t){if(!t)return e;let n=new Map(e.alerts.map(e=>[e.id,e])),r=new Set;for(let i of e.alerts){if(!t.has(Ln(i.key).subject))continue;let e=i;for(;e&&!r.has(e.id);)r.add(e.id),e=e.suppressedByAlertId?n.get(e.suppressedByAlertId):void 0}return{alerts:e.alerts.filter(e=>r.has(e.id))}}function Bn(e){return e.alerts.some(e=>Cn(e)===null)}var Vn={days:7,cell:20,cellGap:3,rowGap:5,gridLeft:168,headerHeight:26,padding:16,labelEvery:7,hideUnhooked:!1,moduleId:null,sortByTrouble:!0};function Hn(e){let t={hourly:1/24,daily:1,weekly:7,monthly:30};if(e in t)return t[e]??null;let n=/^(\d+(?:\.\d+)?)([hdw])$/.exec(e.trim());if(!n)return null;let r=Number(n[1]),i=n[2];return i===`h`?r/24:i===`w`?r*7:r}function Un(e,t,n=!0){if(e.length===0)return t===`hooked`?n?`idle`:`unknown`:`uncovered`;let r=e.some(e=>e.status===`completed`),i=e.some(e=>e.status===`failed`);return r&&i?`mixed`:r?`ok`:`failed`}function Wn(e){if(e.coverage!==`hooked`||e.schedule===`manual`)return null;let t=Hn(e.schedule);if(t===null)return null;if(e.newestGood===null)return 1/0;let n=e.newestGood.secondsAgo/86400;return n>t?n-t:null}function Gn(e){if(e.coverage!==`hooked`)return-1;if(e.newestGood===null)return 1e3;let t=Wn(e),n=0;return t!==null&&(n+=100+Math.min(t,100)),n+=Math.min(e.failuresSinceGood,50),n+=Math.min(e.longestGap,30)/10,n}function Kn(e,t=Vn){let{days:n,cell:r,cellGap:i,rowGap:a,gridLeft:o,headerHeight:s,padding:c}=t,l=new Map;for(let t of e.runs){let e=l.get(t.moduleId)??[];e.push(t),l.set(t.moduleId,e)}for(let e of l.values())e.sort((e,t)=>e.secondsAgo-t.secondsAgo);let u=[];for(let e=0;e<n;e+=1){let a=n-1-e;u.push({daysAgo:a,x:o+e*(r+i),width:r,label:a===0?`today`:`-${a}`,labelled:a===0||a%t.labelEvery===0,weekStart:a%7==0})}let d=e.modules;t.moduleId&&(d=d.filter(e=>e.id===t.moduleId)),t.hideUnhooked&&(d=d.filter(e=>e.coverage===`hooked`));let f=d.map(t=>{let n=l.get(t.id)??[],i=n.find(e=>e.status===`completed`)??null,a=n.filter(e=>e.status===`failed`&&(i===null||e.secondsAgo<i.secondsAgo)).length,o=u.map(i=>{let a=n.filter(e=>e.daysAgo===i.daysAgo);return{moduleId:t.id,daysAgo:i.daysAgo,outcome:Un(a,t.coverage,i.daysAgo<e.completeDays),runs:a,x:i.x,y:0,width:r,height:r}}),s=0,c=0,d=0;for(let e of o){if(e.outcome===`ok`||e.outcome===`mixed`){d=0;continue}e.outcome!==`uncovered`&&e.outcome!==`unknown`&&(s+=1,d+=1,d>c&&(c=d))}return{moduleId:t.id,coverage:t.coverage,schedule:t.schedule,provides:t.provides??[],y:0,height:r,cells:o,newestGood:i,failuresSinceGood:a,daysUncovered:s,longestGap:c}});t.sortByTrouble?f.sort((e,t)=>Gn(t)-Gn(e)||e.moduleId.localeCompare(t.moduleId)):f.sort((e,t)=>e.moduleId.localeCompare(t.moduleId));let p=c+s;for(let e of f){e.y=p;for(let t of e.cells)t.y=p;p+=r+a}let m=f.filter(e=>e.coverage===`hooked`),h={modules:f.length,hooked:m.length,unhooked:f.length-m.length,overdue:m.filter(e=>Wn(e)!==null).length,failing:m.filter(e=>e.failuresSinceGood>0).length,neverGood:m.filter(e=>e.newestGood===null).length,newestGoodBytes:m.reduce((e,t)=>e+(t.newestGood?.sizeBytes??0),0)},g=u[u.length-1];return{width:(g?g.x+g.width:o)+c,height:p-a+c,rows:f,columns:u,gridLeft:o,headerHeight:s,report:h}}function qn(e){if(e===null||e===0)return`—`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${r>0?n.toFixed(1):Math.round(n)} ${t[r]}`}function Jn(e){return e<3600?`${Math.max(1,Math.round(e/60))}m`:e<86400?`${Math.round(e/3600)}h`:`${Math.round(e/86400)}d`}function Yn(e,t){let n=e.daysAgo===0?`today`:`${e.daysAgo} days ago`;if(e.outcome===`uncovered`)return`${e.moduleId} — no on_backup hook, so nothing runs`;if(e.outcome===`unknown`)return`${e.moduleId}, ${n} — outside the captured window, so nothing is known about this day`;if(e.outcome===`idle`)return`${e.moduleId}, ${n} — nothing ran (cadence ${t})`;let r=[`${e.moduleId}, ${n}`];for(let t of e.runs)if(t.status===`completed`){let e=t.name?`\n “${t.name}”`:``;r.push(` ✓ ${Jn(t.secondsAgo)} ago · ${qn(t.sizeBytes)} · ${t.id}${e}`)}else r.push(` ✗ ${Jn(t.secondsAgo)} ago · ${t.error??`failed`}`);return r.join(`
10
+ `)}function Xn(e){if(e.coverage!==`hooked`)return`no on_backup hook — celilo has nothing to run`;if(e.newestGood===null)return`no good copy has ever been made`;let t=Jn(e.newestGood.secondsAgo);if(e.failuresSinceGood>0){let n=e.failuresSinceGood===1?`attempt`:`attempts`;return`newest good copy ${t} old · ${e.failuresSinceGood} failed ${n} since`}return Wn(e)===null?`newest good copy ${t} old`:`newest good copy ${t} old · overdue`}var Zn={type:{row:{family:`Theia, "Helvetica Neue", Arial, sans-serif`,size:14,weight:400,tracking:0},axis:{family:`Theia, "Helvetica Neue", Arial, sans-serif`,size:14,weight:400,tracking:0},detail:{family:`Theia, "Helvetica Neue", Arial, sans-serif`,size:14,weight:400,tracking:0},roster:{family:`Theia, "Helvetica Neue", Arial, sans-serif`,size:14,weight:400,tracking:0}},color:{ground:`#000000`,text:`#ffffff`,textDim:`#6b7078`,rule:`#23262b`,weekRule:`#31353c`,ok:`#3fb98a`,mixed:`#e0a13a`,failed:`#ff5f4d`,idle:`#16181c`,unknown:`#0b0c0e`,uncovered:`#000000`,uncoveredEdge:`#1c1f24`,selected:`#d373c6`,selectedGround:`#331e31`},space:{days:28,cell:27,cellGap:6,rowGap:5,gridLeft:90,verdictWidth:430,headerHeight:26,padding:16,labelEvery:7,rosterWidth:370,rosterRowGap:12},effect:{corner:10,mixedStyle:`corner`,rowLabels:!1,weekRules:!0,verdicts:!1,showUnhooked:!0,sortByTrouble:!0,focusSelected:!1,unselectedWeight:.35}},Qn=[{key:`un-verified`,label:`UN-VERIFIED`,glyph:`◒`,tone:`stale`,explain:`UN-VERIFIED — celilo has it as INSTALLED. It deployed, and no health check has confirmed since that it actually works`,test:e=>e.lifecycle===`INSTALLED`},{key:`paging`,label:`PAGING`,glyph:`▲`,tone:`firing`,explain:`PAGING — an alert against this module is notifying somebody right now. Not merely firing: a firing alert that is silenced, suppressed or acked does not light this`,test:e=>e.state===`firing`},{key:`backup-overdue`,label:`BACKUP OVERDUE`,glyph:`◷`,tone:`stale`,explain:`BACKUP OVERDUE — the last successful backup is older than this module’s schedule allows. Nothing to do with upstream versions`,test:e=>e.backupOverdue===!0},{key:`unwatched`,label:`UNWATCHED`,glyph:`⊘`,tone:`unobserved`,explain:`UNWATCHED — no monitor at all, or one whose interval is manual or has never run. NOTHING IS CHECKING IT, so its silence is not evidence of anything`,test:e=>e.unwatched===!0||e.state===`unobserved`},{key:`pages-disabled`,label:`PAGES DISABLED`,glyph:`↯`,tone:`unobserved`,explain:`PAGES DISABLED — it IS checked, on schedule, and the monitor has no escalation policy. The alert gets raised and then reaches no one`,test:e=>e.pagesNobody===!0}];function $n(e){return Qn.filter(t=>t.test(e))}function er(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function tr(e,t,n=1){return`font-family="${er(e.family)}" font-size="${e.size}" font-weight="${e.weight}" letter-spacing="${e.tracking}" fill="${er(t)}" fill-opacity="${z(n)}"`}function z(e){return Math.round(e*1e3)/1e3}function nr(e,t){let{color:n}=t,r=e.hopTier,i=r===`primary`?n.outlinePrimary:r===`secondary`?n.outlineSecondary:n.outlineTertiary,a=r===`primary`?n.fillPrimary:r===`secondary`?n.fillSecondary:n.fillTertiary,o=r===`primary`?n.textPrimary:r===`secondary`?n.textSecondary:n.textTertiary;return{marker:(e.state===`firing`?n.firing:e.state===`stale`?n.stale:e.state===`unobserved`?n.unobserved:null)??n.textTertiary,outline:i,fill:a,text:o}}function rr(e,t,n){if(!e)return[];let r=n*.62,i=Math.max(4,Math.floor(t/r)),a=[],o=``;for(let t of e.split(/\s+/)){let e=o?`${o} ${t}`:t;e.length>i&&o?(a.push(o),o=t):o=e}return o&&a.push(o),a}function ir(e,t){let{color:n,effect:r,space:i,type:a}=t,o=[];r.laneWash>0&&!e.empty&&o.push(`<rect x="0" y="${e.y}" width="${i.width}" height="${e.height}" fill="${er(n.textPrimary)}" fill-opacity="${z(r.laneWash)}"/>`),r.laneRule&&o.push(`<line x1="0" y1="${e.y}" x2="${i.width}" y2="${e.y}" stroke="${er(n.rule)}"${e.noSystem?` stroke-dasharray="2 4"`:``}/>`);let s=e.accentColor??n.zoneAccents[e.accent%Math.max(1,n.zoneAccents.length)]??n.rule,c=Math.max(18,e.height*.55),l=z(e.y+(e.height-c)/2);o.push(`<rect x="${i.padding}" y="${l}" width="4" height="${z(c)}" fill="${er(s)}" fill-opacity="${e.empty?.3:1}"/>`);let u=i.padding+16,d=e.empty?[`empty`]:rr(e.description??``,i.labelGutter-16,a.detail.size),f=d.length>0,p=z(e.y+e.height/2+a.zone.size/3-d.length*a.detail.size*.7);return o.push(`<text x="${u}" y="${p}" ${tr(a.zone,n.textTertiary,e.empty?.4:1)}>${er(e.zone.toUpperCase())}</text>`),f&&o.push(`<text x="${u}" y="${z(p+a.detail.size+4)}" ${tr(a.detail,n.textTertiary,.55)}>${d.map((e,t)=>`<tspan x="${u}" ${t===0?``:`dy="${z(a.detail.size+2)}"`}>${er(e)}</tspan>`).join(``)}</text>`),o.join(`
11
+ `)}function ar(e,t){let{color:n,edge:r,type:i}=t;if(!e.observed&&!r.showDeclaredUnbound||!e.inClosure&&!r.showUnrelated)return``;let a=Ot(e.hop,t),o=e.observed?e.optional?` stroke-dasharray="${r.optionalDash.join(` `)}"`:a.dash?` stroke-dasharray="${a.dash.join(` `)}"`:``:` stroke-dasharray="1 4"`,s=e.delegation&&r.delegationArrow?` marker-end="url(#delegation)"`:``,c=`${`<polyline points="${e.points.map(([e,t])=>`${z(e)},${z(t)}`).join(` `)}" fill="none" stroke="${er(a.color)}" stroke-opacity="${z(e.observed?e.weight:e.weight*.4)}" stroke-width="${z(a.width)}"${o}${s}${or(e,t)}/>`}${sr(e,a,t)}`;if(!r.capabilityLabels||!e.capability||e.weight<.35)return c;let[l]=e.points;if(!l)return c;let u=l[1]+i.detail.size+3;return`${c}
12
+ <text x="${z(l[0]+4)}" y="${z(u)}" ${tr(i.detail,n.textTertiary,Math.max(.4,e.weight*.8))}>${er(e.capability)}</text>`}function or(e,t){if(!t.effect.drawIn||!e.observed||e.optional||Ot(e.hop,t).dash)return``;let n=cr(e.points);if(n<=0)return``;let r=Math.max(0,(e.hop??1)-1);return` stroke-dasharray="${z(n)}" stroke-dashoffset="${z(n)}" style="animation:celilo-draw-in ${t.effect.drawInMs}ms linear ${z(r*t.effect.drawInMs)}ms forwards"`}function sr(e,t,n){let{flow:r,flowSpeed:i,flowLength:a}=n.effect;if(!r||!e.observed)return``;let o=cr(e.points);if(o<=0||i<=0)return``;let s=n.effect.drawIn&&!Ot(e.hop,n).dash&&!e.optional?n.effect.drawInMs*(e.hop??1)/1e3:0,c=Math.min(60,a/o*100),l=Math.max(.7,(o+a)/i);return`
13
+ <polyline points="${e.points.map(([e,t])=>`${z(e)},${z(t)}`).join(` `)}" fill="none" pathLength="100" aria-hidden="true" stroke="${er(t.color)}" stroke-opacity="${z(e.weight)}" stroke-width="${z(t.width*1.6)}" stroke-linecap="round" stroke-dasharray="${z(c)} 100" style="animation:celilo-flow ${z(l*100)/100}s linear ${z(s*100)/100}s infinite"/>`}function cr(e){let t=0;for(let n=1;n<e.length;n+=1){let r=e[n-1],i=e[n];!r||!i||(t+=Math.abs(r[0]-i[0])+Math.abs(r[1]-i[1]))}return t}function lr(e,t,n){let{color:r,effect:i,space:a,type:o}=t,s=nr(e,t),[c,l,u,d]=e.body,f=u-c,p=d-l,m=a.modulePadding,h=`clip-${Math.round(c)}-${Math.round(l)}`,g=[`<clipPath id="${h}"><rect x="${z(c)}" y="${z(l)}" width="${z(f)}" height="${z(p)}"/></clipPath>`];g.push(`<g tabindex="0" role="listitem" aria-label="${er(`${e.moduleId}${e.unplaced?`, no system`:` on ${e.hostname}, ${e.zone}`}${e.state&&e.state!==`ok`?`, ${e.state}`:``}`)}">`),g.push(`<rect x="${z(c)}" y="${z(l)}" width="${z(f)}" height="${z(p)}" rx="${i.corner}" fill="${er(s.fill)}" fill-opacity="${z(i.fillOpacity*e.weight)}" stroke="${er(s.outline)}" stroke-opacity="${z(e.weight)}"${i.glow>0?` filter="url(#glow)"`:``}/>`);let _=n(e.moduleId,e.providesInClosure??[]),v=Math.round(o.module.size*1.25);if(g.push(`<text x="${z(c+m)}" y="${z(l+m+o.module.size)}" clip-path="url(#${h})" ${tr(o.module,s.text,e.weight)}>${er(_)}</text>`),g.push(`<text x="${z(c+m+v)}" y="${z(l+m+o.module.size)}" clip-path="url(#${h})" ${tr(o.module,s.text,e.weight)}>${er(e.moduleId)}</text>`),[e.unplaced?`no system`:e.address,e.providesInClosure?.[0]].filter(e=>!!e).forEach((t,n)=>{g.push(`<text x="${z(c+m)}" y="${z(l+m+o.module.size+(o.detail.size+3)*(n+1))}" clip-path="url(#${h})" ${tr(o.detail,s.text,e.weight*(n===0?.72:.55))}>${er(t)}</text>`)}),t.edge.hopBadges&&e.hop!==null&&g.push(`<text x="${z(u-m)}" y="${z(l+m+o.detail.size)}" text-anchor="end" ${tr(o.detail,s.text,e.weight)}>${e.hop}</text>`),t.effect.statusLight){let t=Math.max(3,o.detail.size*.3),n=t*2.6;$n(e).forEach((e,i)=>{let a=e.tone===`firing`?r.firing:e.tone===`stale`?r.stale:r.unobserved;g.push(`<circle cx="${z(u-m-t-i*n)}" cy="${z(d-m-t)}" r="${z(t)}" fill="${er(a)}" fill-opacity="1"><title>${er(e.explain)}</title></circle>`)})}return e.optional&&g.push(`<text x="${z(u-m)}" y="${z(d-m)}" text-anchor="end" ${tr(o.detail,s.text,e.weight*.8)}>opt</text>`),g.push(`</g>`),g.join(`
14
+ `)}function ur(e,t){if(!t.edge.groupMultiProvider)return``;let n=new Map;for(let t of e.nodes)for(let e of t.providesInClosure??[]){let r=n.get(e)??[];r.push(t),n.set(e,r)}let r=[];for(let[e,i]of n){if(i.length<2)continue;let n=Math.min(...i.map(e=>e.body[0]))-5,a=Math.max(...i.map(e=>e.body[2]))+5,o=Math.min(...i.map(e=>e.body[1]))-5,s=Math.max(...i.map(e=>e.body[3]))+5;r.push(`<rect x="${z(n)}" y="${z(o)}" width="${z(a-n)}" height="${z(s-o)}" fill="none" stroke="${er(t.color.outlineTertiary)}" stroke-dasharray="1 3"/>`,`<text x="${z(n+3)}" y="${z(o-3)}" ${tr(t.type.detail,t.color.textTertiary)}>${er(e)} · ${i.length} providers</text>`)}return r.join(`
15
+ `)}function dr(e,t,n={}){let{color:r,effect:i}=t,a=n.iconFor??Nn,o=[];return t.edge.delegationArrow&&o.push(`<marker id="delegation" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 1 L 7 4 L 0 7 z" fill="${er(r.edge)}" fill-opacity="0.7"/></marker>`),i.glow>0&&o.push(`<filter id="glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="${z(i.glow)}" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter>`),i.flow&&o.push(`<style>@keyframes celilo-flow{from{stroke-dashoffset:100}to{stroke-dashoffset:-100}}@media (prefers-reduced-motion:reduce){[style*="celilo-flow"]{display:none}}</style>`),i.drawIn&&o.push(`<style>@keyframes celilo-draw-in{to{stroke-dashoffset:0}}@media (prefers-reduced-motion:reduce){polyline{animation-duration:0s!important;animation-delay:0s!important}}</style>`),o.push(`<style>g[tabindex]:focus{outline:none}g[tabindex]:focus-visible>rect{stroke:${er(r.outlinePrimary)};stroke-width:3}</style>`),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}" width="${e.width}" height="${e.height}" style="width:100%;height:auto;max-width:${e.width}px" role="list" aria-label="Fleet topology by ${t.mode===`panel`?`hop distance`:`zone`}">`,o.length?`<defs>${o.join(``)}</defs>`:``,`<rect x="0" y="0" width="${e.width}" height="${e.height}" fill="${er(r.ground)}"/>`,e.lanes.map(e=>ir(e,t)).join(`
16
+ `),e.edges.map(e=>ar(e,t)).join(`
17
+ `),ur(e,t),e.nodes.map(e=>lr(e,t,a)).join(`
18
+ `),`</svg>`].filter(Boolean).join(`
19
+ `)}function fr(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function B(e){return Math.round(e*1e3)/1e3}function pr(e,t,n=1){return`font-family="${fr(e.family)}" font-size="${e.size}" font-weight="${e.weight}" letter-spacing="${e.tracking}" fill="${fr(t)}" fill-opacity="${B(n)}"`}function mr(e){let t=Math.abs(Math.round(e));return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h`:`${Math.floor(t/86400)}d`}function hr(e){return e.deferredForSeconds?`step ${e.escalationStep} · held ${mr(e.deferredForSeconds)} for quiet hours`:e.nextEscalationInSeconds===null?e.escalationStep>0?`step ${e.escalationStep} · final`:`no escalation`:e.nextEscalationInSeconds<-600?`step ${e.escalationStep} · OVERDUE by ${mr(e.nextEscalationInSeconds)}`:`step ${e.escalationStep} · next in ${mr(e.nextEscalationInSeconds)}`}function gr(e,t,n,r){let{space:i,type:a,color:o,effect:s}=t,[c,l,u,d]=e.body,f=On(e.quiet,e.alert.severity,t),p=[],m=i.rowPadding,h=Math.max(3,m/2),g=a.message.size+h+a.detail.size,_=l+Math.max(m,(d-l-g)/2)+a.message.size,v=_+a.detail.size+h;s.rowWash>0&&p.push(`<rect x="${B(c)}" y="${B(l)}" width="${B(u-c)}" height="${B(d-l)}" rx="${s.corner}" fill="${fr(f)}" fill-opacity="${B(s.rowWash)}"/>`),p.push(`<rect x="${B(c)}" y="${B(l+m)}" width="4" height="${B(d-l-m*2)}" fill="${fr(f)}" fill-opacity="${B(s.chipOpacity)}"/>`),p.push(`<text x="${B(c+12)}" y="${B(_)}" ${pr(a.label,f)}>${fr(kn(e.quiet,e.alert.severity))}</text>`);let y=c+i.stateGutter;p.push(`<text x="${B(y)}" y="${B(l+(d-l)/2+a.message.size*.36)}" ${pr(a.message,f,.9)}>${fr(Rn(e.alert.key,[],r))}</text>`);let b=y+i.iconColumn;return p.push(`<text x="${B(b)}" y="${B(_)}" ${pr(a.message,o.text)}>${fr(e.alert.message)}</text>`),p.push(`<text x="${B(b)}" y="${B(v)}" ${pr(a.detail,o.textDim)}>${fr(e.alert.key)}</text>`),n&&(p.push(`<text x="${B(u)}" y="${B(_)}" text-anchor="end" ${pr(a.detail,o.textDim)}>${fr(mr(e.alert.firedSecondsAgo))}</text>`),p.push(`<text x="${B(u)}" y="${B(v)}" text-anchor="end" ${pr(a.detail,e.quiet===null?f:o.textDim,e.quiet===null?1:.7)}>${fr(hr(e.alert))}</text>`)),`<g tabindex="0" role="listitem" data-alert-key="${fr(e.alert.key)}" aria-label="${fr(`${kn(e.quiet,e.alert.severity)}: ${e.alert.message}, ${e.alert.key}, ${hr(e.alert)}`)}">${p.join(``)}</g>`}function _r(e,t,n){if(e.stepsTaken<=0)return``;let{space:r,clock:i}=n,a=On(t.quiet,t.alert.severity,n),o=Math.max(3,i.barHeight-4),s=r.padding+r.keyColumn-10;return Array.from({length:e.stepsTaken},(t,n)=>`<rect x="${B(s-(e.stepsTaken-1-n)*(o+3)-o)}" y="${B(e.now[1]-o/2)}" width="${B(o)}" height="${B(o)}" fill="${fr(a)}" fill-opacity="0.8"/>`).join(``)}function vr(e,t,n){let{color:r,clock:i}=n,a=On(t.quiet,t.alert.severity,n),o=i.barHeight/2,s=[];if(s.push(`<rect x="${B(e.start[0])}" y="${B(e.start[1]-o)}" width="${B(Math.max(1,e.now[0]-e.start[0]))}" height="${i.barHeight}" fill="${fr(a)}" fill-opacity="0.55"/>`),e.clampedStart){let t=e.start[0],n=e.start[1];s.push(`<path d="M ${B(t)} ${B(n-o)} L ${B(t+o)} ${B(n-o)} L ${B(t)} ${B(n)} L ${B(t+o)} ${B(n+o)} L ${B(t)} ${B(n+o)} z" fill="${fr(r.ground)}"/>`)}return e.next&&(s.push(`<line x1="${B(e.now[0])}" y1="${B(e.now[1])}" x2="${B(e.next[0])}" y2="${B(e.next[1])}" stroke="${fr(e.deferred?r.silenced:r.future)}" stroke-width="1"${e.deferred?` stroke-dasharray="3 3"`:``}/>`),s.push(`<circle cx="${B(e.next[0])}" cy="${B(e.next[1])}" r="3" ${e.overdue?`fill="${fr(a)}"`:`fill="none" stroke="${fr(a)}" stroke-width="1.5"`}/>`)),s.join(``)}function yr(e,t,n={}){let{color:r,space:i,type:a}=t,o=[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}" width="${e.width}" height="${e.height}" style="width:100%;height:auto;max-width:${e.width}px" role="list" aria-label="Fleet alerts, ${e.report.notifying} of ${e.report.total} notifying">`,`<rect x="0" y="0" width="${e.width}" height="${e.height}" fill="${fr(r.ground)}"/>`];e.mode===`clock`&&o.push(`<line x1="${B(e.nowX)}" y1="${i.padding-8}" x2="${B(e.nowX)}" y2="${B(e.height-i.padding+8)}" stroke="${fr(r.rule)}" stroke-width="1"/>`,`<text x="${B(e.nowX+4)}" y="${B(i.padding-12)}" ${pr(a.label,r.textDim,.7)}>NOW</text>`);for(let t of e.cascade){let e=t.points.map(([e,t])=>`${B(e)},${B(t)}`).join(` `);o.push(`<polyline points="${e}" fill="none" stroke="${fr(r.cascade)}" stroke-width="1.5" stroke-opacity="0.8"/>`)}let s=new Map(e.alerts.map(e=>[e.alert.id,e]));for(let r of e.alerts)o.push(gr(r,t,e.mode!==`clock`,n.iconFor));for(let n of e.futures){let e=s.get(n.alertId);e&&(o.push(vr(n,e,t)),o.push(_r(n,e,t)))}return o.push(`</svg>`),o.join(`
20
+ `)}function br(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function V(e){return Math.round(e*1e3)/1e3}function xr(e,t,n=1){return`font-family="${br(e.family)}" font-size="${e.size}" font-weight="${e.weight}" letter-spacing="${e.tracking}" fill="${br(t)}" fill-opacity="${V(n)}"`}function Sr(e,t){let{color:n}=t;return e===`ok`?n.ok:e===`mixed`?n.mixed:e===`failed`?n.failed:e===`idle`?n.idle:e===`unknown`?n.unknown:n.uncovered}function Cr(e,t,n,r){let{color:i,effect:a}=t,{x:o,y:s,width:c,height:l}=e,u=Math.min(a.corner,c/2),d=`<title>${br(Yn(e,n))}</title>`,f=e.runs[0],p=f?` data-backup="${br(f.id)}"`:``,m=e.runs.length>0?` cursor="pointer"`:``,h=`class="cell" data-module="${br(e.moduleId)}" data-days="${e.daysAgo}"${p}${m}`,g=r!==null&&e.runs.some(e=>e.id===r)?`<rect x="${V(o-2.5)}" y="${V(s-2.5)}" width="${V(c+5)}" height="${V(l+5)}" rx="${V(u+2)}" fill="none" stroke="${br(i.selected)}" stroke-width="2"/>`:``;if(e.outcome===`uncovered`)return`<rect ${h} x="${V(o)}" y="${V(s)}" width="${V(c)}" height="${V(l)}" rx="${V(u)}" fill="none" stroke="${br(i.uncoveredEdge)}" stroke-width="1" stroke-dasharray="2 2">${d}</rect>`;let _=`<rect ${h} x="${V(o)}" y="${V(s)}" width="${V(c)}" height="${V(l)}" rx="${V(u)}" fill="${br(Sr(e.outcome,t))}"`;if(e.outcome!==`mixed`)return`${_}>${d}</rect>${g}`;let v=`${_.replace(br(i.mixed),br(i.ok))}></rect>`;if(a.mixedStyle===`ring`)return`<g>${v}<rect x="${V(o+1)}" y="${V(s+1)}" width="${V(c-2)}" height="${V(l-2)}" rx="${V(Math.max(0,u-1))}" fill="none" stroke="${br(i.failed)}" stroke-width="2"/>${d}</g>${g}`;if(a.mixedStyle===`split`)return`<g>${v}<path d="M ${V(o+c)} ${V(s)} L ${V(o+c)} ${V(s+l)} L ${V(o)} ${V(s+l)} Z" fill="${br(i.failed)}"/>${d}</g>${g}`;let y=Math.max(5,c*.45);return`<g>${v}<path d="M ${V(o+c-y)} ${V(s+l)} L ${V(o+c)} ${V(s+l-y)} L ${V(o+c)} ${V(s+l)} Z" fill="${br(i.failed)}"/>${d}</g>${g}`}function wr(e,t,n,r,i,a){let{color:o,type:s,effect:c,space:l}=t,u=[],d=n===e.moduleId,f=c.focusSelected&&n!==null&&!d?c.unselectedWeight:1;d&&u.push(`<rect x="0" y="${V(e.y-3)}" width="${V(r)}" height="${V(e.height+6)}" fill="${br(o.selectedGround)}"/>`);let p=d?o.selected:e.coverage===`hooked`?o.text:o.textDim,m=e.y+e.height/2+s.row.size*.35;c.rowLabels&&(u.push(`<text x="${V(l.padding)}" y="${V(m)}" ${xr(s.row,p,f)} opacity="0.75">${br(Nn(e.moduleId,e.provides))}</text>`),u.push(`<text class="rowname" data-module="${br(e.moduleId)}" cursor="pointer" x="${V(l.padding+20)}" y="${V(m)}" ${xr(s.row,p,f)}>${br(e.moduleId)}<title>${br(Xn(e))}</title></text>`));for(let n of e.cells){let r=Cr(n,t,e.schedule,a);u.push(f===1?r:`<g opacity="${V(f)}">${r}</g>`)}if(c.verdicts){let t=i+74;u.push(`<text x="${V(t)}" y="${V(m)}" text-anchor="end" ${xr(s.detail,o.textDim,f)}>${br(e.newestGood?qn(e.newestGood.sizeBytes):`—`)}</text>`),u.push(`<text x="${V(t+16)}" y="${V(m)}" ${xr(s.detail,e.failuresSinceGood>0?o.failed:o.textDim,f)}>${br(Xn(e))}</text>`)}return u.join(``)}function Tr(e,t,n=null,r,i=null){let{color:a,type:o,effect:s,space:c}=t,l=[],u=e.width+(s.verdicts?c.verdictWidth:0),d=Math.max(r??u,u),f=s.verdicts?d-c.verdictWidth:d;if(l.push(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${V(d)} ${V(e.height)}" width="${V(d)}" height="${V(e.height)}">`),l.push(`<rect x="0" y="0" width="${V(d)}" height="${V(e.height)}" fill="${br(a.ground)}"/>`),s.weekRules)for(let n of e.columns){if(!n.weekStart)continue;let r=n.x-t.space.cellGap/2;l.push(`<line x1="${V(r)}" y1="${V(c.padding+e.headerHeight-6)}" x2="${V(r)}" y2="${V(e.height-c.padding+2)}" stroke="${br(a.weekRule)}" stroke-width="1"/>`)}for(let t of e.columns)t.labelled&&l.push(`<text x="${V(t.x+t.width/2)}" y="${V(c.padding+12)}" text-anchor="middle" ${xr(o.axis,a.textDim)}>${br(t.label)}</text>`);for(let r of e.rows)l.push(wr(r,t,n,d,f,i));return l.push(`</svg>`),l.join(``)}function Er({title:e,read:t,stale:n,lastGood:r,emptyLabel:i=`Nothing here.`,isEmpty:a,children:o}){let s=t.status===`ok`?t.value:n?r:void 0;return(0,R.jsxs)(`section`,{style:{borderTop:`1px solid var(--rule)`,padding:`10px 0 16px`},children:[(0,R.jsxs)(`header`,{style:{display:`flex`,alignItems:`baseline`,gap:12,marginBottom:8},children:[(0,R.jsx)(`span`,{className:`eyebrow`,children:e}),t.status===`unavailable`?(0,R.jsxs)(`span`,{style:{color:`var(--stale)`},children:[n?`not refreshing`:`unavailable`,` — `,t.reason]}):null]}),t.status===`loading`?(0,R.jsx)(`p`,{style:{color:`var(--dim)`,margin:0},children:`Reading…`}):s===void 0?(0,R.jsx)(`p`,{style:{color:`var(--dim)`,margin:0},children:`No data. This panel has not successfully read since the page opened.`}):a?.(s)?(0,R.jsx)(`p`,{style:{color:`var(--dim)`,margin:0},children:i}):o(s)]})}function Dr(e){if(e.status===`loading`)return`checking who you are`;if(e.status===`unavailable`)return`identity unavailable, so acknowledgement is unavailable: ${e.reason}`;let{person:t,name:n,subject:r}=e.value;if(t!==null)return`acknowledging as ${t}`;let i=n??r;return`celilo has no person named ${i}, so acknowledgement is unavailable. Add one with: celilo person add ${i}`}function Or(e,t){return Math.max(0,Math.round((t-e)/1e3))}function kr(e,t){return{id:e.key,key:e.key,message:e.message,state:e.state,severity:e.severity,firedSecondsAgo:Or(e.firstFiredAt,t),escalationStep:e.escalationStep,nextEscalationInSeconds:e.nextEscalationAt===null?null:Math.round((e.nextEscalationAt-t)/1e3),...e.suppressedByAlertId?{suppressedByAlertId:e.suppressedByAlertId}:{},...e.suppressedByWindowId?{suppressedByWindow:e.suppressedByWindowId}:{},...e.silencedUntil===null?{}:{silencedForSeconds:Or(t,e.silencedUntil)},...e.ackedBy?{ackedBy:e.ackedBy.name}:{},...e.policy?{policy:e.policy}:{}}}function Ar(e){return{alerts:e.alerts.map(t=>kr(t,e.asOf))}}function jr(e){return e.state!==`acked`&&e.state!==`resolved`}var Mr={version:5,services:[{id:0,name:`AckAlert`,type:`api`},{id:1,name:`Alerts`,type:`api`},{id:2,name:`Backups`,type:`api`},{id:3,name:`Closure`,type:`api`},{id:4,name:`Modules`,type:`api`},{id:6,name:`Session`,type:`api`},{id:5,name:`Topology`,type:`api`}],types:{"PtlAckAlert/ReqAckAlert":{type:`Interface`,properties:[{id:1,name:`alertKey`,type:{type:`String`}}]},"PtlAckAlert/ResAckAlert":{type:`Interface`,properties:[{id:0,name:`ackedAt`,type:{type:`Number`}},{id:1,name:`ackedByName`,type:{type:`String`}}]},"PtlAlerts/ReqAlerts":{type:`Interface`,properties:[{id:0,name:`moduleId`,type:{type:`String`},optional:!0}]},"PtlAlerts/ResAlerts":{type:`Interface`,properties:[{id:1,name:`asOf`,type:{type:`Number`}},{id:0,name:`alerts`,type:{type:`Array`,elementType:{type:`Reference`,target:`PtlAlerts/AlertProjection`}}}]},"PtlAlerts/AlertProjection":{type:`Interface`,properties:[{id:0,name:`id`,type:{type:`String`}},{id:1,name:`key`,type:{type:`String`}},{id:2,name:`moduleId`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:14,name:`message`,type:{type:`String`}},{id:3,name:`state`,type:{type:`Union`,members:[{id:0,type:{type:`Literal`,literal:`pending`}},{id:1,type:{type:`Literal`,literal:`firing`}},{id:2,type:{type:`Literal`,literal:`acked`}},{id:3,type:{type:`Literal`,literal:`suppressed`}},{id:4,type:{type:`Literal`,literal:`resolved`}}]}},{id:4,name:`severity`,type:{type:`Union`,members:[{id:0,type:{type:`Literal`,literal:`warning`}},{id:1,type:{type:`Literal`,literal:`critical`}}]}},{id:15,name:`policy`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:5,name:`firstFiredAt`,type:{type:`Number`}},{id:6,name:`lastSeenAt`,type:{type:`Number`}},{id:7,name:`suppressedByAlertId`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:8,name:`suppressedByWindowId`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:9,name:`silencedUntil`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:10,name:`ackedBy`,type:{type:`Union`,members:[{id:0,type:{type:`Interface`,properties:[{id:0,name:`id`,type:{type:`String`}},{id:1,name:`name`,type:{type:`String`}}]}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:11,name:`ackedAt`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:12,name:`escalationStep`,type:{type:`Number`}},{id:13,name:`nextEscalationAt`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}}]},"PtlBackups/ReqBackups":{type:`Interface`},"PtlBackups/ResBackups":{type:`Interface`,properties:[{id:1,name:`asOf`,type:{type:`Number`}},{id:2,name:`windowDays`,type:{type:`Number`}},{id:0,name:`backups`,type:{type:`Array`,elementType:{type:`Reference`,target:`PtlBackups/BackupProjection`}}},{id:3,name:`runs`,type:{type:`Array`,elementType:{type:`Reference`,target:`PtlBackups/BackupRunProjection`}}}]},"PtlBackups/BackupProjection":{type:`Interface`,properties:[{id:0,name:`moduleId`,type:{type:`String`}},{id:6,name:`coverage`,type:{type:`Reference`,target:`PtlBackups/BackupCoverage`}},{id:1,name:`lastSuccessAt`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:2,name:`lastAttemptAt`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:3,name:`lastAttemptFailed`,type:{type:`Boolean`}},{id:7,name:`failuresSinceSuccess`,type:{type:`Number`}},{id:4,name:`scheduleHours`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:5,name:`stale`,type:{type:`Boolean`}}]},"PtlBackups/BackupCoverage":{type:`Union`,members:[{id:0,type:{type:`Literal`,literal:`hooked`}},{id:1,type:{type:`Literal`,literal:`unhooked`}}]},"PtlBackups/BackupRunProjection":{type:`Interface`,properties:[{id:0,name:`id`,type:{type:`String`}},{id:1,name:`moduleId`,type:{type:`String`}},{id:2,name:`at`,type:{type:`Number`}},{id:3,name:`completed`,type:{type:`Boolean`}},{id:4,name:`sizeBytes`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:5,name:`storage`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:6,name:`moduleVersion`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:7,name:`name`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:8,name:`error`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}}]},"PtlClosure/ReqClosure":{type:`Interface`,properties:[{id:0,name:`moduleId`,type:{type:`String`}},{id:1,name:`depth`,type:{type:`Number`},optional:!0}]},"PtlClosure/ResClosure":{type:`Interface`,properties:[{id:0,name:`nodes`,type:{type:`Array`,elementType:{type:`Reference`,target:`PtlClosure/ClosureNode`}}},{id:1,name:`chains`,type:{type:`Array`,elementType:{type:`Reference`,target:`PtlClosure/DelegationChain`}}},{id:2,name:`depth`,type:{type:`Number`}},{id:3,name:`truncated`,type:{type:`Boolean`}}]},"PtlClosure/ClosureNode":{type:`Interface`,properties:[{id:0,name:`module`,type:{type:`Reference`,target:`common/ModuleProjection`}},{id:1,name:`hop`,type:{type:`Number`}},{id:2,name:`optional`,type:{type:`Boolean`}},{id:3,name:`via`,type:{type:`Array`,elementType:{type:`String`}}}]},"common/ModuleProjection":{type:`Interface`,properties:[{id:0,name:`id`,type:{type:`String`}},{id:1,name:`version`,type:{type:`String`}},{id:2,name:`state`,type:{type:`String`}},{id:3,name:`health`,type:{type:`Reference`,target:`common/ObservedHealth`}},{id:4,name:`systems`,type:{type:`Array`,elementType:{type:`Reference`,target:`common/DeployedSystem`}}},{id:5,name:`lastBackupAt`,type:{type:`Union`,members:[{id:0,type:{type:`Number`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:6,name:`backupStale`,type:{type:`Boolean`}},{id:7,name:`unwatched`,type:{type:`Boolean`}},{id:8,name:`pagesNobody`,type:{type:`Boolean`}}]},"common/ObservedHealth":{type:`Interface`,properties:[{id:0,name:`cell`,type:{type:`Reference`,target:`common/HealthCell`}},{id:1,name:`firingCount`,type:{type:`Number`}}]},"common/HealthCell":{type:`Union`,members:[{id:0,type:{type:`Literal`,literal:`ok`}},{id:1,type:{type:`Literal`,literal:`not observed`}},{id:2,type:{type:`Literal`,literal:`suppressed`}},{id:3,type:{type:`Literal`,literal:`firing`}}]},"common/DeployedSystem":{type:`Interface`,properties:[{id:0,name:`hostname`,type:{type:`String`}},{id:1,name:`address`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:2,name:`zone`,type:{type:`String`}}]},"PtlClosure/DelegationChain":{type:`Interface`,properties:[{id:0,name:`capability`,type:{type:`String`}},{id:1,name:`moduleIds`,type:{type:`Array`,elementType:{type:`String`}}}]},"PtlModules/ReqModules":{type:`Interface`},"PtlModules/ResModules":{type:`Interface`,properties:[{id:0,name:`modules`,type:{type:`Array`,elementType:{type:`Reference`,target:`common/ModuleProjection`}}}]},"PtlSession/ReqSession":{type:`Interface`},"PtlSession/ResSession":{type:`Interface`,properties:[{id:0,name:`subject`,type:{type:`String`}},{id:1,name:`name`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}},{id:2,name:`person`,type:{type:`Union`,members:[{id:0,type:{type:`String`}},{id:1,type:{type:`Literal`,literal:null}}]}}]},"PtlTopology/ReqTopology":{type:`Interface`},"PtlTopology/ResTopology":{type:`Interface`,properties:[{id:0,name:`zones`,type:{type:`Array`,elementType:{type:`String`}}},{id:1,name:`modules`,type:{type:`Array`,elementType:{type:`Reference`,target:`common/ModuleProjection`}}}]}}},Nr,Pr={remove:function(e){if(typeof e==`function`)for(var t=this.length-1;t>-1;--t)e(this[t],t,this)&&this.splice(t,1);else for(var t=this.length-1;t>-1;--t)this[t]===e&&this.splice(t,1);return this},removeOne:function(e){if(typeof e==`function`){for(var t=0;t<this.length;++t)if(e(this[t],t,this))return this.splice(t,1),this}else for(var t=0;t<this.length;++t)if(this[t]===e)return this.splice(t,1),this;return this},first:function(){return this.length?this[0]:null},last:function(){return this.length?this[this.length-1]:null},max:function(e){if(!this.length)return null;if(typeof e==`function`){for(var t=e(this[0],0,this),n=1;n<this.length;++n){var r=e(this[n],n,this);t=r>t?r:t}return t}return this.reduce(function(e,t){return e>t?e:t})},min:function(e){if(!this.length)return null;function t(e,t){return e<t?e:t}if(typeof e==`function`){for(var n=e(this[0],0,this),r=1;r<this.length;++r){var i=e(this[r],r,this);n=i<n?i:n}return n}return this.reduce(function(e,n){return t(e,n)})},distinct:function(){return this.filter(function(e,t,n){return n.indexOf(e)===t})},filterIndex:function(e){for(var t=[],n=0;n<this.length;++n)e(this[n],n,this)&&t.push(n);return t},count:function(e){for(var t=0,n=0;n<this.length;++n)e(this[n],n,this)&&++t;return t},sum:function(e){for(var t=0,n=0;n<this.length;++n)t+=e?e(this[n],n,this):this[n];return t},average:function(e){return this.sum(e)/this.length},orderBy:function(){var e=[...arguments];return this.slice().sort(function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t),a=e[r](n);if(i>a)return 1;if(i<a)return-1}return 0})},orderByDesc:function(){var e=[...arguments];return this.slice().sort(function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t),a=e[r](n);if(i>a)return-1;if(i<a)return 1}return 0})},binarySearch:function(e,t){for(var n=0,r=this.length-1;n<=r;){var i=(r+n)/2|0,a=t?t(this[i]):this[i];if(e===a)return i;e>a?n=i+1:e<a&&(r=i-1)}return-1},binaryInsert:function(e,t,n){typeof t==`boolean`&&(n=t,t=void 0);for(var r=0,i=this.length-1,a=NaN,o=t?t(e):e;r<=i;){a=(i+r)/2|0;var s=t?t(this[a]):this[a];if(o===s){if(n)return a;break}o>s?r=a+1:o<s&&(i=a-1)}var c=r>a?a+1:a;return this.splice(c,0,e),c},binaryDistinct:function(e){return this.filter(function(t,n,r){return r.binarySearch(t,e)===n})},findLast:function(e){for(var t=this.length-1;t>-1;--t)if(e(this[t],t,this))return this[t]},findLastIndex:function(e){for(var t=this.length-1;t>-1;--t)if(e(this[t],t,this))return t;return-1},groupBy:function(e){var t=this.reduce(function(t,n){var r=e(n);return t[r]||(t[r]=[]),t[r].push(n),t},{});return Object.keys(t).map(function(e){var n=t[e];return n.key=e,n})},__k8w_extended:{value:!0}};if(!Array.prototype.__k8w_extended)for(var Fr in Pr)Object.defineProperties(Array.prototype,(Nr={},Nr[Fr]={value:Pr[Fr],writable:!0},Nr));function Ir(e,t){return e.length>1&&t<10?`0`+t:``+t}Date.prototype.format=function(e){var t=this;return e===void 0&&(e=`YYYY-MM-DD hh:mm:ss`),e.replace(/y{2,}|Y{2,}/,function(e){return(t.getFullYear()+``).substr(4-e.length)}).replace(/M{1,2}/,function(e){return Ir(e,t.getMonth()+1)}).replace(/D{1,2}|d{1,2}/,function(e){return Ir(e,t.getDate())}).replace(/Q|q/,function(e){return Ir(e,Math.ceil((t.getMonth()+1)/3))}).replace(/h{1,2}|H{1,2}/,function(e){return Ir(e,t.getHours())}).replace(/m{1,2}/,function(e){return Ir(e,t.getMinutes())}).replace(/s{1,2}/,function(e){return Ir(e,t.getSeconds())}).replace(/SSS|S/,function(e){var n=``+t.getMilliseconds();return e.length===1?n:(n.length===1?`00`:n.length===2?`0`:``)+n})},Date.today=function(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()},Object.merge=function(e){for(var t=[...arguments].slice(1),n=0;n<t.length;++n){var r=t[n];if(!(typeof r!=`object`||!r)){for(var i in r)if(r.hasOwnProperty(i)){if(r[i]instanceof Date){e[i]=new Date(r[i]);continue}typeof e[i]==`object`&&e[i]!=null&&typeof r[i]==`object`&&r[i]!=null?Object.merge(e[i],r[i]):e[i]=Array.isArray(r[i])?Object.merge([],r[i]):typeof r[i]==`object`&&r[i]!==null?Object.merge({},r[i]):r[i]}}}return e},Object.values||(Object.values=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}),Object.entries||(Object.entries=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return t}),Object.forEach=function(e,t){for(var n in e){if(!e.hasOwnProperty(n))return;t(e[n],n,e)}},typeof window<`u`&&!window.console&&(window.console={},console.log=console.debug=console.info=console.warn=console.error=console.time=console.timeEnd=function(){}),console.debug||(console.debug=console.log);var H=o(((e,t)=>{var n=function(e){return e&&e.Math===Math&&e};t.exports=n(typeof globalThis==`object`&&globalThis)||n(typeof window==`object`&&window)||n(typeof self==`object`&&self)||n(typeof global==`object`&&global)||n(typeof e==`object`&&e)||(function(){return this})()||Function(`return this`)()})),Lr=o(((e,t)=>{t.exports=!1})),Rr=o(((e,t)=>{var n=H(),r=Object.defineProperty;t.exports=function(e,t){try{r(n,e,{value:t,configurable:!0,writable:!0})}catch{n[e]=t}return t}})),zr=o(((e,t)=>{var n=Lr(),r=H(),i=Rr(),a=`__core-js_shared__`,o=t.exports=r[a]||i(a,{});(o.versions||=[]).push({version:`3.50.0`,mode:n?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE`,source:`https://github.com/zloirock/core-js`})})),Br=o(((e,t)=>{var n=zr(),r=Object.create||Object;t.exports=function(e,t){return n[e]||(n[e]=t||r(null))}})),U=o(((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}})),Vr=o(((e,t)=>{t.exports=!U()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})})),Hr=o(((e,t)=>{var n=Vr(),r=Function.prototype,i=r.call,a=n&&r.bind.bind(i,i);t.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}})),Ur=o(((e,t)=>{t.exports=function(e){return e==null}})),Wr=o(((e,t)=>{var n=Ur(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`Can't call method on `+e);return e}})),Gr=o(((e,t)=>{var n=Wr(),r=Object;t.exports=function(e){return r(n(e))}})),Kr=o(((e,t)=>{var n=Hr(),r=Gr(),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return i(r(e),t)}})),qr=o(((e,t)=>{var n=Hr(),r=0,i=Math.random(),a=n(1.1.toString);t.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+a(++r+i,36)}})),Jr=o(((e,t)=>{var n=H().navigator,r=n&&n.userAgent;t.exports=r?String(r):``})),Yr=o(((e,t)=>{var n=H(),r=Jr(),i=n.process,a=n.Deno,o=i&&i.versions||a&&a.version,s=o&&o.v8,c,l;s&&(c=s.split(`.`),l=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!l&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(l=+c[1]))),t.exports=l})),Xr=o(((e,t)=>{var n=Yr(),r=U(),i=H().String;t.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol(`symbol detection`);return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})})),Zr=o(((e,t)=>{t.exports=Xr()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`})),Qr=o(((e,t)=>{var n=H(),r=Br(),i=Kr(),a=qr(),o=Xr(),s=Zr(),c=n.Symbol,l=r(`wks`),u=s?c.for||c:c&&c.withoutSetter||a;t.exports=function(e){return i(l,e)||(l[e]=o&&i(c,e)?c[e]:u(`Symbol.`+e)),l[e]}})),$r=o(((e,t)=>{var n=Qr()(`toStringTag`),r={};r[n]=`z`,t.exports=String(r)===`[object z]`})),ei=o(((e,t)=>{var n=typeof document==`object`&&document.all;t.exports=n===void 0&&n!==void 0?function(e){return typeof e==`function`||e===n}:function(e){return typeof e==`function`}})),ti=o(((e,t)=>{t.exports=!U()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})})),ni=o(((e,t)=>{var n=ei();t.exports=function(e){return typeof e==`object`?e!==null:n(e)}})),ri=o(((e,t)=>{var n=H(),r=ni(),i=n.document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}})),ii=o(((e,t)=>{var n=ti(),r=U(),i=ri();t.exports=!n&&!r(function(){return Object.defineProperty(i(`div`),"a",{get:function(){return 7}}).a!==7})})),ai=o(((e,t)=>{var n=ti(),r=U();t.exports=n&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})})),oi=o(((e,t)=>{var n=ni(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not an object`)}})),si=o(((e,t)=>{var n=Vr(),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}})),ci=o(((e,t)=>{var n=H(),r=ei(),i=function(e){return r(e)?e:void 0};t.exports=function(e,t){return arguments.length<2?i(n[e]):n[e]&&n[e][t]}})),li=o(((e,t)=>{t.exports=Hr()({}.isPrototypeOf)})),ui=o(((e,t)=>{var n=ci(),r=ei(),i=li(),a=Zr(),o=Object;t.exports=a?function(e){return typeof e==`symbol`}:function(e){var t=n(`Symbol`);return r(t)&&i(t.prototype,o(e))}})),di=o(((e,t)=>{var n=String;t.exports=function(e){try{return n(e)}catch{return`Object`}}})),fi=o(((e,t)=>{var n=ei(),r=di(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a function`)}})),pi=o(((e,t)=>{var n=fi(),r=Ur();t.exports=function(e,t){var i=e[t];return r(i)?void 0:n(i)}})),mi=o(((e,t)=>{var n=si(),r=ei(),i=ni(),a=TypeError;t.exports=function(e,t){var o,s;if(t===`string`&&r(o=e.toString)&&!i(s=n(o,e))||r(o=e.valueOf)&&!i(s=n(o,e))||t!==`string`&&r(o=e.toString)&&!i(s=n(o,e)))return s;throw new a(`Can't convert object to primitive value`)}})),hi=o(((e,t)=>{var n=si(),r=ni(),i=ui(),a=pi(),o=mi(),s=Qr(),c=TypeError,l=s(`toPrimitive`);t.exports=function(e,t){if(!r(e)||i(e))return e;var s=a(e,l),u;if(s){if(t===void 0&&(t=`default`),u=n(s,e,t),!r(u)||i(u))return u;throw new c(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),o(e,t)}})),gi=o(((e,t)=>{var n=hi(),r=ui();t.exports=function(e){var t=n(e,`string`);return r(t)?t:t+``}})),_i=o((e=>{var t=ti(),n=ii(),r=ai(),i=oi(),a=gi(),o=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=`enumerable`,u=`configurable`,d=`writable`;e.f=t?r?function(e,t,n){if(i(e),t=a(t),i(n),typeof e==`function`&&t===`prototype`&&`value`in n&&d in n&&!n[d]){var r=c(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:u in n?n[u]:r[u],enumerable:l in n?n[l]:r[l],writable:!1})}return s(e,t,n)}:s:function(e,t,r){if(i(e),t=a(t),i(r),n)try{return s(e,t,r)}catch{}if(`get`in r||`set`in r)throw new o(`Accessors not supported`);return`value`in r&&(e[t]=r.value),e}})),vi=o(((e,t)=>{var n=ti(),r=Kr(),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=r(i,`name`);t.exports={EXISTS:o,PROPER:o&&function(){}.name===`something`,CONFIGURABLE:o&&(!n||n&&a(i,`name`).configurable)}})),yi=o(((e,t)=>{var n=Hr(),r=ei(),i=zr(),a=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),t.exports=i.inspectSource})),bi=o(((e,t)=>{var n=H(),r=ei(),i=n.WeakMap;t.exports=r(i)&&/native code/.test(String(i))})),xi=o(((e,t)=>{t.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}})),Si=o(((e,t)=>{var n=ti(),r=_i(),i=xi();t.exports=n?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}})),Ci=o(((e,t)=>{var n=Br(),r=qr(),i=n(`keys`);t.exports=function(e){return i[e]||(i[e]=r(e))}})),wi=o(((e,t)=>{t.exports={}})),Ti=o(((e,t)=>{var n=bi(),r=H(),i=ni(),a=Si(),o=Kr(),s=zr(),c=Ci(),l=wi(),u=`Object already initialized`,d=r.TypeError,f=r.WeakMap,p,m,h,g=function(e){return h(e)?m(e):p(e,{})},_=function(e){return function(t){var n;if(!i(t)||(n=m(t)).type!==e)throw new d(`Incompatible receiver, `+e+` required`);return n}};if(n||s.state){var v=s.state||=new f;v.get=v.get,v.has=v.has,v.set=v.set,p=function(e,t){if(v.has(e))throw new d(u);return t.facade=e,v.set(e,t),t},m=function(e){return v.get(e)||{}},h=function(e){return v.has(e)}}else{var y=c(`state`);l[y]=!0,p=function(e,t){if(o(e,y))throw new d(u);return t.facade=e,a(e,y,t),t},m=function(e){return o(e,y)?e[y]:{}},h=function(e){return o(e,y)}}t.exports={set:p,get:m,has:h,enforce:g,getterFor:_}})),Ei=o(((e,t)=>{var n=Hr(),r=U(),i=ei(),a=Kr(),o=ti(),s=vi().CONFIGURABLE,c=yi(),l=Ti(),u=l.enforce,d=l.get,f=String,p=Object.defineProperty,m=n(``.slice),h=n(``.replace),g=n([].join),_=o&&!r(function(){return p(function(){},`length`,{value:8}).length!==8}),v=String(String).split(`String`),y=t.exports=function(e,t,n){m(f(t),0,7)===`Symbol(`&&(t=`[`+h(f(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!a(e,`name`)||s&&e.name!==t)&&(o?p(e,`name`,{value:t,configurable:!0}):e.name=t),_&&n&&a(n,`arity`)&&e.length!==n.arity&&p(e,`length`,{value:n.arity});try{n&&a(n,`constructor`)&&n.constructor?o&&p(e,`prototype`,{writable:!1}):e.prototype&&=void 0}catch{}var r=u(e);return a(r,`source`)||(r.source=g(v,typeof t==`string`?t:``)),e};Function.prototype.toString=y(function(){return i(this)&&d(this).source||c(this)},`toString`)})),Di=o(((e,t)=>{var n=ei(),r=_i(),i=Ei(),a=Rr();t.exports=function(e,t,o,s){s||={};var c=s.enumerable,l=s.name===void 0?t:s.name;if(n(o)&&i(o,l,s),s.global)c?e[t]=o:a(t,o);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch{}c?e[t]=o:r.f(e,t,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}})),Oi=o(((e,t)=>{var n=Hr(),r=n({}.toString),i=n(``.slice);t.exports=function(e){return i(r(e),8,-1)}})),ki=o(((e,t)=>{var n=$r(),r=ei(),i=Oi(),a=Qr()(`toStringTag`),o=Object,s=i(function(){return arguments}())===`Arguments`,c=function(e,t){try{return e[t]}catch{}};t.exports=n?i:function(e){var t,n,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=c(t=o(e),a))==`string`?n:s?i(t):(l=i(t))===`Object`&&r(t.callee)?`Arguments`:l}})),Ai=o(((e,t)=>{var n=$r(),r=ki();t.exports=n?{}.toString:function(){return`[object `+r(this)+`]`}})),ji=o((()=>{var e=$r(),t=Di(),n=Ai();e||t(Object.prototype,`toString`,n,{unsafe:!0})})),Mi=o(((e,t)=>{var n=ki(),r=String;t.exports=function(e){if(n(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return r(e)}})),Ni=o(((e,t)=>{var n=H(),r=U(),i=n.RegExp;t.exports={correct:!r(function(){var e=!0;try{i(`.`,`d`)}catch{e=!1}var t={},n=``,r=e?`dgimsy`:`gimsy`,a=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)a(s,o[s]);return Object.getOwnPropertyDescriptor(i.prototype,`flags`).get.call(t)!==r||n!==r})}})),Pi=o(((e,t)=>{var n=oi();t.exports=function(){var e=n(this),t=``;return e.hasIndices&&(t+=`d`),e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.unicodeSets&&(t+=`v`),e.sticky&&(t+=`y`),t}})),Fi=o(((e,t)=>{var n=si(),r=Kr(),i=li(),a=Ni(),o=Pi(),s=RegExp.prototype;t.exports=a.correct?function(e){return e.flags}:function(e){return!a.correct&&i(s,e)&&!r(e,`flags`)?n(o,e):e.flags}})),Ii=o((()=>{var e=vi().PROPER,t=Di(),n=oi(),r=Mi(),i=U(),a=Fi(),o=`toString`,s=RegExp.prototype,c=s[o],l=i(function(){return c.call({source:`a`,flags:`b`})!==`/a/b`}),u=e&&c.name!==o;(l||u)&&t(s,o,function(){var e=n(this),t=r(e.source),i=r(a(e));return`/`+t+`/`+i},{unsafe:!0})})),Li=o((e=>{var t={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor;e.f=n&&!t.call({1:2},1)?function(e){var t=n(this,e);return!!t&&t.enumerable}:t})),Ri=o(((e,t)=>{var n=Hr(),r=U(),i=Oi(),a=Object,o=n(``.split);t.exports=r(function(){return!a(`z`).propertyIsEnumerable(0)})?function(e){return i(e)===`String`?o(e,``):a(e)}:a})),zi=o(((e,t)=>{var n=Ri(),r=Wr();t.exports=function(e){return n(r(e))}})),Bi=o((e=>{var t=ti(),n=si(),r=Li(),i=xi(),a=zi(),o=gi(),s=Kr(),c=ii(),l=Object.getOwnPropertyDescriptor;e.f=t?l:function(e,t){if(e=a(e),t=o(t),c)try{return l(e,t)}catch{}if(s(e,t))return i(!n(r.f,e,t),e[t])}})),Vi=o(((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?r:n)(t)}})),Hi=o(((e,t)=>{var n=Vi();t.exports=function(e){var t=+e;return t!==t||t===0?0:n(t)}})),Ui=o(((e,t)=>{var n=Hi(),r=Math.max,i=Math.min;t.exports=function(e,t){var a=n(e);return a<0?r(a+t,0):i(a,t)}})),Wi=o(((e,t)=>{var n=Hi(),r=Math.min;t.exports=function(e){var t=n(e);return t>0?r(t,9007199254740991):0}})),Gi=o(((e,t)=>{var n=Wi();t.exports=function(e){return n(e.length)}})),Ki=o(((e,t)=>{var n=zi(),r=Ui(),i=Gi(),a=function(e){return function(t,a,o){var s=n(t),c=i(s);if(c===0)return!e&&-1;var l=r(o,c),u;if(e&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===a)return e||l||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}})),qi=o(((e,t)=>{var n=Hr(),r=Kr(),i=zi(),a=Ki().indexOf,o=wi(),s=n([].push);t.exports=function(e,t){var n=i(e),c=0,l=[],u;for(u in n)!r(o,u)&&r(n,u)&&s(l,u);for(;t.length>c;)r(n,u=t[c++])&&(~a(l,u)||s(l,u));return l}})),Ji=o(((e,t)=>{t.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]})),Yi=o((e=>{var t=qi(),n=Ji().concat(`length`,`prototype`);e.f=Object.getOwnPropertyNames||function(e){return t(e,n)}})),Xi=o((e=>{e.f=Object.getOwnPropertySymbols})),Zi=o(((e,t)=>{var n=ci(),r=Hr(),i=Yi(),a=Xi(),o=oi(),s=r([].concat);t.exports=n(`Reflect`,`ownKeys`)||function(e){var t=i.f(o(e)),n=a.f;return n?s(t,n(e)):t}})),Qi=o(((e,t)=>{var n=Kr(),r=Zi(),i=Bi(),a=_i();t.exports=function(e,t,o){for(var s=r(t),c=a.f,l=i.f,u=0;u<s.length;u++){var d=s[u];!n(e,d)&&!(o&&n(o,d))&&c(e,d,l(t,d))}}})),$i=o(((e,t)=>{var n=U(),r=ei(),i=/#|\.prototype\./,a=function(e,t){var i=s[o(e)];return i===l?!0:i===c?!1:r(t)?n(t):!!t},o=a.normalize=function(e){return String(e).replace(i,`.`).toLowerCase()},s=a.data={},c=a.NATIVE=`N`,l=a.POLYFILL=`P`;t.exports=a})),W=o(((e,t)=>{var n=H(),r=Bi().f,i=Si(),a=Di(),o=Rr(),s=Qi(),c=$i();t.exports=function(e,t){var l=e.target,u=e.global,d=e.stat,f,p=u?n:d?n[l]||o(l,{}):n[l]&&n[l].prototype,m,h,g,_;if(p)for(m in t){if(g=t[m],e.dontCallGetSet?(_=r(p,m),h=_&&_.value):h=p[m],f=c(u?m:l+(d?`.`:`#`)+m,e.forced),!f&&h!==void 0){if(typeof g==typeof h)continue;s(g,h)}(e.sham||h&&h.sham)&&i(g,`sham`,!0),a(p,m,g,e)}}})),ea=o((()=>{W()({target:`Number`,stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})})),ta=o(((e,t)=>{t.exports=H()})),na=o(((e,t)=>{var n=Hr(),r=fi();t.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch{}}})),ra=o(((e,t)=>{var n=ni();t.exports=function(e){return n(e)||e===null}})),ia=o(((e,t)=>{var n=ra(),r=String,i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(`Can't set `+r(e)+` as a prototype`)}})),aa=o(((e,t)=>{var n=na(),r=ni(),i=Wr(),a=ia();t.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},o;try{o=n(Object.prototype,`__proto__`,`set`),o(t,[]),e=t instanceof Array}catch{}return function(t,n){return i(t),a(n),r(t)&&(e?o(t,n):t.__proto__=n),t}}():void 0)})),oa=o(((e,t)=>{var n=ei(),r=ni(),i=aa();t.exports=function(e,t,a){var o,s;return i&&n(o=t.constructor)&&o!==a&&r(s=o.prototype)&&s!==a.prototype&&i(e,s),e}})),sa=o(((e,t)=>{t.exports=Hr()(1.1.valueOf)})),ca=o(((e,t)=>{t.exports=`
21
+ \v\f\r \xA0               \u2028\u2029`})),la=o(((e,t)=>{var n=Hr(),r=Wr(),i=Mi(),a=ca(),o=n(``.replace),s=RegExp(`^[`+a+`]+`),c=RegExp(`(^|[^`+a+`])[`+a+`]+$`),l=function(e){return function(t){var n=i(r(t));return e&1&&(n=o(n,s,``)),e&2&&(n=o(n,c,`$1`)),n}};t.exports={start:l(1),end:l(2),trim:l(3)}})),ua=o((()=>{var e=W(),t=Lr(),n=ti(),r=H(),i=ta(),a=Hr(),o=$i(),s=Kr(),c=oa(),l=li(),u=ui(),d=hi(),f=U(),p=Yi().f,m=Bi().f,h=_i().f,g=sa(),_=la().trim,v=`Number`,y=r[v],b=i[v],x=y.prototype,S=r.TypeError,C=a(``.slice),w=a(``.charCodeAt),T=function(e){var t=d(e,`number`);return typeof t==`bigint`?t:E(t)},E=function(e){var t=d(e,`number`),n,r,i,a,o,s,c,l;if(u(t))throw new S(`Cannot convert a Symbol value to a number`);if(typeof t==`string`&&t.length>2){if(t=_(t),n=w(t,0),n===43||n===45){if(r=w(t,2),r===88||r===120)return NaN}else if(n===48){switch(w(t,1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+t}for(o=C(t,2),s=o.length,c=0;c<s;c++)if(l=w(o,c),l<48||l>a)return NaN;return parseInt(o,i)}}return+t},D=o(v,!y(` 0o1`)||!y(`0b1`)||y(`+0x1`)),O=function(e){return l(x,e)&&f(function(){g(e)})},k=function(e){var t=arguments.length<1?0:y(T(e));return O(this)?c(Object(t),this,k):t};k.prototype=x,D&&!t&&(x.constructor=k),e({global:!0,constructor:!0,wrap:!0,forced:D},{Number:k});var A=function(e,t){for(var r=n?p(t):`MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range`.split(`,`),i=0,a;r.length>i;i++)s(t,a=r[i])&&!s(e,a)&&h(e,a,m(t,a))};t&&b&&A(i[v],b),(D||t)&&A(i[v],y)})),da=o(((e,t)=>{var n=U(),r=H().RegExp,i=n(function(){var e=r(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!==null}),a=i||n(function(){return!r(`a`,`y`).sticky});t.exports={BROKEN_CARET:i||n(function(){var e=r(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!==null}),MISSED_STICKY:a,UNSUPPORTED_Y:i}})),fa=o(((e,t)=>{var n=qi(),r=Ji();t.exports=Object.keys||function(e){return n(e,r)}})),pa=o((e=>{var t=ti(),n=ai(),r=_i(),i=oi(),a=zi(),o=fa();e.f=t&&!n?Object.defineProperties:function(e,t){i(e);for(var n=a(t),s=o(t),c=s.length,l=0,u;c>l;)r.f(e,u=s[l++],n[u]);return e}})),ma=o(((e,t)=>{t.exports=ci()(`document`,`documentElement`)})),ha=o(((e,t)=>{var n=oi(),r=pa(),i=Ji(),a=wi(),o=ma(),s=ri(),c=Ci(),l=`>`,u=`<`,d=`prototype`,f=`script`,p=c(`IE_PROTO`),m=function(){},h=function(e){return u+f+l+e+u+`/`+f+l},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){var e=s(`iframe`),t=`java`+f+`:`,n;return e.style.display=`none`,o.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(h(`document.F=Object`)),n.close(),n.F},v,y=function(){try{v=new ActiveXObject(`htmlfile`)}catch{}y=typeof document<`u`?document.domain&&v?g(v):_():g(v);for(var e=i.length;e--;)delete y[d][i[e]];return y()};a[p]=!0,t.exports=Object.create||function(e,t){var i;return e===null?i=y():(m[d]=n(e),i=new m,m[d]=null,i[p]=e),t===void 0?i:r.f(i,t)}})),ga=o(((e,t)=>{var n=U(),r=H().RegExp;t.exports=n(function(){var e=r(`.`,`s`);return!(e.dotAll&&e.test(`
22
+ `)&&e.flags===`s`)})})),_a=o(((e,t)=>{var n=U(),r=H().RegExp;t.exports=n(function(){var e=r(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`})})),va=o(((e,t)=>{var n=si(),r=Hr(),i=Mi(),a=Pi(),o=da(),s=Br(),c=ha(),l=Ti().get,u=ga(),d=_a(),f=s(`native-string-replace`,String.prototype.replace),p=RegExp.prototype.exec,m=p,h=r(``.charAt),g=r(``.indexOf),_=r(``.replace),v=r(``.slice),y=(function(){var e=/a/,t=/b*/g;return n(p,e,`a`),n(p,t,`a`),e.lastIndex!==0||t.lastIndex!==0})(),b=o.BROKEN_CARET,x=/()??/.exec(``)[1]!==void 0,S=y||x||b||u||d,C=function(e,t){for(var n=e.groups=c(null),r=0;r<t.length;r++){var i=t[r];n[i[0]]=e[i[1]]}};S&&(m=function(e){var t=this,r=l(t),o=i(e),s=r.raw,c,u,d;if(s)return s.lastIndex=t.lastIndex,c=n(m,s,o),t.lastIndex=s.lastIndex,c&&r.groups&&C(c,r.groups),c;var S=r.groups,w=b&&t.sticky,T=n(a,t),E=t.source,D=0,O=o;if(w){T=_(T,`y`,``),g(T,`g`)===-1&&(T+=`g`),O=v(o,t.lastIndex);var k=t.lastIndex>0&&h(o,t.lastIndex-1);t.lastIndex>0&&(!t.multiline||t.multiline&&k!==`
23
+ `&&k!==`\r`&&k!==`\u2028`&&k!==`\u2029`)&&(E=`(?: (?:`+E+`))`,O=` `+O,D++),u=RegExp(`^(?:`+E+`)`,T)}x&&(u=RegExp(`^`+E+`$(?!\\s)`,T)),y&&(d=t.lastIndex);var A=n(p,w?u:t,O);return w?A?(A.input=o,A[0]=v(A[0],D),A.index=t.lastIndex,t.lastIndex+=A[0].length):t.lastIndex=0:y&&A&&(t.lastIndex=t.global?A.index+A[0].length:d),x&&A&&A.length>1&&n(f,A[0],u,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===void 0&&(A[e]=void 0)}),A&&S&&C(A,S),A}),t.exports=m})),ya=o((()=>{var e=W(),t=va();e({target:`RegExp`,proto:!0,forced:/./.exec!==t},{exec:t})})),ba=o((()=>{ya();var e=W(),t=si(),n=ei(),r=oi(),i=Mi(),a=function(){var e=!1,t=/[ac]/;return t.exec=function(){return e=!0,/./.exec.apply(this,arguments)},t.test(`abc`)===!0&&e}(),o=/./.test;e({target:`RegExp`,proto:!0,forced:!a},{test:function(e){var a=r(this),s=i(e),c=a.exec;if(!n(c))return t(o,a,s);var l=t(c,a,s);return l!==null&&(r(l),!0)}})})),xa=o(((e,t)=>{var n=Qr(),r=ha(),i=_i().f,a=n(`unscopables`),o=Array.prototype;o[a]===void 0&&i(o,a,{configurable:!0,value:r(null)}),t.exports=function(e){o[a][e]=!0}})),Sa=o(((e,t)=>{t.exports=Object.create?Object.create(null):{}})),Ca=o(((e,t)=>{t.exports=!U()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})})),wa=o(((e,t)=>{var n=Kr(),r=ei(),i=Gr(),a=Ci(),o=Ca(),s=a(`IE_PROTO`),c=Object,l=c.prototype;t.exports=o?c.getPrototypeOf:function(e){var t=i(e);if(n(t,s))return t[s];var a=t.constructor;return r(a)&&t instanceof a?a.prototype:t instanceof c?l:null}})),Ta=o(((e,t)=>{var n=U(),r=ei(),i=ni(),a=ha(),o=wa(),s=Di(),c=Qr(),l=Lr(),u=c(`iterator`),d=!1,f,p,m;[].keys&&(m=[].keys(),`next`in m?(p=o(o(m)),p!==Object.prototype&&(f=p)):d=!0),!i(f)||n(function(){var e={};return f[u].call(e)!==e})?f={}:l&&(f=a(f)),r(f[u])||s(f,u,function(){return this}),t.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d}})),Ea=o(((e,t)=>{var n=_i().f,r=Kr(),i=Qr()(`toStringTag`);t.exports=function(e,t,a){e&&!a&&(e=e.prototype),e&&!r(e,i)&&n(e,i,{configurable:!0,value:t})}})),Da=o(((e,t)=>{var n=Ta().IteratorPrototype,r=ha(),i=xi(),a=Ea(),o=Sa(),s=function(){return this};t.exports=function(e,t,c,l){var u=t+` Iterator`;return e.prototype=r(n,{next:i(+!l,c)}),a(e,u,!1,!0),o[u]=s,e}})),Oa=o(((e,t)=>{var n=W(),r=si(),i=Lr(),a=vi(),o=ei(),s=Da(),c=wa(),l=aa(),u=Ea(),d=Si(),f=Di(),p=Qr(),m=Sa(),h=Ta(),g=a.PROPER,_=a.CONFIGURABLE,v=h.IteratorPrototype,y=h.BUGGY_SAFARI_ITERATORS,b=p(`iterator`),x=`keys`,S=`values`,C=`entries`,w=function(){return this};t.exports=function(e,t,a,p,h,T,E){s(a,t,p);var D=function(e){if(e===h&&M)return M;if(!y&&e&&e in A)return A[e];switch(e){case x:return function(){return new a(this,e)};case S:return function(){return new a(this,e)};case C:return function(){return new a(this,e)}}return function(){return new a(this)}},O=t+` Iterator`,k=!1,A=e.prototype,j=A[b]||A[`@@iterator`]||h&&A[h],M=!y&&j||D(h),ee=t===`Array`&&A.entries||j,N,P,F;if(ee&&(N=c(ee.call(new e)),N!==Object.prototype&&N.next&&(!i&&c(N)!==v&&(l?l(N,v):o(N[b])||f(N,b,w)),u(N,O,!0,!0),i&&(m[O]=w))),g&&h===S&&j&&j.name!==S&&(!i&&_?d(A,`name`,S):(k=!0,M=function(){return r(j,this)})),h){if(P={values:D(S),keys:T?M:D(x),entries:D(C)},E)for(F in P)(y||k||!(F in A))&&f(A,F,P[F]);else n({target:t,proto:!0,forced:y||k},P)}return(!i||E)&&A[b]!==M&&f(A,b,M,{name:h}),m[t]=M,P}})),ka=o(((e,t)=>{t.exports=function(e,t){return{value:e,done:t}}})),Aa=o(((e,t)=>{var n=zi(),r=xa(),i=Sa(),a=Ti(),o=_i().f,s=Oa(),c=ka(),l=Lr(),u=ti(),d=`Array Iterator`,f=a.set,p=a.getterFor(d);t.exports=s(Array,`Array`,function(e,t){f(this,{type:d,target:n(e),index:0,kind:t})},function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,c(void 0,!0);switch(e.kind){case`keys`:return c(n,!1);case`values`:return c(t[n],!1)}return c([n,t[n]],!1)},`values`);var m=i.Arguments=i.Array;if(r(`keys`),r(`values`),r(`entries`),!l&&u&&m.name!==`values`)try{o(m,`name`,{value:`values`})}catch{}})),ja=o(((e,t)=>{var n=Oi(),r=Hr();t.exports=function(e){if(n(e)===`Function`)return r(e)}})),Ma=o(((e,t)=>{t.exports=typeof ArrayBuffer<`u`&&typeof DataView<`u`})),Na=o(((e,t)=>{var n=Ei(),r=_i();t.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}})),Pa=o(((e,t)=>{var n=Di();t.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}})),Fa=o(((e,t)=>{var n=li(),r=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new r(`Incorrect invocation`)}})),Ia=o(((e,t)=>{var n=Hi(),r=Wi(),i=RangeError;t.exports=function(e){if(e===void 0)return 0;var t=n(e),a=r(t);if(t!==a)throw new i(`Wrong length or index`);return a}})),La=o(((e,t)=>{t.exports=Math.sign||function(e){var t=+e;return t===0||t!==t?t:t<0?-1:1}})),Ra=o(((e,t)=>{var n=4503599627370496;t.exports=function(e){return e+n-n}})),za=o(((e,t)=>{var n=La(),r=Ra(),i=Math.abs,a=2220446049250313e-31;t.exports=function(e,t,o,s){var c=+e,l=i(c),u=n(c);if(l<s)return u*r(l/s/t)*s*t;var d=(1+t/a)*l,f=d-(d-l);return f>o||f!==f?u*(1/0):u*f}})),Ba=o(((e,t)=>{var n=za(),r=1.1920928955078125e-7,i=34028234663852886e22,a=11754943508222875e-54;t.exports=Math.fround||function(e){return n(e,r,i,a)}})),Va=o(((e,t)=>{var n=Array,r=Math.abs,i=Math.pow,a=Math.floor,o=Math.log,s=Math.LN2;t.exports={pack:function(e,t,c){var l=n(c),u=c*8-t-1,d=(1<<u)-1,f=d>>1,p=t===23?i(2,-24)-i(2,-77):0,m=+(e<0||e===0&&1/e<0),h=0,g,_,v;for(e=r(e),e!==e||e===1/0?(_=e===e?0:1,g=d):(g=a(o(e)/s),v=i(2,-g),e*v<1&&(g--,v*=2),g+f>=1?e+=p/v:e+=p*i(2,1-f),e*v>=2&&(g++,v/=2),g+f>=d?(_=0,g=d):g+f>=1?(_=(e*v-1)*i(2,t),g+=f):(_=e*i(2,f-1)*i(2,t),g=0));t>=8;)l[h++]=_&255,_/=256,t-=8;for(g=g<<t|_,u+=t;u>0;)l[h++]=g&255,g/=256,u-=8;return l[h-1]|=m*128,l},unpack:function(e,t){var n=e.length,r=n*8-t-1,a=(1<<r)-1,o=a>>1,s=r-7,c=n-1,l=e[c--],u=l&127,d;for(l>>=7;s>0;)u=u*256+e[c--],s-=8;for(d=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)d=d*256+e[c--],s-=8;if(u===0)u=1-o;else if(u===a)return d?NaN:l?-1/0:1/0;else d+=i(2,t),u-=o;return(l?-1:1)*d*i(2,u-t)}}})),Ha=o(((e,t)=>{var n=Gr(),r=Ui(),i=Gi();t.exports=[].fill||function(e){for(var t=n(this),a=i(t),o=arguments.length,s=r(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=c===void 0?a:r(c,a);l>s;)t[s++]=e;return t}})),Ua=o(((e,t)=>{t.exports=Hr()([].slice)})),Wa=o(((e,t)=>{var n=H(),r=Hr(),i=ti(),a=Ma(),o=vi(),s=Si(),c=Na(),l=Pa(),u=U(),d=Fa(),f=Hi(),p=Ia(),m=Ba(),h=Va(),g=wa(),_=aa(),v=Ha(),y=Ua(),b=oa(),x=Qi(),S=Ea(),C=Ti(),w=o.PROPER,T=o.CONFIGURABLE,E=`ArrayBuffer`,D=`DataView`,O=`prototype`,k=`Wrong length`,A=`Wrong index`,j=C.getterFor(E),M=C.getterFor(D),ee=C.set,N=n[E],P=N,F=P&&P[O],I=n[D],te=I&&I[O],ne=Object.prototype,re=n.Array,ie=n.RangeError,ae=r(v),L=r([].reverse),oe=h.pack,se=h.unpack,ce=function(e){return[e&255]},le=function(e){return[e&255,e>>8&255]},ue=function(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]},de=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},fe=function(e){return oe(m(e),23,4)},pe=function(e){return oe(e,52,8)},me=function(e,t,n){c(e[O],t,{configurable:!0,get:function(){return n(this)[t]}})},he=function(e,t,n,r){var i=M(e),a=p(n),o=!!r;if(a+t>i.byteLength)throw new ie(A);var s=i.bytes,c=a+i.byteOffset,l=y(s,c,c+t);return o?l:L(l)},ge=function(e,t,n,r,i,a){var o=M(e),s=p(n),c=r(+i),l=!!a;if(s+t>o.byteLength)throw new ie(A);for(var u=o.bytes,d=s+o.byteOffset,f=0;f<t;f++)u[d+f]=c[l?f:t-f-1]};if(!a)P=function(e){d(this,F);var t=p(e);ee(this,{type:E,bytes:ae(re(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)},F=P[O],I=function(e,t,n){d(this,te),d(e,F);var r=j(e),a=r.byteLength,o=f(t);if(o<0||o>a)throw new ie(`Wrong offset`);if(n=n===void 0?a-o:p(n),o+n>a)throw new ie(k);ee(this,{type:D,buffer:e,byteLength:n,byteOffset:o,bytes:r.bytes}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=o)},te=I[O],i&&(me(P,`byteLength`,j),me(I,`buffer`,M),me(I,`byteLength`,M),me(I,`byteOffset`,M)),l(te,{getInt8:function(e){return he(this,1,e)[0]<<24>>24},getUint8:function(e){return he(this,1,e)[0]},getInt16:function(e){var t=he(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=he(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return de(he(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return de(he(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return se(he(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return se(he(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){ge(this,1,e,ce,t)},setUint8:function(e,t){ge(this,1,e,ce,t)},setInt16:function(e,t){ge(this,2,e,le,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){ge(this,2,e,le,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){ge(this,4,e,ue,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){ge(this,4,e,ue,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){ge(this,4,e,fe,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){ge(this,8,e,pe,t,arguments.length>2&&arguments[2])}});else{var _e=w&&N.name!==E;!u(function(){N(1)})||!u(function(){new N(-1)})||u(function(){return new N,new N(1.5),new N(NaN),N.length!==1||_e&&!T})?(P=function(e){return d(this,F),b(new N(p(e)),this,P)},P[O]=F,F.constructor=P,x(P,N)):_e&&T&&s(N,`name`,E),_&&g(te)!==ne&&_(te,ne);var ve=new I(new P(2)),ye=r(te.setInt8);ve.setInt8(0,2147483648),ve.setInt8(1,2147483649),(ve.getInt8(0)||!ve.getInt8(1))&&l(te,{setInt8:function(e,t){ye(this,e,t<<24>>24)},setUint8:function(e,t){ye(this,e,t<<24>>24)}},{unsafe:!0})}S(P,E),S(I,D),t.exports={ArrayBuffer:P,DataView:I}})),Ga=o((()=>{var e=W(),t=ja(),n=U(),r=Wa(),i=oi(),a=Ui(),o=Wi(),s=r.ArrayBuffer,c=r.DataView,l=c.prototype,u=t(s.prototype.slice),d=t(l.getUint8),f=t(l.setUint8);e({target:`ArrayBuffer`,proto:!0,unsafe:!0,forced:n(function(){return!new s(2).slice(1,void 0).byteLength})},{slice:function(e,t){if(u&&t===void 0)return u(i(this),e);for(var n=i(this).byteLength,r=a(e,n),l=a(t===void 0?n:t,n),p=new s(o(l-r)),m=new c(this),h=new c(p),g=0;r<l;)f(h,g++,d(m,r++));return p}})})),Ka=o(((e,t)=>{var n=Qr()(`iterator`),r=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch{}t.exports=function(e,t){try{if(!t&&!r)return!1}catch{return!1}var i=!1;try{var a={};a[n]=function(){return{next:function(){return{done:i=!0}}}},e(a)}catch{}return i}})),qa=o(((e,t)=>{var n=Ma(),r=ti(),i=H(),a=ei(),o=ni(),s=Kr(),c=ki(),l=di(),u=Si(),d=Di(),f=Na(),p=li(),m=wa(),h=aa(),g=Qr(),_=qr(),v=Ti(),y=v.enforce,b=v.get,x=i.Int8Array,S=x&&x.prototype,C=i.Uint8ClampedArray,w=C&&C.prototype,T=x&&m(x),E=S&&m(S),D=Object.prototype,O=i.TypeError,k=g(`toStringTag`),A=_(`TYPED_ARRAY_TAG`),j=`TypedArrayConstructor`,M=n&&!!h&&c(i.opera)!==`Opera`,ee=!1,N,P,F,I={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},te={BigInt64Array:8,BigUint64Array:8},ne=function(e){if(!o(e))return!1;var t=c(e);return t===`DataView`||s(I,t)||s(te,t)},re=function(e){var t=m(e);if(o(t)){var n=b(t);return n&&s(n,j)?n[j]:re(t)}},ie=function(e){if(!o(e))return!1;var t=c(e);return s(I,t)||s(te,t)},ae=function(e){if(ie(e))return e;throw new O(`Target is not a typed array`)},L=function(e){if(a(e)&&(!h||p(T,e)))return e;throw new O(l(e)+` is not a typed array constructor`)},oe=function(e,t,n,a){if(r){if(n)for(var o in I){var c=i[o];if(c&&s(c.prototype,e))try{delete c.prototype[e]}catch{try{c.prototype[e]=t}catch{}}}(!E[e]||n)&&d(E,e,n?t:M&&S[e]||t,a)}},se=function(e,t,n){var a,o;if(r){if(h){if(n){for(a in I)if(o=i[a],o&&s(o,e))try{delete o[e]}catch{}}if(!T[e]||n)try{return d(T,e,n?t:M&&T[e]||t)}catch{}else return}for(a in I)o=i[a],o&&(!o[e]||n)&&d(o,e,t)}};for(N in I)P=i[N],F=P&&P.prototype,F?y(F)[j]=P:M=!1;for(N in te)P=i[N],F=P&&P.prototype,F&&(y(F)[j]=P);if((!M||!a(T)||T===Function.prototype)&&(T=function(){throw new O(`Incorrect invocation`)},M))for(N in I)i[N]&&h(i[N],T);if((!M||!E||E===D)&&(E=T.prototype,M))for(N in I)i[N]&&h(i[N].prototype,E);if(M&&m(w)!==E&&h(w,E),r&&!s(E,k))for(N in ee=!0,f(E,k,{configurable:!0,get:function(){return o(this)?this[A]:void 0}}),I)i[N]&&u(i[N].prototype,A,N);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:M,TYPED_ARRAY_TAG:ee&&A,aTypedArray:ae,aTypedArrayConstructor:L,exportTypedArrayMethod:oe,exportTypedArrayStaticMethod:se,getTypedArrayConstructor:re,isView:ne,isTypedArray:ie,TypedArray:T,TypedArrayPrototype:E}})),Ja=o(((e,t)=>{var n=H(),r=U(),i=Ka(),a=qa().NATIVE_ARRAY_BUFFER_VIEWS,o=n.ArrayBuffer,s=n.Int8Array;t.exports=!a||!r(function(){s(1)})||!r(function(){new s(-1)})||!i(function(e){new s,new s(null),new s(1.5),new s(e)},!0)||r(function(){return new s(new o(2),1,void 0).length!==1})})),Ya=o(((e,t)=>{var n=ni(),r=Math.floor;t.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}})),Xa=o(((e,t)=>{var n=Hi(),r=RangeError;t.exports=function(e){var t=n(e);if(t<0)throw new r(`The argument can't be less than 0`);return t}})),Za=o(((e,t)=>{var n=Xa(),r=RangeError;t.exports=function(e,t){var i=n(e);if(i%t)throw new r(`Wrong offset`);return i}})),Qa=o(((e,t)=>{var n=Math.floor;t.exports=function(e){var t=+e;if(t!==t||t<=0)return 0;if(t>=255)return 255;var r=n(t);return r+.5<t?r+1:t<r+.5||r%2==0?r:r+1}})),$a=o(((e,t)=>{var n=ja(),r=fi(),i=Vr(),a=n(n.bind);t.exports=function(e,t){return r(e),t===void 0?e:i?a(e,t):function(){return e.apply(t,arguments)}}})),eo=o(((e,t)=>{var n=Hr(),r=U(),i=ei(),a=ki(),o=ci(),s=yi(),c=function(){},l=o(`Reflect`,`construct`),u=/^\s*(?:class|function)\b/,d=n(u.exec),f=!u.test(c),p=function(e){if(!i(e))return!1;try{return l(c,[],e),!0}catch{return!1}},m=function(e){if(!i(e))return!1;switch(a(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return f||!!d(u,s(e))}catch{return!0}};m.sham=!0,t.exports=!l||r(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?m:p})),to=o(((e,t)=>{var n=eo(),r=di(),i=TypeError;t.exports=function(e){if(n(e))return e;throw new i(r(e)+` is not a constructor`)}})),no=o(((e,t)=>{var n=Oi(),r=Ur(),i=pi(),a=Qr()(`iterator`),o=Array.prototype;t.exports=function(e){if(!r(e))return i(e,a)||i(e,`@@iterator`)||(n(e)===`Arguments`?o[a]:void 0)}})),ro=o(((e,t)=>{var n=si(),r=ei(),i=oi(),a=di(),o=no(),s=TypeError;t.exports=function(e,t){var c=arguments.length<2?o(e):t;if(r(c))return i(n(c,e));throw new s(a(e)+` is not iterable`)}})),io=o(((e,t)=>{var n=Qr(),r=Sa(),i=n(`iterator`),a=Array.prototype;t.exports=function(e){return e!==void 0&&(r.Array===e||a[i]===e)}})),ao=o(((e,t)=>{var n=ki();t.exports=function(e){var t=n(e);return t===`BigInt64Array`||t===`BigUint64Array`}})),oo=o(((e,t)=>{var n=hi(),r=TypeError;t.exports=function(e){var t=n(e,`number`);if(typeof t==`number`)throw new r(`Can't convert number to bigint`);return BigInt(t)}})),so=o(((e,t)=>{var n=$a(),r=si(),i=fi(),a=to(),o=Gr(),s=Gi(),c=ro(),l=no(),u=io(),d=ao(),f=qa().aTypedArrayConstructor,p=oo();t.exports=function(e){var t=a(this),m=arguments.length,h=m>1?arguments[1]:void 0,g=h!==void 0;g&&i(h);var _=o(e),v=l(_),y,b,x,S,C,w,T,E;if(v&&!u(v))for(T=c(_,v),E=T.next,_=[];!(w=r(E,T)).done;)_.push(w.value);for(g&&m>2&&(h=n(h,arguments[2])),b=s(_),x=new(f(t))(b),S=d(x),y=0;b>y;y++)C=g?h(_[y],y):_[y],x[y]=S?p(C):+C;return x}})),G=o(((e,t)=>{var n=Oi();t.exports=Array.isArray||function(e){return n(e)===`Array`}})),co=o(((e,t)=>{var n=G(),r=eo(),i=ni(),a=Qr()(`species`),o=Array;t.exports=function(e){var t;return n(e)&&(t=e.constructor,r(t)&&(t===o||n(t.prototype))?t=void 0:i(t)&&(t=t[a],t===null&&(t=void 0))),t===void 0?o:t}})),lo=o(((e,t)=>{var n=co();t.exports=function(e,t){return new(n(e))(t===0?0:t)}})),uo=o(((e,t)=>{var n=ti(),r=_i(),i=xi();t.exports=function(e,t,a){n?r.f(e,t,i(0,a)):e[t]=a}})),fo=o(((e,t)=>{var n=$a(),r=Ri(),i=Gr(),a=Gi(),o=lo(),s=uo(),c=function(e){var t=e===1,c=e===2,l=e===3,u=e===4,d=e===6,f=e===7,p=e===5||d;return function(m,h,g){for(var _=i(m),v=r(_),y=a(v),b=n(h,g),x=0,S=0,C=t?o(m,y):c||f?o(m,0):void 0,w,T;y>x;x++)if((p||x in v)&&(w=v[x],T=b(w,x,_),e)){if(t)s(C,x,T);else if(T)switch(e){case 3:return!0;case 5:return w;case 6:return x;case 2:s(C,S++,w)}else switch(e){case 4:return!1;case 7:s(C,S++,w)}}return d?-1:l||u?u:C}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}})),po=o(((e,t)=>{var n=ci(),r=Na(),i=Qr(),a=ti(),o=i(`species`);t.exports=function(e){var t=n(e);a&&t&&!t[o]&&r(t,o,{configurable:!0,get:function(){return this}})}})),mo=o(((e,t)=>{var n=Gi();t.exports=function(e,t,r){for(var i=0,a=arguments.length>2?r:n(t),o=new e(a);a>i;)o[i]=t[i++];return o}})),ho=o(((e,t)=>{var n=W(),r=H(),i=si(),a=ti(),o=Ja(),s=qa(),c=Wa(),l=Fa(),u=xi(),d=Si(),f=Ya(),p=Ia(),m=Za(),h=Qa(),g=gi(),_=Kr(),v=ki(),y=ni(),b=ui(),x=ha(),S=li(),C=aa(),w=Yi().f,T=so(),E=fo().forEach,D=po(),O=Na(),k=_i(),A=Bi(),j=mo(),M=Ti(),ee=oa(),N=M.get,P=M.set,F=M.enforce,I=k.f,te=A.f,ne=r.RangeError,re=c.ArrayBuffer,ie=re.prototype,ae=c.DataView,L=s.NATIVE_ARRAY_BUFFER_VIEWS,oe=s.TYPED_ARRAY_TAG,se=s.TypedArray,ce=s.TypedArrayPrototype,le=s.isTypedArray,ue=`BYTES_PER_ELEMENT`,de=`Wrong length`,fe=function(e,t){O(e,t,{configurable:!0,get:function(){return N(this)[t]}})},pe=function(e){var t;return S(ie,e)||(t=v(e))===`ArrayBuffer`||t===`SharedArrayBuffer`},me=function(e,t){return le(e)&&!b(t)&&t in e&&f(+t)&&t>=0},he=function(e,t){return t=g(t),me(e,t)?u(2,e[t]):te(e,t)},ge=function(e,t,n){return t=g(t),me(e,t)&&y(n)&&_(n,`value`)&&!_(n,`get`)&&!_(n,`set`)&&!n.configurable&&(!_(n,`writable`)||n.writable)&&(!_(n,`enumerable`)||n.enumerable)?(e[t]=n.value,e):I(e,t,n)};a?(L||(A.f=he,k.f=ge,fe(ce,`buffer`),fe(ce,`byteOffset`),fe(ce,`byteLength`),fe(ce,`length`)),n({target:`Object`,stat:!0,forced:!L},{getOwnPropertyDescriptor:he,defineProperty:ge}),t.exports=function(e,t,a){var s=e.match(/\d+/)[0]/8,c=e+(a?`Clamped`:``)+`Array`,u=`get`+e,f=`set`+e,g=r[c],_=g,v=_&&_.prototype,b={},S=function(e,t){var n=N(e);return n.view[u](t*s+n.byteOffset,!0)},O=function(e,t,n){var r=N(e);r.view[f](t*s+r.byteOffset,a?h(n):n,!0)},k=function(e,t){I(e,t,{get:function(){return S(this,t)},set:function(e){return O(this,t,e)},enumerable:!0})};L?o&&(_=t(function(e,t,n,r){return l(e,v),ee(function(){return y(t)?pe(t)?r===void 0?n===void 0?new g(t):new g(t,m(n,s)):new g(t,m(n,s),r):le(t)?j(_,t):i(T,_,t):new g(p(t))}(),e,_)}),C&&C(_,se),E(w(g),function(e){e in _||d(_,e,g[e])}),_.prototype=v):(_=t(function(e,t,n,r){l(e,v);var a=0,o=0,c,u,d;if(!y(t))d=p(t),u=d*s,c=new re(u);else if(pe(t)){c=t,o=m(n,s);var f=t.byteLength;if(r===void 0){if(f%s||(u=f-o,u<0))throw new ne(de)}else if(u=p(r)*s,u+o>f)throw new ne(de);d=u/s}else if(le(t))return j(_,t);else return i(T,_,t);for(P(e,{buffer:c,byteOffset:o,byteLength:u,length:d,view:new ae(c)});a<d;)k(e,a++)}),C&&C(_,se),v=_.prototype=x(ce)),v.constructor!==_&&d(v,`constructor`,_),F(v).TypedArrayConstructor=_,oe&&d(v,oe,c);var A=_!==g;b[c]=_,n({global:!0,constructor:!0,forced:A,sham:!L},b),ue in _||d(_,ue,s),ue in v||d(v,ue,s),D(c)}):t.exports=function(){}})),go=o((()=>{ho()(`Uint8`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),_o=o((()=>{var e=qa(),t=Gi(),n=Hi(),r=e.aTypedArray,i=e.exportTypedArrayMethod;i(`at`,function(e){var i=r(this),a=t(i),o=n(e),s=o>=0?o:a+o;return s<0||s>=a?void 0:i[s]})})),vo=o((()=>{_o()})),yo=o(((e,t)=>{var n=di(),r=TypeError;t.exports=function(e,t){if(!delete e[t])throw new r(`Cannot delete property `+n(t)+` of `+n(e))}})),bo=o(((e,t)=>{var n=Gr(),r=Ui(),i=Gi(),a=yo(),o=Math.min;t.exports=[].copyWithin||function(e,t){var s=n(this),c=i(s),l=r(e,c),u=r(t,c),d=arguments.length>2?arguments[2]:void 0,f=o((d===void 0?c:r(d,c))-u,c-l),p=1;for(u<l&&l<u+f&&(p=-1,u+=f-1,l+=f-1);f-->0;)u in s?s[l]=s[u]:a(s,l),l+=p,u+=p;return s}})),xo=o((()=>{var e=Hr(),t=qa(),n=e(bo()),r=t.aTypedArray,i=t.exportTypedArrayMethod;i(`copyWithin`,function(e,t){return n(r(this),e,t,arguments.length>2?arguments[2]:void 0)})})),So=o((()=>{var e=qa(),t=fo().every,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`every`,function(e){return t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),Co=o((()=>{var e=qa(),t=Ha(),n=oo(),r=ki(),i=si(),a=Hr(),o=U(),s=e.aTypedArray,c=e.exportTypedArrayMethod,l=a(``.slice);c(`fill`,function(e){var a=arguments.length;s(this);var o=l(r(this),0,3)===`Big`?n(e):+e;return i(t,this,o,a>1?arguments[1]:void 0,a>2?arguments[2]:void 0)},o(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),e!==1}))})),wo=o(((e,t)=>{var n=mo(),r=qa().getTypedArrayConstructor;t.exports=function(e,t){return n(r(e),t)}})),To=o((()=>{var e=qa(),t=fo().filter,n=wo(),r=e.aTypedArray,i=e.exportTypedArrayMethod;i(`filter`,function(e){var i=t(r(this),e,arguments.length>1?arguments[1]:void 0);return n(this,i)})})),Eo=o((()=>{var e=qa(),t=fo().find,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`find`,function(e){return t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),Do=o((()=>{var e=qa(),t=fo().findIndex,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`findIndex`,function(e){return t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),Oo=o((()=>{var e=qa(),t=fo().forEach,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`forEach`,function(e){t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),ko=o((()=>{var e=qa(),t=Ki().includes,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`includes`,function(e){return t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),Ao=o((()=>{var e=qa(),t=Ki().indexOf,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`indexOf`,function(e){return t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),jo=o((()=>{var e=H(),t=U(),n=Hr(),r=qa(),i=Aa(),a=Qr()(`iterator`),o=e.Uint8Array,s=n(i.values),c=n(i.keys),l=n(i.entries),u=r.aTypedArray,d=r.exportTypedArrayMethod,f=o&&o.prototype,p=!t(function(){f[a].call([1])}),m=!!f&&f.values&&f[a]===f.values&&f.values.name===`values`,h=function(){return s(u(this))};d(`entries`,function(){return l(u(this))},p),d(`keys`,function(){return c(u(this))},p),d(`values`,h,p||!m,{name:`values`}),d(a,h,p||!m,{name:`values`})})),Mo=o((()=>{var e=qa(),t=Hr(),n=e.aTypedArray,r=e.exportTypedArrayMethod,i=t([].join);r(`join`,function(e){return i(n(this),e)})})),No=o(((e,t)=>{var n=Vr(),r=Function.prototype,i=r.apply,a=r.call;t.exports=typeof Reflect==`object`&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})})),Po=o(((e,t)=>{var n=U();t.exports=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})}})),Fo=o(((e,t)=>{var n=No(),r=zi(),i=Hi(),a=Gi(),o=Po(),s=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,u=o(`lastIndexOf`);t.exports=l||!u?function(e){if(l)return n(c,this,arguments)||0;var t=r(this),o=a(t);if(o===0)return-1;var u=o-1;for(arguments.length>1&&(u=s(u,i(arguments[1]))),u<0&&(u=o+u);u>=0;u--)if(u in t&&t[u]===e)return u||0;return-1}:c})),Io=o((()=>{var e=qa(),t=No(),n=Fo(),r=e.aTypedArray,i=e.exportTypedArrayMethod;i(`lastIndexOf`,function(e){var i=arguments.length;return t(n,r(this),i>1?[e,arguments[1]]:[e])})})),Lo=o((()=>{var e=qa(),t=fo().map,n=wo(),r=e.aTypedArray,i=e.exportTypedArrayMethod;i(`map`,function(e){var i=t(r(this),e,arguments.length>1?arguments[1]:void 0);return n(this,i)})})),Ro=o(((e,t)=>{var n=fi(),r=Gr(),i=Ri(),a=Gi(),o=TypeError,s=`Reduce of empty array with no initial value`,c=function(e){return function(t,c,l,u){var d=r(t),f=i(d),p=a(d);if(n(c),p===0&&l<2)throw new o(s);var m=e?p-1:0,h=e?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,e?m<0:p<=m)throw new o(s)}for(;e?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};t.exports={left:c(!1),right:c(!0)}})),zo=o((()=>{var e=qa(),t=Ro().left,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`reduce`,function(e){var r=arguments.length;return t(n(this),e,r,r>1?arguments[1]:void 0)})})),Bo=o((()=>{var e=qa(),t=Ro().right,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`reduceRight`,function(e){var r=arguments.length;return t(n(this),e,r,r>1?arguments[1]:void 0)})})),Vo=o((()=>{var e=qa(),t=e.aTypedArray,n=e.exportTypedArrayMethod,r=Math.floor;n(`reverse`,function(){for(var e=this,n=t(e).length,i=r(n/2),a=0,o;a<i;)o=e[a],e[a++]=e[--n],e[n]=o;return e})})),Ho=o((()=>{var e=H(),t=si(),n=qa(),r=Gi(),i=Za(),a=Gr(),o=U(),s=e.RangeError,c=e.Int8Array,l=c&&c.prototype,u=l&&l.set,d=n.aTypedArray,f=n.exportTypedArrayMethod,p=!o(function(){var e=new Uint8ClampedArray(2);return t(u,e,{length:1,0:3},1),e[1]!==3}),m=p&&n.NATIVE_ARRAY_BUFFER_VIEWS&&o(function(){var e=new c(2);return e.set(1),e.set(`2`,1),e[0]!==0||e[1]!==2});f(`set`,function(e){d(this);var n=i(arguments.length>1?arguments[1]:void 0,1),o=a(e);if(p)return t(u,this,o,n);var c=this.length,l=r(o),f=0;if(l+n>c)throw new s(`Wrong length`);for(;f<l;)this[n+f]=o[f++]},!p||m)})),Uo=o((()=>{var e=qa(),t=U(),n=Ua(),r=e.aTypedArray,i=e.getTypedArrayConstructor,a=e.exportTypedArrayMethod;a(`slice`,function(e,t){for(var a=n(r(this),e,t),o=i(this),s=0,c=a.length,l=new o(c);c>s;)l[s]=a[s++];return l},t(function(){new Int8Array(1).slice()}))})),Wo=o((()=>{var e=qa(),t=fo().some,n=e.aTypedArray,r=e.exportTypedArrayMethod;r(`some`,function(e){return t(n(this),e,arguments.length>1?arguments[1]:void 0)})})),Go=o(((e,t)=>{var n=Ua(),r=Math.floor,i=function(e,t){var a=e.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=e[o];c&&t(e[c-1],s)>0;)e[c]=e[--c];c!==o++&&(e[c]=s)}else for(var l=r(a/2),u=i(n(e,0,l),t),d=i(n(e,l),t),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)e[m+h]=m<f&&h<p?t(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return e};t.exports=i})),Ko=o(((e,t)=>{var n=Jr().match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]})),qo=o(((e,t)=>{var n=Jr();t.exports=/MSIE|Trident/.test(n)})),Jo=o(((e,t)=>{var n=Jr().match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]})),Yo=o((()=>{var e=H(),t=ja(),n=U(),r=fi(),i=Go(),a=qa(),o=Ko(),s=qo(),c=Yr(),l=Jo(),u=a.aTypedArray,d=a.exportTypedArrayMethod,f=e.Uint16Array,p=f&&t(f.prototype.sort),m=!!p&&!(n(function(){p(new f(2),null)})&&n(function(){p(new f(2),{})})),h=!!p&&!n(function(){if(c)return c<74;if(o)return o<67;if(s)return!0;if(l)return l<602;var e=new f(516),t=Array(516),n,r;for(n=0;n<516;n++)r=n%4,e[n]=515-n,t[n]=n-2*r+3;for(p(e,function(e,t){return(e/4|0)-(t/4|0)}),n=0;n<516;n++)if(e[n]!==t[n])return!0}),g=function(e){return function(t,n){return e===void 0?n===n?t===t?t===0&&n===0?1/t>0?1/n>0?0:1:1/n>0?-1:0:t>n?1:t<n?-1:0:1:t===t?-1:0:+e(t,n)||0}};d(`sort`,function(e){return e!==void 0&&r(e),h?p(this,e):i(u(this),g(e))},!h||m)})),Xo=o((()=>{var e=qa(),t=Wi(),n=Ui(),r=e.aTypedArray,i=e.getTypedArrayConstructor,a=e.exportTypedArrayMethod;a(`subarray`,function(e,a){var o=r(this),s=o.length,c=n(e,s);return new(i(o))(o.buffer,o.byteOffset+c*o.BYTES_PER_ELEMENT,t((a===void 0?s:n(a,s))-c))})})),Zo=o((()=>{var e=H(),t=No(),n=qa(),r=U(),i=Ua(),a=e.Int8Array,o=n.aTypedArray,s=n.exportTypedArrayMethod,c=[].toLocaleString,l=!!a&&r(function(){c.call(new a(1))});s(`toLocaleString`,function(){return t(c,l?i(o(this)):o(this),i(arguments))},r(function(){return[1,2].toLocaleString()!==new a([1,2]).toLocaleString()})||!r(function(){a.prototype.toLocaleString.call([1,2])}))})),Qo=o((()=>{var e=qa().exportTypedArrayMethod,t=U(),n=H(),r=Hr(),i=n.Uint8Array,a=i&&i.prototype||{},o=[].toString,s=r([].join);t(function(){o.call({})})&&(o=function(){return s(this)});var c=a.toString!==o;e(`toString`,o,c)})),$o=o(((e,t)=>{var n=si(),r=oi(),i=pi();t.exports=function(e,t,a){var o,s;r(e);try{if(o=i(e,`return`),!o){if(t===`throw`)throw a;return a}o=n(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw a;if(s)throw o;return r(o),a}})),es=o(((e,t)=>{var n=oi(),r=$o();t.exports=function(e,t,i,a){try{return a?t(n(i)[0],i[1]):t(i)}catch(t){r(e,`throw`,t)}}})),ts=o(((e,t)=>{var n=ti(),r=G(),i=TypeError,a=Object.getOwnPropertyDescriptor;t.exports=n&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(r(e)&&!a(e,`length`).writable)throw new i(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t}})),ns=o(((e,t)=>{var n=TypeError,r=9007199254740991;t.exports=function(e){if(e>r)throw new n(`Maximum allowed index exceeded`);return e}})),rs=o(((e,t)=>{var n=$a(),r=si(),i=Gr(),a=es(),o=io(),s=eo(),c=Gi(),l=uo(),u=ts(),d=ro(),f=no(),p=$o(),m=ns(),h=Array;t.exports=function(e){var t=s(this),g=arguments.length,_=g>1?arguments[1]:void 0,v=_!==void 0;v&&(_=n(_,g>2?arguments[2]:void 0));var y=i(e),b=f(y),x=0,S,C,w,T,E,D;if(b&&!(this===h&&o(b)))for(C=t?new this:[],T=d(y,b),E=T.next;!(w=r(E,T)).done;x++){try{m(x)}catch(e){p(T,`throw`,e)}D=v?a(T,_,[w.value,x],!0):w.value;try{l(C,x,D)}catch(e){p(T,`throw`,e)}}else for(S=c(y),C=t?new this(S):h(S);S>x;x++)D=v?_(y[x],x):y[x],l(C,x,D);return u(C,x),C}})),is=o((()=>{var e=W(),t=rs();e({target:`Array`,stat:!0,forced:!Ka()(function(e){Array.from(e)})},{from:t})})),as=o(((e,t)=>{var n=Hr(),r=Hi(),i=Mi(),a=Wr(),o=n(``.charAt),s=n(``.charCodeAt),c=n(``.slice),l=function(e){return function(t,n){var l=i(a(t)),u=r(n),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=s(l,u),f<55296||f>56319||u+1===d||(p=s(l,u+1))<56320||p>57343?e?o(l,u):f:e?c(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};t.exports={codeAt:l(!1),charAt:l(!0)}})),os=o((()=>{var e=as().charAt,t=Mi(),n=Ti(),r=Oa(),i=ka(),a=`String Iterator`,o=n.set,s=n.getterFor(a);r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))})})),ss=o(((e,t)=>{var n=H(),r=U(),i=Hr(),a=Mi(),o=la().trim,s=ca(),c=n.parseInt,l=n.Symbol,u=l&&l.iterator,d=/^[+-]?0x/i,f=i(d.exec);t.exports=c(s+`08`)!==8||c(s+`0x16`)!==22||u&&!r(function(){c(Object(u))})?function(e,t){var n=o(a(e));return c(n,t>>>0||(f(d,n)?16:10))}:c})),cs=o((()=>{var e=W(),t=ss();e({target:`Number`,stat:!0,forced:Number.parseInt!==t},{parseInt:t})})),ls=o((()=>{var e=W(),t=Hr(),n=Ri(),r=zi(),i=Po(),a=t([].join);e({target:`Array`,proto:!0,forced:n!==Object||!i(`join`,`,`)},{join:function(e){return a(r(this),e===void 0?`,`:e)}})})),us=o(((e,t)=>{ya();var n=si(),r=Di(),i=va(),a=U(),o=Qr(),s=Si(),c=o(`species`),l=RegExp.prototype;t.exports=function(e,t,u,d){var f=o(e),p=!a(function(){var t={};return t[f]=function(){return 7},``[e](t)!==7}),m=p&&!a(function(){var t=!1,n=/a/;if(e===`split`){var r={};r[c]=function(){return n},n={constructor:r,flags:``},n[f]=/./[f]}return n.exec=function(){return t=!0,null},n[f](``),!t});if(!p||!m||u){var h=/./[f],g=t(f,``[e],function(e,t,r,a,o){var s=t.exec;return s===i||s===l.exec?p&&!o?{done:!0,value:n(h,t,r,a)}:{done:!0,value:n(e,r,t,a)}:{done:!1}});r(String.prototype,e,g[0]),r(l,f,g[1])}d&&s(l[f],`sham`,!0)}})),ds=o(((e,t)=>{var n=as().charAt;t.exports=function(e,t,r){return t+(r&&n(e,t).length||1)}})),fs=o(((e,t)=>{var n=si(),r=oi(),i=ei(),a=Oi(),o=va(),s=TypeError;t.exports=function(e,t){var c=e.exec;if(i(c)){var l=n(c,e,t);return l!==null&&r(l),l}if(a(e)===`RegExp`)return n(o,e,t);throw new s(`RegExp#exec called on incompatible receiver`)}})),ps=o((()=>{var e=si(),t=Hr(),n=us(),r=oi(),i=ni(),a=Wi(),o=Mi(),s=Wr(),c=pi(),l=ds(),u=Fi(),d=fs(),f=t(``.indexOf);n(`match`,function(t,n,p){return[function(n){var r=s(this),a=i(n)?c(n,t):void 0;if(a)return e(a,n,r);var l=o(r);return new RegExp(n)[t](l)},function(e){var t=r(this),i=o(e),s=p(n,t,i);if(s.done)return s.value;var c=o(u(t));if(!~f(c,`g`))return d(t,i);var m=!!~f(c,`u`)||!!~f(c,`v`);t.lastIndex=0;for(var h=[],g=0,_;(_=d(t,i))!==null;){var v=o(_[0]);h[g]=v,v===``&&(t.lastIndex=l(i,a(t.lastIndex),m)),g++}return g===0?null:h}]})})),ms=o((()=>{var e=ti(),t=vi().EXISTS,n=Hr(),r=Na(),i=Function.prototype,a=n(i.toString),o=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(o.exec);e&&!t&&r(i,`name`,{configurable:!0,get:function(){try{return s(o,a(this))[1]}catch{return``}}})})),hs=o(((e,t)=>{var n=ni(),r=Ti().get;t.exports=function(e){if(!n(e))return!1;var t=r(e);return!!t&&t.type===`RawJSON`}})),gs=o(((e,t)=>{var n=Hr(),r=Kr(),i=SyntaxError,a=parseInt,o=String.fromCharCode,s=n(``.charAt),c=n(``.slice),l=n(/./.exec),u={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
24
+ `,"\\r":`\r`,"\\t":` `},d=/^[\da-f]{4}$/i,f=/^[\u0000-\u001F]$/;t.exports=function(e,t){for(var n=!0,p=``;t<e.length;){var m=s(e,t);if(m===`\\`){var h=c(e,t,t+2);if(r(u,h))p+=u[h],t+=2;else if(h===`\\u`){t+=2;var g=c(e,t,t+4);if(!l(d,g))throw new i(`Bad Unicode escape at: `+t);p+=o(a(g,16)),t+=4}else throw new i(`Unknown escape sequence: "`+h+`"`)}else if(m===`"`){n=!1,t++;break}else{if(l(f,m))throw new i(`Bad control character in string literal at: `+t);p+=m,t++}}if(n)throw new i(`Unterminated string at: `+t);return{value:p,end:t}}})),_s=o(((e,t)=>{t.exports=!U()(function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})})),vs=o((()=>{var e=W(),t=ci(),n=si(),r=Hr(),i=U(),a=G(),o=ei(),s=ni(),c=ha(),l=hs(),u=ui(),d=Oi(),f=sa(),p=Ki().includes,m=Kr(),h=Mi(),g=gs(),_=qr(),v=Xr(),y=_s(),b=String,x=TypeError,S=t(`JSON`,`stringify`),C=t(`BigInt`),w=r(``.valueOf),T=r((!0).valueOf),E=C&&r(C.prototype.valueOf),D=r(/./.exec),O=r(``.charAt),k=r(``.charCodeAt),A=r(``.replace),j=r(``.slice),M=r([].push),ee=r([].pop),N=r(1.1.toString),P=/[\uD800-\uDFFF]/g,F=/^[\uD800-\uDBFF]$/,I=/^[\uDC00-\uDFFF]$/,te=/^\d+$/,ne=_(),re=_(),ie=_(),ae=ne.length,L=re.length,oe=!v||i(function(){var e=t(`Symbol`)(`stringify detection`);return S([e])!==`[null]`||S({a:e})!==`{}`||S(Object(e))!==`{}`}),se=i(function(){return S(`\udf06\ud834`)!==`"\\udf06\\ud834"`||S(`\udead`)!==`"\\udead"`}),ce=y?t(`JSON`,`isRawJSON`):l,le=oe?function(e,t,r){return S(e,function(e,r){var i=n(t,this,e,r);if(!u(i))return i},r)}:S,ue=function(e,t,n){var r=O(n,t-1),i=O(n,t+1);return D(F,e)&&!D(I,i)||D(I,e)&&!D(F,r)?`\\u`+N(k(e,0),16):e},de=function(e){if(a(e)){for(var t=e.length,n=[],r=c(null),i=0;i<t;i++){var o=e[i],s;if(typeof o==`string`)s=o;else if(typeof o==`number`||d(o)===`Number`||d(o)===`String`)s=h(o);else continue;m(r,s)||(r[s]=!0,M(n,s))}return n}},fe=function(e,t){try{return e(t),!0}catch{return!1}},pe=function(e){var t=d(e);return t===`Number`&&fe(f,e)||t===`String`&&fe(w,e)||t===`Boolean`&&fe(T,e)||!!E&&t===`BigInt`&&fe(E,e)},me=function(e){if(!s(e)||o(e)||a(e))return!1;try{return!pe(e)}catch{return!0}},he=function(e,t){return{toJSON:function(){var r=e[t];if(s(r)||typeof r==`bigint`){var i=r.toJSON;o(i)&&(r=n(i,r,t))}return r}}},ge=function(e){for(var t=0,n=e.length;t<n;t++)if(D(te,e[t]))return re;return``},_e=function(e,t,n){for(var r=c(null),i=0,a=t.length;i<a;i++){var o=t[i];r[n+o]=he(e,o)}return r[ie]=null,r};S&&e({target:`JSON`,stat:!0,arity:3,forced:oe||se||!y},{stringify:function(e,t,r){var i=o(t)?t:void 0,s=i?void 0:de(t),c=s&&ge(s),l=[],u=[],d=[],f,m=!1,h=!0,_=le(e,function(e,t){if(e=b(e),s){if(e===ie){ee(u),f=ee(d);return}if(h)h=!1;else if(this!==f&&!a(this)&&!p(s,e))return}else i&&(t=n(i,this,e,t));if(ce(t))return y?t:(m=!0,ne+(M(l,t.rawJSON)-1));if(s&&me(t)){if(p(u,t))throw new x(`Converting circular structure to JSON`);var r=_e(t,s,c);return M(u,t),M(d,f),f=r,c&&(m=!0),r}return t},r);if(typeof _!=`string`||(se&&(_=A(_,P,ue)),!m))return _;for(var v=``,S=_.length,C=0;C<S;C++){var w=O(_,C);if(w===`"`){var T=g(_,++C).end-1,E=j(_,C,T);j(E,0,ae)===ne?v+=l[j(E,ae)]:j(E,0,L)===re?v+=`"`+j(E,L)+`"`:v+=`"`+E+`"`,C=T}else v+=w}return v}})})),ys=o(((e,t)=>{var n=H(),r=Jr(),i=Oi(),a=function(e){return r.slice(0,e.length)===e};t.exports=(function(){return a(`Bun/`)?`BUN`:a(`Cloudflare-Workers`)?`CLOUDFLARE`:a(`Deno/`)?`DENO`:a(`Node.js/`)?`NODE`:n.Bun&&typeof Bun.version==`string`?`BUN`:n.Deno&&typeof Deno.version==`object`?`DENO`:i(n.process)===`process`?`NODE`:n.window&&n.document?`BROWSER`:`REST`})()})),bs=o(((e,t)=>{t.exports=ys()===`NODE`})),xs=o(((e,t)=>{var n=oi(),r=to(),i=Ur(),a=Qr()(`species`);t.exports=function(e,t){var o=n(e).constructor,s;return o===void 0||i(s=n(o)[a])?t:r(s)}})),Ss=o(((e,t)=>{var n=TypeError;t.exports=function(e,t){if(e<t)throw new n(`Not enough arguments`);return e}})),Cs=o(((e,t)=>{var n=Jr();t.exports=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n)})),ws=o(((e,t)=>{var n=H(),r=No(),i=$a(),a=ei(),o=Kr(),s=U(),c=ma(),l=Ua(),u=ri(),d=Ss(),f=Cs(),p=bs(),m=n.setImmediate,h=n.clearImmediate,g=n.process,_=n.Dispatch,v=n.Function,y=n.MessageChannel,b=n.String,x=0,S={},C=`onreadystatechange`,w,T,E,D;s(function(){w=n.location});var O=function(e){if(o(S,e)){var t=S[e];delete S[e],t()}},k=function(e){return function(){O(e)}},A=function(e){O(e.data)},j=function(e){n.postMessage(b(e),w.protocol+`//`+w.host)};(!m||!h)&&(m=function(e){d(arguments.length,1);var t=a(e)?e:v(e),n=l(arguments,1);return S[++x]=function(){r(t,void 0,n)},T(x),x},h=function(e){delete S[e]},p?T=function(e){g.nextTick(k(e))}:_&&_.now?T=function(e){_.now(k(e))}:y&&!f?(E=new y,D=E.port2,E.port1.onmessage=A,T=i(D.postMessage,D)):n.addEventListener&&a(n.postMessage)&&!n.importScripts&&w&&w.protocol!==`file:`&&!s(j)?(T=j,n.addEventListener(`message`,A,!1)):T=C in u(`script`)?function(e){c.appendChild(u(`script`))[C]=function(){c.removeChild(this),O(e)}}:function(e){setTimeout(k(e),0)}),t.exports={set:m,clear:h}})),Ts=o(((e,t)=>{var n=H(),r=ti(),i=Object.getOwnPropertyDescriptor;t.exports=function(e){if(!r)return n[e];var t=i(n,e);return t&&t.value}})),Es=o(((e,t)=>{var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}},t.exports=n})),Ds=o(((e,t)=>{var n=Jr();t.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<`u`})),Os=o(((e,t)=>{var n=Jr();t.exports=/web0s(?!.*chrome)/i.test(n)})),ks=o(((e,t)=>{var n=H(),r=Ts(),i=$a(),a=ws().set,o=Es(),s=Cs(),c=Ds(),l=Os(),u=bs(),d=n.MutationObserver||n.WebKitMutationObserver,f=n.document,p=n.process,m=n.Promise,h=r(`queueMicrotask`),g,_,v,y,b;if(!h){var x=new o,S=function(){var e,t;for(u&&(e=p.domain)&&e.exit();t=x.get();)try{t()}catch(e){throw x.head&&g(),e}e&&e.enter()};!s&&!u&&!l&&d&&f?(_=!0,v=f.createTextNode(``),new d(S).observe(v,{characterData:!0}),g=function(){v.data=_=!_}):!c&&m&&m.resolve?(y=m.resolve(void 0),y.constructor=m,b=i(y.then,y),g=function(){b(S)}):u?g=function(){p.nextTick(S)}:(a=i(a,n),g=function(){a(S)}),h=function(e){x.head||g(),x.add(e)}}t.exports=h})),As=o(((e,t)=>{t.exports=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}}})),js=o(((e,t)=>{t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}})),Ms=o(((e,t)=>{t.exports=H().Promise})),Ns=o(((e,t)=>{var n=H(),r=Ms(),i=ei(),a=$i(),o=yi(),s=Qr(),c=ys(),l=Lr(),u=Yr(),d=r&&r.prototype,f=s(`species`),p=!1,m=i(n.PromiseRejectionEvent);t.exports={CONSTRUCTOR:a(`Promise`,function(){var e=o(r),t=e!==String(r);if(!t&&u===66||l&&!(d.catch&&d.finally))return!0;if(!u||u<51||!/native code/.test(e)){var n=new r(function(e){e(1)}),i=function(e){e(function(){},function(){})},a=n.constructor={};if(a[f]=i,p=n.then(function(){})instanceof i,!p)return!0}return!t&&(c===`BROWSER`||c===`DENO`)&&!m}),REJECTION_EVENT:m,SUBCLASSING:p}})),Ps=o(((e,t)=>{var n=fi(),r=TypeError,i=function(e){var t,i;this.promise=new e(function(e,n){if(t!==void 0||i!==void 0)throw new r(`Bad Promise constructor`);t=e,i=n}),this.resolve=n(t),this.reject=n(i)};t.exports.f=function(e){return new i(e)}})),Fs=o((()=>{var e=W(),t=Lr(),n=bs(),r=H(),i=ta(),a=si(),o=Di(),s=aa(),c=Ea(),l=po(),u=fi(),d=ei(),f=ni(),p=Fa(),m=xs(),h=ws().set,g=ks(),_=As(),v=js(),y=Es(),b=Ti(),x=Ms(),S=Ns(),C=Ps(),w=`Promise`,T=S.CONSTRUCTOR,E=S.REJECTION_EVENT,D=S.SUBCLASSING,O=b.getterFor(w),k=b.set,A=x&&x.prototype,j=x,M=A,ee=r.TypeError,N=r.document,P=r.process,F=C.f,I=F,te=!!(N&&N.createEvent&&r.dispatchEvent),ne=`unhandledrejection`,re=`rejectionhandled`,ie=0,ae=1,L=2,oe=1,se=2,ce,le,ue,de,fe=function(e){var t;return f(e)&&d(t=e.then)?t:!1},pe=function(e,t){var n=t.value,r=t.state===ae,i=r?e.ok:e.fail,o=e.resolve,s=e.reject,c=e.domain,l,u,d;try{i?(r||(t.rejection===se&&ve(t),t.rejection=oe),i===!0?l=n:(c&&c.enter(),l=i(n),c&&(c.exit(),d=!0)),l===e.promise?s(new ee(`Promise-chain cycle`)):(u=fe(l))?a(u,l,o,s):o(l)):s(n)}catch(e){c&&!d&&c.exit(),s(e)}},me=function(e,t){e.notified||(e.notified=!0,g(function(){for(var n=e.reactions,r;r=n.get();)pe(r,e);e.notified=!1,t&&!e.rejection&&ge(e)}))},he=function(e,t,n){var i,a;te?(i=N.createEvent(`Event`),i.promise=t,i.reason=n,i.initEvent(e,!1,!0),r.dispatchEvent(i)):i={promise:t,reason:n},!E&&(a=r[`on`+e])?a(i):e===ne&&_(`Unhandled promise rejection`,n)},ge=function(e){a(h,r,function(){var t=e.facade,r=e.value,i=_e(e),a;if(i&&(a=v(function(){n?P.emit(`unhandledRejection`,r,t):he(ne,t,r)}),e.rejection=n||_e(e)?se:oe,a.error))throw a.value})},_e=function(e){return e.rejection!==oe&&!e.parent},ve=function(e){a(h,r,function(){var t=e.facade;n?P.emit(`rejectionHandled`,t):he(re,t,e.value)})},ye=function(e,t,n){return function(r){e(t,r,n)}},be=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=L,me(e,!0))},xe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new ee(`Promise can't be resolved itself`);var r=fe(t);r?g(function(){var n={done:!1};try{a(r,t,ye(xe,n,e),ye(be,n,e))}catch(t){be(n,t,e)}}):(e.value=t,e.state=ae,me(e,!1))}catch(t){be({done:!1},t,e)}}};if(T&&(j=function(e){p(this,M),u(e),a(ce,this);var t=O(this);try{e(ye(xe,t),ye(be,t))}catch(e){be(t,e)}},M=j.prototype,ce=function(e){k(this,{type:w,done:!1,notified:!1,parent:!1,reactions:new y,rejection:!1,state:ie,value:null})},ce.prototype=o(M,`then`,function(e,t){var r=O(this),i=F(m(this,j));return r.parent=!0,i.ok=!d(e)||e,i.fail=d(t)&&t,i.domain=n?P.domain:void 0,r.state===ie?r.reactions.add(i):g(function(){pe(i,r)}),i.promise}),le=function(){var e=new ce,t=O(e);this.promise=e,this.resolve=ye(xe,t),this.reject=ye(be,t)},C.f=F=function(e){return e===j||e===ue?new le(e):I(e)},!t&&d(x)&&A!==Object.prototype)){de=A.then,D||o(A,`then`,function(e,t){var n=this;return new j(function(e,t){a(de,n,e,t)}).then(e,t)},{unsafe:!0});try{delete A.constructor}catch{}s&&s(A,M)}e({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:j}),ue=i.Promise,c(j,w,!1,!0),l(w)})),Is=o(((e,t)=>{var n=$a(),r=si(),i=oi(),a=di(),o=io(),s=Gi(),c=li(),l=ro(),u=no(),d=$o(),f=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;t.exports=function(e,t,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=n(t,g),S,C,w,T,E,D,O,k=function(e){var t=S;return S=void 0,t&&d(t,`normal`),new p(!0,e)},A=function(e){return _?(i(e),b?x(e[0],e[1],k):x(e[0],e[1])):b?x(e,k):x(e)};if(v)S=e.iterator;else if(y)S=e;else{if(C=u(e),!C)throw new f(a(e)+` is not iterable`);if(o(C)){for(w=0,T=s(e);T>w;w++)if(E=A(e[w]),E&&c(m,E))return E;return new p(!1)}S=l(e,C)}for(D=v?e.next:S.next;!(O=r(D,S)).done;){var j=O.value;try{E=A(j)}catch(e){if(S)d(S,`throw`,e);else throw e}if(typeof E==`object`&&E&&c(m,E))return E}return new p(!1)}})),Ls=o(((e,t)=>{var n=Ms(),r=Ka();t.exports=Ns().CONSTRUCTOR||!r(function(e){n.all(e).then(void 0,function(){})})})),Rs=o((()=>{var e=W(),t=si(),n=fi(),r=Ps(),i=js(),a=Is();e({target:`Promise`,stat:!0,forced:Ls()},{all:function(e){var o=this,s=r.f(o),c=s.resolve,l=s.reject,u=i(function(){var r=n(o.resolve),i=[],s=0,u=1;a(e,function(e){var n=s++,a=!1;u++,t(r,o,e).then(function(e){a||(a=!0,i[n]=e,--u||c(i))},l)}),--u||c(i)});return u.error&&l(u.value),s.promise}})})),zs=o((()=>{var e=W(),t=Lr(),n=Ns().CONSTRUCTOR,r=Ms(),i=ci(),a=ei(),o=Di(),s=r&&r.prototype;if(e({target:`Promise`,proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&a(r)){var c=i(`Promise`).prototype.catch;s.catch!==c&&o(s,`catch`,c,{unsafe:!0})}})),Bs=o((()=>{var e=W(),t=si(),n=fi(),r=Ps(),i=js(),a=Is();e({target:`Promise`,stat:!0,forced:Ls()},{race:function(e){var o=this,s=r.f(o),c=s.reject,l=i(function(){var r=n(o.resolve);a(e,function(e){t(r,o,e).then(s.resolve,c)})});return l.error&&c(l.value),s.promise}})})),Vs=o((()=>{var e=W(),t=Ps(),n=Ns().CONSTRUCTOR;e({target:`Promise`,stat:!0,forced:n},{reject:function(e){var n=t.f(this),r=n.reject;return r(e),n.promise}})})),Hs=o(((e,t)=>{var n=oi(),r=ni(),i=Ps();t.exports=function(e,t){if(n(e),r(t)&&t.constructor===e)return t;var a=i.f(e),o=a.resolve;return o(t),a.promise}})),Us=o((()=>{var e=W(),t=ci(),n=Lr(),r=Ms(),i=Ns().CONSTRUCTOR,a=Hs(),o=t(`Promise`),s=n&&!i;e({target:`Promise`,stat:!0,forced:n||i},{resolve:function(e){return a(s&&this===o?r:this,e)}})})),Ws=o((()=>{Fs(),Rs(),zs(),Bs(),Vs(),Us()})),Gs=o(((e,t)=>{var n=ni(),r=Oi(),i=Qr()(`match`);t.exports=function(e){var t;return n(e)&&((t=e[i])===void 0?r(e)===`RegExp`:!!t)}})),Ks=o(((e,t)=>{var n=_i().f;t.exports=function(e,t,r){r in e||n(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}})),qs=o((()=>{var e=ti(),t=H(),n=Hr(),r=$i(),i=oa(),a=Si(),o=ha(),s=Yi().f,c=li(),l=Gs(),u=Mi(),d=Fi(),f=da(),p=Ks(),m=Di(),h=U(),g=Kr(),_=Ti().enforce,v=po(),y=Qr(),b=ga(),x=_a(),S=y(`match`),C=t.RegExp,w=C.prototype,T=t.SyntaxError,E=n(w.exec),D=n(``.charAt),O=n(``.replace),k=n(``.indexOf),A=n(``.slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,ee=/a/g,N=new C(M)!==M,P=f.MISSED_STICKY,F=f.UNSUPPORTED_Y,I=e&&(!N||P||b||x||h(function(){return ee[S]=!1,C(M)!==M||C(ee)===ee||String(C(M,`i`))!==`/a/i`})),te=function(e){for(var t=e.length,n=0,r=``,i=!1,a;n<t;n++){if(a=D(e,n),a===`\\`){r+=a+D(e,++n);continue}!i&&a===`.`?r+=`[\\s\\S]`:(a===`[`?i=!0:a===`]`&&(i=!1),r+=a)}return r},ne=function(e){for(var t=e.length,n=0,r=``,i=[],a=o(null),s=!1,c=!1,l=0,u=``,d;n<t;n++){if(d=D(e,n),d===`\\`){if(d+=D(e,++n),!c&&D(d,1)===`\\`){r+=`\\x5c`;continue}}else if(d===`]`)s=!1;else if(!s)switch(!0){case d===`[`:s=!0;break;case d===`(`:r+=d,E(j,A(e,n+1))?(n+=2,c=!0,l++):D(e,n+1)!==`?`&&l++;continue;case d===`>`&&c:if(u===``||g(a,u))throw new T(`Invalid capture group name`);a[u]=!0,i[i.length]=[u,l],c=!1,u=``;continue}c?u+=d:r+=d}for(var f=0;f<i.length;f++)for(var p=`\\k<`+i[f][0]+`>`,m=`\\`+i[f][1];k(r,p)>-1;)r=O(r,p,m);return[r,i]};if(r(`RegExp`,I)){for(var re=function(e,t){var n=c(w,this),r=l(e),o=t===void 0,s=[],f=e,p,m,h,g,v,y;if(!n&&r&&o&&e.constructor===re)return e;if((r||c(w,e))&&(e=e.source,o&&(t=d(f))),e=e===void 0?``:u(e),t=t===void 0?``:u(t),f=e,b&&`dotAll`in M&&(m=!!t&&k(t,`s`)>-1,m&&(t=O(t,/s/g,``))),p=t,P&&`sticky`in M&&(h=!!t&&k(t,`y`)>-1,h&&F&&(t=O(t,/y/g,``))),x&&(g=ne(e),e=g[0],s=g[1]),v=i(C(e,t),n?this:w,re),(m||h||s.length)&&(y=_(v),m&&(y.dotAll=!0,y.raw=re(te(e),p)),h&&(y.sticky=!0),s.length&&(y.groups=s)),e!==f)try{a(v,`source`,f===``?`(?:)`:f)}catch{}return v},ie=s(C),ae=0;ie.length>ae;)p(re,C,ie[ae++]);w.constructor=re,re.prototype=w,m(t,`RegExp`,re,{constructor:!0})}v(`RegExp`)})),Js=o((()=>{var e=ti(),t=da().MISSED_STICKY,n=Oi(),r=Na(),i=Ti().get,a=RegExp.prototype,o=TypeError;e&&t&&r(a,`sticky`,{configurable:!0,get:function(){if(this!==a){if(n(this)===`RegExp`)return!!i(this).sticky;throw new o(`Incompatible receiver, RegExp required`)}}})})),Ys=o(((e,t)=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}})),Xs=o(((e,t)=>{var n=ri()(`span`).classList,r=n&&n.constructor&&n.constructor.prototype;t.exports=r===Object.prototype?void 0:r})),Zs=o(((e,t)=>{var n=fo().forEach;t.exports=Po()(`forEach`)?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})),Qs=o((()=>{var e=H(),t=Ys(),n=Xs(),r=Zs(),i=Si(),a=function(e){if(e&&e.forEach!==r)try{i(e,`forEach`,r)}catch{e.forEach=r}};for(var o in t)t[o]&&a(e[o]&&e[o].prototype);a(n)})),$s=o(((e,t)=>{var n=U(),r=Qr(),i=Yr(),a=r(`species`);t.exports=function(e){return i>=51||!n(function(){var t=[],n=t.constructor={};return n[a]=function(){return{foo:1}},t[e](Boolean).foo!==1})}})),ec=o((()=>{var e=W(),t=fo().filter;e({target:`Array`,proto:!0,forced:!$s()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),tc=o((()=>{var e=W(),t=Gr(),n=fa();e({target:`Object`,stat:!0,forced:U()(function(){n(1)})},{keys:function(e){return n(t(e))}})})),nc=o((()=>{var e=W(),t=fo().findIndex,n=xa(),r=`findIndex`,i=!0;r in[]&&[,][r](function(){i=!1}),e({target:`Array`,proto:!0,forced:i},{findIndex:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r)})),rc=o((()=>{var e=W(),t=Gr(),n=Ui(),r=Hi(),i=Gi(),a=ts(),o=ns(),s=lo(),c=uo(),l=yo(),u=$s()(`splice`),d=Math.max,f=Math.min;e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(a(y,v),_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}})})),ic=o((()=>{var e=W(),t=G(),n=eo(),r=ni(),i=Ui(),a=Gi(),o=zi(),s=uo(),c=ts(),l=Qr(),u=$s(),d=Ua(),f=u(`slice`),p=l(`species`),m=Array,h=Math.max;e({target:`Array`,proto:!0,forced:!f},{slice:function(e,l){var u=o(this),f=a(u),g=i(e,f),_=i(l===void 0?f:l,f),v,y,b;if(t(u)&&(v=u.constructor,n(v)&&(v===m||t(v.prototype))?v=void 0:r(v)&&(v=v[p],v===null&&(v=void 0)),v===m||v===void 0))return d(u,g,_);for(y=new(v===void 0?m:v)(h(_-g,0)),b=0;g<_;g++,b++)g in u&&s(y,b,u[g]);return c(y,b),y}})})),ac=o((()=>{var e=W(),t=fo().find,n=xa(),r=`find`,i=!0;r in[]&&[,][r](function(){i=!1}),e({target:`Array`,proto:!0,forced:i},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r)})),oc=o(((e,t)=>{var n=Gs(),r=TypeError;t.exports=function(e){if(n(e))throw new r(`The method doesn't accept regular expressions`);return e}})),sc=o(((e,t)=>{var n=Qr()(`match`);t.exports=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[n]=!1,`/./`[e](t)}catch{}}return!1}})),cc=o((()=>{var e=W(),t=ja(),n=Bi().f,r=Wi(),i=Mi(),a=oc(),o=Wr(),s=sc(),c=Lr(),l=t(``.slice),u=Math.min,d=s(`endsWith`);e({target:`String`,proto:!0,forced:!(!c&&!d&&function(){var e=n(String.prototype,`endsWith`);return e&&!e.writable}())&&!d},{endsWith:function(e){var t=i(o(this));a(e);var n=i(e),s=arguments.length>1?arguments[1]:void 0,c=t.length,d=s===void 0?c:u(r(s),c);return l(t,d-n.length,d)===n}})})),lc=o((()=>{var e=W(),t=Ki().includes,n=U(),r=xa(),i=n(function(){return![,].includes()}),a=n(function(){return[,1].includes(void 0,1)});e({target:`Array`,proto:!0,forced:i||a},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`)})),uc=o((()=>{var e=W(),t=Hr(),n=oc(),r=Wr(),i=Mi(),a=sc(),o=t(``.indexOf);e({target:`String`,proto:!0,forced:!a(`includes`)},{includes:function(e){return!!~o(i(r(this)),i(n(e)),arguments.length>1?arguments[1]:void 0)}})})),dc=o((()=>{var e=W(),t=ja(),n=Bi().f,r=Wi(),i=Mi(),a=oc(),o=Wr(),s=sc(),c=Lr(),l=t(``.slice),u=Math.min,d=s(`startsWith`);e({target:`String`,proto:!0,forced:!(!c&&!d&&function(){var e=n(String.prototype,`startsWith`);return e&&!e.writable}())&&!d},{startsWith:function(e){var t=i(o(this));a(e);var n=i(e),s=r(u(arguments.length>1?arguments[1]:void 0,t.length));return l(t,s,s+n.length)===n}})})),fc=o((()=>{ho()(`Int8`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),pc=o((()=>{ho()(`Int16`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),mc=o((()=>{ho()(`Int32`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),hc=o((()=>{ho()(`Uint16`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),gc=o((()=>{ho()(`Uint32`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),_c=o((()=>{ho()(`Float32`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),vc=o((()=>{ho()(`Float64`,function(e){return function(t,n,r){return e(this,t,n,r)}})})),yc=o((()=>{var e=W(),t=fo().map;e({target:`Array`,proto:!0,forced:!$s()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})})),bc=o(((e,t)=>{var n=ti(),r=Hr(),i=si(),a=U(),o=fa(),s=Xi(),c=Li(),l=Gr(),u=Ri(),d=Object.assign,f=Object.defineProperty,p=r([].concat);t.exports=!d||a(function(){if(n&&d({b:1},d(f({},`a`,{enumerable:!0,get:function(){f(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol(`assign detection`),i=`abcdefghijklmnopqrst`;return e[r]=7,i.split(``).forEach(function(e){t[e]=e}),d({},e)[r]!==7||o(d({},t)).join(``)!==i})?function(e,t){for(var r=l(e),a=arguments.length,d=1,f=s.f,m=c.f;a>d;)for(var h=u(arguments[d++]),g=f?p(o(h),f(h)):o(h),_=g.length,v=0,y;_>v;)y=g[v++],(!n||i(m,h,y))&&(r[y]=h[y]);return r}:d})),xc=o((()=>{var e=W(),t=bc();e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t})})),Sc=o((()=>{var e=W(),t=ja(),n=Ki().indexOf,r=Po(),i=t([].indexOf),a=!!i&&1/i([1],1,-0)<0;e({target:`Array`,proto:!0,forced:a||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return a?i(this,e,t)||0:n(this,e,t)}})})),Cc=o((()=>{var e=H(),t=Ys(),n=Xs(),r=Aa(),i=Si(),a=Ea(),o=Qr()(`iterator`),s=r.values,c=function(e,n){if(e){if(e[o]!==s)try{i(e,o,s)}catch{e[o]=s}if(a(e,n,!0),t[n]){for(var c in r)if(e[c]!==r[c])try{i(e,c,r[c])}catch{e[c]=r[c]}}}};for(var l in t)c(e[l]&&e[l].prototype,l);c(n,`DOMTokenList`)})),wc=o((()=>{var e=W(),t=H(),n=Wa(),r=po(),i=`ArrayBuffer`,a=n[i],o=t[i];e({global:!0,constructor:!0,forced:o!==a},{ArrayBuffer:a}),r(i)})),Tc=o((()=>{var e=W(),t=qa(),n=t.NATIVE_ARRAY_BUFFER_VIEWS;e({target:`ArrayBuffer`,stat:!0,forced:!n},{isView:t.isView})})),Ec=o(((e,t)=>{var n=H();t.exports=function(e,t){var r=n[e],i=r&&r.prototype;return i&&i[t]}})),Dc=o((()=>{var e=W(),t=si(),n=Ec()(`URL`,`toString`);e({target:`URL`,proto:!0,enumerable:!0},{toJSON:function(){return t(n,this)}})})),Oc=o(((e,t)=>{var n=ti(),r=U(),i=Hr(),a=wa(),o=fa(),s=zi(),c=Li().f,l=i(c),u=i([].push),d=n&&r(function(){var e=Object.create(null);return e[2]=2,!l(e,2)}),f=function(e){return function(t){for(var r=s(t),i=o(r),c=d&&a(r)===null,f=i.length,p=0,m=[],h;f>p;)h=i[p++],(!n||(c?h in r:l(r,h)))&&u(m,e?[h,r[h]]:r[h]);return m}};t.exports={entries:f(!0),values:f(!1)}})),kc=o((()=>{var e=W(),t=Oc().entries;e({target:`Object`,stat:!0},{entries:function(e){return t(e)}})})),Ac=o((()=>{W()({target:`Number`,stat:!0},{isInteger:Ya()})})),jc=o((()=>{var e=W(),t=U(),n=Gr(),r=wa(),i=Ca();e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}})})),Mc=o((()=>{var e=W(),t=ss();e({global:!0,forced:parseInt!==t},{parseInt:t})}));ji(),Ii(),ea(),ua(),ya(),ba(),Aa(),Ga(),go(),vo(),xo(),So(),Co(),To(),Eo(),Do(),Oo(),ko(),Ao(),jo(),Mo(),Io(),Lo(),zo(),Bo(),Vo(),Ho(),Uo(),Wo(),Yo(),Xo(),Zo(),Qo(),is(),os(),cs(),ls(),ps(),ms(),vs(),Ws(),qs(),Js(),Qs(),ec(),tc(),nc(),rc(),ic(),ac(),cc(),lc(),uc(),dc(),fc(),pc(),mc(),hc(),gc(),_c(),vc(),yc(),xc(),Sc(),Cc(),wc(),Tc(),Dc(),kc(),Ac(),jc(),Mc();var K=function(){function e(){}return e.Boolean=`Boolean`,e.Number=`Number`,e.String=`String`,e.Array=`Array`,e.Tuple=`Tuple`,e.Enum=`Enum`,e.Any=`Any`,e.Literal=`Literal`,e.Object=`Object`,e.Interface=`Interface`,e.Buffer=`Buffer`,e.IndexedAccess=`IndexedAccess`,e.Reference=`Reference`,e.Keyof=`Keyof`,e.Union=`Union`,e.Intersection=`Intersection`,e.NonNullable=`NonNullable`,e.Date=`Date`,e.Pick=`Pick`,e.Partial=`Partial`,e.Omit=`Omit`,e.Overwrite=`Overwrite`,e.Custom=`Custom`,e}(),Nc=function(e,t){return Nc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Nc(e,t)};function Pc(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Nc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var q=function(){return q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},q.apply(this,arguments)};function Fc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ic(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function Lc(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Rc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zc=function(){};function Bc(e,t){switch(t){case`none`:return{debug:zc,log:zc,warn:zc,error:zc};case`error`:return{debug:zc,log:zc,warn:zc,error:e.error.bind(e)};case`warn`:return{debug:zc,log:zc,warn:e.warn.bind(e),error:e.error.bind(e)};case`info`:return{debug:zc,log:e.log.bind(e),warn:e.warn.bind(e),error:e.error.bind(e)};case`debug`:return e;default:throw Error(`Invalid logLevel: '${t}'`)}}var Vc;(function(e){e.NetworkError=`NetworkError`,e.ServerError=`ServerError`,e.ClientError=`ClientError`,e.ApiError=`ApiError`})(Vc||={});var Hc={ServerInputData:{type:K.Interface,properties:[{id:0,name:`serviceId`,type:{type:K.Number,scalarType:`uint`}},{id:1,name:`buffer`,type:{type:K.Buffer,arrayType:`Uint8Array`}},{id:2,name:`sn`,type:{type:K.Number,scalarType:`uint`},optional:!0}]},ServerOutputData:{type:K.Interface,properties:[{id:0,name:`buffer`,type:{type:K.Buffer,arrayType:`Uint8Array`},optional:!0},{id:1,name:`error`,type:{type:K.Reference,target:`TsrpcErrorData`},optional:!0},{id:2,name:`serviceId`,type:{type:K.Number,scalarType:`uint`},optional:!0},{id:3,name:`sn`,type:{type:K.Number,scalarType:`uint`},optional:!0}]},TsrpcErrorData:{type:K.Interface,properties:[{id:0,name:`message`,type:{type:K.String}},{id:1,name:`type`,type:{type:K.Reference,target:`TsrpcErrorType`}},{id:2,name:`code`,type:{type:K.Union,members:[{id:0,type:{type:K.String}},{id:1,type:{type:K.Number,scalarType:`int`}}]},optional:!0}],indexSignature:{keyType:`String`,type:{type:K.Any}}},TsrpcErrorType:{type:K.Enum,members:[{id:0,value:`NetworkError`},{id:1,value:`ServerError`},{id:2,value:`ClientError`},{id:3,value:`ApiError`}]}},Uc=function(){function e(e,t){typeof e==`string`?(this.message=e,this.type=t?.type??Vc.ApiError,q(this,t)):q(this,e)}return e.prototype.toString=function(){return`[TSRPC ${this.type}]: ${this.message}`},e.Type=Vc,e}(),Wc=function(){function e(e){this._schemaWithUuids=[],this._unionPropertiesCache={},this._flatInterfaceSchemaCache={},this._parseMappedTypeCache=new WeakMap,this.proto=e}return e.prototype.parseReference=function(e){if(e.type===K.Reference){var t=this.proto[e.target];if(!t)throw Error(`Cannot find reference target: ${e.target}`);return this.isTypeReference(t)?this.parseReference(t):t}if(e.type===K.IndexedAccess){if(!this.isInterface(e.objectType))throw Error(`Error objectType: ${e.objectType.type}`);var n=this.getFlatInterfaceSchema(e.objectType),r=n.properties.find(function(t){return t.name===e.index}),i=void 0;if(r)i=r.type;else if(n.indexSignature)i=n.indexSignature.type;else throw Error(`Error index: ${e.index}`);return r&&r.optional&&(r.type.type!==K.Union||r.type.members.findIndex(function(e){return e.type.type===K.Literal&&e.type.literal===void 0})===-1)&&(i={type:K.Union,members:[{id:0,type:i},{id:1,type:{type:K.Literal,literal:void 0}}]}),this.isTypeReference(i)?this.parseReference(i):i}if(e.type===K.Keyof){var a=this.getFlatInterfaceSchema(e.target);return{type:K.Union,members:a.properties.map(function(e,t){return{id:t,type:{type:K.Literal,literal:e.name}}})}}return e},e.prototype.isInterface=function(e,t){if(t===void 0&&(t=!1),!t&&this.isTypeReference(e)){var n=this.parseReference(e);return this.isInterface(n,t)}return e.type===K.Interface||this.isMappedType(e)&&this.parseMappedType(e).type===K.Interface},e.prototype.isMappedType=function(e){return e.type===K.Pick||e.type===K.Partial||e.type===K.Omit||e.type===K.Overwrite},e.prototype.isTypeReference=function(e){return e.type===K.Reference||e.type===K.IndexedAccess||e.type===K.Keyof},e.prototype._getSchemaUuid=function(e){var t=e;return t.uuid||=this._schemaWithUuids.push(t),t.uuid},e.prototype.getUnionProperties=function(e){var t=this._getSchemaUuid(e);return this._unionPropertiesCache[t]||(this._unionPropertiesCache[t]=this._addUnionProperties([],e.members.map(function(e){return e.type}))),this._unionPropertiesCache[t]},e.prototype._addUnionProperties=function(e,t){for(var n=0,r=t.length;n<r;++n){var i=this.parseReference(t[n]);if(this.isInterface(i)){var a=this.getFlatInterfaceSchema(i);if(a.properties.forEach(function(t){e.binaryInsert(t.name,!0)}),a.indexSignature){var o=`[[${a.indexSignature.keyType}]]`;e.binaryInsert(o,!0)}}else i.type===K.Intersection||i.type===K.Union?this._addUnionProperties(e,i.members.map(function(e){return e.type})):this.isMappedType(i)&&this._addUnionProperties(e,[this.parseMappedType(i)])}return e},e.prototype.applyUnionProperties=function(e,t){for(var n=q(q({},e),{properties:e.properties.slice()}),r=function(t){t===`[[String]]`?n.indexSignature=n.indexSignature||{keyType:K.String,type:{type:K.Any}}:t===`[[Number]]`?n.indexSignature=n.indexSignature||{keyType:K.Number,type:{type:K.Any}}:e.properties.find(function(e){return e.name===t})||n.properties.push({id:-1,name:t,optional:!0,type:{type:K.Any}})},i=0,a=t;i<a.length;i++){var o=a[i];r(o)}return n},e.prototype.getFlatInterfaceSchema=function(e){var t=this._getSchemaUuid(e);if(this._flatInterfaceSchemaCache[t])return this._flatInterfaceSchemaCache[t];if(this.isTypeReference(e)){var n=this.parseReference(e);if(n.type!==K.Interface)throw Error(`Cannot flatten non interface type: ${n.type}`);this._flatInterfaceSchemaCache[t]=this.getFlatInterfaceSchema(n)}else if(e.type===K.Interface)this._flatInterfaceSchemaCache[t]=this._flattenInterface(e);else if(this.isMappedType(e))this._flatInterfaceSchemaCache[t]=this._flattenMappedType(e);else throw Error(`Invalid interface type: `+e.type);return this._flatInterfaceSchemaCache[t]},e.prototype._flattenInterface=function(e){var t={},n;if(e.properties)for(var r=0,i=e.properties;r<i.length;r++){var a=i[r];t[a.name]={optional:a.optional,type:a.type}}if(e.indexSignature&&(n=e.indexSignature),e.extends)for(var o=0,s=e.extends;o<s.length;o++){var c=s[o],l=this.parseReference(c.type);if(this.isMappedType(l)&&(l=this._flattenMappedType(l)),!this.isInterface(l))throw Error(`SchemaError: extends must from interface but from `+l.type);var u=this.getFlatInterfaceSchema(l);if(u.properties)for(var d=0,f=u.properties;d<f.length;d++){var a=f[d];t[a.name]||(t[a.name]={optional:a.optional,type:a.type})}u.indexSignature&&!n&&(n=u.indexSignature)}return{type:K.Interface,properties:Object.entries(t).map(function(e,t){return{id:t,name:e[0],optional:e[1].optional,type:e[1].type}}),indexSignature:n}},e.prototype._flattenMappedType=function(e){var t=this.isTypeReference(e.target)?this.parseReference(e.target):e.target,n;if(t.type===K.Pick||t.type===K.Partial||t.type===K.Omit||t.type===K.Overwrite)n=this._flattenMappedType(t);else if(t.type===K.Interface)n=this._flattenInterface(t);else throw Error(`Invalid target.type: ${t.type}`);if(e.type===K.Pick){for(var r=[],i=function(e){var t=n.properties.find(function(t){return t.name===e});t?r.push({id:r.length,name:e,optional:t.optional,type:t.type}):n.indexSignature&&r.push({id:r.length,name:e,type:n.indexSignature.type})},a=0,o=e.keys;a<o.length;a++){var s=o[a];i(s)}return{type:K.Interface,properties:r}}if(e.type===K.Partial){for(var c=0,l=n.properties;c<l.length;c++){var u=l[c];u.optional=!0}return n}if(e.type===K.Omit){for(var d=function(e){n.properties.removeOne(function(t){return t.name===e})},f=0,p=e.keys;f<p.length;f++){var s=p[f];d(s)}return n}if(e.type===K.Overwrite){var m=this.getFlatInterfaceSchema(e.overwrite);m.indexSignature&&(n.indexSignature=m.indexSignature);for(var h=function(e){n.properties.removeOne(function(t){return t.name===e.name}),n.properties.push(e)},g=0,_=m.properties;g<_.length;g++){var v=_[g];h(v)}return n}throw Error(`Unknown type: ${e.type}`)},e.prototype.parseMappedType=function(e){var t=this._parseMappedTypeCache.get(e);if(t)return t;var n=[],r=e;do n.push(r),r=this.parseReference(r.target);while(this.isMappedType(r));if(r.type===K.Interface)return this._parseMappedTypeCache.set(e,r),r;if(r.type===K.Union||r.type===K.Intersection){var i={type:r.type,members:r.members.map(function(e){for(var t=e.type,r=n.length-1;r>-1;--r){var i=n[r];i.isJsonEncodable,i.isJsonDecodable;var a=Fc(i,[`isJsonEncodable`,`isJsonDecodable`]);t=q(q({},a),{target:t})}return{id:e.id,type:t}})};return this._parseMappedTypeCache.set(e,i),i}throw Error(`Unsupported pattern ${e.type}<${r.type}>`)},e}(),Gc,J;(function(e){e.TypeError=`TypeError`,e.InvalidScalarType=`InvalidScalarType`,e.TupleOverLength=`TupleOverLength`,e.InvalidEnumValue=`InvalidEnumValue`,e.InvalidLiteralValue=`InvalidLiteralValue`,e.MissingRequiredProperty=`MissingRequiredProperty`,e.ExcessProperty=`ExcessProperty`,e.InvalidNumberKey=`InvalidNumberKey`,e.UnionTypesNotMatch=`UnionTypesNotMatch`,e.UnionMembersNotMatch=`UnionMembersNotMatch`,e.CustomError=`CustomError`})(J||={});var Kc=(Gc={},Gc[J.TypeError]=function(e,t){return`Expected type to be \`${e}\`, actually \`${t}\`.`},Gc[J.InvalidScalarType]=function(e,t){return`\`${e}\` is not a valid \`${t}\`.`},Gc[J.TupleOverLength]=function(e,t){return`Value has ${e} elements but schema allows only ${t}.`},Gc[J.InvalidEnumValue]=function(e){return`\`${e}\` is not a valid enum member.`},Gc[J.InvalidLiteralValue]=function(e,t){return`Expected to equals \`${qc(e)}\`, actually \`${qc(t)}\``},Gc[J.MissingRequiredProperty]=function(e){return`Missing required property \`${e}\`.`},Gc[J.ExcessProperty]=function(e){return`Excess property \`${e}\` should not exists.`},Gc[J.InvalidNumberKey]=function(e){return`\`${e}\` is not a valid key, the key here should be a \`number\`.`},Gc[J.UnionTypesNotMatch]=function(e,t){return`\`${qc(e)}\` is not matched to \`${t.join(` | `)}\``},Gc[J.UnionMembersNotMatch]=function(e){return`No union member matched, detail:
25
+ ${e.map(function(e,t){return` <${t}> ${e.errMsg}`}).join(`
26
+ `)}`},Gc[J.CustomError]=function(e){return e},Gc);function qc(e){if(typeof e==`string`){var t=JSON.stringify(e);return`'`+t.substr(1,t.length-2)+`'`}return JSON.stringify(e)}for(var Jc=function(){function e(e){this.isSucc=!1,this.error=e}return Object.defineProperty(e.prototype,"errMsg",{get:function(){return e.getErrMsg(this.error)},enumerable:!1,configurable:!0}),e.getErrMsg=function(e){var t=Kc[e.type].apply(Kc,e.params);return e.inner?.property.length?`Property \`${e.inner.property.join(`.`)}\`: ${t}`:t},e}(),Y=function(){function e(){}return e.error=function(e){return new Jc({type:e,params:[...arguments].slice(1)})},e.innerError=function(e,t,n,r){var i;return r.error.inner?typeof e==`string`?r.error.inner.property.unshift(e):(i=r.error.inner.property).unshift.apply(i,e):r.error.inner={property:typeof e==`string`?[e]:e,value:t,schema:n},r},e.succ={isSucc:!0},e}(),Yc={Int8Array,Int16Array,Int32Array,BigInt64Array:typeof BigInt64Array<`u`?BigInt64Array:void 0,Uint8Array,Uint16Array,Uint32Array,BigUint64Array:typeof BigUint64Array<`u`?BigUint64Array:void 0,Float32Array,Float64Array},Xc=function(){function e(e,t){this.options={excessPropertyChecks:!0,strictNullChecks:!1,cloneProto:!0},t&&(this.options=q(q({},this.options),t)),this.proto=this.options.cloneProto?Object.merge({},e):e,this.protoHelper=new Wc(this.proto)}return e.prototype.validate=function(e,t,n){var r,i;if(typeof t==`string`){if(i=t,r=this.proto[i],!r)throw Error(`Cannot find schema: ${i}`)}else r=t;return this._validate(e,r,q(q({},n),{excessPropertyChecks:n?.excessPropertyChecks??this.options.excessPropertyChecks,strictNullChecks:n?.strictNullChecks??this.options.strictNullChecks}))},e.prototype._validate=function(e,t,n){var r;switch(t.type){case K.Boolean:r=this._validateBooleanType(e,t);break;case K.Number:r=this._validateNumberType(e,t);break;case K.String:r=this._validateStringType(e,t);break;case K.Array:r=this._validateArrayType(e,t,n);break;case K.Tuple:r=this._validateTupleType(e,t,n);break;case K.Enum:r=this._validateEnumType(e,t);break;case K.Any:r=this._validateAnyType(e);break;case K.Literal:r=this._validateLiteralType(e,t,n?.strictNullChecks??this.options.strictNullChecks);break;case K.Object:r=this._validateObjectType(e,t);break;case K.Interface:r=this._validateInterfaceType(e,t,n);break;case K.Buffer:r=this._validateBufferType(e,t);break;case K.IndexedAccess:case K.Reference:case K.Keyof:r=this._validateReferenceType(e,t,n);break;case K.Union:r=this._validateUnionType(e,t,n);break;case K.Intersection:r=this._validateIntersectionType(e,t,n);break;case K.Pick:case K.Omit:case K.Partial:case K.Overwrite:r=this._validateMappedType(e,t,n);break;case K.Date:r=this._validateDateType(e);break;case K.NonNullable:r=this._validateNonNullableType(e,t,n);break;case K.Custom:var i=t.validate(e);r=i.isSucc?Y.succ:Y.error(J.CustomError,i.errMsg);break;default:throw Error(`Unsupported schema type: ${t.type}`)}return n?.prune&&(n.prune.output===void 0&&(n.prune.output=e),n.prune.parent&&(n.prune.parent.value[n.prune.parent.key]=n.prune.output)),r},e.prototype.prune=function(e,t,n){var r=typeof t==`string`?this.proto[t]:t;if(!r)throw Error(`Cannot find schema: `+t);var i={},a=this._validate(e,r,q(q({},n),{prune:i,excessPropertyChecks:!1,strictNullChecks:n?.strictNullChecks??this.options.strictNullChecks}));return a.isSucc&&(a.pruneOutput=i.output),a},e.prototype._validateBooleanType=function(e,t){var n=this._getTypeof(e);return n===`boolean`?Y.succ:Y.error(J.TypeError,`boolean`,n)},e.prototype._validateNumberType=function(e,t){var n=t.scalarType||`double`,r=this._getTypeof(e),i=n.indexOf(`big`)>-1?`bigint`:`number`;return r===i?n!==`double`&&r===`number`&&!Number.isInteger(e)||n.indexOf(`uint`)>-1&&e<0?Y.error(J.InvalidScalarType,e,n):Y.succ:Y.error(J.TypeError,i,r)},e.prototype._validateStringType=function(e,t){var n=this._getTypeof(e);return n===`string`?Y.succ:Y.error(J.TypeError,`string`,n)},e.prototype._validateArrayType=function(e,t,n){var r=this._getTypeof(e);if(r!==K.Array)return Y.error(J.TypeError,K.Array,r);var i=n.prune;i&&(i.output=Array.from({length:e.length}));for(var a=0;a<e.length;++a){var o=this._validate(e[a],t.elementType,q(q({},n),{prune:i?.output?{parent:{value:i.output,key:a}}:void 0}));if(!o.isSucc)return Y.innerError(``+a,e[a],t.elementType,o)}return Y.succ},e.prototype._validateTupleType=function(e,t,n){var r=this._getTypeof(e);if(r!==K.Array)return Y.error(J.TypeError,K.Array,r);var i=n.prune;if(!i&&n.excessPropertyChecks&&e.length>t.elementTypes.length)return Y.error(J.TupleOverLength,e.length,t.elementTypes.length);i&&(i.output=Array.from({length:Math.min(e.length,t.elementTypes.length)}));for(var a=0;a<t.elementTypes.length;++a){if(e[a]===void 0||e[a]===null&&!n.strictNullChecks){var o=this._canBeNull(t.elementTypes[a]),s=t.optionalStartIndex!==void 0&&a>=t.optionalStartIndex||this._canBeUndefined(t.elementTypes[a]);if(s||!n.strictNullChecks&&o){i?.output&&(e[a]===null&&o||e[a]===void 0&&!s&&o)&&(i.output[a]=null);continue}return Y.error(J.MissingRequiredProperty,a)}var c=this._validate(e[a],t.elementTypes[a],{prune:i?.output?{parent:{value:i.output,key:a}}:void 0,strictNullChecks:n.strictNullChecks,excessPropertyChecks:n.excessPropertyChecks});if(!c.isSucc)return Y.innerError(``+a,e[a],t.elementTypes[a],c)}return Y.succ},e.prototype._canBeUndefined=function(e){var t=this;return e.type===K.Union?e.members.some(function(e){return t._canBeUndefined(e.type)}):e.type===K.Literal&&e.literal===void 0},e.prototype._canBeNull=function(e){var t=this;return e.type===K.Union?e.members.some(function(e){return t._canBeNull(e.type)}):e.type===K.Literal&&e.literal===null},e.prototype._validateEnumType=function(e,t){var n=this._getTypeof(e);return n!==`string`&&n!==`number`?Y.error(J.TypeError,`string | number`,n):t.members.some(function(t){return t.value===e})?Y.succ:Y.error(J.InvalidEnumValue,e)},e.prototype._validateAnyType=function(e){return Y.succ},e.prototype._validateLiteralType=function(e,t,n){return!n&&(t.literal===null||t.literal===void 0)?e==null?Y.succ:Y.error(J.InvalidLiteralValue,t.literal,e):e===t.literal?Y.succ:Y.error(J.InvalidLiteralValue,t.literal,e)},e.prototype._validateObjectType=function(e,t){var n=this._getTypeof(e);return n===`Object`||n===`Array`?Y.succ:Y.error(J.TypeError,`Object`,n)},e.prototype._validateInterfaceType=function(e,t,n){var r=this._getTypeof(e);if(r!==`Object`)return Y.error(J.TypeError,`Object`,r);var i=this.protoHelper.getFlatInterfaceSchema(t);return n.unionProperties&&(i=this.protoHelper.applyUnionProperties(i,n.unionProperties)),this._validateFlatInterface(e,i,n)},e.prototype._validateMappedType=function(e,t,n){var r=this.protoHelper.parseMappedType(t);if(r.type===K.Interface)return this._validateInterfaceType(e,t,n);if(r.type===K.Union)return this._validateUnionType(e,r,n);if(r.type===K.Intersection)return this._validateIntersectionType(e,r,n);throw Error(`Invalid ${t.type} target type: ${r.type}`)},e.prototype._validateFlatInterface=function(e,t,n){if(t.indexSignature&&t.indexSignature.keyType===K.Number){for(var r in e)if(!this._isNumberKey(r))return Y.error(J.InvalidNumberKey,r)}var i=n.prune;if(i&&(i.output={}),!i&&n.excessPropertyChecks&&!t.indexSignature){var a=t.properties.map(function(e){return e.name}),o=Object.keys(e).find(function(e){return a.indexOf(e)===-1});if(o)return Y.error(J.ExcessProperty,o)}if(t.properties)for(var s=0,c=t.properties;s<c.length;s++){var l=c[s];if(e[l.name]===void 0||e[l.name]===null&&!n.strictNullChecks){var u=this._canBeNull(l.type),d=l.optional||this._canBeUndefined(l.type);if(d||!n.strictNullChecks&&u){i?.output&&(e[l.name]===null&&u||e[l.name]===void 0&&!d&&u)&&(i.output[l.name]=null);continue}return Y.error(J.MissingRequiredProperty,l.name)}var f=this._validate(e[l.name],l.type,{prune:i?.output&&l.id>-1?{parent:{value:i.output,key:l.name}}:void 0,strictNullChecks:n.strictNullChecks,excessPropertyChecks:n.excessPropertyChecks});if(!f.isSucc)return Y.innerError(l.name,e[l.name],l.type,f)}if(t.indexSignature)for(var r in e){var f=this._validate(e[r],t.indexSignature.type,{prune:i?.output?{parent:{value:i.output,key:r}}:void 0,strictNullChecks:n.strictNullChecks,excessPropertyChecks:n.excessPropertyChecks});if(!f.isSucc)return Y.innerError(r,e[r],t.indexSignature.type,f)}return Y.succ},e.prototype._validateBufferType=function(e,t){var n=this._getTypeof(e);if(n!==`Object`)return Y.error(J.TypeError,t.arrayType||`ArrayBuffer`,n);if(t.arrayType){var r=Yc[t.arrayType];if(!r)throw Error(`Error TypedArray type: ${t.arrayType}`);return e instanceof r?Y.succ:Y.error(J.TypeError,t.arrayType,e?.constructor?.name)}return e instanceof ArrayBuffer?Y.succ:Y.error(J.TypeError,`ArrayBuffer`,e?.constructor?.name)},e.prototype._validateReferenceType=function(e,t,n){return this._validate(e,this.protoHelper.parseReference(t),n)},e.prototype._validateUnionType=function(e,t,n){var r=this;n.unionProperties=n.unionProperties||this.protoHelper.getUnionProperties(t);var i=!1,a=n.prune;a&&e&&Object.getPrototypeOf(e)===Object.prototype&&(i=!0,a.output={});for(var o=!1,s=[],c=0;c<t.members.length;++c){var l=t.members[c],u=this.protoHelper.isTypeReference(l.type)?this.protoHelper.parseReference(l.type):l.type,d=a?{}:void 0,f=this._validate(e,u,q(q({},n),{prune:d}));if(f.isSucc){if(o=!0,i)a.output=q(q({},a.output),d.output);else break}else s.push(f)}if(o)return Y.succ;var p=s[0].errMsg;if(s.every(function(e){return e.errMsg===p}))return s[0];var m=s.filter(function(e){return e.error.type!==J.InvalidLiteralValue});if(m.length===1)return m[0];if(s.every(function(e){return!e.error.inner&&(e.error.type===J.TypeError||e.error.type===J.InvalidLiteralValue)})){var h=this._getTypeof(e),g=s.map(function(e){return e.error.type===J.TypeError?e.error.params[0]:r._getTypeof(e.error.params[0])}).distinct();if(g.indexOf(h)===-1)return Y.error(J.TypeError,g.join(` | `),this._getTypeof(e));if(h!==`Object`&&h!==K.Array){var _=s.map(function(e){return e.error.type===J.TypeError?e.error.params[0]:qc(e.error.params[0])}).distinct();return Y.error(J.UnionTypesNotMatch,e,_)}}return Y.error(J.UnionMembersNotMatch,s)},e.prototype._validateIntersectionType=function(e,t,n){n.unionProperties=n.unionProperties||this.protoHelper.getUnionProperties(t);var r=!1,i=n.prune;i&&e&&Object.getPrototypeOf(e)===Object.prototype&&(i.output={},r=!0);for(var a=0,o=t.members.length;a<o;++a){var s=t.members[a].type;s=this.protoHelper.isTypeReference(s)?this.protoHelper.parseReference(s):s;var c=i?{}:void 0,l=this._validate(e,s,q(q({},n),{prune:c}));if(!l.isSucc)return l;r&&(i.output=q(q({},i.output),c.output))}return Y.succ},e.prototype._validateDateType=function(e){return e instanceof Date?Y.succ:Y.error(J.TypeError,`Date`,this._getTypeof(e))},e.prototype._validateNonNullableType=function(e,t,n){var r=this._getTypeof(e);return(r===`null`||r===`undefined`)&&t.target.type!==`Any`?Y.error(J.TypeError,`NonNullable`,r):this._validate(e,t.target,n)},e.prototype._isNumberKey=function(e){var t=parseInt(e);return!(isNaN(t)||``+t!==e)},e.prototype._getTypeof=function(e){var t=typeof e;return t===`object`?e===null?`null`:Array.isArray(e)?K.Array:`Object`:t},e}(),Zc=function(){function e(){}return e.bufferToBase64=function(e){if(typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);for(var t=``,n=e.length,r=0;r<n;r+=3)t+=Qc[e[r]>>2],t+=Qc[(e[r]&3)<<4|e[r+1]>>4],t+=Qc[(e[r+1]&15)<<2|e[r+2]>>6],t+=Qc[e[r+2]&63];return n%3==2?t=t.substring(0,t.length-1)+`=`:n%3==1&&(t=t.substring(0,t.length-2)+`==`),t},e.base64ToBuffer=function(e){if(typeof Buffer<`u`)return new Uint8Array(Buffer.from(e,`base64`));var t=e.length*.75,n=e.length,r=0,i,a,o,s;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);for(var c=new Uint8Array(t),l=0;l<n;l+=4)i=$c[e.charCodeAt(l)],a=$c[e.charCodeAt(l+1)],o=$c[e.charCodeAt(l+2)],s=$c[e.charCodeAt(l+3)],c[r++]=i<<2|a>>4,c[r++]=(a&15)<<4|o>>2,c[r++]=(o&3)<<6|s&63;return c},e}(),Qc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,$c=typeof Uint8Array>`u`?[]:new Uint8Array(256),el=0;el<Qc.length;el++)$c[Qc.charCodeAt(el)]=el;var tl=function(){function e(){}return e.isJsonCompatible=function(e,t,n){var r=t===`encode`?`isJsonEncodable`:`isJsonDecodable`,i=e[r];if(i!==void 0)return i;var a=new Set,o=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if(s(r)===!1)return!1}return!0},s=function(e){if(a.has(e))return!0;a.add(e);var t;switch(e.type){case K.Array:t=s(e.elementType);break;case K.Tuple:t=o(e.elementTypes);break;case K.Interface:var r=n.getFlatInterfaceSchema(e);t=o(Rc(Rc([],r.properties.map(function(e){return e.type}),!0),r.indexSignature?[r.indexSignature.type]:[],!0));break;case K.IndexedAccess:case K.Reference:var i=n.parseReference(e);t=s(i);break;case K.Union:case K.Intersection:t=o(e.members.map(function(e){return e.type}));break;case K.NonNullable:t=s(e.target);break;case K.Pick:case K.Partial:case K.Omit:case K.Overwrite:var i=n.parseMappedType(e);if(i.type===K.Interface){var r=n.getFlatInterfaceSchema(e);t=o(Rc(Rc([],r.properties.map(function(e){return e.type}),!0),r.indexSignature?[r.indexSignature.type]:[],!0))}else if(i.type===K.Union||i.type===K.Intersection)t=o(i.members.map(function(e){return e.type}));else throw Error(`不应该走到这里`+i.type);break;case K.Custom:case K.Date:case K.Buffer:t=!1;break;default:t=!0}return a.delete(e),t},c=s(e);return e[r]=c,c},e}(),nl=function(){function e(){}return e.getPayloadLengthInfo=function(e,t){switch(e.type){case K.Boolean:case K.Enum:return{lengthType:X.Varint};case K.Number:return!e.scalarType||e.scalarType.includes(`64`)||e.scalarType===`double`?{lengthType:X.Bit64}:e.scalarType&&e.scalarType.startsWith(`big`)?{lengthType:X.LengthDelimited}:{lengthType:X.Varint};case K.Buffer:case K.String:case K.Any:case K.Object:return{lengthType:X.LengthDelimited};case K.Interface:case K.Pick:case K.Partial:case K.Omit:case K.Union:case K.Intersection:return{lengthType:X.IdBlock};case K.Array:case K.Overwrite:case K.Tuple:return{lengthType:X.LengthDelimited,needLengthPrefix:!0};case K.Literal:return{lengthType:X.LengthDelimited,needLengthPrefix:!1};case K.Date:return{lengthType:X.Varint};case K.NonNullable:return this.getPayloadLengthInfo(t.parseReference(e.target),t);case K.Custom:return{lengthType:X.LengthDelimited};default:throw Error(`Unrecognized schema type: ${e.type}`)}},e}(),X;(function(e){e[e.LengthDelimited=0]=`LengthDelimited`,e[e.Varint=1]=`Varint`,e[e.Bit64=2]=`Bit64`,e[e.IdBlock=3]=`IdBlock`})(X||={});var rl=function(){function e(){}return e.canBeLiteral=function(e,t){var n=this;return e.type===K.Union?e.members.some(function(e){return n.canBeLiteral(e.type,t)}):e.type===K.Any||e.type===K.Literal&&e.literal===t},e}(),il={Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array},al=typeof Buffer<`u`&&Buffer.from&&Buffer.prototype.write?{measureLength:function(e){return Buffer.byteLength(e,`utf-8`)},write:function(e,t,n){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).write(e,n,`utf-8`)},read:function(e,t,n){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString(`utf-8`,t,t+n)}}:{measureLength:function(e){for(var t=0,n=0,r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320?(++r,t+=4):t+=3;return t},write:function(e,t,n){for(var r=n,i,a,o=0;o<e.length;++o)i=e.charCodeAt(o),i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=i&63|128):(i&64512)==55296&&((a=e.charCodeAt(o+1))&64512)==56320?(i=65536+((i&1023)<<10)+(a&1023),++o,t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128);return n-r},read:function(e,t,n){if(n<1)return``;for(var r=``,i=t,a=t+n;i<a;){var o=e[i++];if(o<=127)r+=String.fromCharCode(o);else if(o>=192&&o<224)r+=String.fromCharCode((o&31)<<6|e[i++]&63);else if(o>=224&&o<240)r+=String.fromCharCode((o&15)<<12|(e[i++]&63)<<6|e[i++]&63);else if(o>=240){var s=((o&7)<<18|(e[i++]&63)<<12|(e[i++]&63)<<6|e[i++]&63)-65536;r+=String.fromCharCode(55296+(s>>10)),r+=String.fromCharCode(56320+(s&1023))}}return r}},ol=function(){function e(e,t,n){this.uint32s=new Uint32Array([e,t]),n!==void 0&&(this._byteLength=n)}return e.from=function(t){if(t===0)return this.Zero;var n=t<0;n&&(t=-t);var r=t>>>0,i=(t-r)/4294967296>>>0;return n&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new e(i,r)},e.prototype.toNumber=function(e){if(!e&&this.uint32s[0]>>>31){var t=~this.uint32s[1]+1>>>0,n=~this.uint32s[0]>>>0;return t||(n=n+1>>>0),-(t+n*4294967296)}return this.uint32s[1]+this.uint32s[0]*4294967296},e.prototype.zzEncode=function(){var e=this.uint32s[0]>>31;return this.uint32s[0]=((this.uint32s[0]<<1|this.uint32s[1]>>>31)^e)>>>0,this.uint32s[1]=(this.uint32s[1]<<1^e)>>>0,this},e.prototype.zzDecode=function(){var e=-(this.uint32s[1]&1);return this.uint32s[1]=((this.uint32s[1]>>>1|this.uint32s[0]<<31)^e)>>>0,this.uint32s[0]=(this.uint32s[0]>>>1^e)>>>0,this},Object.defineProperty(e.prototype,"byteLength",{get:function(){if(this._byteLength===void 0){var e=this.uint32s[1],t=(this.uint32s[1]>>>28|this.uint32s[0]<<4)>>>0,n=this.uint32s[0]>>>24;this._byteLength=n===0?t===0?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}return this._byteLength},enumerable:!1,configurable:!0}),e.prototype.writeToBuffer=function(e,t){for(;this.uint32s[0];)e[t++]=this.uint32s[1]&127|128,this.uint32s[1]=(this.uint32s[1]>>>7|this.uint32s[0]<<25)>>>0,this.uint32s[0]>>>=7;for(;this.uint32s[1]>127;)e[t++]=this.uint32s[1]&127|128,this.uint32s[1]=this.uint32s[1]>>>7;return e[t++]=this.uint32s[1],t},e.readFromBuffer=function(t,n){var r=n,i=0,a=0,o=0;if(t.byteLength-n>4){for(;o<4;++o)if(a=(a|(t[n]&127)<<o*7)>>>0,t[n++]<128)return new e(i,a,n-r);if(a=(a|(t[n]&127)<<28)>>>0,i=(i|(t[n]&127)>>4)>>>0,t[n++]<128)return new e(i,a,n-r);o=0}else{for(;o<3;++o){if(n>=t.byteLength)throw Error(`Read varint error: index out of range`);if(a=(a|(t[n]&127)<<o*7)>>>0,t[n++]<128)return new e(i,a,n-r)}return a=(a|(t[n++]&127)<<o*7)>>>0,new e(i,a,n-r)}if(t.byteLength-n>4){for(;o<5;++o)if(i=(i|(t[n]&127)<<o*7+3)>>>0,t[n++]<128)return new e(i,a,n-r)}else for(;o<5;++o){if(n>=t.byteLength)throw Error(`Read varint error: index out of range`);if(i=(i|(t[n]&127)<<o*7+3)>>>0,t[n++]<128)return new e(i,a,n-r)}throw Error(`invalid varint encoding`)},e.Zero=new e(0,0),e}(),sl=function(){function e(){this._pos=0}return e.prototype.load=function(e,t){t===void 0&&(t=0),this._buf=e,this._pos=t,this._view=new DataView(e.buffer)},e.prototype.readVarint=function(){var e=ol.readFromBuffer(this._buf,this._pos);return this._pos+=e.byteLength,e},e.prototype.readUint=function(){return this.readVarint().toNumber(!0)},e.prototype.readInt=function(){return this.readVarint().zzDecode().toNumber()},e.prototype.readDouble=function(){var e=this._pos;return this._pos+=8,this._view.getFloat64(this._buf.byteOffset+e)},e.prototype.readString=function(){var e=this.readUint(),t=al.read(this._buf,this._pos,e);return this._pos+=e,t},e.prototype.readBuffer=function(){var e=this.readUint(),t=this._buf.subarray(this._pos,this._pos+e);return this._pos+=e,t},e.prototype.skip=function(e){this._pos+=e},e.prototype.skipByLengthType=function(e){if(e===X.Bit64)this._pos+=8;else if(e===X.Varint)this.readVarint();else if(e===X.LengthDelimited){var t=this.readUint();this._pos+=t}else if(e===X.IdBlock)this.skipIdBlock();else throw Error(`Unknown lengthType: `+e)},e.prototype.skipIdBlock=function(){for(var e=this.readUint(),t=0;t<e;++t){var n=this.readUint()&3;this.skipByLengthType(n)}},e.prototype.readBoolean=function(){var e=this._view.getUint8(this._buf.byteOffset+this._pos++);if(e===255)return!0;if(e===0)return!1;throw Error(`Invalid boolean encoding [${e}] at pos ${this._pos-1}`)},Object.defineProperty(e.prototype,"unreadByteLength",{get:function(){return this._buf.byteLength-this._pos},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._buf=this._view=void 0},e}(),cl=function(){function e(e){this._options=e,this._reader=new sl,this._validator=e.validator}return e.prototype.decode=function(e,t){return this._reader.load(e),this._read(t)},e.prototype.decodeJSON=function(e,t){var n=this;if(e===null||tl.isJsonCompatible(t,`decode`,this._validator.protoHelper))return e;switch(t.type){case K.Array:if(!Array.isArray(e))break;return e.map(function(e){return n.decodeJSON(e,t.elementType)});case K.Tuple:if(!Array.isArray(e))break;return e.map(function(e,r){return n.decodeJSON(e,t.elementTypes[r])});case K.Interface:if(e.constructor!==Object)break;e=Object.assign({},e);var r=this._validator.protoHelper.getFlatInterfaceSchema(t),i=function(t){var n=r.properties.find(function(e){return e.name===t});n?e[t]=a.decodeJSON(e[t],n.type):r.indexSignature&&(e[t]=a.decodeJSON(e[t],r.indexSignature.type))},a=this;for(var o in e)i(o);return e;case K.Date:if(typeof e!=`string`&&typeof e!=`number`)break;return new Date(e);case K.Partial:case K.Pick:case K.Omit:case K.Overwrite:var s=this._validator.protoHelper.parseMappedType(t);if(s.type===K.Interface){if(e.constructor!==Object)break;e=Object.assign({},e);var c=this._validator.protoHelper.getFlatInterfaceSchema(t),l=function(t){var n=c.properties.find(function(e){return e.name===t});n?e[t]=u.decodeJSON(e[t],n.type):c.indexSignature&&(e[t]=u.decodeJSON(e[t],c.indexSignature.type))},u=this;for(var o in e)l(o);return e}if(s.type===K.Union||s.type===K.Intersection){for(var d=0,f=s.members;d<f.length;d++){var p=f[d];e=this.decodeJSON(e,p.type)}return e}break;case K.Buffer:if(typeof e!=`string`)break;var m=Zc.base64ToBuffer(e);return this._getBufferValue(m,t);case K.IndexedAccess:case K.Reference:case K.Keyof:return this.decodeJSON(e,this._validator.protoHelper.parseReference(t));case K.Union:case K.Intersection:for(var h=0,g=t.members;h<g.length;h++){var p=g[h];e=this.decodeJSON(e,p.type)}return e;case K.NonNullable:return this.decodeJSON(e,t.target);case K.Custom:if(t.decodeJSON)return t.decodeJSON(e);break;default:t.type}return e},e.prototype._read=function(e){switch(e.type){case K.Boolean:return this._reader.readBoolean();case K.Number:return this._readNumber(e);case K.String:return this._reader.readString();case K.Array:for(var t=[],n=this._reader.readUint(),r=0;r<n;++r){var i=this._read(e.elementType);t.push(i)}return t;case K.Tuple:if(e.elementTypes.length>64)throw Error(`Elements oversized, maximum supported tuple elements is 64, now get `+e.elementTypes.length);for(var t=[],a=this._reader.readVarint(),o=[],r=0;r<32;++r)a.uint32s[1]&1<<r&&o.push(r);for(var r=0;r<32;++r)a.uint32s[0]&1<<r&&o.push(r+32);if(!o.length)return[];for(var s=o.last(),r=0,c=0,l=o[0];r<=s;++r)r===l?(t[r]=this._read(e.elementTypes[r]),++c,l=o[c]):t[r]=void 0;for(var r=0;r<e.elementTypes.length;++r)this._undefinedAsNull(t[r],e.elementTypes[r],e.optionalStartIndex!==void 0&&r>=e.optionalStartIndex)&&(t[r]=null);return t;case K.Enum:var u=this._reader.readVarint().toNumber(),d=e.members.find(function(e){return e.id===u});if(!d)throw Error(`Invalid enum encoding: unexpected id ${u}`);return d.value;case K.Any:case K.Object:var f=this._reader.readString();return f===`undefined`?void 0:JSON.parse(f);case K.Literal:return e.literal;case K.Interface:return this._readInterface(e);case K.Buffer:var p=this._reader.readBuffer();return this._getBufferValue(p,e);case K.IndexedAccess:case K.Reference:case K.Keyof:return this._read(this._validator.protoHelper.parseReference(e));case K.Partial:case K.Pick:case K.Omit:case K.Overwrite:var m=this._validator.protoHelper.parseMappedType(e);return m.type===K.Interface?this._readPureMappedType(e):this._readUnionOrIntersection(m);case K.Union:case K.Intersection:return this._readUnionOrIntersection(e);case K.Date:return new Date(this._reader.readUint());case K.NonNullable:return this._read(e.target);case K.Custom:if(!e.decode)throw Error(`Missing decode method for CustomTypeSchema`);var h=this._reader.readBuffer();return e.decode(h);default:throw Error(`Unrecognized schema type: ${e.type}`)}},e.prototype._readPureMappedType=function(e){var t,n;e.type===`Overwrite`&&(n=this._read(e.overwrite));var r=this._validator.protoHelper.parseReference(e.target);if(r.type===`Interface`)t=this._readInterface(r);else if(r.type===`Pick`||r.type===`Omit`||r.type===`Partial`||r.type===`Overwrite`)t=this._readPureMappedType(r);else throw Error(`Invalid PureMappedType child: `+e.type);if(e.type===`Pick`)for(var i in t)e.keys.indexOf(i)===-1&&delete t[i];else if(e.type===`Omit`)for(var i in t)e.keys.indexOf(i)>-1&&delete t[i];else e.type===`Overwrite`&&Object.assign(t,n);return t},e.prototype._readNumber=function(e){var t=e.scalarType||`double`;switch(t){case`double`:return this._reader.readDouble();case`int`:return this._reader.readInt();case`uint`:return this._reader.readUint();default:throw Error(`Scalar type not support : `+t)}},e.prototype._readInterface=function(e){for(var t={},n=this._validator.protoHelper.getFlatInterfaceSchema(e),r=this._reader.readUint(),i=function(r){var i=a._reader.readUint(),o=i&3,s=i>>2;if(s===0){if(n.indexSignature){var c=n.indexSignature.type,l=a._reader.readString();a._skipIdLengthPrefix(a._validator.protoHelper.parseReference(c)),t[l]=a._read(c)}else a._reader.skipByLengthType(X.LengthDelimited),a._reader.skipByLengthType(o)}else if(s<=9){var u=s-1,d=e.extends&&e.extends.find(function(e){return e.id===u});if(d){a._skipIdLengthPrefix(a._validator.protoHelper.parseReference(d.type));var f=a._read(d.type);Object.assign(t,f)}else a._reader.skipByLengthType(o)}else{var p=s-10,m=e.properties&&e.properties.find(function(e){return e.id===p});m?(a._skipIdLengthPrefix(a._validator.protoHelper.parseReference(m.type)),t[m.name]=a._read(m.type)):a._reader.skipByLengthType(o)}},a=this,o=0;o<r;++o)i();for(var s=0,c=n.properties;s<c.length;s++){var l=c[s];if(!t.hasOwnProperty(l.name)){var u=this._validator.protoHelper.parseReference(l.type);if(u.type===`Literal`){t[l.name]=u.literal;continue}if(this._undefinedAsNull(t[l.name],u,l.optional)){t[l.name]=null;continue}}}return t},e.prototype._undefinedAsNull=function(e,t,n){return e===void 0&&this._options.undefinedAsNull&&!rl.canBeLiteral(t,void 0)&&!n&&rl.canBeLiteral(t,null)},e.prototype._skipIdLengthPrefix=function(e){nl.getPayloadLengthInfo(e,this._validator.protoHelper).needLengthPrefix&&this._reader.skipByLengthType(X.Varint)},e.prototype._readUnionOrIntersection=function(e){for(var t,n=this._reader.readUint(),r=function(n){var r=i._reader.readUint(),a=r&3,o=r>>2,s=e.members.find(function(e){return e.id===o});if(!s)return i._reader.skipByLengthType(a),`continue`;i._skipIdLengthPrefix(i._validator.protoHelper.parseReference(s.type));var c=i._read(s.type);i._isObject(t)&&i._isObject(c)?Object.assign(t,c):t=c},i=this,a=0;a<n;++a)r();return this._undefinedAsNull(t,e)&&(t=null),t},e.prototype._isObject=function(e){return typeof e==`object`&&!!e},e.prototype._getBufferValue=function(e,t){if(t.arrayType){if(t.arrayType===`BigInt64Array`||t.arrayType===`BigUint64Array`)throw Error(`Unsupported arrayType: `+t.arrayType);if(t.arrayType===`Uint8Array`)return e;var n=il[t.arrayType];return e.byteOffset%n.BYTES_PER_ELEMENT===0?new n(e.buffer,e.byteOffset,e.byteLength/n.BYTES_PER_ELEMENT):new n(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}return e.byteLength===e.buffer.byteLength&&e.byteOffset===0?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)},e}(),ll={interface:{maxExtendsNum:9}},ul=function(){function e(){this._ops=[]}return Object.defineProperty(e.prototype,"ops",{get:function(){return this._ops},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this._ops=[]},e.prototype.push=function(e){return this._ops.push(this.req2op(e)),this},e.prototype.req2op=function(e){if(e.type===`string`||e.type===`buffer`){var t=this.measureLength(e);return this.push({type:`varint`,value:ol.from(t)}),q(q({},e),{length:t})}var n=this.measureLength(e);return q(q({},e),{length:n})},e.prototype.measureLength=function(e){switch(e.type){case`varint`:return e.value.byteLength;case`string`:return al.measureLength(e.value);case`buffer`:return e.value.byteLength;case`double`:return 8;case`boolean`:return 1;default:return NaN}},e.prototype.finish=function(){for(var e=this._ops.sum(function(e){return e.length}),t=0,n=new Uint8Array(e),r=new DataView(n.buffer),i=0,a=this._ops;i<a.length;i++){var o=a[i];switch(o.type){case`varint`:var s=o.value.writeToBuffer(n,t);if(s!==t+o.length)throw Error(`Error varint measuredLength ${o.length}, actual is ${s-t}, value is ${o.value.toNumber()}`);break;case`double`:r.setFloat64(n.byteOffset+t,o.value);break;case`string`:var c=al.write(o.value,n,t);if(c!==o.length)throw Error(`Expect ${o.length} bytes but encoded ${c} bytes`);break;case`buffer`:n.subarray(t,t+o.length).set(o.value);break;case`boolean`:r.setUint8(n.byteOffset+t,o.value?255:0)}t+=o.length}return n},e}(),dl=function(){function e(e){this._options=e,this._writer=new ul,this._validator=e.validator}return e.prototype.encode=function(e,t){return this._writer.clear(),this._write(e,t),this._writer.finish()},e.prototype.encodeJSON=function(e,t){var n=this;if(typeof e!=`object`||!e||tl.isJsonCompatible(t,`encode`,this._validator.protoHelper))return e;switch(t.type){case K.Array:if(!Array.isArray(e))break;return e.map(function(e){return n.encodeJSON(e,t.elementType)});case K.Tuple:if(!Array.isArray(e))break;return e.map(function(e,r){return n.encodeJSON(e,t.elementTypes[r])});case K.Interface:if(e.constructor!==Object)break;e=Object.assign({},e);var r=this._validator.protoHelper.getFlatInterfaceSchema(t),i=function(t){var n=r.properties.find(function(e){return e.name===t});n?e[t]=a.encodeJSON(e[t],n.type):r.indexSignature&&(e[t]=a.encodeJSON(e[t],r.indexSignature.type))},a=this;for(var o in e)i(o);return e;case K.Partial:case K.Pick:case K.Omit:case K.Overwrite:var s=this._validator.protoHelper.parseMappedType(t);return this.encodeJSON(e,s);case K.Buffer:if(!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))break;if(t.arrayType){if(t.arrayType===`Uint8Array`)return Zc.bufferToBase64(e);var c=e,l=c.byteLength===c.buffer.byteLength&&c.byteOffset===0?c.buffer:c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength);return Zc.bufferToBase64(new Uint8Array(l))}return Zc.bufferToBase64(new Uint8Array(e));case K.IndexedAccess:case K.Reference:case K.Keyof:return this.encodeJSON(e,this._validator.protoHelper.parseReference(t));case K.Union:case K.Intersection:for(var u=0,d=t.members;u<d.length;u++){var f=d[u];e=this.encodeJSON(e,f.type)}return e;case K.NonNullable:return this.encodeJSON(e,t.target);case K.Date:if(!(e instanceof Date))break;return e.toJSON();case K.Custom:return t.encodeJSON?t.encodeJSON(e):typeof e?.toJSON==`function`?e.toJSON():typeof e?.toString==`function`?e.toString():e;default:t.type}return e},e.prototype._write=function(e,t,n){switch(t.type){case K.Boolean:this._writer.push({type:`boolean`,value:e});break;case K.Number:this._writeNumber(e,t);break;case K.String:this._writer.push({type:`string`,value:e});break;case K.Array:var r=e;this._writer.push({type:`varint`,value:ol.from(r.length)});for(var i=0;i<r.length;++i)this._write(r[i],t.elementType);break;case K.Tuple:if(t.elementTypes.length>64)throw Error(`Elements oversized, maximum supported tuple elements is 64, now get `+t.elementTypes.length);for(var r=e,a=[],i=0;i<r.length;++i)r[i]===void 0||this._nullAsUndefined(r[i],t.elementTypes[i])||a.push(i);for(var o=0,s=0,c=0,l=a;c<l.length;c++){var u=l[c];u<32?o|=1<<u:s|=1<<u-32}this._writer.push({type:`varint`,value:new ol(s,o)});for(var d=0,f=a;d<f.length;d++){var i=f[d];this._write(r[i],t.elementTypes[i])}break;case K.Enum:var p=t.members.find(function(t){return t.value===e});if(!p)throw Error(`Unexpect enum value: ${e}`);this._writer.push({type:`varint`,value:ol.from(p.id)});break;case K.Any:e===void 0?this._writer.push({type:`string`,value:`undefined`}):this._writer.push({type:`string`,value:JSON.stringify(e)});break;case K.Object:this._writer.push({type:`string`,value:JSON.stringify(e)});break;case K.Literal:break;case K.Interface:this._writeInterface(e,t,n);break;case K.Buffer:this._writeBuffer(e);break;case K.IndexedAccess:case K.Reference:case K.Keyof:this._write(e,this._validator.protoHelper.parseReference(t),n);break;case K.Partial:case K.Pick:case K.Omit:case K.Overwrite:var m=this._validator.protoHelper.parseMappedType(t);m.type===K.Interface?this._writePureMappedType(e,t,n):m.type===K.Union?this._writeUnion(e,m,n?.skipFields):m.type===K.Intersection&&this._writeIntersection(e,m,n?.skipFields);break;case K.Union:this._writeUnion(e,t,n?.skipFields);break;case K.Intersection:this._writeIntersection(e,t,n?.skipFields);break;case K.Date:this._writer.push({type:`varint`,value:ol.from(e.getTime())});break;case K.NonNullable:this._write(e,t.target,n);break;case K.Custom:if(!t.encode)throw Error(`Missing encode method for CustomTypeSchema`);var h=t.encode(e);this._writeBuffer(h);break;default:throw Error(`Unrecognized schema type: ${t.type}`)}},e.prototype._writePureMappedType=function(e,t,n){if(n||={},t.type===`Pick`){if(n.pickFields){for(var r={},i=0,a=t.keys;i<a.length;i++){var o=a[i];n.pickFields[o]&&(r[o]=1)}n.pickFields=r}else{n.pickFields={};for(var s=0,c=t.keys;s<c.length;s++){var o=c[s];n.pickFields[o]=1}}}else if(t.type===`Omit`){n?.skipFields||(n||={},n.skipFields={});for(var l=0,u=t.keys;l<u.length;l++){var o=u[l];n.skipFields[o]=1}}else if(t.type===`Overwrite`){var d=this._parseOverwrite(e,t);this._write(d.overwriteValue,d.overwrite,n)}else if(t.type!==`Partial`)throw Error(`Invalid PureMappedType child: `+t.type);var f=this._validator.protoHelper.parseReference(t.target);f.type===`Interface`?this._writeInterface(e,f,n):this._writePureMappedType(e,f,n)},e.prototype._writeNumber=function(e,t){var n=t.scalarType||`double`;switch(n){case`double`:this._writer.push({type:n,value:e});break;case`int`:this._writer.push({type:`varint`,value:ol.from(e).zzEncode()});break;case`uint`:this._writer.push({type:`varint`,value:ol.from(e)});break;default:throw Error(`Scalar type not support : `+n)}},e.prototype._writeInterface=function(e,t,n){n||={},n.skipFields||(n.skipFields={});var r=this._writer.ops.length,i=0;if(t.extends){if(t.extends.length>ll.interface.maxExtendsNum)throw Error(`Max support ${ll.interface.maxExtendsNum} extends, actual: ${t.extends.length}`);for(var a=0,o=t.extends;a<o.length;a++){var s=o[a],c=s.id+1;this._writer.push({type:`varint`,value:ol.from(c)});var l=this._writer.ops.length-1,u=this._writer.ops.length,d=this._validator.protoHelper.parseReference(s.type);this._writeInterface(e,d,q(q({},n),{skipIndexSignature:!!t.indexSignature||n.skipIndexSignature})),this._writer.ops.length===u+1?this._writer.ops.splice(this._writer.ops.length-2,2):(++i,this._processIdWithLengthType(l,s.type))}}if(t.properties)for(var f=0,p=t.properties;f<p.length;f++){var m=p[f],h=this._validator.protoHelper.parseReference(m.type),g=e[m.name];if(!(n.pickFields&&!n.pickFields[m.name])){if(h.type===`Literal`){n.skipFields[m.name]=1;continue}if(this._nullAsUndefined(g,m.type)&&(g=void 0),g!==void 0&&!n.skipFields[m.name]){n.skipFields[m.name]=1;var c=m.id+ll.interface.maxExtendsNum+1;this._writer.push({type:`varint`,value:ol.from(c)});var l=this._writer.ops.length-1;this._write(g,h),++i,this._processIdWithLengthType(l,h)}}}if(!n.skipIndexSignature){var _=this._validator.protoHelper.getFlatInterfaceSchema(t);if(_.indexSignature){for(var v in e)if(!(e[v]===void 0||this._nullAsUndefined(e[v],_.indexSignature.type))&&!(n.pickFields&&!n.pickFields[v])&&!n.skipFields[v]){n.skipFields[v]=1,this._writer.push({type:`varint`,value:ol.from(0)});var l=this._writer.ops.length-1;this._writer.push({type:`string`,value:v});var y=this._writer.ops.length;this._write(e[v],_.indexSignature.type),++i,this._processIdWithLengthType(l,_.indexSignature.type,y)}}}this._writer.ops.splice(r,0,this._writer.req2op({type:`varint`,value:ol.from(i)}))},e.prototype._nullAsUndefined=function(e,t){return e===null&&this._options.nullAsUndefined&&!rl.canBeLiteral(t,null)},e.prototype._parseOverwrite=function(e,t){var n={},r=this._validator.protoHelper.parseReference(t.target),i=this._validator.protoHelper.parseReference(t.overwrite),a=this._validator.protoHelper.getFlatInterfaceSchema(r),o=this._validator.protoHelper.getFlatInterfaceSchema(i),s={},c={};if(o.properties)for(var l=0,u=o.properties;l<u.length;l++){var d=u[l];e[d.name]!==void 0&&!n[d.name]&&(s[d.name]=e[d.name],n[d.name]=1)}if(a.properties)for(var f=0,p=a.properties;f<p.length;f++){var d=p[f];e[d.name]!==void 0&&!n[d.name]&&(c[d.name]=e[d.name],n[d.name]=1)}var m,h;if(o.indexSignature?(h=o.indexSignature,m=s):a.indexSignature&&(h=a.indexSignature,m=c),h)for(var g in e)n[g]||(m[g]=e[g],n[g]=1);return{target:r,targetValue:c,overwrite:i,overwriteValue:s}},e.prototype._writeUnion=function(e,t,n,r){n===void 0&&(n={});var i=this._writer.ops.length,a=0;this._nullAsUndefined(e,t)&&(e=void 0);for(var o=0,s=t.members;o<s.length;o++){var c=s[o];if(this._validator.validate(e,c.type,{excessPropertyChecks:!1}).isSucc){this._writer.push({type:`varint`,value:ol.from(c.id)});var l=this._writer.ops.length-1;if(c.type.type===`Union`?this._writeUnion(e,c.type,n):this._write(e,c.type,{skipFields:n}),a++,this._processIdWithLengthType(l,c.type),typeof e!=`object`)break}}if(a>0){this._writer.ops.splice(i,0,this._writer.req2op({type:`varint`,value:ol.from(a)}));return}throw Error(`Non member is satisfied for union type`)},e.prototype._writeIntersection=function(e,t,n){n===void 0&&(n={}),this._writer.push({type:`varint`,value:ol.from(t.members.length)});for(var r=0,i=t.members;r<i.length;r++){var a=i[r];this._writer.push({type:`varint`,value:ol.from(a.id)});var o=this._writer.ops.length-1,s=q({},n);this._write(e,a.type,{skipFields:s}),this._processIdWithLengthType(o,a.type)}},e.prototype._writeBuffer=function(e){if(e instanceof ArrayBuffer)this._writer.push({type:`buffer`,value:new Uint8Array(e)});else if(e instanceof Uint8Array)this._writer.push({type:`buffer`,value:e});else{var t=il[e.constructor.name],n=new Uint8Array(e.buffer,e.byteOffset,e.length*t.BYTES_PER_ELEMENT);this._writer.push({type:`buffer`,value:n})}},e.prototype._processIdWithLengthType=function(e,t,n){var r=this._writer.ops[e];if(r.type!==`varint`)throw Error(`Error idPos: `+e);var i=this._validator.protoHelper.parseReference(t),a=nl.getPayloadLengthInfo(i,this._validator.protoHelper),o=(r.value.toNumber()<<2)+a.lengthType;if(this._writer.ops[e]=this._writer.req2op({type:`varint`,value:ol.from(o)}),a.needLengthPrefix){var s=this._writer.ops.filter(function(t,n){return n>e}).sum(function(e){return e.length});this._writer.ops.splice(n??e+1,0,this._writer.req2op({type:`varint`,value:ol.from(s)}))}},e}(),fl=function(){function e(e,t){this._options={excessPropertyChecks:!0,strictNullChecks:!1,skipEncodeValidate:!1,skipDecodeValidate:!1,cloneProto:!0},this._options=q(q({},this._options),t),this._proto=this._options.cloneProto?Object.merge({},e):e,Object.assign(this._proto,Object.merge({},t?.customTypes)),this._validator=new Xc(this._proto,{excessPropertyChecks:this._options.excessPropertyChecks,strictNullChecks:this._options.strictNullChecks,cloneProto:!1}),this.validate=this._validator.validate.bind(this._validator),this.prune=this._validator.prune.bind(this._validator),this._encoder=new dl({validator:this._validator,nullAsUndefined:!this._options.strictNullChecks}),this._decoder=new cl({validator:this._validator,undefinedAsNull:!this._options.strictNullChecks})}return e.prototype.encode=function(e,t,n){var r;if(typeof t==`string`){if(r=this._proto[t],!r)return{isSucc:!1,errMsg:`Cannot find schema: ${t}`}}else r=t;if(!(n?.skipValidate??this._options.skipEncodeValidate)){var i=this._validator.validate(e,r,{excessPropertyChecks:!1});if(!i.isSucc)return i}var a;try{a=this._encoder.encode(e,r)}catch(e){return{isSucc:!1,errMsg:e.message}}return{isSucc:!0,buf:a}},e.prototype.decode=function(e,t,n){var r;if(typeof t==`string`){if(r=this._proto[t],!r)return{isSucc:!1,errMsg:`Cannot find schema: ${t}`,errPhase:void 0}}else r=t;var i;try{i=this._decoder.decode(e,r)}catch(e){return{isSucc:!1,errMsg:e.message,errPhase:`decode`}}if(!(n?.skipValidate??this._options.skipDecodeValidate)){var a=this._validator.validate(i,r);if(!a.isSucc)return q(q({},a),{errPhase:`validate`})}return{isSucc:!0,value:i}},e.prototype.encodeJSON=function(e,t,n){var r;if(typeof t==`string`){if(r=this._proto[t],!r)return{isSucc:!1,errMsg:`Cannot find schema: ${t}`}}else r=t;if(!(n?.skipValidate??this._options.skipEncodeValidate)){var i=this._validator.prune(e,r);if(!i.isSucc)return i;e=i.pruneOutput}var a;try{a=this._encoder.encodeJSON(e,r)}catch(e){return{isSucc:!1,errMsg:e.message}}return{isSucc:!0,json:a}},e.prototype.decodeJSON=function(e,t,n){var r;if(typeof t==`string`){if(r=this._proto[t],!r)return{isSucc:!1,errMsg:`Cannot find schema: ${t}`,errPhase:void 0}}else r=t;var i;try{i=this._decoder.decodeJSON(e,r)}catch(e){return{isSucc:!1,errMsg:e.message,errPhase:`decode`}}if(!(n?.skipValidate??this._options.skipDecodeValidate)){var a=this._validator.prune(i,r);return a.isSucc?{isSucc:!0,value:a.pruneOutput}:(a.errPhase=`validate`,a)}return{isSucc:!0,value:i}},e}(),pl=function(){function e(e,t){e===void 0&&(e=1),t===void 0&&(t=2**53-1),this._min=e,this._max=t,this._last=t}return e.prototype.reset=function(){this._last=this._max},e.prototype.getNext=function(e){return this._last>=this._max?this._last=this._min:e?this._last:++this._last},Object.defineProperty(e.prototype,"last",{get:function(){return this._last},enumerable:!1,configurable:!0}),e}(),ml=function(){function e(){this.nodes=[],this.onError=function(e,t,n,r){r?.error(`Uncaught FlowError:`,e)}}return e.prototype.exec=function(e,t){return Ic(this,void 0,void 0,function(){var n,r,i;return Lc(this,function(a){switch(a.label){case 0:n=e,r=0,a.label=1;case 1:if(!(r<this.nodes.length))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.nodes[r](n)];case 3:return n=a.sent(),[3,5];case 4:return i=a.sent(),this.onError(i,n,e,t),[2,void 0];case 5:if(n==null)return[2,n];a.label=6;case 6:return++r,[3,1];case 7:return[2,n]}})})},e.prototype.push=function(e){return this.nodes.push(e),e},e.prototype.remove=function(e){return this.nodes.remove(function(t){return t===e})},e}();function hl(e){var t={};return t[`?mongodb/ObjectId`]=e===String?{type:K.Custom,validate:function(e){return typeof e==`string`?/^[0-9a-fA-F]{24}$/.test(e)?{isSucc:!0}:{isSucc:!1,errMsg:`ObjectId must be a string of 24 hex characters`}:{isSucc:!1,errMsg:`Expected type to be \`string\`, actually \`${typeof e}\`.`}},encode:function(e){return new Uint8Array(Array.from({length:12},function(t,n){return Number.parseInt(`0x`+e.substr(n*2,2))}))},decode:function(e){return Array.from(e,function(e){var t=e.toString(16);return t.length===1&&(t=`0`+t),t}).join(``)}}:{type:K.Custom,validate:function(t){return t instanceof e?{isSucc:!0}:{isSucc:!1,errMsg:"Expected to be instance of `ObjectId`, actually not."}},encode:function(e){return new Uint8Array(e.id)},decode:function(t){return new e(t)},decodeJSON:function(t){return new e(t)}},t[`?mongodb/ObjectID`]=t[`?mongodb/ObjectId`],t[`?bson/ObjectId`]=t[`?mongodb/ObjectId`],t[`?bson/ObjectID`]=t[`?mongodb/ObjectId`],t}var gl=function(){function e(){this._handlers={}}return e.prototype.forEachHandler=function(e,t){var n=[...arguments].slice(2),r=this._handlers[e];if(!r)return[];for(var i=[],a=0,o=r;a<o.length;a++){var s=o[a];try{i.push(s.apply(void 0,n))}catch(e){t?.error(`[MsgHandlerError]`,e)}}return i},e.prototype.addHandler=function(e,t){var n=this._handlers[e];if(!n)n=this._handlers[e]=[];else if(n.some(function(e){return e===t}))return;n.push(t)},e.prototype.removeHandler=function(e,t){var n=this._handlers[e];n&&n.removeOne(function(e){return e===t})},e.prototype.removeAllHandlers=function(e){this._handlers[e]=void 0},e}(),_l=function(){function e(){}return e.getServiceMap=function(e){for(var t={id2Service:{},apiName2Service:{},msgName2Service:{}},n=0,r=e.services;n<r.length;n++){var i=r[n],a=i.name.match(/(.+\/)?([^\/]+)$/),o=a[1]||``,s=a[2];if(i.type===`api`){var c=q(q({},i),{reqSchemaId:`${o}Ptl${s}/Req${s}`,resSchemaId:`${o}Ptl${s}/Res${s}`});t.apiName2Service[i.name]=c,t.id2Service[i.id]=c}else{var c=q(q({},i),{msgSchemaId:`${o}Msg${s}/Msg${s}`});t.msgName2Service[i.name]=c,t.id2Service[i.id]=c}}return t},e}(),vl=function(){function e(){}return Object.defineProperty(e,"tsbuffer",{get:function(){return this._tsbuffer||=new fl(Hc),this._tsbuffer},enumerable:!1,configurable:!0}),e.encodeClientMsg=function(e,t,n,r,i){if(r===`buffer`){var a=e.encode(n,t.msgSchemaId);if(!a.isSucc)return a;var o={serviceId:t.id,buffer:a.buf},s=this.tsbuffer.encode(o,`ServerInputData`);return s.isSucc?{isSucc:!0,output:s.buf}:{isSucc:!1,errMsg:s.errMsg}}var a=e.encodeJSON(n,t.msgSchemaId);if(!a.isSucc)return a;var c=i===`SHORT`?a.json:[t.name,a.json];return{isSucc:!0,output:r===`json`?c:JSON.stringify(c)}},e.encodeApiReq=function(e,t,n,r,i){if(r===`buffer`){var a=e.encode(n,t.reqSchemaId);if(!a.isSucc)return a;var o={serviceId:t.id,buffer:a.buf,sn:i},s=this.tsbuffer.encode(o,`ServerInputData`);return s.isSucc?{isSucc:!0,output:s.buf}:{isSucc:!1,errMsg:s.errMsg}}var a=e.encodeJSON(n,t.reqSchemaId);if(!a.isSucc)return a;var c=i===void 0?a.json:[t.name,a.json,i];return{isSucc:!0,output:r===`json`?c:JSON.stringify(c)}},e.encodeServerMsg=function(e,t,n,r,i){if(r===`buffer`){var a=e.encode(n,t.msgSchemaId);if(!a.isSucc)return a;var o={serviceId:t.id,buffer:a.buf},s=this.tsbuffer.encode(o,`ServerOutputData`);return s.isSucc?{isSucc:!0,output:s.buf}:{isSucc:!1,errMsg:s.errMsg}}var a=e.encodeJSON(n,t.msgSchemaId);if(!a.isSucc)return a;var c=i===`SHORT`?a.json:[t.name,a.json];return{isSucc:!0,output:r===`json`?c:JSON.stringify(c)}},e.parseServerOutout=function(e,t,n,r){if(n instanceof Uint8Array){var i=this.tsbuffer.decode(n,`ServerOutputData`);if(!i.isSucc)return i;var a=i.value;if(r??=a.serviceId,r===void 0)return{isSucc:!1,errMsg:`Missing 'serviceId' in ServerOutput`};var o=t.id2Service[r];if(!o)return{isSucc:!1,errMsg:`Invalid service ID: ${r} (from ServerOutput)`};if(o.type===`msg`){if(!a.buffer)return{isSucc:!1,errMsg:`Empty msg buffer (from ServerOutput)`};var s=e.decode(a.buffer,o.msgSchemaId);return s.isSucc?{isSucc:!0,result:{type:`msg`,service:o,msg:s.value}}:s}if(a.error)return{isSucc:!0,result:{type:`api`,service:o,sn:a.sn,ret:{isSucc:!1,err:new Uc(a.error)}}};if(!a.buffer)return{isSucc:!1,errMsg:`Empty API res buffer (from ServerOutput)`};var c=e.decode(a.buffer,o.resSchemaId);return c.isSucc?{isSucc:!0,result:{type:`api`,service:o,sn:a.sn,ret:{isSucc:!0,res:c.value}}}:c}var l=void 0;if(typeof n==`string`)try{l=JSON.parse(n)}catch(e){return{isSucc:!1,errMsg:`Invalid input JSON: ${e.message}`}}else l=n;var u=void 0,d=void 0,o=void 0;if(r==null){if(!Array.isArray(l))return{isSucc:!1,errMsg:`Invalid server output format`};var f=l[0];if(u=l[1],d=l[2],o=d?t.apiName2Service[f]:t.msgName2Service[f],!o)return{isSucc:!1,errMsg:`Invalid service name: ${f} (from ServerOutputData)`}}else{if(o=t.id2Service[r],!o)return{isSucc:!1,errMsg:`Invalid service ID: ${r}`};u=l}if(o.type===`api`){if(u.isSucc&&`res`in u){var p=e.decodeJSON(u.res,o.resSchemaId);if(!p.isSucc)return p;u.res=p.value}else if(u.err)u.err=new Uc(u.err);else return{isSucc:!1,errMsg:`Invalid server output format`};return{isSucc:!0,result:{type:`api`,service:o,sn:d,ret:u}}}var p=e.decodeJSON(u,o.msgSchemaId);return p.isSucc?{isSucc:!0,result:{type:`msg`,service:o,msg:p.value}}:p},e.HeartbeatPacket=new Uint8Array([0]),e}(),yl=function(){function e(e,t){this._msgHandlers=new gl,this.flows={preCallApiFlow:new ml,preApiReturnFlow:new ml,postApiReturnFlow:new ml,preSendMsgFlow:new ml,postSendMsgFlow:new ml,preRecvMsgFlow:new ml,postRecvMsgFlow:new ml,preSendDataFlow:new ml,preRecvDataFlow:new ml,preSendBufferFlow:new ml,preRecvBufferFlow:new ml,preConnectFlow:new ml,postConnectFlow:new ml,postDisconnectFlow:new ml},this._apiSnCounter=new pl(1),this._pendingApis=[],this._onRecvBuf=this._onRecvData,this.options=t,this.serviceMap=_l.getServiceMap(e),this.dataType=this.options.json?`text`:`buffer`;var n=q({},e.types);t.customObjectIdClass&&(n=q(q({},n),hl(t.customObjectIdClass))),this.tsbuffer=new fl(n),this.logger=this.options.logger,this.logger&&=Bc(this.logger,this.options.logLevel)}return Object.defineProperty(e.prototype,"lastSN",{get:function(){return this._apiSnCounter.last},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSN",{get:function(){return this._apiSnCounter.getNext(!0)},enumerable:!1,configurable:!0}),e.prototype.callApi=function(e,t,n){return n===void 0&&(n={}),Ic(this,void 0,void 0,function(){var r,i,a,o=this;return Lc(this,function(s){return r=this._apiSnCounter.getNext(),i={sn:r,abortKey:n.abortKey,service:this.serviceMap.apiName2Service[e]},this._pendingApis.push(i),a=new Promise(function(r){return Ic(o,void 0,void 0,function(){var a,o,s,c,l;return Lc(this,function(u){switch(u.label){case 0:return[4,this.flows.preCallApiFlow.exec({apiName:e,req:t,options:n},this.logger)];case 1:return a=u.sent(),!a||i.isAborted?(this.abort(i.sn),[2]):a.return?(o=a.return,[3,4]):[3,2];case 2:return[4,this._doCallApi(a.apiName,a.req,a.options,i)];case 3:o=u.sent(),u.label=4;case 4:return i.isAborted?[2]:(o.isSucc?this.options.logApi&&((c=this.logger)==null||c.log(`[ApiRes] #${i.sn} ${e}`,o.res)):this.options.logApi&&((l=this.logger)==null||l[o.err.type===Uc.Type.ApiError?`log`:`error`](`[ApiErr] #${i.sn} ${e}`,o.err)),[4,this.flows.preApiReturnFlow.exec(q(q({},a),{return:o}),this.logger)]);case 5:return s=u.sent(),s?(r(s.return),this.flows.postApiReturnFlow.exec(s,this.logger),[2]):(this.abort(i.sn),[2])}})})}),a.catch().then(function(){o._pendingApis.removeOne(function(e){return e.sn===i.sn})}),[2,a]})})},e.prototype._doCallApi=function(e,t,n,r){var i;return n===void 0&&(n={}),Ic(this,void 0,void 0,function(){var a,o=this;return Lc(this,function(s){return this.options.logApi&&((i=this.logger)==null||i.log(`[ApiReq] #${r.sn}`,e,t)),a=new Promise(function(i){return Ic(o,void 0,void 0,function(){var a,o,s,c,l,u;return Lc(this,function(d){switch(d.label){case 0:return a=this.serviceMap.apiName2Service[e],a?(r.service=a,o=vl.encodeApiReq(this.tsbuffer,a,t,this.dataType,this.type===`LONG`?r.sn:void 0),o.isSucc?(s=this._waitApiReturn(r,n.timeout??this.options.timeout),c=this.sendData(o.output,n,a.id,r),[4,c]):(i({isSucc:!1,err:new Uc(o.errMsg,{type:Vc.ClientError,code:`INPUT_DATA_ERR`})}),[2])):(i({isSucc:!1,err:new Uc(`Invalid api name: `+e,{code:`INVALID_API_NAME`,type:Vc.ClientError})}),[2]);case 1:return l=d.sent(),l.err?(i({isSucc:!1,err:l.err}),[2]):[4,s];case 2:return u=d.sent(),r.isAborted||i(u),[2]}})})}),[2,a]})})},e.prototype.sendMsg=function(e,t,n){var r=this;n===void 0&&(n={});var i=new Promise(function(i){return Ic(r,void 0,void 0,function(){var r,a,o,s,c,l,u;return Lc(this,function(d){switch(d.label){case 0:return[4,this.flows.preSendMsgFlow.exec({msgName:e,msg:t,options:n},this.logger)];case 1:return r=d.sent(),r?(this.options.logMsg&&((l=this.logger)==null||l.log(`[SendMsg]`,e,t)),a=this.serviceMap.msgName2Service[e],a?(o=vl.encodeClientMsg(this.tsbuffer,a,t,this.dataType,this.type),o.isSucc?(s=this.sendData(o.output,n,a.id),[4,s]):(i({isSucc:!1,err:new Uc(o.errMsg,{type:Vc.ClientError,code:`ENCODE_MSG_ERR`})}),[2])):((u=this.logger)==null||u.error(`Invalid msg name: `+e),i({isSucc:!1,err:new Uc(`Invalid msg name: `+e,{code:`INVALID_MSG_NAME`,type:Vc.ClientError})}),[2])):[2];case 2:return c=d.sent(),c.err?(i({isSucc:!1,err:c.err}),[2]):(i({isSucc:!0}),this.flows.postSendMsgFlow.exec(r,this.logger),[2])}})})});return i.then(function(e){e.isSucc||(r.logger??console).error(`[SendMsgErr]`,e.err)}),i},e.prototype.listenMsg=function(e,t){var n=this;return e instanceof RegExp?Object.keys(this.serviceMap.msgName2Service).filter(function(t){return e.test(t)}).forEach(function(e){n._msgHandlers.addHandler(e,t)}):this._msgHandlers.addHandler(e,t),t},e.prototype.unlistenMsg=function(e,t){var n=this;e instanceof RegExp?Object.keys(this.serviceMap.msgName2Service).filter(function(t){return e.test(t)}).forEach(function(e){n._msgHandlers.removeHandler(e,t)}):this._msgHandlers.removeHandler(e,t)},e.prototype.unlistenMsgAll=function(e){var t=this;e instanceof RegExp?Object.keys(this.serviceMap.msgName2Service).filter(function(t){return e.test(t)}).forEach(function(e){t._msgHandlers.removeAllHandlers(e)}):this._msgHandlers.removeAllHandlers(e)},e.prototype.abort=function(e){var t,n,r=this._pendingApis.findIndex(function(t){return t.sn===e});if(r!==-1){var i=this._pendingApis[r];this._pendingApis.splice(r,1),i.onReturn=void 0,i.isAborted=!0,(t=this.logger)==null||t.log(`[ApiAbort] #${i.sn} ${i.service.name}`),(n=i.onAbort)==null||n.call(i)}},e.prototype.abortByKey=function(e){var t=this;this._pendingApis.filter(function(t){return t.abortKey===e}).forEach(function(e){t.abort(e.sn)})},e.prototype.abortAll=function(){var e=this;this._pendingApis.slice().forEach(function(t){return e.abort(t.sn)})},e.prototype.sendData=function(e,t,n,r){var i,a,o;return Ic(this,void 0,void 0,function(){var s,c;return Lc(this,function(l){switch(l.label){case 0:return[4,this.flows.preSendDataFlow.exec({data:e,sn:r?.sn},this.logger)];case 1:return s=l.sent(),s?(e=s.data,e instanceof Uint8Array?[4,this.flows.preSendBufferFlow.exec({buf:e,sn:r?.sn},this.logger)]:[3,3]):[2,new Promise(function(e){})];case 2:if(c=l.sent(),!c)return[2,new Promise(function(e){})];e=c.buf,l.label=3;case 3:return this.options.debugBuf&&(typeof e==`string`?(i=this.logger)==null||i.debug(`[SendText]`+(r?` #`+r.sn:``)+` length=${e.length}`,e):e instanceof Uint8Array?(a=this.logger)==null||a.debug(`[SendBuf]`+(r?` #`+r.sn:``)+` length=${e.length}`,e):(o=this.logger)==null||o.debug(`[SendJSON]`+(r?` #`+r.sn:``),e)),[2,this._sendData(e,t,n,r)]}})})},e.prototype._onRecvData=function(e,t){var n,r,i,a,o,s,c,l,u;return Ic(this,void 0,void 0,function(){var d,f,p,m,h,g;return Lc(this,function(_){switch(_.label){case 0:return d=t?.sn,[4,this.flows.preRecvDataFlow.exec({data:e,sn:d},this.logger)];case 1:return f=_.sent(),f?(e=f.data,typeof e==`string`?(this.options.debugBuf&&((n=this.logger)==null||n.debug(`[RecvText]`+(d?` #`+d:``),e)),[3,5]):[3,2]):[2];case 2:return e instanceof Uint8Array?(this.options.debugBuf&&((r=this.logger)==null||r.debug(`[RecvBuf]`+(d?` #`+d:``),`length=`+e.length,e)),[4,this.flows.preRecvBufferFlow.exec({buf:e,sn:d},this.logger)]):[3,4];case 3:return p=_.sent(),p?(e=p.buf,[3,5]):[2];case 4:this.options.debugBuf&&((i=this.logger)==null||i.debug(`[RecvJSON]`+(d?` #`+d:``),e)),_.label=5;case 5:return m=vl.parseServerOutout(this.tsbuffer,this.serviceMap,e,t?.service.id),m.isSucc?(h=m.result,h.type===`api`?(d??=h.sn,(l=(c=this._pendingApis.find(function(e){return e.sn===d}))?.onReturn)==null||l.call(c,h.ret),[3,9]):[3,6]):((a=this.logger)==null||a.error(`ParseServerOutputError: `+m.errMsg),e instanceof Uint8Array&&((o=this.logger)==null||o.error(`Please check the version of serviceProto between server and client`)),t&&((s=t.onReturn)==null||s.call(t,{isSucc:!1,err:new Uc(`Parse server output error`,{type:Vc.ServerError})})),[2]);case 6:return h.type===`msg`?(this.options.logMsg&&((u=this.logger)==null||u.log(`[RecvMsg] ${h.service.name}`,h.msg)),[4,this.flows.preRecvMsgFlow.exec({msgName:h.service.name,msg:h.msg},this.logger)]):[3,9];case 7:return g=_.sent(),g?(this._msgHandlers.forEachHandler(g.msgName,this.logger,g.msg,g.msgName),[4,this.flows.postRecvMsgFlow.exec(g,this.logger)]):[2];case 8:_.sent(),_.label=9;case 9:return[2]}})})},e.prototype._waitApiReturn=function(e,t){return Ic(this,void 0,void 0,function(){var n=this;return Lc(this,function(r){return[2,new Promise(function(r){var i;t&&(i=setTimeout(function(){i=void 0,n._pendingApis.removeOne(function(t){return t.sn===e.sn}),r({isSucc:!1,err:new Uc(`Request Timeout`,{type:Vc.NetworkError,code:`TIMEOUT`})})},t)),e.onReturn=function(t){i&&=(clearTimeout(i),void 0),n._pendingApis.removeOne(function(t){return t.sn===e.sn}),r(t)}})]})})},e}(),bl={logLevel:`debug`,logApi:!0,logMsg:!0,json:!1,timeout:15e3,debugBuf:!1},xl=function(e){Pc(t,e);function t(t,n,r){var i=this,a;return i=e.call(this,t,q(q({},Sl),r))||this,i.type=`SHORT`,i._http=n,i._jsonServer=i.options.server+(i.options.server.endsWith(`/`)?``:`/`),(a=i.logger)==null||a.log(`TSRPC HTTP Client :`,i.options.server),i}return t.prototype._sendData=function(e,t,n,r){return Ic(this,void 0,void 0,function(){var i,a=this;return Lc(this,function(o){return i=(function(){return Ic(a,void 0,void 0,function(){var i,a,o,s,c,l,u;return Lc(this,function(d){switch(d.label){case 0:return i=this.serviceMap.id2Service[n],a=i.type===`msg`?`?type=msg`:``,o=typeof e==`string`?this._jsonServer+i.name+a:this.options.server,s=this._http.fetch({url:o,data:e,method:`POST`,timeout:t.timeout||this.options.timeout,headers:{"Content-Type":typeof e==`string`?`application/json`:`application/octet-stream`},transportOptions:t,responseType:typeof e==`string`?`text`:`arraybuffer`}),c=s.promise,l=s.abort,r&&(r.onAbort=function(){l()}),r?.isAborted?[2,new Promise(function(e){})]:[4,c];case 1:return u=d.sent(),u.isSucc?[2,{res:u.res}]:[2,{err:u.err}]}})})})(),i.then(function(e){r&&e.res&&a._onRecvData(e.res,r)}),i.catch(function(e){}).then(function(){r&&(r.onAbort=void 0)}),[2,i]})})},t}(yl),Sl=q(q({},bl),{server:`http://localhost:3000`,jsonPrune:!0}),Cl=function(e){Pc(t,e);function t(t,n,r){var i=this,a;return i=e.call(this,t,q(q({},wl),r))||this,i.type=`LONG`,i._onWsOpen=function(){var e;i._connecting&&(i._status=Tl.Opened,i._connecting.rs({isSucc:!0}),i._connecting=void 0,(e=i.logger)==null||e.log(`WebSocket connection to server successful`),i.flows.postConnectFlow.exec({},i.logger),i.options.heartbeat&&i._heartbeat())},i._onWsClose=function(e,t){var n,r,a;if(i._status!==Tl.Closed){var o=!!i._rsDisconnecting,s=i.isConnected||o;i._status=Tl.Closed,i._connecting&&(i._connecting.rs({isSucc:!1,errMsg:`Failed to connect to WebSocket server: ${i.options.server}`}),i._connecting=void 0,(n=i.logger)==null||n.error(`Failed to connect to WebSocket server: ${i.options.server}`)),i._pendingHeartbeat&&(clearTimeout(i._pendingHeartbeat.timeoutTimer),i._pendingHeartbeat=void 0),i._nextHeartbeatTimer&&clearTimeout(i._nextHeartbeatTimer),i._rsDisconnecting?(i._rsDisconnecting(),i._rsDisconnecting=void 0,(r=i.logger)==null||r.log(`Disconnected succ`,`code=${e} reason=${t}`)):s&&((a=i.logger)==null||a.log(`Lost connection to ${i.options.server}`,`code=${e} reason=${t}`)),s&&i.flows.postDisconnectFlow.exec({reason:t,isManual:o},i.logger),i._pendingApis.slice().forEach(function(e){var n;(n=e.onReturn)==null||n.call(e,{isSucc:!1,err:new Uc(t||`Lost connection to server`,{type:Vc.NetworkError,code:`LOST_CONN`})})})}},i._onWsError=function(e){var t,n;(t=i.logger)==null||t.error(`[WebSocket Error]`,e),i._connecting&&(i._connecting.rs({isSucc:!1,errMsg:`Failed to connect to WebSocket server: ${i.options.server}`}),i._connecting=void 0,(n=i.logger)==null||n.error(`Failed to connect to WebSocket server: ${i.options.server}`))},i._onWsMessage=function(e){if(i._status===Tl.Opened){if(e instanceof Uint8Array&&e.length===vl.HeartbeatPacket.length&&e.every(function(e,t){return e===vl.HeartbeatPacket[t]})){i._onHeartbeatAnswer(e);return}i._onRecvData(e)}},i.lastHeartbeatLatency=0,i._status=Tl.Closed,i._wsp=n,n.options={onOpen:i._onWsOpen,onClose:i._onWsClose,onError:i._onWsError,onMessage:i._onWsMessage,logger:i.logger},(a=i.logger)==null||a.log(`TSRPC WebSocket Client :`,i.options.server),i}return t.prototype._sendData=function(e){return Ic(this,void 0,void 0,function(){var t=this;return Lc(this,function(n){return[2,new Promise(function(n){return Ic(t,void 0,void 0,function(){return Lc(this,function(t){return this.isConnected?(n(this._wsp.send(e)),[2]):(n({err:new Uc(`WebSocket is not connected`,{code:`WS_NOT_OPEN`,type:Uc.Type.ClientError})}),[2])})})})]})})},t.prototype._heartbeat=function(){var e=this,t;this._pendingHeartbeat||this._status!==Tl.Opened||!this.options.heartbeat||(this._pendingHeartbeat={startTime:Date.now(),timeoutTimer:setTimeout(function(){var t;e._pendingHeartbeat=void 0,(t=e.logger)==null||t.error(`[Heartbeat] Heartbeat timeout, the connection disconnected automatically.`),e._wsClose(3e3,`Heartbeat timeout`),e._wsp.options.onClose(3e3,`Heartbeat timeout`)},this.options.heartbeat.timeout)},this.options.debugBuf&&((t=this.logger)==null||t.log(`[Heartbeat] Send ping`,vl.HeartbeatPacket)),this._sendData(vl.HeartbeatPacket))},t.prototype._onHeartbeatAnswer=function(e){var t=this,n;!this._pendingHeartbeat||this._status!==Tl.Opened||!this.options.heartbeat||(this.lastHeartbeatLatency=Date.now()-this._pendingHeartbeat.startTime,this.options.debugBuf&&((n=this.logger)==null||n.log(`[Heartbeat] Recv pong, latency=${this.lastHeartbeatLatency}ms`,e)),clearTimeout(this._pendingHeartbeat.timeoutTimer),this._pendingHeartbeat=void 0,this._nextHeartbeatTimer=setTimeout(function(){t._heartbeat()},this.options.heartbeat.interval))},Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return this._status===Tl.Opened},enumerable:!1,configurable:!0}),t.prototype.connect=function(){var e,t;return Ic(this,void 0,void 0,function(){var n,r,i=this;return Lc(this,function(a){switch(a.label){case 0:return this.isConnected?[2,{isSucc:!0}]:this._connecting?[2,this._connecting.promise]:[4,this.flows.preConnectFlow.exec({},this.logger)];case 1:if(n=a.sent(),n?.return)return[2,n.return];if(!n)return[2,new Promise(function(e){})];try{this._wsp.connect(this.options.server,[this.options.json?`text`:`buffer`])}catch(t){return(e=this.logger)==null||e.error(t),[2,{isSucc:!1,errMsg:t.message}]}return this._status=Tl.Opening,(t=this.logger)==null||t.log(`Start connecting ${this.options.server}...`),this._connecting={},r=new Promise(function(e){i._connecting.rs=e}),this._connecting.promise=r,[2,r]}})})},t.prototype.disconnect=function(e,t){var n;return Ic(this,void 0,void 0,function(){var r,i=this;return Lc(this,function(a){return this._status===Tl.Closed?[2]:(this._status=Tl.Closing,(n=this.logger)==null||n.log(`Start disconnecting...`),r=!1,[2,Promise.race([new Promise(function(n){i._rsDisconnecting=function(){r||(r=!0,n())},i._wsClose(e??1e3,t??``)}),new Promise(function(e){setTimeout(function(){r||(r=!0,i._onWsClose(1005,`Connection closed, but not received ws.onClose event.`))},1e3)})])])})})},t.prototype._wsClose=function(e,t){var n;try{this._wsp.close(e??1e3,t??``)}catch(e){(n=this.logger)==null||n.error(`[WsCloseError]`,e)}},t}(yl),wl=q(q({},bl),{server:`ws://localhost:3000`}),Tl;(function(e){e.Opening=`OPENING`,e.Opened=`OPENED`,e.Closing=`CLOSING`,e.Closed=`CLOSED`})(Tl||={});var El=function(){function e(){}return e.prototype.fetch=function(e){var t=this,n,r=new Promise(function(e){n=e}),i=new XMLHttpRequest;if(typeof navigator<`u`&&(navigator==null?void 0:navigator.userAgent)?.indexOf(`MSIE 8.0;`)>-1)i.onreadystatechange=function(){return Ic(t,void 0,void 0,function(){return Lc(this,function(t){if(i.readyState==4){if(i.status==0||i.response==null&&i.responseText==null)return n({isSucc:!1,err:new Uc(`Network Error`,{type:Uc.Type.NetworkError,httpCode:i.status})}),[2];if(i.status==12029)return n({isSucc:!1,err:new Uc({message:`Network Error`,type:Uc.Type.NetworkError,httpCode:i.status})}),[2];n({isSucc:!0,res:e.responseType===`text`?i.responseText:new Uint8Array(i.response)})}return[2]})})};else{i.onerror=function(){n({isSucc:!1,err:new Uc({message:`Network Error`,type:Uc.Type.NetworkError,httpCode:i.status})})},i.ontimeout=function(){n({isSucc:!1,err:new Uc({message:`Request Timeout`,type:Uc.Type.NetworkError,code:`TIMEOUT`})})},i.onload=function(){return Ic(t,void 0,void 0,function(){return Lc(this,function(t){return i.status===200||i.status===500?n({isSucc:!0,res:i.response&&(e.responseType===`text`?i.responseText:new Uint8Array(i.response))}):n({isSucc:!1,err:new Uc({message:`HTTP Error `+i.status,type:Uc.Type.ServerError,httpCode:i.status})}),[2]})})};var a=e.transportOptions;a.onProgress&&(i.upload.onprogress=function(e){var t;(t=a.onProgress)==null||t.call(a,e.loaded/e.total)})}if(i.open(e.method,e.url,!0),e.headers)for(var o in e.headers)i.setRequestHeader(o,e.headers[o]);i.responseType=e.responseType;var s=e.timeout;return s&&(i.timeout=s),i.send(e.data),{promise:r,abort:i.abort.bind(i)}},e}(),Dl=function(e){Pc(t,e);function t(t,n){var r=new El;return e.call(this,t,r,q(q({},Ol),n))||this}return t.prototype.callApi=function(t,n,r){return r===void 0&&(r={}),e.prototype.callApi.call(this,t,n,r)},t.prototype.sendMsg=function(t,n,r){return r===void 0&&(r={}),e.prototype.sendMsg.call(this,t,n,r)},t}(xl),Ol=q(q({},Sl),{customObjectIdClass:String}),kl=function(){function e(e){this.caUrl=e}return e.prototype.connect=function(e,t){var n=this;this._ws=this.caUrl?new WebSocket(e,t,this.caUrl):new WebSocket(e,t),this._ws.binaryType=`arraybuffer`,this._ws.onopen=this.options.onOpen,this._ws.onerror=this.options.onError,this._ws.onclose=function(e){n.options.onClose(e.code,e.reason),n._ws=void 0},this._ws.onmessage=function(e){var t;e.data instanceof ArrayBuffer?n.options.onMessage(new Uint8Array(e.data)):typeof e.data==`string`?n.options.onMessage(e.data):(t=n.options.logger)==null||t.warn(`[Unresolved Recv]`,e.data)}},e.prototype.close=function(e,t){var n;(n=this._ws)==null||n.close(e,t),this._ws=void 0},e.prototype.send=function(e){return Ic(this,void 0,void 0,function(){var t,n;return Lc(this,function(r){try{return t=void 0,typeof e==`string`?t=e:(n=e,t=n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)),this._ws.send(t),[2,{}]}catch(e){return[2,{err:new Uc(`Network Error`,{code:`SEND_BUF_ERR`,type:Uc.Type.NetworkError,innerErr:e})}]}})})},e}();(function(e){Pc(t,e);function t(t,n){var r=new kl(n?.caUrl);return e.call(this,t,r,q(q({},Al),n))||this}return t})(Cl);var Al=q(q({},wl),{customObjectIdClass:String}),jl=new Dl(Mr,{server:window.location.origin,json:!0,logger:void 0}),Ml=5e3;function Nl(e,t=[],n=Ml){let[r,i]=(0,_.useState)({status:`loading`}),[a,o]=(0,_.useState)(void 0),s=(0,_.useRef)(!1),c=(0,_.useRef)(!1),l=(0,_.useRef)(e);l.current=e;let[u,d]=(0,_.useState)(0);return(0,_.useEffect)(()=>{c.current=!1;let e=async()=>{if(!s.current){s.current=!0;try{let e=await l.current();if(c.current)return;o(e),i({status:`ok`,value:e})}catch(e){if(c.current)return;i({status:`unavailable`,reason:e instanceof Error?e.message:String(e)})}finally{s.current=!1}}};e();let t=setInterval(()=>void e(),n);return()=>{c.current=!0,clearInterval(t)}},[n,u,...t]),{read:r,lastGood:a,stale:r.status===`unavailable`&&a!==void 0,refresh:()=>d(e=>e+1)}}var Pl=3e5;function Fl(){return Nl(async()=>{let e=await jl.callApi(`Session`,{});if(!e.isSucc)throw Error(e.err.message);return e.res},[],Pl)}function Z(e){let t=Math.floor(e/86400);if(t>0)return`${t}d`;let n=Math.floor(e/3600);return n>0?`${n}h`:`${Math.floor(e/60)}m`}var Q={grace:`in its grace period`,"suppressed-by-alert":`suppressed by an ancestor alert`,"suppressed-by-window":`suppressed by a window`,silenced:`silenced by an operator`,"awaiting-confirmation":`awaiting confirmation`,acked:`acknowledged`,resolved:`resolved`};function Il(e){let t=Cn(e);if(t===null)return null;let n=t===`acked`&&e.ackedBy?` by ${e.ackedBy}`:``,r=t===`suppressed-by-alert`&&e.suppressedByAlertId?` (${e.suppressedByAlertId})`:``;return`${Q[t]}${n}${r}`}function Ll(){let e=Nl(async()=>{let e=await jl.callApi(`Alerts`,{});if(!e.isSucc)throw Error(e.err.message);return e.res}),t=Fl(),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),o=t.read.status===`ok`?t.read.value.person:null;async function s(t){r(t),a(null);try{let n=await jl.callApi(`AckAlert`,{alertKey:t});n.isSucc?e.refresh():a({key:t,message:n.err.message})}finally{r(null)}}return(0,R.jsx)(Er,{title:`alerts`,read:e.read,stale:e.stale,lastGood:e.lastGood,emptyLabel:`No live alerts. The fleet is quiet.`,isEmpty:e=>e.alerts.length===0,children:e=>{let r=Ar(e).alerts;return(0,R.jsxs)(`div`,{className:`scroll-x`,children:[(0,R.jsx)(`p`,{className:`eyebrow`,style:{color:`var(--dim)`},children:Dr(t.read)}),(0,R.jsxs)(`table`,{children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`since`}),(0,R.jsx)(`th`,{children:`alert`}),(0,R.jsx)(`th`,{children:`module`}),(0,R.jsx)(`th`,{children:`state`}),(0,R.jsx)(`th`,{children:`escalation`}),(0,R.jsx)(`th`,{children:`ack`})]})}),(0,R.jsx)(`tbody`,{children:r.map(e=>{let t=Il(e);return(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{style:{color:e.state===`firing`?`var(--firing)`:`var(--dim)`},children:Z(e.firedSecondsAgo)}),(0,R.jsx)(`td`,{children:(0,R.jsx)(`span`,{style:{color:e.state===`firing`?`var(--firing)`:`var(--dim)`},children:e.key})}),(0,R.jsx)(`td`,{style:{color:`var(--dim)`},children:e.key.split(`/`)[0]}),(0,R.jsxs)(`td`,{style:{color:`var(--dim)`},children:[e.state,t?`, ${t}`:``]}),(0,R.jsx)(`td`,{style:{color:`var(--dim)`},children:e.escalationStep>0?`step ${e.escalationStep}`:`—`}),(0,R.jsxs)(`td`,{children:[o===null||!jr(e)?(0,R.jsx)(`span`,{style:{color:`var(--dim)`},children:`—`}):(0,R.jsx)(`button`,{type:`button`,onClick:()=>void s(e.key),disabled:n!==null,children:n===e.key?`acking`:`ack`}),i?.key===e.key?(0,R.jsxs)(`span`,{style:{color:`var(--firing)`},children:[` `,i.message]}):null]})]},e.id)})})]})]})}})}var Rl=D({key:`route`,default:`dashboard`}),zl=D({key:`selectedModule`,default:null}),Bl=D({key:`rosterFilter`,default:``}),Vl=D({key:`selectedBackup`,default:null}),Hl=D({key:`closureDepth`,default:2});function Ul(e){return e.coverage!==`hooked`||e.scheduleHours===null?`none`:e.scheduleHours===24?`daily`:e.scheduleHours===168?`weekly`:`${e.scheduleHours}h`}function Wl(e,t){let n=Math.max(0,Math.round((t-e.at)/1e3));return{id:e.id,moduleId:e.moduleId,daysAgo:Math.floor(n/86400),secondsAgo:n,status:e.completed?`completed`:`failed`,sizeBytes:e.sizeBytes,...e.name?{name:e.name}:{},...e.error?{error:e.error}:{},...e.storage?{storage:e.storage}:{},...e.moduleVersion?{moduleVersion:e.moduleVersion}:{}}}function Gl(e){return{capturedAt:new Date(e.asOf).toISOString(),completeDays:e.windowDays,modules:e.backups.map(e=>({id:e.moduleId,coverage:e.coverage,schedule:Ul(e)})),runs:e.runs.map(t=>Wl(t,e.asOf))}}function Kl({run:e,onClose:t}){let n=[[`taken`,`${Jn(e.secondsAgo)} ago`],[`size`,qn(e.sizeBytes)],[`backup`,e.id],[`destination`,e.storage??`unknown`]];return e.moduleVersion&&n.push([`module version`,`v${e.moduleVersion}`]),e.name&&n.push([`name`,`“${e.name}”`]),(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-end`,flexWrap:`wrap`,gap:22,marginTop:12,padding:`12px 14px`,border:`1px solid var(--rule)`,borderLeft:`2px solid var(--ink)`,background:`var(--raised)`},children:[(0,R.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:9},children:[(0,R.jsx)(`span`,{children:e.moduleId}),(0,R.jsx)(`span`,{className:`eyebrow`,style:{padding:`1px 7px`,border:`1px solid ${e.status===`completed`?`var(--ok)`:`var(--firing)`}`,color:e.status===`completed`?`var(--ok)`:`var(--firing)`},children:e.status===`completed`?`kept`:`failed`})]}),n.map(([e,t])=>(0,R.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,R.jsx)(`span`,{className:`eyebrow`,style:{color:`var(--dim)`},children:e}),(0,R.jsx)(`span`,{style:{fontVariantNumeric:`tabular-nums`},children:t})]},e)),e.error?(0,R.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,gap:2,minWidth:0},children:[(0,R.jsx)(`span`,{className:`eyebrow`,style:{color:`var(--dim)`},children:`why it failed`}),(0,R.jsx)(`span`,{style:{color:`var(--firing)`},children:e.error})]}):null,(0,R.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Close this backup`,style:{marginLeft:`auto`,color:`var(--dim)`,fontSize:15},children:`✕`})]})}function ql(){let e=xt(zl),t=bt(zl),n=xt(Vl),r=bt(Vl),i=Nl(async()=>{let e=await jl.callApi(`Backups`,{});if(!e.isSucc)throw Error(e.err.message);return e.res}),a=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let e=a.current;if(e===null)return;let n=e=>{let n=e.target;if(!(n instanceof Element))return;let i=n.closest(`[data-module]`);if(i===null)return;let a=i.getAttribute(`data-module`);a!==null&&(t(a),r(i.getAttribute(`data-backup`)))};return e.addEventListener(`click`,n),()=>e.removeEventListener(`click`,n)},[t,r]),(0,R.jsx)(Er,{title:`backups`,read:i.read,stale:i.stale,lastGood:i.lastGood,emptyLabel:`No module has a backup history.`,isEmpty:e=>e.backups.length===0,children:t=>{let i=Gl(t),o=Kn(i,{...Vn,days:Zn.space.days,cell:Zn.space.cell,cellGap:Zn.space.cellGap,rowGap:Zn.space.rowGap,gridLeft:Zn.space.gridLeft,headerHeight:Zn.space.headerHeight,padding:Zn.space.padding,labelEvery:Zn.space.labelEvery,hideUnhooked:!Zn.effect.showUnhooked,sortByTrouble:Zn.effect.sortByTrouble}),s=i.runs.find(e=>e.id===n)??null,c=o.rows.find(t=>t.moduleId===e)??null;return(0,R.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,R.jsx)(`div`,{className:`scroll-x`,children:(0,R.jsx)(`div`,{ref:a,dangerouslySetInnerHTML:{__html:Tr(o,Zn,e,void 0,n)}})}),s?(0,R.jsx)(Kl,{run:s,onClose:()=>r(null)}):(0,R.jsxs)(`p`,{style:{color:`var(--dim)`,marginTop:12},children:[o.report.hooked,` of `,o.report.modules,` modules have an`,` `,(0,R.jsx)(`code`,{children:`on_backup`}),` hook.`,` `,o.report.failing>0?`${o.report.failing} failing. `:``,`Pick a square for that day’s attempt.`]}),c?(0,R.jsx)(`p`,{style:{color:`var(--dim)`,marginTop:6},children:Xn(c)}):null]})}})}function Jl({board:e,subjects:t,selected:n}){let r=e===null?null:zn(e,t),i=r!==null&&Bn(r),[a,o]=(0,_.useState)(i),s=(0,_.useRef)(n);(0,_.useEffect)(()=>{s.current!==n&&(s.current=n,o(i))},[n,i]);let c=r===null?0:r.alerts.length,l=n?`${n} and its closure`:`the fleet`;return(0,R.jsxs)(`section`,{style:{flex:`0 0 auto`,borderTop:`1px solid var(--rule)`,marginTop:8,paddingTop:8},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:10},children:[(0,R.jsxs)(`button`,{type:`button`,onClick:()=>o(!a),"aria-expanded":a,className:`eyebrow`,style:{color:i?`var(--firing)`:`var(--dim)`},children:[a?`▾`:`▸`,` alerts `,r===null?`—`:c]}),(0,R.jsx)(`span`,{className:`eyebrow`,style:{color:`var(--dim)`},children:l}),r===null?(0,R.jsx)(`span`,{className:`eyebrow`,style:{color:`var(--stale)`},children:`unavailable`}):i?(0,R.jsx)(`span`,{className:`eyebrow`,style:{color:`var(--firing)`},children:`paging`}):c>0?(0,R.jsx)(`span`,{className:`eyebrow`,style:{color:`var(--dim)`},children:`nobody is being paged`}):null]}),a?r===null?(0,R.jsx)(`p`,{style:{color:`var(--stale)`,padding:`8px 0 0`},children:`Could not read alerts. This is not an all-clear — the fleet may have alerts this console cannot currently see.`}):c===0?(0,R.jsxs)(`p`,{style:{color:`var(--dim)`,padding:`8px 0 0`},children:[`No alert against `,l,`.`]}):(0,R.jsx)(`div`,{className:`scroll-x`,style:{paddingTop:8},children:(0,R.jsx)(`div`,{dangerouslySetInnerHTML:{__html:yr(En(r,Dn),Dn)}})}):null]})}function Yl(e){return{state:Xl(e),lifecycle:e.state,backupOverdue:e.backupStale,unwatched:e.unwatched||e.health.cell===`not observed`,pagesNobody:e.pagesNobody}}function Xl(e){return e.health.cell===`firing`?`firing`:e.health.cell===`not observed`?`unobserved`:e.backupStale?`stale`:`ok`}var Zl={firing:`var(--firing)`,stale:`var(--stale)`,unobserved:`var(--unobserved)`};function Ql(e,t){if(e===null)return`never`;let n=Math.max(0,Math.round((t-e)/1e3));return n<3600?`${Math.max(1,Math.round(n/60))}m`:n<86400?`${Math.round(n/3600)}h`:`${Math.round(n/86400)}d`}function $l({module:e}){let t=Yl(e);return(0,R.jsx)(`span`,{style:{display:`flex`,gap:5,marginLeft:`auto`,flex:`0 0 auto`},children:Qn.map(e=>{let n=e.test(t);return(0,R.jsx)(`span`,{title:n?e.explain:`${e.label} — this lamp is off`,"aria-label":n?e.label:void 0,style:{width:`1em`,textAlign:`center`,lineHeight:1,cursor:`help`,color:n?Zl[e.tone]:`var(--rule)`,opacity:n?1:.45},children:e.glyph},e.key)})})}function eu({modules:e}){let t=xt(zl),n=bt(zl),r=xt(Bl),i=bt(Bl),a=e.filter(e=>e.id.includes(r.trim())),o=Date.now(),s=e.filter(e=>Qn.some(t=>t.test(Yl(e))));return(0,R.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,minHeight:0},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,padding:`0 0 8px`},children:[(0,R.jsxs)(`span`,{className:`eyebrow`,children:[`modules `,e.length]}),s.length>0?(0,R.jsxs)(`span`,{className:`eyebrow`,style:{color:`var(--stale)`},children:[s.length,` need attention`]}):null,t?(0,R.jsx)(`button`,{type:`button`,onClick:()=>n(null),style:{color:`var(--dim)`,marginLeft:`auto`},children:`clear`}):null]}),(0,R.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`filter`,"aria-label":`Filter modules`,style:{background:`var(--raised)`,color:`var(--ink)`,border:`1px solid var(--rule)`,padding:`3px 6px`,font:`inherit`,marginBottom:8}}),(0,R.jsxs)(`div`,{style:{overflowY:`auto`,minHeight:0},children:[a.map(e=>{let r=e.id===t;return(0,R.jsxs)(`button`,{type:`button`,onClick:()=>n(e.id),"aria-current":r,style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,textAlign:`left`,padding:`3px 6px`,background:r?`var(--raised)`:`transparent`,color:r?`var(--ink)`:`var(--dim)`,boxShadow:r?`inset 2px 0 0 var(--ink)`:`none`},children:[(0,R.jsx)(`span`,{style:{flex:`1 1 auto`,minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},children:e.id}),(0,R.jsx)(`span`,{title:e.lastBackupAt===null?`no successful backup on record`:`age of the newest successful backup`,style:{flex:`0 0 auto`,fontVariantNumeric:`tabular-nums`,color:e.backupStale?`var(--stale)`:`var(--dim)`},children:Ql(e.lastBackupAt,o)}),(0,R.jsx)($l,{module:e})]},e.id)}),a.length===0?(0,R.jsxs)(`p`,{style:{color:`var(--dim)`,padding:`4px 6px`},children:[`No module matches “`,r,`”.`]}):null]})]})}function tu(e,t,n){if(e===null)return[];let r=new Set(n.flatMap(e=>e.moduleIds.slice(1)));return[...t.flatMap(t=>r.has(t.module.id)?[]:t.via.map(n=>({fromModuleId:e,toModuleId:t.module.id,capability:n,optional:t.optional}))),...n.flatMap(e=>e.moduleIds.slice(0,-1).map((t,n)=>({fromModuleId:t,toModuleId:e.moduleIds[n+1],capability:e.capability,delegation:!0})))]}function nu(){let e=xt(zl),t=xt(Hl),n=Nl(async()=>{let e=await jl.callApi(`Topology`,{});if(!e.isSucc)throw Error(e.err.message);return e.res}),r=Nl(async()=>{if(!e)return null;let n=await jl.callApi(`Closure`,{moduleId:e,depth:t});if(!n.isSucc)throw Error(n.err.message);return n.res},[e,t]),i=!!e&&r.read.status===`unavailable`,a=r.read.status===`ok`&&r.read.value!==null?r.read.value.nodes:[],o=r.read.status===`ok`&&r.read.value!==null?r.read.value.chains:[],s=Nl(async()=>{let e=await jl.callApi(`Alerts`,{});if(!e.isSucc)throw Error(e.err.message);return e.res}),c=new Map,l=new Set;if(e&&r.read.status===`ok`){c.set(e,0);for(let e of a)c.set(e.module.id,e.hop),e.optional&&l.add(e.module.id)}let u=e===null?null:new Set([e,...c.keys()]),d=s.read.status===`ok`?Ar(s.read.value):null;return(0,R.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,minHeight:0},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,gap:16,flex:`1 1 auto`,minHeight:0},children:[(0,R.jsx)(`div`,{style:{flex:`0 0 200px`,borderRight:`1px solid var(--rule)`,paddingRight:12,minHeight:0},children:(0,R.jsx)(Er,{title:`roster`,read:n.read,stale:n.stale,lastGood:n.lastGood,emptyLabel:`celilo has no modules installed.`,isEmpty:e=>e.modules.length===0,children:e=>(0,R.jsx)(eu,{modules:e.modules})})}),(0,R.jsx)(`div`,{style:{flex:`1 1 auto`,minWidth:0,overflow:`auto`},children:(0,R.jsx)(Er,{title:e?`${e} and what it stands on`:`fleet`,read:n.read,stale:n.stale,lastGood:n.lastGood,emptyLabel:`Nothing is deployed.`,isEmpty:e=>e.modules.length===0,children:t=>{let n=sn({zones:t.zones,modules:t.modules.map(e=>{let t=Yl(e);return{id:e.id,hop:c.get(e.id)??null,optional:l.has(e.id),state:t.state,lifecycle:t.lifecycle,unwatched:t.unwatched,pagesNobody:t.pagesNobody,backupOverdue:t.backupOverdue,systems:e.systems.map(e=>({hostname:e.hostname,address:e.address,zone:e.zone}))}}),edges:tu(e,a,o)},Tt);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{dangerouslySetInnerHTML:{__html:dr(n,Tt)}}),i?(0,R.jsxs)(`p`,{style:{color:`var(--stale)`},children:[`Could not read what `,e,` depends on. The picture below shows placement only, not dependencies.`]}):null,n.report.dropped.length>0||n.report.edgesOverlapping>0?(0,R.jsxs)(`p`,{style:{color:`var(--stale)`},children:[`Incomplete drawing: `,n.report.dropped.length,` module(s) not placed,`,` `,n.report.edgesOverlapping,` edge(s) could not be routed clear.`]}):null]})}})})]}),(0,R.jsx)(Jl,{board:d,subjects:u,selected:e})]})}var ru=[`dashboard`,`alerts`,`backups`];function iu(){let e=xt(Rl),t=bt(Rl);return(0,R.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`100%`,padding:16,gap:4},children:[(0,R.jsxs)(`header`,{style:{display:`flex`,alignItems:`baseline`,gap:20},children:[(0,R.jsx)(`span`,{style:{fontFamily:`var(--sans)`,fontWeight:700,letterSpacing:`0.16em`},children:`CELILO`}),(0,R.jsx)(`nav`,{style:{display:`flex`,gap:16},children:ru.map(n=>(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(n),"aria-current":e===n?`page`:void 0,className:`eyebrow`,style:{color:e===n?`var(--ink)`:`var(--dim)`,boxShadow:e===n?`inset 0 -2px 0 var(--ink)`:`none`},children:n},n))})]}),(0,R.jsx)(`main`,{style:{flex:`1 1 auto`,minHeight:0},children:e===`dashboard`?(0,R.jsx)(nu,{}):e===`alerts`?(0,R.jsx)(Ll,{}):(0,R.jsx)(ql,{})})]})}var au=document.getElementById(`root`);if(!au)throw Error(`#root is missing from index.html`);(0,v.createRoot)(au).render((0,R.jsx)(_.StrictMode,{children:(0,R.jsx)(iu,{})}));