← Files EdgePilot ResearchARCHIVED FILE
src/edgepilot_research/ui_assets/app/assets/index-Beh9CqFB.js
397 KB · Oct 2, 2026 · 00:31 UTC
var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(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 t=e((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 ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function w(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ie(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ae=/\/+/g;function oe(e,t){return typeof e==`object`&&e&&e.key!=null?ie(``+e.key):t.toString(36)}function se(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(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 ce(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,ce(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+oe(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(ae,`$&/`)+`/`),ce(o,r,i,``,function(e){return e})):o!=null&&(w(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ae,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u<e.length;u++)a=e[u],s=l+oe(a,u),c+=ce(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+oe(a,u++),c+=ce(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ce(se(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 le(e,t,n){if(e==null)return e;var r=[],i=0;return ce(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ue(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 T=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)},E={map:le,forEach:function(e,t,n){le(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return le(e,function(){t++}),t},toArray:function(e){return le(e,function(e){return e})||[]},only:function(e){if(!w(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=E,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=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.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)!te.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 ne(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)te.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 ne(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=w,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ue}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(S,T)}catch(e){T(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.8`})),n=e(((e,n)=>{n.exports=t()})),r=e((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,ee||(ee=!0,w());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){if(g=!1,ee){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){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&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?w():ee=!1}}}var w;if(typeof y==`function`)w=function(){y(re)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=re,w=function(){ae.postMessage(null)}}else w=function(){_(re,0)};function oe(t,n){S=_(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`):C=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(S),S=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,w()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(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 i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(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=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.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,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,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=l(t.as,t.crossOrigin);a.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??a.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=l(n,t.crossOrigin);a.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=l(t.as,t.crossOrigin);a.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 a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),o=e(((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=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(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 u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(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`),ee=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),w=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.iterator;function se(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var ce=Symbol.for(`react.client.reference`);function le(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ce?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 te:return`Suspense`;case ne:return`SuspenseList`;case ie:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case S:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case w:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ue=Array.isArray,T=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},fe=[],D=-1;function O(e){return{current:e}}function k(e){0>D||(e.current=fe[D],fe[D]=null,D--)}function A(e,t){D++,fe[D]=e.current,e.current=t}var j=O(null),pe=O(null),me=O(null),he=O(null);function ge(e,t){switch(A(me,t),A(pe,e),A(j,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}}k(j),A(j,e)}function _e(){k(j),k(pe),k(me)}function ve(e){e.memoizedState!==null&&A(he,e);var t=j.current,n=Hd(t,e.type);t!==n&&(A(pe,e),A(j,n))}function ye(e){pe.current===e&&(k(j),k(pe)),he.current===e&&(k(he),Qf._currentValue=de)}var be,M;function xe(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,M=-1<e.stack.indexOf(`
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
`+be+e+M}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!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(`
`),l=s.split(`
`);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=`
`+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{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
Error generating stack: `+e.message+`
`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(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 Ze(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=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(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 $e(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 et(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(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-Ue(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&&it(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function it(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ue(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function at(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:st(n),(n&(e.suspendedLanes|t))===0?n:0}function st(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 ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=E.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ut(e,t){var n=E.p;try{return E.p=e,t()}finally{E.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,mt=`__reactContainer$`+dt,ht=`__reactEvents$`+dt,gt=`__reactListeners$`+dt,_t=`__reactHandles$`+dt,vt=`__reactResources$`+dt,yt=`__reactMarker$`+dt;function bt(e){delete e[ft],delete e[pt],delete e[ht],delete e[gt],delete e[_t]}function xt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ft])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[ft]||e[mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function wt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Tt(e){e[yt]=!0}var Et=new Set,Dt={};function Ot(e,t){kt(e,t),kt(e+`Capture`,t)}function kt(e,t){for(Dt[e]=t,e=0;e<t.length;e++)Et.add(t[e])}var At=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]*$`),jt={},Mt={};function Nt(e){return Ee.call(Mt,e)?!0:Ee.call(jt,e)?!1:At.test(e)?Mt[e]=!0:(jt[e]=!0,!1)}function Pt(e,t,n){if(Nt(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 Ft(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 It(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 Lt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Rt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function zt(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 Bt(e){if(!e._valueTracker){var t=Rt(e)?`checked`:`value`;e._valueTracker=zt(e,t,``+e[t])}}function Vt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Rt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Ht(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 Ut=/[\n"\\]/g;function Wt(e){return e.replace(Ut,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Gt(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=``+Lt(t)):e.value!==``+Lt(t)&&(e.value=``+Lt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):qt(e,o,Lt(n)):qt(e,o,Lt(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=``+Lt(s):e.removeAttribute(`name`)}function Kt(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)){Bt(e);return}n=n==null?``:``+Lt(n),t=t==null?n:``+Lt(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),Bt(e)}function qt(e,t,n){t===`number`&&Ht(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Jt(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=``+Lt(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 Yt(e,t,n){if(t!=null&&(t=``+Lt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Lt(n)}function Xt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(s(92));if(ue(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}n??=``,t=n}n=Lt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Bt(e)}function Zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qt=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 $t(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||Qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function en(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(s(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&$t(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&$t(e,a,t[a])}function tn(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 nn=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`]]),rn=/^[\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 an(e){return rn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function on(){}var sn=null;function cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ln=null,un=null;function dn(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Gt(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="`+Wt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[pt]||null;if(!i)throw Error(s(90));Gt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Vt(r)}break a;case`textarea`:Yt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Jt(e,!!n.multiple,t,!1)}}}var fn=!1;function pn(e,t,n){if(fn)return e(t,n);fn=!0;try{return e(t)}finally{if(fn=!1,(ln!==null||un!==null)&&(bu(),ln&&(t=ln,e=un,un=ln=null,dn(t),e)))for(t=0;t<e.length;t++)dn(e[t])}}function mn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[pt]||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(s(231,t,typeof n));return n}var hn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),gn=!1;if(hn)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){gn=!0}}),window.addEventListener(`test`,_n,_n),window.removeEventListener(`test`,_n,_n)}catch{gn=!1}var vn=null,yn=null,bn=null;function xn(){if(bn)return bn;var e,t=yn,n=t.length,r,i=`value`in vn?vn.value:vn.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 bn=i.slice(e,1<r?1-r:void 0)}function Sn(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 Cn(){return!0}function wn(){return!1}function Tn(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)?Cn:wn,this.isPropagationStopped=wn,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=Cn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Cn)},persist:function(){},isPersistent:Cn}),t}var En={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dn=Tn(En),On=h({},En,{view:0,detail:0}),kn=Tn(On),An,jn,Mn,Nn=h({},On,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wn,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!==Mn&&(Mn&&e.type===`mousemove`?(An=e.screenX-Mn.screenX,jn=e.screenY-Mn.screenY):jn=An=0,Mn=e),An)},movementY:function(e){return`movementY`in e?e.movementY:jn}}),Pn=Tn(Nn),Fn=Tn(h({},Nn,{dataTransfer:0})),In=Tn(h({},On,{relatedTarget:0})),Ln=Tn(h({},En,{animationName:0,elapsedTime:0,pseudoElement:0})),Rn=Tn(h({},En,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),zn=Tn(h({},En,{data:0})),Bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Vn={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`},Hn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hn[e])?!!t[e]:!1}function Wn(){return Un}var Gn=Tn(h({},On,{key:function(e){if(e.key){var t=Bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Sn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Vn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wn,charCode:function(e){return e.type===`keypress`?Sn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Sn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Kn=Tn(h({},Nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),qn=Tn(h({},On,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wn})),Jn=Tn(h({},En,{propertyName:0,elapsedTime:0,pseudoElement:0})),Yn=Tn(h({},Nn,{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})),Xn=Tn(h({},En,{newState:0,oldState:0})),Zn=[9,13,27,32],Qn=hn&&`CompositionEvent`in window,$n=null;hn&&`documentMode`in document&&($n=document.documentMode);var er=hn&&`TextEvent`in window&&!$n,tr=hn&&(!Qn||$n&&8<$n&&11>=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=xn(),bn=yn=vn=null,or=!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 tr&&t.locale!==`ko`?null:t.data;default:return null}}var lr={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 ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!lr[e.type]:t===`textarea`}function dr(e,t,n,r){ln?un?un.push(r):un=[r]:ln=r,t=Ed(t,`onChange`),0<t.length&&(n=new Dn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function mr(e){yd(e,0)}function hr(e){if(Vt(Ct(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(hn){var vr;if(hn){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){fr&&(fr.detachEvent(`onpropertychange`,Sr),pr=fr=null)}function Sr(e){if(e.propertyName===`value`&&hr(pr)){var t=[];dr(t,pr,e,cn(e)),pn(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),fr=t,pr=n,fr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(pr)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(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(!Ee.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(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=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ht(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=Ht(e.document)}return t}function Pr(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 Fr=hn&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Ht(r)||(r=Ir,`selectionStart`in r&&Pr(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}),Rr&&kr(Rr,r)||(Rr=r,r=Ed(Lr,`onSelect`),0<r.length&&(t=new Dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Hr={animationend:Vr(`Animation`,`AnimationEnd`),animationiteration:Vr(`Animation`,`AnimationIteration`),animationstart:Vr(`Animation`,`AnimationStart`),transitionrun:Vr(`Transition`,`TransitionRun`),transitionstart:Vr(`Transition`,`TransitionStart`),transitioncancel:Vr(`Transition`,`TransitionCancel`),transitionend:Vr(`Transition`,`TransitionEnd`)},Ur={},Wr={};hn&&(Wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),`TransitionEvent`in window||delete Hr.transitionend.transition);function Gr(e){if(Ur[e])return Ur[e];if(!Hr[e])return e;var t=Hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wr)return Ur[e]=t[n];return e}var Kr=Gr(`animationend`),qr=Gr(`animationiteration`),Jr=Gr(`animationstart`),Yr=Gr(`transitionrun`),Xr=Gr(`transitionstart`),Zr=Gr(`transitioncancel`),Qr=Gr(`transitionend`),$r=new Map,ei=`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(` `);ei.push(`scrollEnd`);function ti(e,t){$r.set(e,t),Ot(t,[e])}var ni=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)},ri=[],ii=0,ai=0;function oi(){for(var e=ii,t=ai=ii=0;t<e;){var n=ri[t];ri[t++]=null;var r=ri[t];ri[t++]=null;var i=ri[t];ri[t++]=null;var a=ri[t];if(ri[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&&ui(n,i,a)}}function si(e,t,n,r){ri[ii++]=e,ri[ii++]=t,ri[ii++]=n,ri[ii++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(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-Ue(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<du)throw du=0,fu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(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 mi(e,t,n,r){return new pi(e,t,n,r)}function hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var n=e.alternate;return n===null?(n=mi(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 _i(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 vi(e,t,n,r,i,a){var o=0;if(r=e,typeof e==`function`)hi(e)&&(o=1);else if(typeof e==`string`)o=Uf(e,n,j.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ie:return e=mi(31,n,t,i),e.elementType=ie,e.lanes=a,e;case y:return yi(n.children,i,a,t);case b:o=8,i|=24;break;case x:return e=mi(12,n,t,i|2),e.elementType=x,e.lanes=a,e;case te:return e=mi(13,n,t,i),e.elementType=te,e.lanes=a,e;case ne:return e=mi(19,n,t,i),e.elementType=ne,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:o=10;break a;case ee:o=9;break a;case C:o=11;break a;case re:o=14;break a;case w:o=16,r=null;break a}o=29,n=Error(s(130,e===null?`null`:typeof e,``)),r=null}return t=mi(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function yi(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function bi(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function xi(e){var t=mi(18,null,null,0);return t.stateNode=e,t}function Si(e,t,n){return t=mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ci=new WeakMap;function wi(e,t){if(typeof e==`object`&&e){var n=Ci.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},Ci.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var Ti=[],Ei=0,Di=null,Oi=0,ki=[],Ai=0,ji=null,Mi=1,Ni=``;function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=Di,Di=e,Oi=t}function Fi(e,t,n){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,ji=e;var r=Mi;e=Ni;var i=32-Ue(r)-1;r&=~(1<<i),n+=1;var a=32-Ue(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-Ue(t)+i|n<<i|r,Ni=a+e}else Mi=1<<a|n<<i|r,Ni=e}function Ii(e){e.return!==null&&(Pi(e,1),Fi(e,1,0))}function Li(e){for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null;for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Ni=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null}function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=Ni,ki[Ai++]=ji,Mi=t.id,Ni=t.overflow,ji=e}var zi=null,N=null,P=!1,Bi=null,Vi=!1,Hi=Error(s(519));function Ui(e){throw Yi(wi(Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Hi}function Wi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Xt(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||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||Ui(e,!0)}function Gi(e){for(zi=e.return;zi;)switch(zi.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:zi=zi.return}}function Ki(e){if(e!==zi)return!1;if(!P)return Gi(e),P=!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&&N&&Ui(e),Gi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));N=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));N=uf(e)}else t===27?(t=N,Zd(e.type)?(e=lf,lf=null,N=e):N=t):N=zi?cf(e.stateNode.nextSibling):null;return!0}function qi(){N=zi=null,P=!1}function Ji(){var e=Bi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Bi=null),e}function Yi(e){Bi===null?Bi=[e]:Bi.push(e)}var Xi=O(null),Zi=null,Qi=null;function $i(e,t,n){A(Xi,t._currentValue),t._currentValue=n}function ea(e){e._currentValue=Xi.current,k(Xi)}function ta(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 na(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),ta(a.return,n,e),r||(o=null);break a}a=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ta(o,n,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function ra(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var c=i.type;Or(i.pendingProps.value,o.value)||(e===null?e=[c]:e.push(c))}}else if(i===he.current){if(o=i.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&na(t,e,n,r),t.flags|=262144}function ia(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){Zi=e,Qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function oa(e){return ca(Zi,e)}function sa(e,t){return Zi===null&&aa(e),ca(e,t)}function ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Qi===null){if(e===null)throw Error(s(308));Qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qi=Qi.next=t;return n}var la=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()})}},ua=t.unstable_scheduleCallback,da=t.unstable_NormalPriority,F={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fa(){return{controller:new la,data:new Map,refCount:0}}function pa(e){e.refCount--,e.refCount===0&&ua(da,function(){e.controller.abort()})}var ma=null,ha=0,ga=0,_a=null;function va(e,t){if(ma===null){var n=ma=[];ha=0,ga=dd(),_a={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ha++,t.then(ya,ya),t}function ya(){if(--ha===0&&ma!==null){_a!==null&&(_a.status=`fulfilled`);var e=ma;ma=null,ga=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function I(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 ba=T.S;T.S=function(e,t){eu=je(),typeof t==`object`&&t&&typeof t.then==`function`&&va(e,t),ba!==null&&ba(e,t)};var xa=O(null);function Sa(){var e=xa.current;return e===null?K.pooledCache:e}function Ca(e,t){t===null?A(xa,xa.current):A(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:F._currentValue,pool:e}}var Ta=Error(s(460)),Ea=Error(s(474)),Da=Error(s(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(on,on),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(on,on);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(s(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,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(s(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(s(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(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 i(e,t){return e=gi(e,t),e.index=0,e.sibling=null,e}function a(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 o(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=bi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===w&&ja(a)===t.type)?(t=i(t,n.props),Ra(t,n),t.return=e,t):(t=vi(n.type,n.key,n.props,null,e.mode,r),Ra(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=Si(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=yi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=vi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case v:return t=Si(t,e.mode,n),t.return=e,t;case w:return t=ja(t),f(e,t,n)}if(ue(t)||se(t))return t=yi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===S)return f(e,sa(e,t),n);za(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 w:return n=ja(n),p(e,t,n,r)}if(ue(n)||se(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===S)return p(e,t,sa(e,n),r);za(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 w:return r=ja(r),m(e,t,n,r,i)}if(ue(r)||se(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===S)return m(e,t,n,sa(t,r),i);za(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=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),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&Pi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return P&&Pi(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),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),P&&Pi(i,h),l}function g(i,o,c,l){if(c==null)throw Error(s(151));for(var u=null,d=null,h=o,g=o=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),P&&Pi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return P&&Pi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),P&&Pi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===w&&ja(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ra(c,a),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===y?(c=yi(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=vi(a.type,a.key,a.props,null,e.mode,c),Ra(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=Si(a,e.mode,c),c.return=e,e=c}return o(e);case w:return a=ja(a),b(e,r,a,c)}if(ue(a))return h(e,r,a,c);if(se(a)){if(l=se(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,La(a),c);if(a.$$typeof===S)return b(e,r,sa(e,a),c);za(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=bi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(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 Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Ja(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,at(e,n)}}function Ya(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 Xa=!1;function Za(){if(Xa){var e=_a;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!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?(J&f)===f:(r&f)===f){f!==0&&f===ga&&(Xa=!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:Ua=!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),Gl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=O(null),no=O(0);function ro(e,t){e=Wl,A(no,e),A(to,t),Wl=e|t.baseLanes}function io(){A(no,Wl),A(to,to.current)}function ao(){Wl=no.current,k(to),k(no)}var oo=O(null),so=null;function co(e){var t=e.alternate;A(L,L.current&1),A(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){A(L,L.current),A(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(A(L,L.current),A(oo,e),so===null&&(so=e)):fo(e)}function fo(){A(L,L.current),A(oo,oo.current)}function po(e){k(oo),so===e&&(so=null),k(L)}var L=O(0);function mo(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 ho=0,R=null,z=null,B=null,go=!1,_o=!1,vo=!1,yo=0,bo=0,xo=null,So=0;function V(){throw Error(s(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return ho=a,R=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Bs:Vs,vo=!1,a=n(r,i),vo=!1,_o&&(a=Eo(t,n,r,i)),To(e),a}function To(e){T.H=zs;var t=z!==null&&z.next!==null;if(ho=0,B=z=R=null,go=!1,bo=0,xo=null,t)throw Error(s(300));e===null||ic||(e=e.dependencies,e!==null&&ia(e)&&(ic=!0))}function Eo(e,t,n,r){R=e;var i=0;do{if(_o&&(xo=null),bo=0,_o=!1,25<=i)throw Error(s(301));if(i+=1,B=z=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}T.H=Hs,a=t(n,r)}while(_o);return a}function Do(){var e=T.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(z===null?null:z.memoizedState)!==e&&(R.flags|=1024),t}function Oo(){var e=yo!==0;return yo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(go){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}go=!1}ho=0,B=z=R=null,_o=!1,bo=yo=0,xo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return B===null?R.memoizedState=B=e:B=B.next=e,B}function H(){if(z===null){var e=R.alternate;e=e===null?null:e.memoizedState}else e=z.next;var t=B===null?R.memoizedState:B.next;if(t!==null)B=t,z=e;else{if(e===null)throw R.alternate===null?Error(s(467)):Error(s(310));z=e,e={memoizedState:z.memoizedState,baseState:z.baseState,baseQueue:z.baseQueue,queue:z.queue,next:null},B===null?R.memoizedState=B=e:B=B.next=e}return B}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=bo;return bo+=1,xo===null&&(xo=[]),e=Aa(xo,e,t),t=R,(B===null?t.memoizedState:B.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===S)return oa(e)}throw Error(s(438,String(e)))}function Fo(e){var t=null,n=R.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=R.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=Mo(),R.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]=ae;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(H(),z,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=o=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(J&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===ga&&(d=!0);else if((ho&p)===p){u=u.next,p===ga&&(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,o=a):l=l.next=f,R.lanes|=p,Gl|=p;f=u.action,vo&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,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,o=a):l=l.next=p,R.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=c,!Or(a,e.memoizedState)&&(ic=!0,d&&(n=_a,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=H(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Or(a,t.memoizedState)||(ic=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Bo(e,t,n){var r=R,i=H(),a=P;if(a){if(n===void 0)throw Error(s(407));n=n()}else n=t();var o=!Or((z||i).memoizedState,n);if(o&&(i.memoizedState=n,ic=!0),i=i.queue,ds(Uo.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||B!==null&&B.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,i,n,t),null),K===null)throw Error(s(349));a||ho&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=R.updateQueue,t===null?(t=Mo(),R.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Or(e,n)}catch{return!0}}function Go(e){var t=li(e,2);t!==null&&hu(t,e,2)}function Ko(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),vo){He(!0);try{n()}finally{He(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,z,typeof r==`function`?r:Io)}function Jo(e,t,n,r,i){if(Is(e))throw Error(s(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};T.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Yo(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=T.T,o={};T.T=o;try{var s=n(i,r),c=T.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),T.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(P){var n=K.formState;if(n!==null){a:{var r=R;if(P){if(N){b:{for(var i=N,a=Vi;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){N=cf(i.nextSibling),r=i.data===`F!`;break a}}Ui(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,R,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,R,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,R,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(H(),z,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===Ta?Da:e}else r=t;t=H();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(R.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=H(),n=z;if(n!==null)return rs(t,n,e);H(),t=t.memoizedState,n=H();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=R.updateQueue,t===null&&(t=Mo(),R.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 ss(){return H().memoizedState}function cs(e,t,n,r){var i=jo();R.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=H();r=r===void 0?null:r;var a=i.memoizedState.inst;z!==null&&r!==null&&Co(r,z.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(R.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){R.flags|=4;var t=R.updateQueue;if(t===null)t=Mo(),R.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=H().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(G&2)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=H();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=H();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),vo){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||ho&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),R.lanes|=e,Gl|=e,n)}function Ss(e,t,n,r){return Or(n,t)?n:to.current===null?!(ho&42)||ho&1073741824&&!(J&261930)?(ic=!0,e.memoizedState=n):(e=mu(),R.lanes|=e,Gl|=e,t):(e=xs(e,n,r),Or(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=E.p;E.p=a!==0&&8>a?a:8;var o=T.T,s={};T.T=s,Fs(e,!1,t,n);try{var c=i(),l=T.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,I(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),T.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Es(e).queue;Cs(e,i,t,de,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:de},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return oa(Qf)}function ks(){return H().memoizedState}function As(){return H().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ka(n);var r=qa(t,e,n);r!==null&&(hu(r,t,n),Ja(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ci(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(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,Or(s,o))return si(e,t,i,0),K===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(s(479))}else t=ci(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===R||t!==null&&t===R}function Ls(e,t){_o=go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var zs={readContext:oa,use:Po,useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useLayoutEffect:V,useInsertionEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V,useDeferredValue:V,useTransition:V,useSyncExternalStore:V,useId:V,useHostTransitionStatus:V,useFormState:V,useActionState:V,useOptimistic:V,useMemoCache:V,useCacheRefresh:V};zs.useEffectEvent=V;var Bs={readContext:oa,use:Po,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(vo){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(vo){He(!0);try{n(t)}finally{He(!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=Ms.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,R,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(jo(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,R,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=R,i=jo();if(P){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),K===null)throw Error(s(349));J&127||Vo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,us(Uo.bind(null,r,a,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),n},useId:function(){var e=jo(),t=K.identifierPrefix;if(P){var n=Ni,r=Mi;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=yo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=So++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,R,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return jo().memoizedState=js.bind(null,R)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:oa,use:Po,useCallback:ys,useContext:oa,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(H(),z.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=H().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(H(),z,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:oa,use:Po,useCallback:ys,useContext:oa,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=H();return z===null?xs(n,e,t):Ss(n,z.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=H().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=H();return z===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,z,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(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 Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(hu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(hu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(hu(t,e,n),Ja(t,e,n))}};function Gs(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?!kr(n,r)||!kr(i,a):!0}function Ks(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&&Ws.enqueueReplaceState(t,t.state,null)}function qs(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 Js(e){ni(e)}function Ys(e){console.error(e)}function Xs(e){ni(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(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 $s(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ka(e),e.tag=3,e}function tc(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(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ra(t,n,i,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Du():n.alternate===null&&X===0&&(X=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Oa?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)),Gu(e,r,i)),!1}throw Error(s(435,n.tag))}return Gu(e,r,i),Du(),!1}if(P)return t=oo.current,t===null?(r!==Hi&&(t=Error(s(423),{cause:r}),Yi(wi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=wi(r,n),i=$s(e.stateNode,r,i),Ya(e,i),X!==4&&(X=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Hi&&(e=Error(s(422),{cause:r}),Yi(wi(e,n)))),!1;var a=Error(s(520),{cause:r});if(a=wi(a,n),Xl===null?Xl=[a]:Xl.push(a),X!==4&&(X=2),t===null)return!0;r=wi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=$s(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(ru===null||!ru.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ec(i),tc(i,e,n,r),Ya(n,i),!1}n=n.return}while(n!==null);return!1}var rc=Error(s(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function oc(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 aa(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!ic?(ko(e,t,i),Ac(e,t,i)):(P&&s&&Ii(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=gi(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref)if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return gc(e,t,n,r,i)}function lc(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 dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:F._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ra(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Va(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(lo(t),(e=N)?(e=rf(e,Vi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Ui(t);return t.lanes=536870912,null}return fc(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(lo(t),i)if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(ic||ra(e,t,n,!1),i=(n&e.childLanes)!==0,ic||i){if(r=K,r!==null&&(o=ot(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,li(e,o),hu(r,e,o),rc;Du(),t=pc(e,t,n)}else e=a.treeContext,N=cf(o.nextSibling),zi=t,P=!0,Bi=null,Vi=!1,e!==null&&Ri(t,e),t=fc(t,r),t.flags|=4096;return t}return e=gi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(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(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gc(e,t,n,r,i){return aa(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!ic?(ko(e,t,i),Ac(e,t,i)):(P&&r&&Ii(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return aa(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!ic?(ko(e,t,a),Ac(e,t,a)):(P&&r&&Ii(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(aa(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=oa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?oa(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(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&&Ws.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),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=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=oa(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)&&Ks(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ua||Gs(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,Ga(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=oa(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)&&Ks(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&ia(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ua||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ia(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,hc(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=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return qi(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:wa()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Cc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(L.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(P){if(i?co(t):fo(t),(e=N)?(e=rf(e,Vi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Ui(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(fo(t),i=t.mode,c=Tc({mode:`hidden`,children:c},i),r=yi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,o,n),t.memoizedState=bc,uc(null,r)):(co(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(co(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,i=t.mode,r=Tc({mode:`visible`,children:r.children},i),c=yi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,o,n),t.memoizedState=bc,t=uc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),of(c)){if(o=c.nextSibling&&c.nextSibling.dataset,o)var u=o.dgst;o=u,r=Error(s(419)),r.stack=``,r.digest=o,Yi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||ra(e,t,n,!1),o=(n&e.childLanes)!==0,ic||o){if(o=K,o!==null&&(r=ot(o,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),hu(o,e,r),rc;af(c)||Du(),t=Ec(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,N=cf(c.nextSibling),zi=t,P=!0,Bi=null,Vi=!1,e!==null&&Ri(t,e),t=wc(t,r.children),t.flags|=4096);return t}return i?(fo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=gi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=yi(c,i,n,null),c.flags|=2):c=gi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(i=c.cachePool,i===null?i=wa():(l=F._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Sc(e,o,n),t.memoizedState=bc,uc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=gi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=mi(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Va(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ta(e.return,t,n)}function Oc(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 kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=L.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,A(L,o),ac(e,t,r,n),r=P?Oi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(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&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(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&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ia(e)))}function Mc(e,t,n){switch(t.tag){case 3:ge(t,t.stateNode.containerInfo),$i(t,F,e.memoizedState.cache),qi();break;case 27:case 5:ve(t);break;case 4:ge(t,t.stateNode.containerInfo);break;case 10:$i(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ra(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(L,L.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:$i(t,F,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}else ic=!1,P&&t.flags&1048576&&Fi(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)hi(e)?(r=qs(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===C){t.tag=11,t=oc(null,t,e,r,n);break a}if(i===re){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=le(e)||e,Error(s(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=qs(r,t.pendingProps),vc(e,t,r,i,n);case 3:a:{if(ge(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ga(e,t),Qa(t,r,null,n);var o=t.memoizedState;if(r=o.cache,$i(t,F,r),r!==a.cache&&na(t,[F],n,!0),Za(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=yc(e,t,r,n);break a}else if(r!==i){i=wi(Error(s(424)),t),Yi(i),t=yc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(N=cf(e.firstChild),zi=t,P=!0,Bi=null,Vi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qi(),r===i){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Bd(me.current).createElement(n),r[ft]=t,r[pt]=e,Pd(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ve(t),e===null&&P&&(r=t.stateNode=ff(t.type,t.pendingProps,me.current),zi=t,Vi=!0,i=N,Zd(t.type)?(lf=i,N=cf(r.firstChild)):N=i),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((i=r=N)&&(r=tf(r,t.type,t.pendingProps,Vi),r===null?i=!1:(t.stateNode=r,zi=t,N=cf(r.firstChild),Vi=!1,i=!0)),i||Ui(t)),ve(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,Ud(i,a)?r=null:o!==null&&Ud(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=wo(e,t,Do,null,null,n),Qf._currentValue=i),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=N)&&(n=nf(n,t.pendingProps,Vi),n===null?e=!1:(t.stateNode=n,zi=t,N=null,e=!0)),e||Ui(t)),null;case 13:return Cc(e,t,n);case 4:return ge(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,$i(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,aa(t),i=oa(i),r=r(i),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return aa(t),r=oa(F),e===null?(i=Sa(),i===null&&(i=K,a=fa(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Wa(t),$i(t,F,i)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,$i(t,F,r),r!==i.cache&&na(t,[F],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),$i(t,F,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Pc(e){e.flags|=4}function Fc(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(wu())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ma=Oa,Ea}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:et(),e.lanes|=t,Yl|=t)}function Rc(e,t){if(!P)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 U(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 zc(e,t,n){var r=t.pendingProps;switch(Li(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return U(t),null;case 1:return U(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ea(F),_e(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ki(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ji())),U(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Pc(t),a===null?(U(t),Fc(t,i,null,r,n)):(U(t),Ic(t,a))):a?a===e.memoizedState?(U(t),t.flags&=-16777217):(Pc(t),U(t),Ic(t,a)):(e=e.memoizedProps,e!==r&&Pc(t),U(t),Fc(t,i,e,r,n)),null;case 27:if(ye(t),n=me.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return U(t),null}e=j.current,Ki(t)?Wi(t,e):(e=ff(i,r,n),t.stateNode=e,Pc(t))}return U(t),null;case 5:if(ye(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return U(t),null}if(a=j.current,Ki(t))Wi(t,a);else{var o=Bd(me.current);switch(a){case 1:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=o.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[ft]=t,a[pt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=me.current,Ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=zi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ui(t,!0)}else e=Bd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ki(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[ft]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(s(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[ft]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return _e(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return ea(t.type),U(t),null;case 19:if(k(L),r=t.memoizedState,r===null)return U(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null)if(i)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=mo(e),a!==null){for(t.flags|=128,Rc(r,!1),e=a.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return A(L,L.current&1|2),P&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>tu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=mo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!P)return U(t),null}else 2*je()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,n=L.current,A(L,i?n&1|2:n&1),P&&Pi(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(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&&k(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ea(F),U(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Bc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(F),_e(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(s(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(L),null;case 4:return _e(),null;case 10:return ea(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&k(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(F),null;case 25:return null;default:return null}}function Vc(e,t){switch(Li(t),t.tag){case 3:ea(F),_e();break;case 26:case 27:case 5:ye(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:k(L);break;case 10:ea(t.type);break;case 22:case 23:po(t),ao(),e!==null&&k(xa);break;case 24:ea(F)}}function Hc(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){Z(t,t.return,e)}}function Uc(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){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(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){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(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){Z(e,t,n)}else n.current=null}function Jc(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){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[pt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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=on));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 $c(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($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(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[ft]=e,t[pt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=Nr(e),Pr(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 i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(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,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,a=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++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=qs(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Hc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(xl(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{eo(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:xl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?Cl(e,n,!!(n.subtreeFlags&8772)):xl(e,n),tl=i,nl=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(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 W=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=W,i=ll;Zd(n.type)&&(W=n.stateNode,ll=!1),ul(e,t,n),pf(n.stateNode),W=r,ll=i;break;case 5:nl||qc(n,t);case 6:if(r=W,i=ll,W=null,ul(e,t,n),W=r,ll=i,W!==null)if(ll)try{(W.nodeType===9?W.body:W.nodeName===`HTML`?W.ownerDocument.body:W).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{W.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:W!==null&&(ll?(e=W,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(W,n.stateNode));break;case 4:r=W,i=ll,W=n.stateNode.containerInfo,ll=!0,ul(e,t,n),W=r,ll=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),ul(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,ul(e,t,n),nl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function pl(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){Z(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(s(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,o=t,c=o;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){W=c.stateNode,ll=!1;break a}break;case 5:W=c.stateNode,ll=!1;break a;case 3:case 4:W=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(W===null)throw Error(s(160));dl(a,o,i),W=null,ll=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(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 i=_l;if(gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var a=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,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[yt]||a[ft]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Pd(a,r,n),a[ft]=e,Tt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;case`meta`:if(o=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;default:throw Error(s(468,r))}a[ft]=e,Tt(a),r=a}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){i=e.stateNode;try{Zt(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Yc(e,i,n===null?i:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=_l,_l=gf(t.containerInfo),gl(t,e),_l=i,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=_l,_l=gf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=je()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||i,nl=d||l,gl(t,e),nl=d,tl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||tl||nl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.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){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(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,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode;$c(e,Zc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(Zt(a,``),n.flags&=-33),$c(e,Zc(e),a);break;case 3:case 4:var o=n.stateNode.containerInfo;Qc(e,Zc(e),o);break;default:throw Error(s(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Sl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Sl(t);break;case 27:pf(t.stateNode);case 26:case 5:qc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(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:Cl(i,a,n),Hc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(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++)$a(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Kc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(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&&pa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Hc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(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&&pa(e)));break;case 12:if(i&2048){El(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){Z(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(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:Ol(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(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:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Gf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=gf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(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 Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(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:pa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=oa(F),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return oa(F).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,X=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return G&2&&J!==0?J&-J:T.T===null?lt():dd()}function mu(){if(Jl===0)if(!(J&536870912)||P){var e=Je;Je<<=1,!(Je&3932160)&&(Je=262144),Jl=e}else Jl=536870912;return e=oo.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,J,Jl,!1)),nt(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(Kl|=n),X===4&&yu(e,J,Jl,!1)),rd(e))}function gu(e,t,n){if(G&6)throw Error(s(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Qe(e,t),i=r?Au(e,t):Ou(e,t,!0),a=r;do{if(i===0){Hl&&!r&&yu(e,t,0,!1);break}if(n=e.current.alternate,a&&!vu(n)){i=Ou(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o===0?o&536870912?536870912:0:o;if(o!==0){t=o;a:{var c=e;i=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,o).flags|=256),o=Ou(c,o,!1),o!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=a,Kl|=a,i=4;break a}a=Zl,Zl=i,a!==null&&(Zl===null?Zl=a:Zl.push.apply(Zl,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Vl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=$l+300-je(),10<i)){if(yu(r,t,Jl,!Vl),Ze(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,a,`Throttled`,-0,0),i);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,a,null,-0,0)}break}while(1);rd(e)}function _u(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:on},Ml(t,a,d);var m=(a&62914560)===a?$l-je():(a&4194048)===a?eu-je():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!Or(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ue(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&it(e,n,t)}function bu(){return G&6?!0:(id(0,!1),!1)}function xu(){if(q!==null){if(Y===0)var e=q.return;else e=q,Qi=Zi=null,Ao(e),Fa=null,Ia=0,e=q;for(;e!==null;)Vc(e.alternate,e),e=e.return;q=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),K=e,q=n=gi(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=Qe(e,t),Ul=!1,Yl=Jl=ql=Kl=Gl=X=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ue(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,oi(),n}function Cu(e,t){R=null,T.H=zs,t===Ta||t===Da?(t=Na(),Y=3):t===Ea?(t=Na(),Y=4):Y=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(X=1,Zs(e,wi(t,e.current)))}function wu(){var e=oo.current;return e===null?!0:(J&4194048)===J?so===null:(J&62914560)===J||J&536870912?e===so:!1}function Tu(){var e=T.H;return T.H=zs,e===null?zs:e}function Eu(){var e=T.A;return T.A=Rl,e}function Du(){X=4,Vl||(J&4194048)!==J&&oo.current!==null||(Hl=!0),!(Gl&134217727)&&!(Kl&134217727)||K===null||yu(K,J,Jl,!1)}function Ou(e,t,n){var r=G;G|=2;var i=Tu(),a=Eu();(K!==e||J!==t)&&(nu=null,Su(e,t)),t=!1;var o=X;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Pu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Pu(e,s,c,l)}}ku(),o=X;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Qi=Zi=null,G=r,T.H=i,T.A=a,q===null&&(K=null,J=0,oi()),o}function ku(){for(;q!==null;)Mu(q)}function Au(e,t){var n=G;G|=2;var r=Tu(),i=Eu();K!==e||J!==t?(nu=null,tu=je()+500,Su(e,t)):Hl=Qe(e,t);a:do try{if(Y!==0&&q!==null){t=q;var a=Bl;b:switch(Y){case 1:Y=0,Bl=null,Pu(e,t,a,1);break;case 2:case 9:if(ka(a)){Y=0,Bl=null,Nu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),rd(e)},a.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:ka(a)?(Y=0,Bl=null,Nu(t)):(Y=0,Bl=null,Pu(e,t,a,7));break;case 5:var o=null;switch(q.tag){case 26:o=q.memoizedState;case 5:case 27:var c=q;if(o?Wf(o):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Fu(u))}break b}}Y=0,Bl=null,Pu(e,t,a,5);break;case 6:Y=0,Bl=null,Pu(e,t,a,6);break;case 8:xu(),X=6;break a;default:throw Error(s(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Qi=Zi=null,T.H=r,T.A=i,G=n,q===null?(K=null,J=0,oi(),X):0}function ju(){for(;q!==null&&!ke();)Mu(q)}function Mu(e){var t=Nc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:Ao(t);default:Vc(n,t),t=q=_i(t,Wl),t=Nc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Pu(e,t,n,r){Qi=Zi=null,Ao(t),Fa=null,Ia=0;var i=t.return;try{if(nc(e,i,t,n,J)){X=1,Zs(e,wi(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;X=1,Zs(e,wi(n,e.current)),q=null;return}t.flags&32768?(P||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=zc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);X===0&&(X=5)}function Iu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);X=6,q=null}function Lu(e,t,n,r,i,a,o,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(G&6)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(a=t.lanes|t.childLanes,a|=ai,rt(e,n,a,o,c,l),e===K&&(q=K=null,J=0),ou=t,au=e,su=n,cu=a,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Fe,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=T.T,T.T=null,i=E.p,E.p=2,o=G,G|=4;try{ol(e,t,n)}finally{G=o,E.p=i,T.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=G;G|=4;try{vl(t,e);var a=zd,o=Nr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(c!==null&&Pr(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 _=jr(s,h),v=jr(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{G=i,E.p=r,T.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,E.p=r,T.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Ae();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ct(n),t=t.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=T.T,i=E.p,E.p=2,T.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{T.T=t,E.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ct(su),r=T.T,i=E.p;try{E.p=32>n?32:n,T.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(s(331));var c=G;if(G|=4,Fl(a.current),Dl(a,a.current,o,n),G=c,id(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,a)}catch{}return!0}finally{E.p=i,T.T=r,Vu(e,t)}}function Wu(e,t,n){t=wi(n,t),t=$s(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(nt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=wi(n,e),n=ec(2),r=qa(t,n,2),r!==null&&(tc(n,r,t,e),nt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;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)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>je()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=et()),e=li(e,t),e!==null&&(nt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return De(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;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-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Ze(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=je(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ue(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=$e(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=Ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Oe(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&&Oe(r),ct(n)){case 2:case 8:n=Pe;break;case 32:n=Fe;break;case 268435456:n=Le;break;default:n=Fe}return r=cd.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Oe(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=J;return r=Ze(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,je()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){G&6?De(Ne,ad):od()})}function dd(){if(nd===0){var e=ga;e===0&&(e=qe,qe<<=1,!(qe&261888)&&(qe=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:an(``+e)}function pd(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 md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Dn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ei.length;hd++){var gd=ei[hd];ti(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ti(Kr,`onAnimationEnd`),ti(qr,`onAnimationIteration`),ti(Jr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Yr,`onTransitionRun`),ti(Xr,`onTransitionStart`),ti(Zr,`onTransitionCancel`),ti(Qr,`onTransitionEnd`),kt(`onMouseEnter`,[`mouseout`,`mouseover`]),kt(`onMouseLeave`,[`mouseout`,`mouseover`]),kt(`onPointerEnter`,[`pointerout`,`pointerover`]),kt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ot(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ot(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ot(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ot(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(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){ni(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){ni(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Et.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(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,!gn||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 wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=xt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}pn(function(){var r=a,i=cn(n),o=[];a:{var s=$r.get(e);if(s!==void 0){var c=Dn,u=e;switch(e){case`keypress`:if(Sn(n)===0)break a;case`keydown`:case`keyup`:c=Gn;break;case`focusin`:u=`focus`,c=In;break;case`focusout`:u=`blur`,c=In;break;case`beforeblur`:case`afterblur`:c=In;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`:c=Pn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Fn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=qn;break;case Kr:case qr:case Jr:c=Ln;break;case Qr:c=Jn;break;case`scroll`:case`scrollend`:c=kn;break;case`wheel`:c=Yn;break;case`copy`:case`cut`:case`paste`:c=Rn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Kn;break;case`toggle`:case`beforetoggle`:c=Xn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;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=mn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==sn&&(u=n.relatedTarget||n.fromElement)&&(xt(u)||u[mt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?xt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=Pn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Kn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:Ct(c),h=u==null?s:Ct(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Dd,p=c,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;c!==null&&Od(o,s,c,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(s=r?Ct(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=gr;else if(ur(s))if(_r)v=Er;else{v=wr;var y=Cr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&tn(r.elementType)&&(v=gr):v=Tr;if(v&&=v(e,r)){dr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&qt(s,`number`,s.value)}switch(y=r?Ct(r):window,e){case`focusin`:(ur(y)||y.contentEditable===`true`)&&(Ir=y,Lr=r,Rr=null);break;case`focusout`:Rr=Lr=Ir=null;break;case`mousedown`:zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:zr=!1,Br(o,n,i);break;case`selectionchange`:if(Fr)break;case`keydown`:case`keyup`:Br(o,n,i)}var b;if(Qn)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 or?ir(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(tr&&n.locale!==`ko`&&(or||x!==`onCompositionStart`?x===`onCompositionEnd`&&or&&(b=xn()):(vn=i,yn=`value`in vn?vn.value:vn.textContent,or=!0)),y=Ed(r,x),0<y.length&&(x=new zn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=ar(n),b!==null&&(x.data=b)))),(b=er?sr(e,n):cr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new zn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(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=mn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=mn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(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=mn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=mn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Zt(e,``+r);break;case`className`:Ft(e,`class`,r);break;case`tabIndex`:Ft(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ft(e,n,r);break;case`style`:en(e,r,a);break;case`data`:if(t!==`object`){Ft(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=an(``+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 a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=on);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(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=an(``+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`:Q(`beforetoggle`,e),Q(`toggle`,e),Pt(e,`popover`,r);break;case`xlinkActuate`:It(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:It(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:It(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:It(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Pt(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=nn.get(n)||n,Pt(e,n,r))}}function Nd(e,t,n,r,i,a){switch(n){case`style`:en(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Zt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=on);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Dt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[pt]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Pt(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`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:$(e,t,a,o,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:o=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(s(137,t));break;default:$(e,t,r,d,n,null)}}Kt(e,a,c,l,u,o,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:o=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=a,n=o,e.multiple=!!r,t==null?n!=null&&Jt(e,!!r,n,!0):Jt(e,!!r,t,!1);return;case`textarea`:for(o in Q(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(c=n[o],c!=null))switch(o){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(s(91));break;default:$(e,t,o,c,n,null)}Xt(e,r,i,a);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:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(s(137,t));default:$(e,t,u,r,n,null)}return;default:if(tn(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&&$(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 i=null,a=null,o=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)||$(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`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:o=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(s(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Gt(e,o,c,l,u,d,a,i);return;case`select`:for(a in m=o=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||$(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:o=a;default:a!==l&&$(e,t,i,a,r,l)}t=c,n=o,r=m,p==null?!!r!=!!n&&(t==null?Jt(e,!!n,n?[]:``,!1):Jt(e,!!n,t,!0)):Jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(s(91));break;default:i!==a&&$(e,t,o,i,r,a)}Yt(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:$(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:$(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)&&$(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(s(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(tn(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)&&$(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||$(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[yt]||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),bt(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[yt])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(s(452));return e;case`head`:if(e=t.head,!e)throw Error(s(453));return e;case`body`:if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(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=E.d;E.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=bu();return e||t}function yf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?Ds(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=Wt(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),Tt(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="`+Wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Wt(n.imageSizes)+`"]`)):i+=`[href="`+Wt(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),Tt(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="`+Wt(r)+`"][href="`+Wt(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),Tt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=wt(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`);Tt(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=wt(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`),Tt(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=wt(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`),Tt(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 i=(i=me.current)?gf(i):null;if(!i)throw Error(s(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=wt(i).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 a=wt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.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),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(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=wt(i).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(s(444,e))}}function Af(e){return`href="`+Wt(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),Tt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Wt(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~="`+Wt(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,Tt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),Tt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,Tt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Tt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(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[yt]||a[ft]||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,Tt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Tt(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:S,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_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=tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tt(0),this.hiddenUpdates=tt(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=mi(3,null,null,t),e.current=a,a.stateNode=e,t=fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function tp(e){return e?(e=fi,e):fi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(hu(n,e,t),Ja(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=li(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=st(t);var n=li(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=2,up(e,t,n,r)}finally{E.p=a,T.T=i}}function lp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=8,up(e,t,n,r)}finally{E.p=a,T.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(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=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Xe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ue(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(tu=je()+500,id(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=cn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=xt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(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(Me()){case Ne:return 2;case Pe:return 8;case Fe:case Ie:return 32;case Le: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=St(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=xt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,ut(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);sn=r,n.target.dispatchEvent(r),sn=null}else return t=St(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=St(n);a!==null&&(e.splice(t,3),t-=3,Ts(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[pt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||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(s(409));var n=t.current;np(n,pu(),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),bu(),t[mt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();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=r.version;if(Lp!==`19.2.8`)throw Error(s(527,Lp,`19.2.8`));E.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(s(188)):(e=Object.keys(e).join(`,`),Error(s(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:T,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Be=zp.inject(Rp),Ve=zp}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,r=``,i=Js,a=Ys,o=Xs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,o,Pp),e[mt]=t.current,Sd(e),new Fp(t)}})),c=e(((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=s()})),l=n(),u=c(),d=``,f=new Set([`INVALID_REQUEST`,`INVALID_ARGUMENT`,`REQUEST_TOO_LARGE`,`CATALOG_COVERAGE_INSUFFICIENT`,`RATE_LIMITED`,`NOT_FOUND`,`VALIDATION_FAILED`,`CONFLICT`,`DIGEST_MISMATCH`,`CSRF_REJECTED`,`INSTANCE_MISMATCH`,`REMOTE_RATE_LIMITED`,`REMOTE_HTTP_ERROR`,`REMOTE_TIMEOUT`,`DNS_FAILED`,`CONNECT_TIMEOUT`,`REMOTE_CONNECTION_FAILED`,`LOCAL_IO_ERROR`,`INTERNAL_ERROR`,`SERVICE_UNAVAILABLE`]),p=class extends Error{status;code;retryable;retryAfter;constructor(e,t,n,r,i){super(n),this.status=e,this.code=t,this.retryable=r,this.retryAfter=i,this.name=`ApiRequestError`}};async function m(){let e;try{e=await window.fetch(`/api/bootstrap`,{cache:`no-store`})}catch{throw Error(`LOCAL_SERVER_OFFLINE: Research Dashboard backend is not reachable`)}if(!e.ok)throw Error(`Dashboard bootstrap failed`);d=(await e.json()).csrf_token}async function h(e,t={}){let n=(t.method??`GET`).toUpperCase(),r=new Headers(t.headers);[`GET`,`HEAD`].includes(n)||(r.set(`X-EdgePilot-CSRF`,d),t.body&&r.set(`Content-Type`,`application/json`));let i;try{i=await window.fetch(e,{...t,headers:r,cache:`no-store`})}catch{throw Error(`LOCAL_SERVER_OFFLINE: Research Dashboard backend is not reachable`)}let a;try{a=await i.json()}catch{throw i.ok?Error(`Invalid JSON response`):new p(i.status,`REMOTE_HTTP_ERROR`,`Request failed (${i.status})`,i.status>=500)}if(!i.ok){let e=a.error,t=typeof e?.code==`string`&&f.has(e.code)?e.code:`REMOTE_HTTP_ERROR`,n=Number(i.headers?.get?.(`Retry-After`)),r=typeof e?.retry_after==`number`?e.retry_after:void 0,o=Number.isInteger(r)&&r>=1&&r<=3600?r:Number.isInteger(n)&&n>=1&&n<=3600?n:void 0;throw new p(i.status,t,typeof e?.message==`string`?e.message:`Request failed (${i.status})`,e?.retryable===!0,o)}return a}function g(e){var t=e.width,n=e.height;if(t<0)throw Error(`Negative width is not allowed for Size`);if(n<0)throw Error(`Negative height is not allowed for Size`);return{width:t,height:n}}function _(e,t){return e.width===t.width&&e.height===t.height}var v=function(){function e(e){var t=this;this._resolutionListener=function(){return t._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=e,this._installResolutionListener()}return e.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(e.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(e){var t=this,n={next:e};return this._observers.push(n),{unsubscribe:function(){t._observers=t._observers.filter(function(e){return e!==n})}}},e.prototype._installResolutionListener=function(){if(this._resolutionMediaQueryList!==null)throw Error(`Resolution listener is already installed`);var e=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia(`all and (resolution: ${e}dppx)`),this._resolutionMediaQueryList.addListener(this._resolutionListener)},e.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},e.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},e.prototype._onResolutionChanged=function(){var e=this;this._observers.forEach(function(t){return t.next(e._window.devicePixelRatio)}),this._reinstallResolutionListener()},e}();function y(e){return new v(e)}var b=function(){function e(e,t,n){this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=e,this._canvasElementClientSize=g({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=t??(function(e){return e}),this._allowResizeObserver=n?.allowResizeObserver??!0,this._chooseAndInitObserver()}return e.prototype.dispose=function(){var e,t;if(this._canvasElement===null)throw Error(`Object is disposed`);(e=this._canvasElementResizeObserver)==null||e.disconnect(),this._canvasElementResizeObserver=null,(t=this._devicePixelRatioObservable)==null||t.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(e.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw Error(`Object is disposed`);return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bitmapSize",{get:function(){return g({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),e.prototype.resizeCanvasElement=function(e){this._canvasElementClientSize=g(e),this.canvasElement.style.width=`${this._canvasElementClientSize.width}px`,this.canvasElement.style.height=`${this._canvasElementClientSize.height}px`,this._invalidateBitmapSize()},e.prototype.subscribeBitmapSizeChanged=function(e){this._bitmapSizeChangedListeners.push(e)},e.prototype.unsubscribeBitmapSizeChanged=function(e){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(t){return t!==e})},Object.defineProperty(e.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),e.prototype.subscribeSuggestedBitmapSizeChanged=function(e){this._suggestedBitmapSizeChangedListeners.push(e)},e.prototype.unsubscribeSuggestedBitmapSizeChanged=function(e){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(t){return t!==e})},e.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var e=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(e),this._emitSuggestedBitmapSizeChanged(e,this._suggestedBitmapSize)}},e.prototype._resizeBitmap=function(e){var t=this.bitmapSize;_(t,e)||(this.canvasElement.width=e.width,this.canvasElement.height=e.height,this._emitBitmapSizeChanged(t,e))},e.prototype._emitBitmapSizeChanged=function(e,t){var n=this;this._bitmapSizeChangedListeners.forEach(function(r){return r.call(n,e,t)})},e.prototype._suggestNewBitmapSize=function(e){var t=this._suggestedBitmapSize,n=g(this._transformBitmapSize(e,this._canvasElementClientSize)),r=_(this.bitmapSize,n)?null:n;(t!==null||r!==null)&&(t!==null&&r!==null&&_(t,r)||(this._suggestedBitmapSize=r,this._emitSuggestedBitmapSizeChanged(t,r)))},e.prototype._emitSuggestedBitmapSizeChanged=function(e,t){var n=this;this._suggestedBitmapSizeChangedListeners.forEach(function(r){return r.call(n,e,t)})},e.prototype._chooseAndInitObserver=function(){var e=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}S().then(function(t){return t?e._initResizeObserver():e._initDevicePixelRatioObservable()})},e.prototype._initDevicePixelRatioObservable=function(){var e=this;if(this._canvasElement!==null){var t=ee(this._canvasElement);if(t===null)throw Error(`No window is associated with the canvas`);this._devicePixelRatioObservable=y(t),this._devicePixelRatioObservable.subscribe(function(){return e._invalidateBitmapSize()}),this._invalidateBitmapSize()}},e.prototype._invalidateBitmapSize=function(){if(this._canvasElement!==null){var e=ee(this._canvasElement);if(e!==null){var t=this._devicePixelRatioObservable?.value??e.devicePixelRatio,n=this._canvasElement.getClientRects(),r=n[0]===void 0?g({width:this._canvasElementClientSize.width*t,height:this._canvasElementClientSize.height*t}):C(n[0],t);this._suggestNewBitmapSize(r)}}},e.prototype._initResizeObserver=function(){var e=this;this._canvasElement!==null&&(this._canvasElementResizeObserver=new ResizeObserver(function(t){var n=t.find(function(t){return t.target===e._canvasElement});if(!(!n||!n.devicePixelContentBoxSize||!n.devicePixelContentBoxSize[0])){var r=n.devicePixelContentBoxSize[0],i=g({width:r.inlineSize,height:r.blockSize});e._suggestNewBitmapSize(i)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:`device-pixel-content-box`}))},e}();function x(e,t){if(t.type===`device-pixel-content-box`)return new b(e,t.transform,t.options);throw Error(`Unsupported binding target`)}function ee(e){return e.ownerDocument.defaultView}function S(){return new Promise(function(e){var t=new ResizeObserver(function(n){e(n.every(function(e){return`devicePixelContentBoxSize`in e})),t.disconnect()});t.observe(document.body,{box:`device-pixel-content-box`})}).catch(function(){return!1})}function C(e,t){return g({width:Math.round(e.left*t+e.width*t)-Math.round(e.left*t),height:Math.round(e.top*t+e.height*t)-Math.round(e.top*t)})}var te=function(){function e(e,t,n){if(t.width===0||t.height===0)throw TypeError(`Rendering target could only be created on a media with positive width and height`);if(this._mediaSize=t,n.width===0||n.height===0)throw TypeError(`Rendering target could only be created using a bitmap with positive integer width and height`);this._bitmapSize=n,this._context=e}return e.prototype.useMediaCoordinateSpace=function(e){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),this._context.scale(this._horizontalPixelRatio,this._verticalPixelRatio),e({context:this._context,mediaSize:this._mediaSize})}finally{this._context.restore()}},e.prototype.useBitmapCoordinateSpace=function(e){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),e({context:this._context,mediaSize:this._mediaSize,bitmapSize:this._bitmapSize,horizontalPixelRatio:this._horizontalPixelRatio,verticalPixelRatio:this._verticalPixelRatio})}finally{this._context.restore()}},Object.defineProperty(e.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),e}();function ne(e,t){var n=e.canvasElementClientSize;if(n.width===0||n.height===0)return null;var r=e.bitmapSize;if(r.width===0||r.height===0)return null;var i=e.canvasElement.getContext(`2d`,t);return i===null?null:new te(i,n,r)}var re={upColor:`#26a69a`,downColor:`#ef5350`,wickVisible:!0,borderVisible:!0,borderColor:`#378658`,borderUpColor:`#26a69a`,borderDownColor:`#ef5350`,wickColor:`#737375`,wickUpColor:`#26a69a`,wickDownColor:`#ef5350`},w={upColor:`#26a69a`,downColor:`#ef5350`,openVisible:!0,thinBars:!0},ie={color:`#2196f3`,lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:``,crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:``,lastPriceAnimation:0,pointMarkersVisible:!1},ae={topColor:`rgba( 46, 220, 135, 0.4)`,bottomColor:`rgba( 40, 221, 100, 0)`,invertFilledArea:!1,lineColor:`#33D778`,lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:``,crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:``,lastPriceAnimation:0,pointMarkersVisible:!1},oe={baseValue:{type:`price`,price:0},topFillColor1:`rgba(38, 166, 154, 0.28)`,topFillColor2:`rgba(38, 166, 154, 0.05)`,topLineColor:`rgba(38, 166, 154, 1)`,bottomFillColor1:`rgba(239, 83, 80, 0.05)`,bottomFillColor2:`rgba(239, 83, 80, 0.28)`,bottomLineColor:`rgba(239, 83, 80, 1)`,lineWidth:3,lineStyle:0,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:``,crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:``,lastPriceAnimation:0,pointMarkersVisible:!1},se={color:`#26a69a`,base:0},ce={color:`#2196f3`},le={title:``,visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:``,priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:`#B2B5BE`,baseLineStyle:0,priceFormat:{type:`price`,precision:2,minMove:.01}},ue,T;function E(e,t){let n={0:[],1:[e.lineWidth,e.lineWidth],2:[2*e.lineWidth,2*e.lineWidth],3:[6*e.lineWidth,6*e.lineWidth],4:[e.lineWidth,4*e.lineWidth]}[t];e.setLineDash(n)}function de(e,t,n,r){e.beginPath();let i=e.lineWidth%2?.5:0;e.moveTo(n,t+i),e.lineTo(r,t+i),e.stroke()}function fe(e,t){if(!e)throw Error(`Assertion failed`+(t?`: `+t:``))}function D(e){if(e===void 0)throw Error(`Value is undefined`);return e}function O(e){if(e===null)throw Error(`Value is null`);return e}function k(e){return O(D(e))}(function(e){e[e.Simple=0]=`Simple`,e[e.WithSteps=1]=`WithSteps`,e[e.Curved=2]=`Curved`})(ue||={}),function(e){e[e.Solid=0]=`Solid`,e[e.Dotted=1]=`Dotted`,e[e.Dashed=2]=`Dashed`,e[e.LargeDashed=3]=`LargeDashed`,e[e.SparseDotted=4]=`SparseDotted`}(T||={});var A={khaki:`#f0e68c`,azure:`#f0ffff`,aliceblue:`#f0f8ff`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gainsboro:`#dcdcdc`,gray:`#808080`,green:`#008000`,honeydew:`#f0fff0`,floralwhite:`#fffaf0`,lightblue:`#add8e6`,lightcoral:`#f08080`,lemonchiffon:`#fffacd`,hotpink:`#ff69b4`,lightyellow:`#ffffe0`,greenyellow:`#adff2f`,lightgoldenrodyellow:`#fafad2`,limegreen:`#32cd32`,linen:`#faf0e6`,lightcyan:`#e0ffff`,magenta:`#f0f`,maroon:`#800000`,olive:`#808000`,orange:`#ffa500`,oldlace:`#fdf5e6`,mediumblue:`#0000cd`,transparent:`#0000`,lime:`#0f0`,lightpink:`#ffb6c1`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,midnightblue:`#191970`,orchid:`#da70d6`,mediumorchid:`#ba55d3`,mediumturquoise:`#48d1cc`,orangered:`#ff4500`,royalblue:`#4169e1`,powderblue:`#b0e0e6`,red:`#f00`,coral:`#ff7f50`,turquoise:`#40e0d0`,white:`#fff`,whitesmoke:`#f5f5f5`,wheat:`#f5deb3`,teal:`#008080`,steelblue:`#4682b4`,bisque:`#ffe4c4`,aquamarine:`#7fffd4`,aqua:`#0ff`,sienna:`#a0522d`,silver:`#c0c0c0`,springgreen:`#00ff7f`,antiquewhite:`#faebd7`,burlywood:`#deb887`,brown:`#a52a2a`,beige:`#f5f5dc`,chocolate:`#d2691e`,chartreuse:`#7fff00`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cadetblue:`#5f9ea0`,tomato:`#ff6347`,fuchsia:`#f0f`,blue:`#00f`,salmon:`#fa8072`,blanchedalmond:`#ffebcd`,slateblue:`#6a5acd`,slategray:`#708090`,thistle:`#d8bfd8`,tan:`#d2b48c`,cyan:`#0ff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,blueviolet:`#8a2be2`,black:`#000`,darkmagenta:`#8b008b`,darkslateblue:`#483d8b`,darkkhaki:`#bdb76b`,darkorchid:`#9932cc`,darkorange:`#ff8c00`,darkgreen:`#006400`,darkred:`#8b0000`,dodgerblue:`#1e90ff`,darkslategray:`#2f4f4f`,dimgray:`#696969`,deepskyblue:`#00bfff`,firebrick:`#b22222`,forestgreen:`#228b22`,indigo:`#4b0082`,ivory:`#fffff0`,lavenderblush:`#fff0f5`,feldspar:`#d19275`,indianred:`#cd5c5c`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightskyblue:`#87cefa`,lightslategray:`#789`,lightslateblue:`#8470ff`,snow:`#fffafa`,lightseagreen:`#20b2aa`,lightsalmon:`#ffa07a`,darksalmon:`#e9967a`,darkviolet:`#9400d3`,mediumpurple:`#9370d8`,mediumaquamarine:`#66cdaa`,skyblue:`#87ceeb`,lavender:`#e6e6fa`,lightsteelblue:`#b0c4de`,mediumvioletred:`#c71585`,mintcream:`#f5fffa`,navajowhite:`#ffdead`,navy:`#000080`,olivedrab:`#6b8e23`,palevioletred:`#d87093`,violetred:`#d02090`,yellow:`#ff0`,yellowgreen:`#9acd32`,lawngreen:`#7cfc00`,pink:`#ffc0cb`,paleturquoise:`#afeeee`,palegoldenrod:`#eee8aa`,darkolivegreen:`#556b2f`,darkseagreen:`#8fbc8f`,darkturquoise:`#00ced1`,peachpuff:`#ffdab9`,deeppink:`#ff1493`,violet:`#ee82ee`,palegreen:`#98fb98`,mediumseagreen:`#3cb371`,peru:`#cd853f`,saddlebrown:`#8b4513`,sandybrown:`#f4a460`,rosybrown:`#bc8f8f`,purple:`#800080`,seagreen:`#2e8b57`,seashell:`#fff5ee`,papayawhip:`#ffefd5`,mediumslateblue:`#7b68ee`,plum:`#dda0dd`,mediumspringgreen:`#00fa9a`};function j(e){return e<0?0:e>255?255:Math.round(e)||0}function pe(e){return e<=0||e>1?Math.min(Math.max(e,0),1):Math.round(1e4*e)/1e4}var me=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,he=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,ge=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,_e=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d*\.?\d+)\s*\)$/;function ve(e){(e=e.toLowerCase())in A&&(e=A[e]);{let t=_e.exec(e)||ge.exec(e);if(t)return[j(parseInt(t[1],10)),j(parseInt(t[2],10)),j(parseInt(t[3],10)),pe(t.length<5?1:parseFloat(t[4]))]}{let t=he.exec(e);if(t)return[j(parseInt(t[1],16)),j(parseInt(t[2],16)),j(parseInt(t[3],16)),1]}{let t=me.exec(e);if(t)return[j(17*parseInt(t[1],16)),j(17*parseInt(t[2],16)),j(17*parseInt(t[3],16)),1]}throw Error(`Cannot parse color: ${e}`)}function ye(e){return .199*e[0]+.687*e[1]+.114*e[2]}function be(e){let t=ve(e);return{t:`rgb(${t[0]}, ${t[1]}, ${t[2]})`,i:ye(t)>160?`black`:`white`}}var M=class{constructor(){this.h=[]}l(e,t,n){let r={o:e,_:t,u:!0===n};this.h.push(r)}v(e){let t=this.h.findIndex((t=>e===t.o));t>-1&&this.h.splice(t,1)}p(e){this.h=this.h.filter((t=>t._!==e))}m(e,t,n){let r=[...this.h];this.h=this.h.filter((e=>!e.u)),r.forEach((r=>r.o(e,t,n)))}M(){return this.h.length>0}S(){this.h=[]}};function xe(e,...t){for(let n of t)for(let t in n)n[t]!==void 0&&Object.prototype.hasOwnProperty.call(n,t)&&![`__proto__`,`constructor`,`prototype`].includes(t)&&(typeof n[t]!=`object`||e[t]===void 0||Array.isArray(n[t])?e[t]=n[t]:xe(e[t],n[t]));return e}function Se(e){return typeof e==`number`&&isFinite(e)}function Ce(e){return typeof e==`number`&&e%1==0}function we(e){return typeof e==`string`}function Te(e){return typeof e==`boolean`}function Ee(e){let t=e;if(!t||typeof t!=`object`)return t;let n,r,i;for(r in n=Array.isArray(t)?[]:{},t)t.hasOwnProperty(r)&&(i=t[r],n[r]=i&&typeof i==`object`?Ee(i):i);return n}function De(e){return e!==null}function Oe(e){return e===null?void 0:e}var ke=`-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif`;function Ae(e,t,n){return t===void 0&&(t=ke),`${n=n===void 0?``:`${n} `}${e}px ${t}`}var je=class{constructor(e){this.k={C:1,T:5,P:NaN,R:``,D:``,V:``,O:``,B:0,A:0,I:0,L:0,N:0},this.F=e}W(){let e=this.k,t=this.j(),n=this.H();return e.P===t&&e.D===n||(e.P=t,e.D=n,e.R=Ae(t,n),e.L=2.5/12*t,e.B=e.L,e.A=t/12*e.T,e.I=t/12*e.T,e.N=0),e.V=this.$(),e.O=this.U(),this.k}$(){return this.F.W().layout.textColor}U(){return this.F.q()}j(){return this.F.W().layout.fontSize}H(){return this.F.W().layout.fontFamily}},Me=class{constructor(){this.Y=[]}Z(e){this.Y=e}X(e,t,n){this.Y.forEach((r=>{r.X(e,t,n)}))}},Ne=class{X(e,t,n){e.useBitmapCoordinateSpace((e=>this.K(e,t,n)))}},Pe=class extends Ne{constructor(){super(...arguments),this.G=null}J(e){this.G=e}K({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){if(this.G===null||this.G.tt===null)return;let r=this.G.tt,i=this.G,a=Math.max(1,Math.floor(t))%2/2,o=o=>{e.beginPath();for(let s=r.to-1;s>=r.from;--s){let r=i.it[s],c=Math.round(r.nt*t)+a,l=r.st*n,u=o*n+a;e.moveTo(c,l),e.arc(c,l,u,0,2*Math.PI)}e.fill()};i.et>0&&(e.fillStyle=i.rt,o(i.ht+i.et)),e.fillStyle=i.lt,o(i.ht)}};function Fe(){return{it:[{nt:0,st:0,ot:0,_t:0}],lt:``,rt:``,ht:0,et:0,tt:null}}var Ie={from:0,to:1},Le=class{constructor(e,t){this.ut=new Me,this.ct=[],this.dt=[],this.ft=!0,this.F=e,this.vt=t,this.ut.Z(this.ct)}bt(e){let t=this.F.wt();t.length!==this.ct.length&&(this.dt=t.map(Fe),this.ct=this.dt.map((e=>{let t=new Pe;return t.J(e),t})),this.ut.Z(this.ct)),this.ft=!0}gt(){return this.ft&&=(this.Mt(),!1),this.ut}Mt(){let e=this.vt.W().mode===2,t=this.F.wt(),n=this.vt.xt(),r=this.F.St();t.forEach(((t,i)=>{let a=this.dt[i],o=t.kt(n);if(e||o===null||!t.yt())return void(a.tt=null);let s=O(t.Ct());a.lt=o.Tt,a.ht=o.ht,a.et=o.Pt,a.it[0]._t=o._t,a.it[0].st=t.Dt().Rt(o._t,s.Vt),a.rt=o.Ot??this.F.Bt(a.it[0].st/t.Dt().At()),a.it[0].ot=n,a.it[0].nt=r.It(n),a.tt=Ie}))}},Re=class extends Ne{constructor(e){super(),this.zt=e}K({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(this.zt===null)return;let i=this.zt.Lt.yt,a=this.zt.Et.yt;if(!i&&!a)return;let o=Math.round(this.zt.nt*n),s=Math.round(this.zt.st*r);e.lineCap=`butt`,i&&o>=0&&(e.lineWidth=Math.floor(this.zt.Lt.et*n),e.strokeStyle=this.zt.Lt.V,e.fillStyle=this.zt.Lt.V,E(e,this.zt.Lt.Nt),function(e,t,n,r){e.beginPath();let i=e.lineWidth%2?.5:0;e.moveTo(t+i,n),e.lineTo(t+i,r),e.stroke()}(e,o,0,t.height)),a&&s>=0&&(e.lineWidth=Math.floor(this.zt.Et.et*r),e.strokeStyle=this.zt.Et.V,e.fillStyle=this.zt.Et.V,E(e,this.zt.Et.Nt),de(e,s,0,t.width))}},ze=class{constructor(e){this.ft=!0,this.Ft={Lt:{et:1,Nt:0,V:``,yt:!1},Et:{et:1,Nt:0,V:``,yt:!1},nt:0,st:0},this.Wt=new Re(this.Ft),this.jt=e}bt(){this.ft=!0}gt(){return this.ft&&=(this.Mt(),!1),this.Wt}Mt(){let e=this.jt.yt(),t=O(this.jt.Ht()),n=t.$t().W().crosshair,r=this.Ft;if(n.mode===2)return r.Et.yt=!1,void(r.Lt.yt=!1);r.Et.yt=e&&this.jt.Ut(t),r.Lt.yt=e&&this.jt.qt(),r.Et.et=n.horzLine.width,r.Et.Nt=n.horzLine.style,r.Et.V=n.horzLine.color,r.Lt.et=n.vertLine.width,r.Lt.Nt=n.vertLine.style,r.Lt.V=n.vertLine.color,r.nt=this.jt.Yt(),r.st=this.jt.Zt()}};function Be(e,t,n,r,i,a){e.fillRect(t+a,n,r-2*a,a),e.fillRect(t+a,n+i-a,r-2*a,a),e.fillRect(t,n,a,i),e.fillRect(t+r-a,n,a,i)}function Ve(e,t,n,r,i,a){e.save(),e.globalCompositeOperation=`copy`,e.fillStyle=a,e.fillRect(t,n,r,i),e.restore()}function He(e,t,n,r,i,a){e.beginPath(),e.roundRect?e.roundRect(t,n,r,i,a):(e.lineTo(t+r-a[1],n),a[1]!==0&&e.arcTo(t+r,n,t+r,n+a[1],a[1]),e.lineTo(t+r,n+i-a[2]),a[2]!==0&&e.arcTo(t+r,n+i,t+r-a[2],n+i,a[2]),e.lineTo(t+a[3],n+i),a[3]!==0&&e.arcTo(t,n+i,t,n+i-a[3],a[3]),e.lineTo(t,n+a[0]),a[0]!==0&&e.arcTo(t,n,t+a[0],n,a[0]))}function Ue(e,t,n,r,i,a,o=0,s=[0,0,0,0],c=``){if(e.save(),!o||!c||c===a)return He(e,t,n,r,i,s),e.fillStyle=a,e.fill(),void e.restore();let l=o/2;var u;He(e,t+l,n+l,r-o,i-o,(u=-l,s.map((e=>e===0?e:e+u)))),a!==`transparent`&&(e.fillStyle=a,e.fill()),c!==`transparent`&&(e.lineWidth=o,e.strokeStyle=c,e.closePath(),e.stroke()),e.restore()}function We(e,t,n,r,i,a,o){e.save(),e.globalCompositeOperation=`copy`;let s=e.createLinearGradient(0,0,0,i);s.addColorStop(0,a),s.addColorStop(1,o),e.fillStyle=s,e.fillRect(t,n,r,i),e.restore()}var Ge=class{constructor(e,t){this.J(e,t)}J(e,t){this.zt=e,this.Xt=t}At(e,t){return this.zt.yt?e.P+e.L+e.B:0}X(e,t,n,r){if(!this.zt.yt||this.zt.Kt.length===0)return;let i=this.zt.V,a=this.Xt.t,o=e.useBitmapCoordinateSpace((e=>{let o=e.context;o.font=t.R;let s=this.Gt(e,t,n,r),c=s.Jt;return s.Qt?Ue(o,c.ti,c.ii,c.ni,c.si,a,c.ei,[c.ht,0,0,c.ht],a):Ue(o,c.ri,c.ii,c.ni,c.si,a,c.ei,[0,c.ht,c.ht,0],a),this.zt.hi&&(o.fillStyle=i,o.fillRect(c.ri,c.li,c.ai-c.ri,c.oi)),this.zt._i&&(o.fillStyle=t.O,o.fillRect(s.Qt?c.ui-c.ei:0,c.ii,c.ei,c.ci-c.ii)),s}));e.useMediaCoordinateSpace((({context:e})=>{let n=o.di;e.font=t.R,e.textAlign=o.Qt?`right`:`left`,e.textBaseline=`middle`,e.fillStyle=i,e.fillText(this.zt.Kt,n.fi,(n.ii+n.ci)/2+n.pi)}))}Gt(e,t,n,r){let{context:i,bitmapSize:a,mediaSize:o,horizontalPixelRatio:s,verticalPixelRatio:c}=e,l=this.zt.hi||!this.zt.mi?t.T:0,u=this.zt.bi?t.C:0,d=t.L+this.Xt.wi,f=t.B+this.Xt.gi,p=t.A,m=t.I,h=this.zt.Kt,g=t.P,_=n.Mi(i,h),v=Math.ceil(n.xi(i,h)),y=g+d+f,b=t.C+p+m+v+l,x=Math.max(1,Math.floor(c)),ee=Math.round(y*c);ee%2!=x%2&&(ee+=1);let S=u>0?Math.max(1,Math.floor(u*s)):0,C=Math.round(b*s),te=Math.round(l*s),ne=this.Xt.Si??this.Xt.ki,re=Math.round(ne*c)-Math.floor(.5*c),w=Math.floor(re+x/2-ee/2),ie=w+ee,ae=r===`right`,oe=ae?o.width-u:u,se=ae?a.width-S:S,ce,le,ue;return ae?(ce=se-C,le=se-te,ue=oe-l-p-u):(ce=se+C,le=se+te,ue=oe+l+p),{Qt:ae,Jt:{ii:w,li:re,ci:ie,ni:C,si:ee,ht:2*s,ei:S,ti:ce,ri:se,ai:le,oi:x,ui:a.width},di:{ii:w/c,ci:ie/c,fi:ue,pi:_}}}},Ke=class{constructor(e){this.yi={ki:0,t:`#000`,gi:0,wi:0},this.Ci={Kt:``,yt:!1,hi:!0,mi:!1,Ot:``,V:`#FFF`,_i:!1,bi:!1},this.Ti={Kt:``,yt:!1,hi:!1,mi:!0,Ot:``,V:`#FFF`,_i:!0,bi:!0},this.ft=!0,this.Pi=new(e||Ge)(this.Ci,this.yi),this.Ri=new(e||Ge)(this.Ti,this.yi)}Kt(){return this.Di(),this.Ci.Kt}ki(){return this.Di(),this.yi.ki}bt(){this.ft=!0}At(e,t=!1){return Math.max(this.Pi.At(e,t),this.Ri.At(e,t))}Vi(){return this.yi.Si||0}Oi(e){this.yi.Si=e}Bi(){return this.Di(),this.Ci.yt||this.Ti.yt}Ai(){return this.Di(),this.Ci.yt}gt(e){return this.Di(),this.Ci.hi=this.Ci.hi&&e.W().ticksVisible,this.Ti.hi=this.Ti.hi&&e.W().ticksVisible,this.Pi.J(this.Ci,this.yi),this.Ri.J(this.Ti,this.yi),this.Pi}Ii(){return this.Di(),this.Pi.J(this.Ci,this.yi),this.Ri.J(this.Ti,this.yi),this.Ri}Di(){this.ft&&(this.Ci.hi=!0,this.Ti.hi=!1,this.zi(this.Ci,this.Ti,this.yi))}},qe=class extends Ke{constructor(e,t,n){super(),this.jt=e,this.Li=t,this.Ei=n}zi(e,t,n){if(e.yt=!1,this.jt.W().mode===2)return;let r=this.jt.W().horzLine;if(!r.labelVisible)return;let i=this.Li.Ct();if(!this.jt.yt()||this.Li.Ni()||i===null)return;let a=be(r.labelBackgroundColor);n.t=a.t,e.V=a.i;let o=2/12*this.Li.P();n.wi=o,n.gi=o;let s=this.Ei(this.Li);n.ki=s.ki,e.Kt=this.Li.Fi(s._t,i),e.yt=!0}},Je=/[1-9]/g,Ye=class{constructor(){this.zt=null}J(e){this.zt=e}X(e,t){if(this.zt===null||!1===this.zt.yt||this.zt.Kt.length===0)return;let n=e.useMediaCoordinateSpace((({context:e})=>(e.font=t.R,Math.round(t.Wi.xi(e,O(this.zt).Kt,Je)))));if(n<=0)return;let r=t.ji,i=n+2*r,a=i/2,o=this.zt.Hi,s=this.zt.ki,c=Math.floor(s-a)+.5;c<0?(s+=Math.abs(0-c),c=Math.floor(s-a)+.5):c+i>o&&(s-=Math.abs(o-(c+i)),c=Math.floor(s-a)+.5);let l=c+i,u=Math.ceil(0+t.C+t.T+t.L+t.P+t.B);e.useBitmapCoordinateSpace((({context:e,horizontalPixelRatio:n,verticalPixelRatio:r})=>{let i=O(this.zt);e.fillStyle=i.t;let a=Math.round(c*n),o=Math.round(0*r),s=Math.round(l*n),d=Math.round(u*r),f=Math.round(2*n);if(e.beginPath(),e.moveTo(a,o),e.lineTo(a,d-f),e.arcTo(a,d,a+f,d,f),e.lineTo(s-f,d),e.arcTo(s,d,s,d-f,f),e.lineTo(s,o),e.fill(),i.hi){let a=Math.round(i.ki*n),s=o,c=Math.round((s+t.T)*r);e.fillStyle=i.V;let l=Math.max(1,Math.floor(n)),u=Math.floor(.5*n);e.fillRect(a-u,s,l,c-s)}})),e.useMediaCoordinateSpace((({context:e})=>{let n=O(this.zt),i=0+t.C+t.T+t.L+t.P/2;e.font=t.R,e.textAlign=`left`,e.textBaseline=`middle`,e.fillStyle=n.V;let a=t.Wi.Mi(e,`Apr0`);e.translate(c+r,i+a),e.fillText(n.Kt,0,0)}))}},Xe=class{constructor(e,t,n){this.ft=!0,this.Wt=new Ye,this.Ft={yt:!1,t:`#4c525e`,V:`white`,Kt:``,Hi:0,ki:NaN,hi:!0},this.vt=e,this.$i=t,this.Ei=n}bt(){this.ft=!0}gt(){return this.ft&&=(this.Mt(),!1),this.Wt.J(this.Ft),this.Wt}Mt(){let e=this.Ft;if(e.yt=!1,this.vt.W().mode===2)return;let t=this.vt.W().vertLine;if(!t.labelVisible)return;let n=this.$i.St();if(n.Ni())return;e.Hi=n.Hi();let r=this.Ei();if(r===null)return;e.ki=r.ki;let i=n.Ui(this.vt.xt());e.Kt=n.qi(O(i)),e.yt=!0;let a=be(t.labelBackgroundColor);e.t=a.t,e.V=a.i,e.hi=n.W().ticksVisible}},Ze=class{constructor(){this.Yi=null,this.Zi=0}Xi(){return this.Zi}Ki(e){this.Zi=e}Dt(){return this.Yi}Gi(e){this.Yi=e}Ji(e){return[]}Qi(){return[]}yt(){return!0}},Qe;(function(e){e[e.Normal=0]=`Normal`,e[e.Magnet=1]=`Magnet`,e[e.Hidden=2]=`Hidden`})(Qe||={});var $e=class extends Ze{constructor(e,t){super(),this.tn=null,this.nn=NaN,this.sn=0,this.en=!0,this.rn=new Map,this.hn=!1,this.ln=NaN,this.an=NaN,this._n=NaN,this.un=NaN,this.$i=e,this.cn=t,this.dn=new Le(e,this),this.fn=((e,t)=>n=>{let r=t(),i=e();if(n===O(this.tn).vn())return{_t:i,ki:r};{let e=O(n.Ct());return{_t:n.pn(r,e),ki:r}}})((()=>this.nn),(()=>this.an));let n=((e,t)=>()=>{let n=this.$i.St().mn(e()),r=t();return n&&Number.isFinite(r)?{ot:n,ki:r}:null})((()=>this.sn),(()=>this.Yt()));this.bn=new Xe(this,e,n),this.wn=new ze(this)}W(){return this.cn}gn(e,t){this._n=e,this.un=t}Mn(){this._n=NaN,this.un=NaN}xn(){return this._n}Sn(){return this.un}kn(e,t,n){this.hn||=!0,this.en=!0,this.yn(e,t,n)}xt(){return this.sn}Yt(){return this.ln}Zt(){return this.an}yt(){return this.en}Cn(){this.en=!1,this.Tn(),this.nn=NaN,this.ln=NaN,this.an=NaN,this.tn=null,this.Mn()}Pn(e){return this.tn===null?[]:[this.wn,this.dn]}Ut(e){return e===this.tn&&this.cn.horzLine.visible}qt(){return this.cn.vertLine.visible}Rn(e,t){this.en&&this.tn===e||this.rn.clear();let n=[];return this.tn===e&&n.push(this.Dn(this.rn,t,this.fn)),n}Qi(){return this.en?[this.bn]:[]}Ht(){return this.tn}Vn(){this.wn.bt(),this.rn.forEach((e=>e.bt())),this.bn.bt(),this.dn.bt()}On(e){return e&&!e.vn().Ni()?e.vn():null}yn(e,t,n){this.Bn(e,t,n)&&this.Vn()}Bn(e,t,n){let r=this.ln,i=this.an,a=this.nn,o=this.sn,s=this.tn,c=this.On(n);this.sn=e,this.ln=isNaN(e)?NaN:this.$i.St().It(e),this.tn=n;let l=c===null?null:c.Ct();return c!==null&&l!==null?(this.nn=t,this.an=c.Rt(t,l)):(this.nn=NaN,this.an=NaN),r!==this.ln||i!==this.an||o!==this.sn||a!==this.nn||s!==this.tn}Tn(){let e=this.$i.wt().map((e=>e.In().An())).filter(De),t=e.length===0?null:Math.max(...e);this.sn=t===null?NaN:t}Dn(e,t,n){let r=e.get(t);return r===void 0&&(r=new qe(this,t,n),e.set(t,r)),r}};function et(e){return e===`left`||e===`right`}var tt=class e{constructor(e){this.zn=new Map,this.Ln=[],this.En=e}Nn(e,t){let n=function(e,t){return e===void 0?t:{Fn:Math.max(e.Fn,t.Fn),Wn:e.Wn||t.Wn}}(this.zn.get(e),t);this.zn.set(e,n)}jn(){return this.En}Hn(e){let t=this.zn.get(e);return t===void 0?{Fn:this.En}:{Fn:Math.max(this.En,t.Fn),Wn:t.Wn}}$n(){this.Un(),this.Ln=[{qn:0}]}Yn(e){this.Un(),this.Ln=[{qn:1,Vt:e}]}Zn(e){this.Xn(),this.Ln.push({qn:5,Vt:e})}Un(){this.Xn(),this.Ln.push({qn:6})}Kn(){this.Un(),this.Ln=[{qn:4}]}Gn(e){this.Un(),this.Ln.push({qn:2,Vt:e})}Jn(e){this.Un(),this.Ln.push({qn:3,Vt:e})}Qn(){return this.Ln}ts(e){for(let t of e.Ln)this.ns(t);this.En=Math.max(this.En,e.En),e.zn.forEach(((e,t)=>{this.Nn(t,e)}))}static ss(){return new e(2)}static es(){return new e(3)}ns(e){switch(e.qn){case 0:this.$n();break;case 1:this.Yn(e.Vt);break;case 2:this.Gn(e.Vt);break;case 3:this.Jn(e.Vt);break;case 4:this.Kn();break;case 5:this.Zn(e.Vt);break;case 6:this.Xn()}}Xn(){let e=this.Ln.findIndex((e=>e.qn===5));e!==-1&&this.Ln.splice(e,1)}},nt=`.`;function rt(e,t){if(!Se(e))return`n/a`;if(!Ce(t)||t<0||t>16)throw TypeError(`invalid length`);return t===0?e.toString():(`0000000000000000`+e.toString()).slice(-t)}var it=class{constructor(e,t){if(t||=1,Se(e)&&Ce(e)||(e=100),e<0)throw TypeError(`invalid base`);this.Li=e,this.rs=t,this.hs()}format(e){let t=e<0?`−`:``;return e=Math.abs(e),t+this.ls(e)}hs(){if(this._s=0,this.Li>0&&this.rs>0){let e=this.Li;for(;e>1;)e/=10,this._s++}}ls(e){let t=this.Li/this.rs,n=Math.floor(e),r=``,i=this._s===void 0?NaN:this._s;if(t>1){let a=+(Math.round(e*t)-n*t).toFixed(this._s);a>=t&&(a-=t,n+=1),r=nt+rt(+a.toFixed(this._s)*this.rs,i)}else n=Math.round(n*t)/t,i>0&&(r=nt+rt(0,i));return n.toFixed(0)+r}},at=class extends it{constructor(e=100){super(e)}format(e){return`${super.format(e)}%`}},ot=class{constructor(e){this.us=e}format(e){let t=``;return e<0&&(t=`-`,e=-e),e<995?t+this.cs(e):e<999995?t+this.cs(e/1e3)+`K`:e<999999995?(e=1e3*Math.round(e/1e3),t+this.cs(e/1e6)+`M`):(e=1e6*Math.round(e/1e6),t+this.cs(e/1e9)+`B`)}cs(e){let t,n=10**this.us;return t=(e=Math.round(e*n)/n)>=1e-15&&e<1?e.toFixed(this.us).replace(/\.?0+$/,``):String(e),t.replace(/(\.[1-9]*)0+$/,((e,t)=>t))}};function st(e,t,n,r,i,a,o){if(t.length===0||r.from>=t.length||r.to<=0)return;let{context:s,horizontalPixelRatio:c,verticalPixelRatio:l}=e,u=t[r.from],d=a(e,u),f=u;if(r.to-r.from<2){let t=i/2;s.beginPath();let n={nt:u.nt-t,st:u.st},r={nt:u.nt+t,st:u.st};s.moveTo(n.nt*c,n.st*l),s.lineTo(r.nt*c,r.st*l),o(e,d,n,r)}else{let i=(t,n)=>{o(e,d,f,n),s.beginPath(),d=t,f=n},p=f;s.beginPath(),s.moveTo(u.nt*c,u.st*l);for(let o=r.from+1;o<r.to;++o){p=t[o];let r=a(e,p);switch(n){case 0:s.lineTo(p.nt*c,p.st*l);break;case 1:s.lineTo(p.nt*c,t[o-1].st*l),r!==d&&(i(r,p),s.lineTo(p.nt*c,t[o-1].st*l)),s.lineTo(p.nt*c,p.st*l);break;case 2:{let[e,n]=dt(t,o-1,o);s.bezierCurveTo(e.nt*c,e.st*l,n.nt*c,n.st*l,p.nt*c,p.st*l);break}}n!==1&&r!==d&&(i(r,p),s.moveTo(p.nt*c,p.st*l))}(f!==p||f===p&&n===1)&&o(e,d,f,p)}}var ct=6;function lt(e,t){return{nt:e.nt-t.nt,st:e.st-t.st}}function ut(e,t){return{nt:e.nt/t,st:e.st/t}}function dt(e,t,n){let r=Math.max(0,t-1),i=Math.min(e.length-1,n+1);var a,o;return[(a=e[t],o=ut(lt(e[n],e[r]),ct),{nt:a.nt+o.nt,st:a.st+o.st}),lt(e[n],ut(lt(e[i],e[t]),ct))]}function ft(e,t,n,r,i){let{context:a,horizontalPixelRatio:o,verticalPixelRatio:s}=t;a.lineTo(i.nt*o,e*s),a.lineTo(r.nt*o,e*s),a.closePath(),a.fillStyle=n,a.fill()}var pt=class extends Ne{constructor(){super(...arguments),this.G=null}J(e){this.G=e}K(e){if(this.G===null)return;let{it:t,tt:n,ds:r,et:i,Nt:a,fs:o}=this.G,s=this.G.vs??(this.G.ps?0:e.mediaSize.height);if(n===null)return;let c=e.context;c.lineCap=`butt`,c.lineJoin=`round`,c.lineWidth=i,E(c,a),c.lineWidth=1,st(e,t,o,n,r,this.bs.bind(this),ft.bind(null,s))}};function mt(e,t,n){return Math.min(Math.max(e,t),n)}function ht(e,t,n){return t-e<=n}function gt(e){let t=Math.ceil(e);return t%2==0?t-1:t}var _t=class{ws(e,t){let n=this.gs,{Ms:r,xs:i,Ss:a,ks:o,ys:s,vs:c}=t;if(this.Cs===void 0||n===void 0||n.Ms!==r||n.xs!==i||n.Ss!==a||n.ks!==o||n.vs!==c||n.ys!==s){let n=e.context.createLinearGradient(0,0,0,s);if(n.addColorStop(0,r),c!=null){let t=mt(c*e.verticalPixelRatio/s,0,1);n.addColorStop(t,i),n.addColorStop(t,a)}n.addColorStop(1,o),this.Cs=n,this.gs=t}return this.Cs}},vt=class extends pt{constructor(){super(...arguments),this.Ts=new _t}bs(e,t){return this.Ts.ws(e,{Ms:t.Ps,xs:``,Ss:``,ks:t.Rs,ys:e.bitmapSize.height})}};function yt(e,t){let n=e.context;n.strokeStyle=t,n.stroke()}var bt=class extends Ne{constructor(){super(...arguments),this.G=null}J(e){this.G=e}K(e){if(this.G===null)return;let{it:t,tt:n,ds:r,fs:i,et:a,Nt:o,Ds:s}=this.G;if(n===null)return;let c=e.context;c.lineCap=`butt`,c.lineWidth=a*e.verticalPixelRatio,E(c,o),c.lineJoin=`round`;let l=this.Vs.bind(this);i!==void 0&&st(e,t,i,n,r,l,yt),s&&function(e,t,n,r,i){let{horizontalPixelRatio:a,verticalPixelRatio:o,context:s}=e,c=null,l=Math.max(1,Math.floor(a))%2/2,u=n*o+l;for(let n=r.to-1;n>=r.from;--n){let r=t[n];if(r){let t=i(e,r);t!==c&&(s.beginPath(),c!==null&&s.fill(),s.fillStyle=t,c=t);let n=Math.round(r.nt*a)+l,d=r.st*o;s.moveTo(n,d),s.arc(n,d,u,0,2*Math.PI)}}s.fill()}(e,t,s,n,l)}},xt=class extends bt{Vs(e,t){return t.lt}};function St(e,t,n,r,i=0,a=t.length){let o=a-i;for(;0<o;){let a=o>>1,s=i+a;r(t[s],n)===e?(i=s+1,o-=a+1):o=a}return i}var Ct=St.bind(null,!0),wt=St.bind(null,!1);function Tt(e,t){return e.ot<t}function Et(e,t){return t<e.ot}function Dt(e,t,n){let r=t.Os(),i=t.ui(),a=Ct(e,r,Tt),o=wt(e,i,Et);if(!n)return{from:a,to:o};let s=a,c=o;return a>0&&a<e.length&&e[a].ot>=r&&(s=a-1),o>0&&o<e.length&&e[o-1].ot<=i&&(c=o+1),{from:s,to:c}}var Ot=class{constructor(e,t,n){this.Bs=!0,this.As=!0,this.Is=!0,this.zs=[],this.Ls=null,this.Es=e,this.Ns=t,this.Fs=n}bt(e){this.Bs=!0,e===`data`&&(this.As=!0),e===`options`&&(this.Is=!0)}gt(){return this.Es.yt()?(this.Ws(),this.Ls===null?null:this.js):null}Hs(){this.zs=this.zs.map((e=>Object.assign(Object.assign({},e),this.Es.Us().$s(e.ot))))}qs(){this.Ls=null}Ws(){this.As&&=(this.Ys(),!1),this.Is&&=(this.Hs(),!1),this.Bs&&=(this.Zs(),!1)}Zs(){let e=this.Es.Dt(),t=this.Ns.St();if(this.qs(),t.Ni()||e.Ni())return;let n=t.Xs();if(n===null||this.Es.In().Ks()===0)return;let r=this.Es.Ct();r!==null&&(this.Ls=Dt(this.zs,n,this.Fs),this.Gs(e,t,r.Vt),this.Js())}},kt=class extends Ot{constructor(e,t){super(e,t,!0)}Gs(e,t,n){t.Qs(this.zs,Oe(this.Ls)),e.te(this.zs,n,Oe(this.Ls))}ie(e,t){return{ot:e,_t:t,nt:NaN,st:NaN}}Ys(){let e=this.Es.Us();this.zs=this.Es.In().ne().map((t=>{let n=t.Vt[3];return this.se(t.ee,n,e)}))}},At=class extends kt{constructor(e,t){super(e,t),this.js=new Me,this.re=new vt,this.he=new xt,this.js.Z([this.re,this.he])}se(e,t,n){return Object.assign(Object.assign({},this.ie(e,t)),n.$s(e))}Js(){let e=this.Es.W();this.re.J({fs:e.lineType,it:this.zs,Nt:e.lineStyle,et:e.lineWidth,vs:null,ps:e.invertFilledArea,tt:this.Ls,ds:this.Ns.St().le()}),this.he.J({fs:e.lineVisible?e.lineType:void 0,it:this.zs,Nt:e.lineStyle,et:e.lineWidth,tt:this.Ls,ds:this.Ns.St().le(),Ds:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0})}},jt=class extends Ne{constructor(){super(...arguments),this.zt=null,this.ae=0,this.oe=0}J(e){this.zt=e}K({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){if(this.zt===null||this.zt.In.length===0||this.zt.tt===null)return;this.ae=this._e(t),this.ae>=2&&Math.max(1,Math.floor(t))%2!=this.ae%2&&this.ae--,this.oe=this.zt.ue?Math.min(this.ae,Math.floor(t)):this.ae;let r=null,i=this.oe<=this.ae&&this.zt.le>=Math.floor(1.5*t);for(let a=this.zt.tt.from;a<this.zt.tt.to;++a){let o=this.zt.In[a];r!==o.ce&&(e.fillStyle=o.ce,r=o.ce);let s=Math.floor(.5*this.oe),c=Math.round(o.nt*t),l=c-s,u=this.oe,d=l+u-1,f=Math.min(o.de,o.fe),p=Math.max(o.de,o.fe),m=Math.round(f*n)-s,h=Math.round(p*n)+s,g=Math.max(h-m,this.oe);e.fillRect(l,m,u,g);let _=Math.ceil(1.5*this.ae);if(i){if(this.zt.ve){let t=c-_,r=Math.max(m,Math.round(o.pe*n)-s),i=r+u-1;i>m+g-1&&(i=m+g-1,r=i-u+1),e.fillRect(t,r,l-t,i-r+1)}let t=c+_,r=Math.max(m,Math.round(o.me*n)-s),i=r+u-1;i>m+g-1&&(i=m+g-1,r=i-u+1),e.fillRect(d+1,r,t-d,i-r+1)}}}_e(e){return Math.max(Math.floor(e),Math.floor(function(e,t){return Math.floor(.3*e*t)}(O(this.zt).le,e)))}},Mt=class extends Ot{constructor(e,t){super(e,t,!1)}Gs(e,t,n){t.Qs(this.zs,Oe(this.Ls)),e.be(this.zs,n,Oe(this.Ls))}we(e,t,n){return{ot:e,ge:t.Vt[0],Me:t.Vt[1],xe:t.Vt[2],Se:t.Vt[3],nt:NaN,pe:NaN,de:NaN,fe:NaN,me:NaN}}Ys(){let e=this.Es.Us();this.zs=this.Es.In().ne().map((t=>this.se(t.ee,t,e)))}},Nt=class extends Mt{constructor(){super(...arguments),this.js=new jt}se(e,t,n){return Object.assign(Object.assign({},this.we(e,t,n)),n.$s(e))}Js(){let e=this.Es.W();this.js.J({In:this.zs,le:this.Ns.St().le(),ve:e.openVisible,ue:e.thinBars,tt:this.Ls})}},Pt=class extends pt{constructor(){super(...arguments),this.Ts=new _t}bs(e,t){let n=this.G;return this.Ts.ws(e,{Ms:t.ke,xs:t.ye,Ss:t.Ce,ks:t.Te,ys:e.bitmapSize.height,vs:n.vs})}},Ft=class extends bt{constructor(){super(...arguments),this.Pe=new _t}Vs(e,t){let n=this.G;return this.Pe.ws(e,{Ms:t.Re,xs:t.Re,Ss:t.De,ks:t.De,ys:e.bitmapSize.height,vs:n.vs})}},It=class extends kt{constructor(e,t){super(e,t),this.js=new Me,this.Ve=new Pt,this.Oe=new Ft,this.js.Z([this.Ve,this.Oe])}se(e,t,n){return Object.assign(Object.assign({},this.ie(e,t)),n.$s(e))}Js(){let e=this.Es.Ct();if(e===null)return;let t=this.Es.W(),n=this.Es.Dt().Rt(t.baseValue.price,e.Vt),r=this.Ns.St().le();this.Ve.J({it:this.zs,et:t.lineWidth,Nt:t.lineStyle,fs:t.lineType,vs:n,ps:!1,tt:this.Ls,ds:r}),this.Oe.J({it:this.zs,et:t.lineWidth,Nt:t.lineStyle,fs:t.lineVisible?t.lineType:void 0,Ds:t.pointMarkersVisible?t.pointMarkersRadius||t.lineWidth/2+2:void 0,vs:n,tt:this.Ls,ds:r})}},Lt=class extends Ne{constructor(){super(...arguments),this.zt=null,this.ae=0}J(e){this.zt=e}K(e){if(this.zt===null||this.zt.In.length===0||this.zt.tt===null)return;let{horizontalPixelRatio:t}=e;this.ae=function(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);let n=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),r=Math.floor(e*n*t),i=Math.floor(e*t);return Math.max(Math.floor(t),Math.min(r,i))}(this.zt.le,t),this.ae>=2&&Math.floor(t)%2!=this.ae%2&&this.ae--;let n=this.zt.In;this.zt.Be&&this.Ae(e,n,this.zt.tt),this.zt._i&&this.Ie(e,n,this.zt.tt);let r=this.ze(t);(!this.zt._i||this.ae>2*r)&&this.Le(e,n,this.zt.tt)}Ae(e,t,n){if(this.zt===null)return;let{context:r,horizontalPixelRatio:i,verticalPixelRatio:a}=e,o=``,s=Math.min(Math.floor(i),Math.floor(this.zt.le*i));s=Math.max(Math.floor(i),Math.min(s,this.ae));let c=Math.floor(.5*s),l=null;for(let e=n.from;e<n.to;e++){let n=t[e];n.Ee!==o&&(r.fillStyle=n.Ee,o=n.Ee);let u=Math.round(Math.min(n.pe,n.me)*a),d=Math.round(Math.max(n.pe,n.me)*a),f=Math.round(n.de*a),p=Math.round(n.fe*a),m=Math.round(i*n.nt)-c,h=m+s-1;l!==null&&(m=Math.max(l+1,m),m=Math.min(m,h));let g=h-m+1;r.fillRect(m,f,g,u-f),r.fillRect(m,d+1,g,p-d),l=h}}ze(e){let t=Math.floor(1*e);this.ae<=2*t&&(t=Math.floor(.5*(this.ae-1)));let n=Math.max(Math.floor(e),t);return this.ae<=2*n?Math.max(Math.floor(e),Math.floor(1*e)):n}Ie(e,t,n){if(this.zt===null)return;let{context:r,horizontalPixelRatio:i,verticalPixelRatio:a}=e,o=``,s=this.ze(i),c=null;for(let e=n.from;e<n.to;e++){let n=t[e];n.Ne!==o&&(r.fillStyle=n.Ne,o=n.Ne);let l=Math.round(n.nt*i)-Math.floor(.5*this.ae),u=l+this.ae-1,d=Math.round(Math.min(n.pe,n.me)*a),f=Math.round(Math.max(n.pe,n.me)*a);if(c!==null&&(l=Math.max(c+1,l),l=Math.min(l,u)),this.zt.le*i>2*s)Be(r,l,d,u-l+1,f-d+1,s);else{let e=u-l+1;r.fillRect(l,d,e,f-d+1)}c=u}}Le(e,t,n){if(this.zt===null)return;let{context:r,horizontalPixelRatio:i,verticalPixelRatio:a}=e,o=``,s=this.ze(i);for(let e=n.from;e<n.to;e++){let n=t[e],c=Math.round(Math.min(n.pe,n.me)*a),l=Math.round(Math.max(n.pe,n.me)*a),u=Math.round(n.nt*i)-Math.floor(.5*this.ae),d=u+this.ae-1;if(n.ce!==o){let e=n.ce;r.fillStyle=e,o=e}this.zt._i&&(u+=s,c+=s,d-=s,l-=s),c>l||r.fillRect(u,c,d-u+1,l-c+1)}}},Rt=class extends Mt{constructor(){super(...arguments),this.js=new Lt}se(e,t,n){return Object.assign(Object.assign({},this.we(e,t,n)),n.$s(e))}Js(){let e=this.Es.W();this.js.J({In:this.zs,le:this.Ns.St().le(),Be:e.wickVisible,_i:e.borderVisible,tt:this.Ls})}},zt=class{constructor(e,t){this.Fe=e,this.Li=t}X(e,t,n){this.Fe.draw(e,this.Li,t,n)}},Bt=class extends Ot{constructor(e,t,n){super(e,t,!1),this.wn=n,this.js=new zt(this.wn.renderer(),(t=>{let n=e.Ct();return n===null?null:e.Dt().Rt(t,n.Vt)}))}We(e){return this.wn.priceValueBuilder(e)}je(e){return this.wn.isWhitespace(e)}Ys(){let e=this.Es.Us();this.zs=this.Es.In().ne().map((t=>Object.assign(Object.assign({ot:t.ee,nt:NaN},e.$s(t.ee)),{He:t.$e})))}Gs(e,t){t.Qs(this.zs,Oe(this.Ls))}Js(){this.wn.update({bars:this.zs.map(Vt),barSpacing:this.Ns.St().le(),visibleRange:this.Ls},this.Es.W())}};function Vt(e){return{x:e.nt,time:e.ot,originalData:e.He,barColor:e.ce}}var Ht=class extends Ne{constructor(){super(...arguments),this.zt=null,this.Ue=[]}J(e){this.zt=e,this.Ue=[]}K({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){if(this.zt===null||this.zt.it.length===0||this.zt.tt===null)return;this.Ue.length||this.qe(t);let r=Math.max(1,Math.floor(n)),i=Math.round(this.zt.Ye*n)-Math.floor(r/2),a=i+r;for(let t=this.zt.tt.from;t<this.zt.tt.to;t++){let o=this.zt.it[t],s=this.Ue[t-this.zt.tt.from],c=Math.round(o.st*n),l,u;e.fillStyle=o.ce,c<=i?(l=c,u=a):(l=i,u=c-Math.floor(r/2)+r),e.fillRect(s.Os,l,s.ui-s.Os+1,u-l)}}qe(e){if(this.zt===null||this.zt.it.length===0||this.zt.tt===null)return void(this.Ue=[]);let t=Math.ceil(this.zt.le*e)<=1?0:Math.max(1,Math.floor(e)),n=Math.round(this.zt.le*e)-t;this.Ue=Array(this.zt.tt.to-this.zt.tt.from);for(let t=this.zt.tt.from;t<this.zt.tt.to;t++){let r=this.zt.it[t],i=Math.round(r.nt*e),a,o;if(n%2){let e=(n-1)/2;a=i-e,o=i+e}else{let e=n/2;a=i-e,o=i+e-1}this.Ue[t-this.zt.tt.from]={Os:a,ui:o,Ze:i,Xe:r.nt*e,ot:r.ot}}for(let e=this.zt.tt.from+1;e<this.zt.tt.to;e++){let n=this.Ue[e-this.zt.tt.from],r=this.Ue[e-this.zt.tt.from-1];n.ot===r.ot+1&&n.Os-r.ui!==t+1&&(r.Ze>r.Xe?r.ui=n.Os-t-1:n.Os=r.ui+t+1)}let r=Math.ceil(this.zt.le*e);for(let e=this.zt.tt.from;e<this.zt.tt.to;e++){let t=this.Ue[e-this.zt.tt.from];t.ui<t.Os&&(t.ui=t.Os);let n=t.ui-t.Os+1;r=Math.min(n,r)}if(t>0&&r<4)for(let e=this.zt.tt.from;e<this.zt.tt.to;e++){let t=this.Ue[e-this.zt.tt.from];t.ui-t.Os+1>r&&(t.Ze>t.Xe?--t.ui:t.Os+=1)}}},Ut=class extends kt{constructor(){super(...arguments),this.js=new Ht}se(e,t,n){return Object.assign(Object.assign({},this.ie(e,t)),n.$s(e))}Js(){let e={it:this.zs,le:this.Ns.St().le(),tt:this.Ls,Ye:this.Es.Dt().Rt(this.Es.W().base,O(this.Es.Ct()).Vt)};this.js.J(e)}},Wt=class extends kt{constructor(){super(...arguments),this.js=new xt}se(e,t,n){return Object.assign(Object.assign({},this.ie(e,t)),n.$s(e))}Js(){let e=this.Es.W(),t={it:this.zs,Nt:e.lineStyle,fs:e.lineVisible?e.lineType:void 0,et:e.lineWidth,Ds:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0,tt:this.Ls,ds:this.Ns.St().le()};this.js.J(t)}},Gt=/[2-9]/g,Kt=class{constructor(e=50){this.Ke=0,this.Ge=1,this.Je=1,this.Qe={},this.tr=new Map,this.ir=e}nr(){this.Ke=0,this.tr.clear(),this.Ge=1,this.Je=1,this.Qe={}}xi(e,t,n){return this.sr(e,t,n).width}Mi(e,t,n){let r=this.sr(e,t,n);return((r.actualBoundingBoxAscent||0)-(r.actualBoundingBoxDescent||0))/2}sr(e,t,n){let r=n||Gt,i=String(t).replace(r,`0`);if(this.tr.has(i))return D(this.tr.get(i)).er;if(this.Ke===this.ir){let e=this.Qe[this.Je];delete this.Qe[this.Je],this.tr.delete(e),this.Je++,this.Ke--}e.save(),e.textBaseline=`middle`;let a=e.measureText(i);return e.restore(),a.width===0&&t.length||(this.tr.set(i,{er:a,rr:this.Ge}),this.Qe[this.Ge]=i,this.Ke++,this.Ge++),a}},qt=class{constructor(e){this.hr=null,this.k=null,this.lr=`right`,this.ar=e}_r(e,t,n){this.hr=e,this.k=t,this.lr=n}X(e){this.k!==null&&this.hr!==null&&this.hr.X(e,this.k,this.ar,this.lr)}},Jt=class{constructor(e,t,n){this.ur=e,this.ar=new Kt(50),this.cr=t,this.F=n,this.j=-1,this.Wt=new qt(this.ar)}gt(){let e=this.F.dr(this.cr);if(e===null)return null;let t=e.vr(this.cr)?e.pr():this.cr.Dt();if(t===null)return null;let n=e.mr(t);if(n===`overlay`)return null;let r=this.F.br();return r.P!==this.j&&(this.j=r.P,this.ar.nr()),this.Wt._r(this.ur.Ii(),r,n),this.Wt}},Yt=class extends Ne{constructor(){super(...arguments),this.zt=null}J(e){this.zt=e}wr(e,t){if(!this.zt?.yt)return null;let{st:n,et:r,gr:i}=this.zt;return t>=n-r-7&&t<=n+r+7?{Mr:this.zt,gr:i}:null}K({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(this.zt===null||!1===this.zt.yt)return;let i=Math.round(this.zt.st*r);i<0||i>t.height||(e.lineCap=`butt`,e.strokeStyle=this.zt.V,e.lineWidth=Math.floor(this.zt.et*n),E(e,this.zt.Nt),de(e,i,0,t.width))}},Xt=class{constructor(e){this.Sr={st:0,V:`rgba(0, 0, 0, 0)`,et:1,Nt:0,yt:!1},this.kr=new Yt,this.ft=!0,this.Es=e,this.Ns=e.$t(),this.kr.J(this.Sr)}bt(){this.ft=!0}gt(){return this.Es.yt()?(this.ft&&=(this.yr(),!1),this.kr):null}},Zt=class extends Xt{constructor(e){super(e)}yr(){this.Sr.yt=!1;let e=this.Es.Dt(),t=e.Cr().Cr;if(t!==2&&t!==3)return;let n=this.Es.W();if(!n.baseLineVisible||!this.Es.yt())return;let r=this.Es.Ct();r!==null&&(this.Sr.yt=!0,this.Sr.st=e.Rt(r.Vt,r.Vt),this.Sr.V=n.baseLineColor,this.Sr.et=n.baseLineWidth,this.Sr.Nt=n.baseLineStyle)}},Qt=class extends Ne{constructor(){super(...arguments),this.zt=null}J(e){this.zt=e}$e(){return this.zt}K({context:e,horizontalPixelRatio:t,verticalPixelRatio:n}){let r=this.zt;if(r===null)return;let i=Math.max(1,Math.floor(t)),a=i%2/2,o=Math.round(r.Xe.x*t)+a,s=r.Xe.y*n;e.fillStyle=r.Tr,e.beginPath();let c=Math.max(2,1.5*r.Pr)*t;e.arc(o,s,c,0,2*Math.PI,!1),e.fill(),e.fillStyle=r.Rr,e.beginPath(),e.arc(o,s,r.ht*t,0,2*Math.PI,!1),e.fill(),e.lineWidth=i,e.strokeStyle=r.Dr,e.beginPath(),e.arc(o,s,r.ht*t+i/2,0,2*Math.PI,!1),e.stroke()}},$t=[{Vr:0,Or:.25,Br:4,Ar:10,Ir:.25,zr:0,Lr:.4,Er:.8},{Vr:.25,Or:.525,Br:10,Ar:14,Ir:0,zr:0,Lr:.8,Er:0},{Vr:.525,Or:1,Br:14,Ar:14,Ir:0,zr:0,Lr:0,Er:0}];function en(e,t,n,r){return function(e,t){if(e===`transparent`)return e;let n=ve(e),r=n[3];return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t*r})`}(e,n+(r-n)*t)}function tn(e,t){let n=e%2600/2600,r;for(let e of $t)if(n>=e.Vr&&n<=e.Or){r=e;break}fe(r!==void 0,`Last price animation internal logic error`);let i=(n-r.Vr)/(r.Or-r.Vr);return{Rr:en(t,i,r.Ir,r.zr),Dr:en(t,i,r.Lr,r.Er),ht:(a=i,o=r.Br,s=r.Ar,o+(s-o)*a)};var a,o,s}var nn=class{constructor(e){this.Wt=new Qt,this.ft=!0,this.Nr=!0,this.Fr=performance.now(),this.Wr=this.Fr-1,this.jr=e}Hr(){this.Wr=this.Fr-1,this.bt()}$r(){if(this.bt(),this.jr.W().lastPriceAnimation===2){let e=performance.now(),t=this.Wr-e;if(t>0)return void(t<650&&(this.Wr+=2600));this.Fr=e,this.Wr=e+2600}}bt(){this.ft=!0}Ur(){this.Nr=!0}yt(){return this.jr.W().lastPriceAnimation!==0}qr(){switch(this.jr.W().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Wr}}gt(){return this.ft?(this.Mt(),this.ft=!1,this.Nr=!1):this.Nr&&=(this.Yr(),!1),this.Wt}Mt(){this.Wt.J(null);let e=this.jr.$t().St(),t=e.Xs(),n=this.jr.Ct();if(t===null||n===null)return;let r=this.jr.Zr(!0);if(r.Xr||!t.Kr(r.ee))return;let i={x:e.It(r.ee),y:this.jr.Dt().Rt(r._t,n.Vt)},a=r.V,o=this.jr.W().lineWidth,s=tn(this.Gr(),a);this.Wt.J({Tr:a,Pr:o,Rr:s.Rr,Dr:s.Dr,ht:s.ht,Xe:i})}Yr(){let e=this.Wt.$e();if(e!==null){let t=tn(this.Gr(),e.Tr);e.Rr=t.Rr,e.Dr=t.Dr,e.ht=t.ht}}Gr(){return this.qr()?performance.now()-this.Fr:2599}};function rn(e,t){return gt(Math.min(Math.max(e,12),30)*t)}function an(e,t){switch(e){case`arrowDown`:case`arrowUp`:return rn(t,1);case`circle`:return rn(t,.8);case`square`:return rn(t,.7)}}function on(e){return function(e){let t=Math.ceil(e);return t%2==0?t:t-1}(rn(e,1))}function sn(e){return Math.max(rn(e,.1),3)}function cn(e,t,n){return t?e:n?Math.ceil(e/2):0}function ln(e,t,n,r,i){let a=an(`square`,n),o=(a-1)/2,s=e-o,c=t-o;return r>=s&&r<=s+a&&i>=c&&i<=c+a}function un(e,t,n,r){let i=(an(`arrowUp`,r)-1)/2*n.Jr,a=(gt(r/2)-1)/2*n.Jr;t.beginPath(),e?(t.moveTo(n.nt-i,n.st),t.lineTo(n.nt,n.st-i),t.lineTo(n.nt+i,n.st),t.lineTo(n.nt+a,n.st),t.lineTo(n.nt+a,n.st+i),t.lineTo(n.nt-a,n.st+i),t.lineTo(n.nt-a,n.st)):(t.moveTo(n.nt-i,n.st),t.lineTo(n.nt,n.st+i),t.lineTo(n.nt+i,n.st),t.lineTo(n.nt+a,n.st),t.lineTo(n.nt+a,n.st-i),t.lineTo(n.nt-a,n.st-i),t.lineTo(n.nt-a,n.st)),t.fill()}function dn(e,t,n,r,i,a){return ln(t,n,r,i,a)}var fn=class extends Ne{constructor(){super(...arguments),this.zt=null,this.ar=new Kt,this.j=-1,this.H=``,this.Qr=``}J(e){this.zt=e}_r(e,t){this.j===e&&this.H===t||(this.j=e,this.H=t,this.Qr=Ae(e,t),this.ar.nr())}wr(e,t){if(this.zt===null||this.zt.tt===null)return null;for(let n=this.zt.tt.from;n<this.zt.tt.to;n++){let r=this.zt.it[n];if(mn(r,e,t))return{Mr:r.th,gr:r.gr}}return null}K({context:e,horizontalPixelRatio:t,verticalPixelRatio:n},r,i){if(this.zt!==null&&this.zt.tt!==null){e.textBaseline=`middle`,e.font=this.Qr;for(let r=this.zt.tt.from;r<this.zt.tt.to;r++){let i=this.zt.it[r];i.Kt!==void 0&&(i.Kt.Hi=this.ar.xi(e,i.Kt.ih),i.Kt.At=this.j,i.Kt.nt=i.nt-i.Kt.Hi/2),pn(i,e,t,n)}}}};function pn(e,t,n,r){t.fillStyle=e.V,e.Kt!==void 0&&function(e,t,n,r,i,a){e.save(),e.scale(i,a),e.fillText(t,n,r),e.restore()}(t,e.Kt.ih,e.Kt.nt,e.Kt.st,n,r),function(e,t,n){if(e.Ks!==0){switch(e.nh){case`arrowDown`:un(!1,t,n,e.Ks);return;case`arrowUp`:un(!0,t,n,e.Ks);return;case`circle`:(function(e,t,n){let r=(an(`circle`,n)-1)/2;e.beginPath(),e.arc(t.nt,t.st,r*t.Jr,0,2*Math.PI,!1),e.fill()})(t,n,e.Ks);return;case`square`:(function(e,t,n){let r=an(`square`,n),i=(r-1)*t.Jr/2,a=t.nt-i,o=t.st-i;e.fillRect(a,o,r*t.Jr,r*t.Jr)})(t,n,e.Ks);return}e.nh}}(e,t,function(e,t,n){let r=Math.max(1,Math.floor(t))%2/2;return{nt:Math.round(e.nt*t)+r,st:e.st*n,Jr:t}}(e,n,r))}function mn(e,t,n){return!(e.Kt===void 0||!function(e,t,n,r,i,a){let o=r/2;return i>=e&&i<=e+n&&a>=t-o&&a<=t+o}(e.Kt.nt,e.Kt.st,e.Kt.Hi,e.Kt.At,t,n))||function(e,t,n){if(e.Ks===0)return!1;switch(e.nh){case`arrowDown`:case`arrowUp`:return dn(0,e.nt,e.st,e.Ks,t,n);case`circle`:return function(e,t,n,r,i){let a=2+an(`circle`,n)/2,o=e-r,s=t-i;return Math.sqrt(o*o+s*s)<=a}(e.nt,e.st,e.Ks,t,n);case`square`:return ln(e.nt,e.st,e.Ks,t,n)}}(e,t,n)}function hn(e,t,n,r,i,a,o,s,c){let l=Se(n)?n:n.Se,u=Se(n)?n:n.Me,d=Se(n)?n:n.xe,f=Se(t.size)?Math.max(t.size,0):1,p=on(s.le())*f,m=p/2;switch(e.Ks=p,t.position){case`inBar`:e.st=o.Rt(l,c),e.Kt!==void 0&&(e.Kt.st=e.st+m+a+.6*i);return;case`aboveBar`:e.st=o.Rt(u,c)-m-r.sh,e.Kt!==void 0&&(e.Kt.st=e.st-m-.6*i,r.sh+=1.2*i),r.sh+=p+a;return;case`belowBar`:e.st=o.Rt(d,c)+m+r.eh,e.Kt!==void 0&&(e.Kt.st=e.st+m+a+.6*i,r.eh+=1.2*i),r.eh+=p+a;return}t.position}var gn=class{constructor(e,t){this.ft=!0,this.rh=!0,this.hh=!0,this.ah=null,this.oh=null,this.Wt=new fn,this.jr=e,this.$i=t,this.zt={it:[],tt:null}}bt(e){this.ft=!0,this.hh=!0,e===`data`&&(this.rh=!0,this.oh=null)}gt(e){if(!this.jr.yt())return null;this.ft&&this._h();let t=this.$i.W().layout;return this.Wt._r(t.fontSize,t.fontFamily),this.Wt.J(this.zt),this.Wt}uh(){if(this.hh){if(this.jr.dh().length>0){let e=this.$i.St().le(),t=sn(e),n=1.5*on(e)+2*t,r=this.fh();this.ah={above:cn(n,r.aboveBar,r.inBar),below:cn(n,r.belowBar,r.inBar)}}else this.ah=null;this.hh=!1}return this.ah}fh(){return this.oh===null&&(this.oh=this.jr.dh().reduce(((e,t)=>(e[t.position]||(e[t.position]=!0),e)),{inBar:!1,aboveBar:!1,belowBar:!1})),this.oh}_h(){let e=this.jr.Dt(),t=this.$i.St(),n=this.jr.dh();this.rh&&=(this.zt.it=n.map((e=>({ot:e.time,nt:0,st:0,Ks:0,nh:e.shape,V:e.color,th:e.th,gr:e.id,Kt:void 0}))),!1);let r=this.$i.W().layout;this.zt.tt=null;let i=t.Xs();if(i===null)return;let a=this.jr.Ct();if(a===null||this.zt.it.length===0)return;let o=NaN,s=sn(t.le()),c={sh:s,eh:s};this.zt.tt=Dt(this.zt.it,i,!0);for(let i=this.zt.tt.from;i<this.zt.tt.to;i++){let l=n[i];l.time!==o&&(c.sh=s,c.eh=s,o=l.time);let u=this.zt.it[i];u.nt=t.It(l.time),l.text!==void 0&&l.text.length>0&&(u.Kt={ih:l.text,nt:0,st:0,Hi:0,At:0});let d=this.jr.ph(l.time);d!==null&&hn(u,l,d,c,r.fontSize,s,e,t,a.Vt)}this.ft=!1}},_n=class extends Xt{constructor(e){super(e)}yr(){let e=this.Sr;e.yt=!1;let t=this.Es.W();if(!t.priceLineVisible||!this.Es.yt())return;let n=this.Es.Zr(t.priceLineSource===0);n.Xr||(e.yt=!0,e.st=n.ki,e.V=this.Es.mh(n.V),e.et=t.priceLineWidth,e.Nt=t.priceLineStyle)}},vn=class extends Ke{constructor(e){super(),this.jt=e}zi(e,t,n){e.yt=!1,t.yt=!1;let r=this.jt;if(!r.yt())return;let i=r.W(),a=i.lastValueVisible,o=r.bh()!==``,s=i.seriesLastValueMode===0,c=r.Zr(!1);if(c.Xr)return;a&&(e.Kt=this.wh(c,a,s),e.yt=e.Kt.length!==0),(o||s)&&(t.Kt=this.gh(c,a,o,s),t.yt=t.Kt.length>0);let l=r.mh(c.V),u=be(l);n.t=u.t,n.ki=c.ki,t.Ot=r.$t().Bt(c.ki/r.Dt().At()),e.Ot=l,e.V=u.i,t.V=u.i}gh(e,t,n,r){let i=``,a=this.jt.bh();return n&&a.length!==0&&(i+=`${a} `),t&&r&&(i+=this.jt.Dt().Mh()?e.xh:e.Sh),i.trim()}wh(e,t,n){return t?n?this.jt.Dt().Mh()?e.Sh:e.xh:e.Kt:``}};function yn(e,t,n,r){let i=Number.isFinite(t),a=Number.isFinite(n);return i&&a?e(t,n):i||a?i?t:n:r}var bn=class e{constructor(e,t){this.kh=e,this.yh=t}Ch(e){return e!==null&&this.kh===e.kh&&this.yh===e.yh}Th(){return new e(this.kh,this.yh)}Ph(){return this.kh}Rh(){return this.yh}Dh(){return this.yh-this.kh}Ni(){return this.yh===this.kh||Number.isNaN(this.yh)||Number.isNaN(this.kh)}ts(t){return t===null?this:new e(yn(Math.min,this.Ph(),t.Ph(),-1/0),yn(Math.max,this.Rh(),t.Rh(),1/0))}Vh(e){if(!Se(e)||this.yh-this.kh===0)return;let t=.5*(this.yh+this.kh),n=this.yh-t,r=this.kh-t;n*=e,r*=e,this.yh=t+n,this.kh=t+r}Oh(e){Se(e)&&(this.yh+=e,this.kh+=e)}Bh(){return{minValue:this.kh,maxValue:this.yh}}static Ah(t){return t===null?null:new e(t.minValue,t.maxValue)}},xn=class e{constructor(e,t){this.Ih=e,this.zh=t||null}Lh(){return this.Ih}Eh(){return this.zh}Bh(){return this.Ih===null?null:{priceRange:this.Ih.Bh(),margins:this.zh||void 0}}static Ah(t){return t===null?null:new e(bn.Ah(t.priceRange),t.margins)}},Sn=class extends Xt{constructor(e,t){super(e),this.Nh=t}yr(){let e=this.Sr;e.yt=!1;let t=this.Nh.W();if(!this.Es.yt()||!t.lineVisible)return;let n=this.Nh.Fh();n!==null&&(e.yt=!0,e.st=n,e.V=t.color,e.et=t.lineWidth,e.Nt=t.lineStyle,e.gr=this.Nh.W().id)}},Cn=class extends Ke{constructor(e,t){super(),this.jr=e,this.Nh=t}zi(e,t,n){e.yt=!1,t.yt=!1;let r=this.Nh.W(),i=r.axisLabelVisible,a=r.title!==``,o=this.jr;if(!i||!o.yt())return;let s=this.Nh.Fh();if(s===null)return;a&&(t.Kt=r.title,t.yt=!0),t.Ot=o.$t().Bt(s/o.Dt().At()),e.Kt=this.Wh(r.price),e.yt=!0;let c=be(r.axisLabelColor||r.color);n.t=c.t;let l=r.axisLabelTextColor||c.i;e.V=l,t.V=l,n.ki=s}Wh(e){let t=this.jr.Ct();return t===null?``:this.jr.Dt().Fi(e,t.Vt)}},wn=class{constructor(e,t){this.jr=e,this.cn=t,this.jh=new Sn(e,this),this.ur=new Cn(e,this),this.Hh=new Jt(this.ur,e,e.$t())}$h(e){xe(this.cn,e),this.bt(),this.jr.$t().Uh()}W(){return this.cn}qh(){return this.jh}Yh(){return this.Hh}Zh(){return this.ur}bt(){this.jh.bt(),this.ur.bt()}Fh(){let e=this.jr,t=e.Dt();if(e.$t().St().Ni()||t.Ni())return null;let n=e.Ct();return n===null?null:t.Rt(this.cn.price,n.Vt)}},Tn=class extends Ze{constructor(e){super(),this.$i=e}$t(){return this.$i}},En={Bar:(e,t,n,r)=>{let i=t.upColor,a=t.downColor,o=O(e(n,r)),s=k(o.Vt[0])<=k(o.Vt[3]);return{ce:o.V??(s?i:a)}},Candlestick:(e,t,n,r)=>{let i=t.upColor,a=t.downColor,o=t.borderUpColor,s=t.borderDownColor,c=t.wickUpColor,l=t.wickDownColor,u=O(e(n,r)),d=k(u.Vt[0])<=k(u.Vt[3]);return{ce:u.V??(d?i:a),Ne:u.Ot??(d?o:s),Ee:u.Xh??(d?c:l)}},Custom:(e,t,n,r)=>({ce:O(e(n,r)).V??t.color}),Area:(e,t,n,r)=>{let i=O(e(n,r));return{ce:i.lt??t.lineColor,lt:i.lt??t.lineColor,Ps:i.Ps??t.topColor,Rs:i.Rs??t.bottomColor}},Baseline:(e,t,n,r)=>{let i=O(e(n,r));return{ce:i.Vt[3]>=t.baseValue.price?t.topLineColor:t.bottomLineColor,Re:i.Re??t.topLineColor,De:i.De??t.bottomLineColor,ke:i.ke??t.topFillColor1,ye:i.ye??t.topFillColor2,Ce:i.Ce??t.bottomFillColor1,Te:i.Te??t.bottomFillColor2}},Line:(e,t,n,r)=>{let i=O(e(n,r));return{ce:i.V??t.color,lt:i.V??t.color}},Histogram:(e,t,n,r)=>({ce:O(e(n,r)).V??t.color})},Dn=class{constructor(e){this.Kh=(e,t)=>t===void 0?this.jr.In().Gh(e):t.Vt,this.jr=e,this.Jh=En[e.Qh()]}$s(e,t){return this.Jh(this.Kh,this.jr.W(),e,t)}},On;(function(e){e[e.NearestLeft=-1]=`NearestLeft`,e[e.None=0]=`None`,e[e.NearestRight=1]=`NearestRight`})(On||={});var kn=30,An=class{constructor(){this.tl=[],this.il=new Map,this.nl=new Map}sl(){return this.Ks()>0?this.tl[this.tl.length-1]:null}el(){return this.Ks()>0?this.rl(0):null}An(){return this.Ks()>0?this.rl(this.tl.length-1):null}Ks(){return this.tl.length}Ni(){return this.Ks()===0}Kr(e){return this.hl(e,0)!==null}Gh(e){return this.ll(e)}ll(e,t=0){let n=this.hl(e,t);return n===null?null:Object.assign(Object.assign({},this.al(n)),{ee:this.rl(n)})}ne(){return this.tl}ol(e,t,n){if(this.Ni())return null;let r=null;for(let i of n)r=jn(r,this._l(e,t,i));return r}J(e){this.nl.clear(),this.il.clear(),this.tl=e}rl(e){return this.tl[e].ee}al(e){return this.tl[e]}hl(e,t){let n=this.ul(e);if(n===null&&t!==0)switch(t){case-1:return this.cl(e);case 1:return this.dl(e);default:throw TypeError(`Unknown search mode`)}return n}cl(e){let t=this.fl(e);return t>0&&--t,t!==this.tl.length&&this.rl(t)<e?t:null}dl(e){let t=this.vl(e);return t!==this.tl.length&&e<this.rl(t)?t:null}ul(e){let t=this.fl(e);return t===this.tl.length||e<this.tl[t].ee?null:t}fl(e){return Ct(this.tl,e,((e,t)=>e.ee<t))}vl(e){return wt(this.tl,e,((e,t)=>e.ee>t))}pl(e,t,n){let r=null;for(let i=e;i<t;i++){let e=this.tl[i].Vt[n];Number.isNaN(e)||(r===null?r={ml:e,bl:e}:(e<r.ml&&(r.ml=e),e>r.bl&&(r.bl=e)))}return r}_l(e,t,n){if(this.Ni())return null;let r=null,i=O(this.el()),a=O(this.An()),o=Math.max(e,i),s=Math.min(t,a),c=Math.ceil(o/kn)*kn,l=Math.max(c,Math.floor(s/kn)*kn);{let e=this.fl(o),i=this.vl(Math.min(s,c,t));r=jn(r,this.pl(e,i,n))}let u=this.il.get(n);u===void 0&&(u=new Map,this.il.set(n,u));for(let e=Math.max(c+1,o);e<l;e+=kn){let t=Math.floor(e/kn),i=u.get(t);if(i===void 0){let e=this.fl(t*kn),r=this.vl((t+1)*kn-1);i=this.pl(e,r,n),u.set(t,i)}r=jn(r,i)}{let e=this.fl(l),t=this.vl(s);r=jn(r,this.pl(e,t,n))}return r}};function jn(e,t){return e===null?t:t===null?e:{ml:Math.min(e.ml,t.ml),bl:Math.max(e.bl,t.bl)}}var Mn=class{constructor(e){this.wl=e}X(e,t,n){this.wl.draw(e)}gl(e,t,n){var r,i;(i=(r=this.wl).drawBackground)==null||i.call(r,e)}},Nn=class{constructor(e){this.tr=null,this.wn=e}gt(){let e=this.wn.renderer();if(e===null)return null;if(this.tr?.Ml===e)return this.tr.xl;let t=new Mn(e);return this.tr={Ml:e,xl:t},t}Sl(){var e;return(e=this.wn).zOrder?.call(e)??`normal`}};function Pn(e){var t,n;return{Kt:e.text(),ki:e.coordinate(),Si:e.fixedCoordinate?.call(e),V:e.textColor(),t:e.backColor(),yt:(t=e.visible?.call(e))==null||t,hi:(n=e.tickVisible?.call(e))==null||n}}var Fn=class{constructor(e,t){this.Wt=new Ye,this.kl=e,this.yl=t}gt(){return this.Wt.J(Object.assign({Hi:this.yl.Hi()},Pn(this.kl))),this.Wt}},In=class extends Ke{constructor(e,t){super(),this.kl=e,this.Li=t}zi(e,t,n){let r=Pn(this.kl);n.t=r.t,e.V=r.V;let i=2/12*this.Li.P();n.wi=i,n.gi=i,n.ki=r.ki,n.Si=r.Si,e.Kt=r.Kt,e.yt=r.yt,e.hi=r.hi}},Ln=class{constructor(e,t){this.Cl=null,this.Tl=null,this.Pl=null,this.Rl=null,this.Dl=null,this.Vl=e,this.jr=t}Ol(){return this.Vl}Vn(){var e,t;(t=(e=this.Vl).updateAllViews)==null||t.call(e)}Pn(){var e;let t=(e=this.Vl).paneViews?.call(e)??[];if(this.Cl?.Ml===t)return this.Cl.xl;let n=t.map((e=>new Nn(e)));return this.Cl={Ml:t,xl:n},n}Qi(){var e;let t=(e=this.Vl).timeAxisViews?.call(e)??[];if(this.Tl?.Ml===t)return this.Tl.xl;let n=this.jr.$t().St(),r=t.map((e=>new Fn(e,n)));return this.Tl={Ml:t,xl:r},r}Rn(){var e;let t=(e=this.Vl).priceAxisViews?.call(e)??[];if(this.Pl?.Ml===t)return this.Pl.xl;let n=this.jr.Dt(),r=t.map((e=>new In(e,n)));return this.Pl={Ml:t,xl:r},r}Bl(){var e;let t=(e=this.Vl).priceAxisPaneViews?.call(e)??[];if(this.Rl?.Ml===t)return this.Rl.xl;let n=t.map((e=>new Nn(e)));return this.Rl={Ml:t,xl:n},n}Al(){var e;let t=(e=this.Vl).timeAxisPaneViews?.call(e)??[];if(this.Dl?.Ml===t)return this.Dl.xl;let n=t.map((e=>new Nn(e)));return this.Dl={Ml:t,xl:n},n}Il(e,t){var n;return(n=this.Vl).autoscaleInfo?.call(n,e,t)??null}wr(e,t){var n;return(n=this.Vl).hitTest?.call(n,e,t)??null}};function Rn(e,t,n,r){e.forEach((e=>{t(e).forEach((e=>{e.Sl()===n&&r.push(e)}))}))}function zn(e){return e.Pn()}function Bn(e){return e.Bl()}function Vn(e){return e.Al()}var Hn=class extends Tn{constructor(e,t,n,r,i){super(e),this.zt=new An,this.jh=new _n(this),this.zl=[],this.Ll=new Zt(this),this.El=null,this.Nl=null,this.Fl=[],this.Wl=[],this.jl=null,this.Hl=[],this.cn=t,this.$l=n;let a=new vn(this);this.rn=[a],this.Hh=new Jt(a,this,e),n!==`Area`&&n!==`Line`&&n!==`Baseline`||(this.El=new nn(this)),this.Ul(),this.ql(i)}S(){this.jl!==null&&clearTimeout(this.jl)}mh(e){return this.cn.priceLineColor||e}Zr(e){let t={Xr:!0},n=this.Dt();if(this.$t().St().Ni()||n.Ni()||this.zt.Ni())return t;let r=this.$t().St().Xs(),i=this.Ct();if(r===null||i===null)return t;let a,o;if(e){let e=this.zt.sl();if(e===null)return t;a=e,o=e.ee}else{let e=this.zt.ll(r.ui(),-1);if(e===null||(a=this.zt.Gh(e.ee),a===null))return t;o=e.ee}let s=a.Vt[3],c=this.Us().$s(o,{Vt:a}),l=n.Rt(s,i.Vt);return{Xr:!1,_t:s,Kt:n.Fi(s,i.Vt),xh:n.Yl(s),Sh:n.Zl(s,i.Vt),V:c.ce,ki:l,ee:o}}Us(){return this.Nl!==null||(this.Nl=new Dn(this)),this.Nl}W(){return this.cn}$h(e){let t=e.priceScaleId;t!==void 0&&t!==this.cn.priceScaleId&&this.$t().Xl(this,t),xe(this.cn,e),e.priceFormat!==void 0&&(this.Ul(),this.$t().Kl()),this.$t().Gl(this),this.$t().Jl(),this.wn.bt(`options`)}J(e,t){this.zt.J(e),this.Ql(),this.wn.bt(`data`),this.dn.bt(`data`),this.El!==null&&(t&&t.ta?this.El.$r():e.length===0&&this.El.Hr());let n=this.$t().dr(this);this.$t().ia(n),this.$t().Gl(this),this.$t().Jl(),this.$t().Uh()}na(e){this.Fl=e,this.Ql();let t=this.$t().dr(this);this.dn.bt(`data`),this.$t().ia(t),this.$t().Gl(this),this.$t().Jl(),this.$t().Uh()}sa(){return this.Fl}dh(){return this.Wl}ea(e){let t=new wn(this,e);return this.zl.push(t),this.$t().Gl(this),t}ra(e){let t=this.zl.indexOf(e);t!==-1&&this.zl.splice(t,1),this.$t().Gl(this)}Qh(){return this.$l}Ct(){let e=this.ha();return e===null?null:{Vt:e.Vt[3],la:e.ot}}ha(){let e=this.$t().St().Xs();if(e===null)return null;let t=e.Os();return this.zt.ll(t,1)}In(){return this.zt}ph(e){let t=this.zt.Gh(e);return t===null?null:this.$l===`Bar`||this.$l===`Candlestick`||this.$l===`Custom`?{ge:t.Vt[0],Me:t.Vt[1],xe:t.Vt[2],Se:t.Vt[3]}:t.Vt[3]}aa(e){let t=[];Rn(this.Hl,zn,`top`,t);let n=this.El;return n!==null&&n.yt()?(this.jl===null&&n.qr()&&(this.jl=setTimeout((()=>{this.jl=null,this.$t().oa()}),0)),n.Ur(),t.unshift(n),t):t}Pn(){let e=[];this._a()||e.push(this.Ll),e.push(this.wn,this.jh,this.dn);let t=this.zl.map((e=>e.qh()));return e.push(...t),Rn(this.Hl,zn,`normal`,e),e}ua(){return this.ca(zn,`bottom`)}da(e){return this.ca(Bn,e)}fa(e){return this.ca(Vn,e)}va(e,t){return this.Hl.map((n=>n.wr(e,t))).filter((e=>e!==null))}Ji(e){return[this.Hh,...this.zl.map((e=>e.Yh()))]}Rn(e,t){if(t!==this.Yi&&!this._a())return[];let n=[...this.rn];for(let e of this.zl)n.push(e.Zh());return this.Hl.forEach((e=>{n.push(...e.Rn())})),n}Qi(){let e=[];return this.Hl.forEach((t=>{e.push(...t.Qi())})),e}Il(e,t){if(this.cn.autoscaleInfoProvider!==void 0){let n=this.cn.autoscaleInfoProvider((()=>{let n=this.pa(e,t);return n===null?null:n.Bh()}));return xn.Ah(n)}return this.pa(e,t)}ma(){return this.cn.priceFormat.minMove}ba(){return this.wa}Vn(){var e;this.wn.bt(),this.dn.bt();for(let e of this.rn)e.bt();for(let e of this.zl)e.bt();this.jh.bt(),this.Ll.bt(),(e=this.El)==null||e.bt(),this.Hl.forEach((e=>e.Vn()))}Dt(){return O(super.Dt())}kt(e){if(!((this.$l===`Line`||this.$l===`Area`||this.$l===`Baseline`)&&this.cn.crosshairMarkerVisible))return null;let t=this.zt.Gh(e);return t===null?null:{_t:t.Vt[3],ht:this.ga(),Ot:this.Ma(),Pt:this.xa(),Tt:this.Sa(e)}}bh(){return this.cn.title}yt(){return this.cn.visible}ka(e){this.Hl.push(new Ln(e,this))}ya(e){this.Hl=this.Hl.filter((t=>t.Ol()!==e))}Ca(){if(this.wn instanceof Bt!=0)return e=>this.wn.We(e)}Ta(){if(this.wn instanceof Bt!=0)return e=>this.wn.je(e)}_a(){return!et(this.Dt().Pa())}pa(e,t){if(!Ce(e)||!Ce(t)||this.zt.Ni())return null;let n=this.$l===`Line`||this.$l===`Area`||this.$l===`Baseline`||this.$l===`Histogram`?[3]:[2,1],r=this.zt.ol(e,t,n),i=r===null?null:new bn(r.ml,r.bl);if(this.Qh()===`Histogram`){let e=this.cn.base,t=new bn(e,e);i=i===null?t:i.ts(t)}let a=this.dn.uh();return this.Hl.forEach((n=>{let r=n.Il(e,t);if(r?.priceRange){let e=new bn(r.priceRange.minValue,r.priceRange.maxValue);i=i===null?e:i.ts(e)}var o,s;r!=null&&r.margins&&(o=a,s=r.margins,a={above:Math.max(o?.above??0,s.above),below:Math.max(o?.below??0,s.below)})})),new xn(i,a)}ga(){switch(this.$l){case`Line`:case`Area`:case`Baseline`:return this.cn.crosshairMarkerRadius}return 0}Ma(){switch(this.$l){case`Line`:case`Area`:case`Baseline`:{let e=this.cn.crosshairMarkerBorderColor;if(e.length!==0)return e}}return null}xa(){switch(this.$l){case`Line`:case`Area`:case`Baseline`:return this.cn.crosshairMarkerBorderWidth}return 0}Sa(e){switch(this.$l){case`Line`:case`Area`:case`Baseline`:{let e=this.cn.crosshairMarkerBackgroundColor;if(e.length!==0)return e}}return this.Us().$s(e).ce}Ul(){switch(this.cn.priceFormat.type){case`custom`:this.wa={format:this.cn.priceFormat.formatter};break;case`volume`:this.wa=new ot(this.cn.priceFormat.precision);break;case`percent`:this.wa=new at(this.cn.priceFormat.precision);break;default:{let e=10**this.cn.priceFormat.precision;this.wa=new it(e,this.cn.priceFormat.minMove*e)}}this.Yi!==null&&this.Yi.Ra()}Ql(){let e=this.$t().St();if(!e.Da()||this.zt.Ni())return void(this.Wl=[]);let t=O(this.zt.el());this.Wl=this.Fl.map(((n,r)=>{let i=O(e.Va(n.time,!0)),a=i<t?1:-1;return{time:O(this.zt.ll(i,a)).ee,position:n.position,shape:n.shape,color:n.color,id:n.id,th:r,text:n.text,size:n.size,originalTime:n.originalTime}}))}ql(e){switch(this.dn=new gn(this,this.$t()),this.$l){case`Bar`:this.wn=new Nt(this,this.$t());break;case`Candlestick`:this.wn=new Rt(this,this.$t());break;case`Line`:this.wn=new Wt(this,this.$t());break;case`Custom`:this.wn=new Bt(this,this.$t(),D(e));break;case`Area`:this.wn=new At(this,this.$t());break;case`Baseline`:this.wn=new It(this,this.$t());break;case`Histogram`:this.wn=new Ut(this,this.$t());break;default:throw Error(`Unknown chart style assigned: `+this.$l)}}ca(e,t){let n=[];return Rn(this.Hl,e,t,n),n}},Un=class{constructor(e){this.cn=e}Oa(e,t,n){let r=e;if(this.cn.mode===0)return r;let i=n.vn(),a=i.Ct();if(a===null)return r;let o=i.Rt(e,a),s=n.Ba().filter((e=>e instanceof Hn)).reduce(((e,r)=>{if(n.vr(r)||!r.yt())return e;let i=r.Dt(),a=r.In();if(i.Ni()||!a.Kr(t))return e;let o=a.Gh(t);if(o===null)return e;let s=k(r.Ct());return e.concat([i.Rt(o.Vt[3],s.Vt)])}),[]);if(s.length===0)return r;s.sort(((e,t)=>Math.abs(e-o)-Math.abs(t-o)));let c=s[0];return r=i.pn(c,a),r}},Wn=class extends Ne{constructor(){super(...arguments),this.zt=null}J(e){this.zt=e}K({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(this.zt===null)return;let i=Math.max(1,Math.floor(n));e.lineWidth=i,function(e,t){e.save(),e.lineWidth%2&&e.translate(.5,.5),t(),e.restore()}(e,(()=>{let a=O(this.zt);if(a.Aa){e.strokeStyle=a.Ia,E(e,a.za),e.beginPath();for(let r of a.La){let a=Math.round(r.Ea*n);e.moveTo(a,-i),e.lineTo(a,t.height+i)}e.stroke()}if(a.Na){e.strokeStyle=a.Fa,E(e,a.Wa),e.beginPath();for(let n of a.ja){let a=Math.round(n.Ea*r);e.moveTo(-i,a),e.lineTo(t.width+i,a)}e.stroke()}}))}},Gn=class{constructor(e){this.Wt=new Wn,this.ft=!0,this.tn=e}bt(){this.ft=!0}gt(){if(this.ft){let e=this.tn.$t().W().grid,t={Na:e.horzLines.visible,Aa:e.vertLines.visible,Fa:e.horzLines.color,Ia:e.vertLines.color,Wa:e.horzLines.style,za:e.vertLines.style,ja:this.tn.vn().Ha(),La:(this.tn.$t().St().Ha()||[]).map((e=>({Ea:e.coord})))};this.Wt.J(t),this.ft=!1}return this.Wt}},Kn=class{constructor(e){this.wn=new Gn(e)}qh(){return this.wn}},qn={$a:4,Ua:1e-4};function Jn(e,t){let n=100*(e-t)/t;return t<0?-n:n}function Yn(e,t){return new bn(Jn(e.Ph(),t),Jn(e.Rh(),t))}function Xn(e,t){let n=100*(e-t)/t+100;return t<0?-n:n}function Zn(e,t){return new bn(Xn(e.Ph(),t),Xn(e.Rh(),t))}function Qn(e,t){let n=Math.abs(e);if(n<1e-15)return 0;let r=Math.log10(n+t.Ua)+t.$a;return e<0?-r:r}function $n(e,t){let n=Math.abs(e);if(n<1e-15)return 0;let r=10**(n-t.$a)-t.Ua;return e<0?-r:r}function er(e,t){return e===null?null:new bn(Qn(e.Ph(),t),Qn(e.Rh(),t))}function tr(e,t){return e===null?null:new bn($n(e.Ph(),t),$n(e.Rh(),t))}function nr(e){if(e===null)return qn;let t=Math.abs(e.Rh()-e.Ph());if(t>=1||t<1e-15)return qn;let n=Math.ceil(Math.abs(Math.log10(t))),r=qn.$a+n;return{$a:r,Ua:1/10**r}}var rr=class{constructor(e,t){if(this.qa=e,this.Ya=t,function(e){if(e<0)return!1;for(let t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}(this.qa))this.Za=[2,2.5,2];else{this.Za=[];for(let e=this.qa;e!==1;){if(e%2==0)this.Za.push(2),e/=2;else{if(e%5!=0)throw Error(`unexpected base`);this.Za.push(2,2.5),e/=5}if(this.Za.length>100)throw Error(`something wrong with base`)}}}Xa(e,t,n){let r=this.qa===0?0:1/this.qa,i=10**Math.max(0,Math.ceil(Math.log10(e-t))),a=0,o=this.Ya[0];for(;;){let e=ht(i,r,1e-14)&&i>r+1e-14,t=ht(i,n*o,1e-14),s=ht(i,1,1e-14);if(!(e&&t&&s))break;i/=o,o=this.Ya[++a%this.Ya.length]}if(i<=r+1e-14&&(i=r),i=Math.max(1,i),this.Za.length>0&&(s=i,c=1,l=1e-14,Math.abs(s-c)<l))for(a=0,o=this.Za[0];ht(i,n*o,1e-14)&&i>r+1e-14;)i/=o,o=this.Za[++a%this.Za.length];var s,c,l;return i}},ir=class{constructor(e,t,n,r){this.Ka=[],this.Li=e,this.qa=t,this.Ga=n,this.Ja=r}Xa(e,t){if(e<t)throw Error(`high < low`);let n=this.Li.At(),r=(e-t)*this.Qa()/n,i=new rr(this.qa,[2,2.5,2]),a=new rr(this.qa,[2,2,2.5]),o=new rr(this.qa,[2.5,2,2]),s=[];return s.push(i.Xa(e,t,r),a.Xa(e,t,r),o.Xa(e,t,r)),function(e){if(e.length<1)throw Error(`array is empty`);let t=e[0];for(let n=1;n<e.length;++n)e[n]<t&&(t=e[n]);return t}(s)}io(){let e=this.Li,t=e.Ct();if(t===null)return void(this.Ka=[]);let n=e.At(),r=this.Ga(n-1,t),i=this.Ga(0,t),a=this.Li.W().entireTextOnly?this.no()/2:0,o=a,s=n-1-a,c=Math.max(r,i),l=Math.min(r,i);if(c===l)return void(this.Ka=[]);let u=this.Xa(c,l),d=c%u;d+=d<0?u:0;let f=c>=l?1:-1,p=null,m=0;for(let n=c-d;n>l;n-=u){let r=this.Ja(n,t,!0);p!==null&&Math.abs(r-p)<this.Qa()||r<o||r>s||(m<this.Ka.length?(this.Ka[m].Ea=r,this.Ka[m].so=e.eo(n)):this.Ka.push({Ea:r,so:e.eo(n)}),m++,p=r,e.ro()&&(u=this.Xa(n*f,l)))}this.Ka.length=m}Ha(){return this.Ka}no(){return this.Li.P()}Qa(){return Math.ceil(2.5*this.no())}};function ar(e){return e.slice().sort(((e,t)=>O(e.Xi())-O(t.Xi())))}var or;(function(e){e[e.Normal=0]=`Normal`,e[e.Logarithmic=1]=`Logarithmic`,e[e.Percentage=2]=`Percentage`,e[e.IndexedTo100=3]=`IndexedTo100`})(or||={});var sr=new at,cr=new it(100,1),lr=class{constructor(e,t,n,r){this.ho=0,this.lo=null,this.Ih=null,this.ao=null,this.oo={_o:!1,uo:null},this.co=0,this.do=0,this.fo=new M,this.vo=new M,this.po=[],this.mo=null,this.bo=null,this.wo=null,this.Mo=null,this.wa=cr,this.xo=nr(null),this.So=e,this.cn=t,this.ko=n,this.yo=r,this.Co=new ir(this,100,this.To.bind(this),this.Po.bind(this))}Pa(){return this.So}W(){return this.cn}$h(e){if(xe(this.cn,e),this.Ra(),e.mode!==void 0&&this.Ro({Cr:e.mode}),e.scaleMargins!==void 0){let t=D(e.scaleMargins.top),n=D(e.scaleMargins.bottom);if(t<0||t>1)throw Error(`Invalid top margin - expect value between 0 and 1, given=${t}`);if(n<0||n>1)throw Error(`Invalid bottom margin - expect value between 0 and 1, given=${n}`);if(t+n>1)throw Error(`Invalid margins - sum of margins must be less than 1, given=${t+n}`);this.Do(),this.bo=null}}Vo(){return this.cn.autoScale}ro(){return this.cn.mode===1}Mh(){return this.cn.mode===2}Oo(){return this.cn.mode===3}Cr(){return{Wn:this.cn.autoScale,Bo:this.cn.invertScale,Cr:this.cn.mode}}Ro(e){let t=this.Cr(),n=null;e.Wn!==void 0&&(this.cn.autoScale=e.Wn),e.Cr!==void 0&&(this.cn.mode=e.Cr,e.Cr!==2&&e.Cr!==3||(this.cn.autoScale=!0),this.oo._o=!1),t.Cr===1&&e.Cr!==t.Cr&&(function(e,t){if(e===null)return!1;let n=$n(e.Ph(),t),r=$n(e.Rh(),t);return isFinite(n)&&isFinite(r)}(this.Ih,this.xo)?(n=tr(this.Ih,this.xo),n!==null&&this.Ao(n)):this.cn.autoScale=!0),e.Cr===1&&e.Cr!==t.Cr&&(n=er(this.Ih,this.xo),n!==null&&this.Ao(n));let r=t.Cr!==this.cn.mode;r&&(t.Cr===2||this.Mh())&&this.Ra(),r&&(t.Cr===3||this.Oo())&&this.Ra(),e.Bo!==void 0&&t.Bo!==e.Bo&&(this.cn.invertScale=e.Bo,this.Io()),this.vo.m(t,this.Cr())}zo(){return this.vo}P(){return this.ko.fontSize}At(){return this.ho}Lo(e){this.ho!==e&&(this.ho=e,this.Do(),this.bo=null)}Eo(){if(this.lo)return this.lo;let e=this.At()-this.No()-this.Fo();return this.lo=e,e}Lh(){return this.Wo(),this.Ih}Ao(e,t){let n=this.Ih;(t||n===null&&e!==null||n!==null&&!n.Ch(e))&&(this.bo=null,this.Ih=e)}Ni(){return this.Wo(),this.ho===0||!this.Ih||this.Ih.Ni()}jo(e){return this.Bo()?e:this.At()-1-e}Rt(e,t){return this.Mh()?e=Jn(e,t):this.Oo()&&(e=Xn(e,t)),this.Po(e,t)}te(e,t,n){this.Wo();let r=this.Fo(),i=O(this.Lh()),a=i.Ph(),o=i.Rh(),s=this.Eo()-1,c=this.Bo(),l=s/(o-a),u=n===void 0?0:n.from,d=n===void 0?e.length:n.to,f=this.Ho();for(let n=u;n<d;n++){let i=e[n],o=i._t;if(isNaN(o))continue;let s=o;f!==null&&(s=f(i._t,t));let u=r+l*(s-a);i.st=c?u:this.ho-1-u}}be(e,t,n){this.Wo();let r=this.Fo(),i=O(this.Lh()),a=i.Ph(),o=i.Rh(),s=this.Eo()-1,c=this.Bo(),l=s/(o-a),u=n===void 0?0:n.from,d=n===void 0?e.length:n.to,f=this.Ho();for(let n=u;n<d;n++){let i=e[n],o=i.ge,s=i.Me,u=i.xe,d=i.Se;f!==null&&(o=f(i.ge,t),s=f(i.Me,t),u=f(i.xe,t),d=f(i.Se,t));let p=r+l*(o-a),m=c?p:this.ho-1-p;i.pe=m,p=r+l*(s-a),m=c?p:this.ho-1-p,i.de=m,p=r+l*(u-a),m=c?p:this.ho-1-p,i.fe=m,p=r+l*(d-a),m=c?p:this.ho-1-p,i.me=m}}pn(e,t){let n=this.To(e,t);return this.$o(n,t)}$o(e,t){let n=e;return this.Mh()?n=function(e,t){return t<0&&(e=-e),e/100*t+t}(n,t):this.Oo()&&(n=function(e,t){return e-=100,t<0&&(e=-e),e/100*t+t}(n,t)),n}Ba(){return this.po}Uo(){if(this.mo)return this.mo;let e=[];for(let t=0;t<this.po.length;t++){let n=this.po[t];n.Xi()===null&&n.Ki(t+1),e.push(n)}return e=ar(e),this.mo=e,this.mo}qo(e){this.po.indexOf(e)===-1&&(this.po.push(e),this.Ra(),this.Yo())}Zo(e){let t=this.po.indexOf(e);if(t===-1)throw Error(`source is not attached to scale`);this.po.splice(t,1),this.po.length===0&&(this.Ro({Wn:!0}),this.Ao(null)),this.Ra(),this.Yo()}Ct(){let e=null;for(let t of this.po){let n=t.Ct();n!==null&&(e===null||n.la<e.la)&&(e=n)}return e===null?null:e.Vt}Bo(){return this.cn.invertScale}Ha(){let e=this.Ct()===null;if(this.bo!==null&&(e||this.bo.Xo===e))return this.bo.Ha;this.Co.io();let t=this.Co.Ha();return this.bo={Ha:t,Xo:e},this.fo.m(),t}Ko(){return this.fo}Go(e){this.Mh()||this.Oo()||this.wo===null&&this.ao===null&&(this.Ni()||(this.wo=this.ho-e,this.ao=O(this.Lh()).Th()))}Jo(e){if(this.Mh()||this.Oo()||this.wo===null)return;this.Ro({Wn:!1}),(e=this.ho-e)<0&&(e=0);let t=(this.wo+.2*(this.ho-1))/(e+.2*(this.ho-1)),n=O(this.ao).Th();t=Math.max(t,.1),n.Vh(t),this.Ao(n)}Qo(){this.Mh()||this.Oo()||(this.wo=null,this.ao=null)}t_(e){this.Vo()||this.Mo===null&&this.ao===null&&(this.Ni()||(this.Mo=e,this.ao=O(this.Lh()).Th()))}i_(e){if(this.Vo()||this.Mo===null)return;let t=O(this.Lh()).Dh()/(this.Eo()-1),n=e-this.Mo;this.Bo()&&(n*=-1);let r=n*t,i=O(this.ao).Th();i.Oh(r),this.Ao(i,!0),this.bo=null}n_(){this.Vo()||this.Mo!==null&&(this.Mo=null,this.ao=null)}ba(){return this.wa||this.Ra(),this.wa}Fi(e,t){switch(this.cn.mode){case 2:return this.s_(Jn(e,t));case 3:return this.ba().format(Xn(e,t));default:return this.Wh(e)}}eo(e){switch(this.cn.mode){case 2:return this.s_(e);case 3:return this.ba().format(e);default:return this.Wh(e)}}Yl(e){return this.Wh(e,O(this.e_()).ba())}Zl(e,t){return e=Jn(e,t),this.s_(e,sr)}r_(){return this.po}h_(e){this.oo={uo:e,_o:!1}}Vn(){this.po.forEach((e=>e.Vn()))}Ra(){this.bo=null;let e=this.e_(),t=100;e!==null&&(t=Math.round(1/e.ma())),this.wa=cr,this.Mh()?(this.wa=sr,t=100):this.Oo()?(this.wa=new it(100,1),t=100):e!==null&&(this.wa=e.ba()),this.Co=new ir(this,t,this.To.bind(this),this.Po.bind(this)),this.Co.io()}Yo(){this.mo=null}e_(){return this.po[0]||null}No(){return this.Bo()?this.cn.scaleMargins.bottom*this.At()+this.do:this.cn.scaleMargins.top*this.At()+this.co}Fo(){return this.Bo()?this.cn.scaleMargins.top*this.At()+this.co:this.cn.scaleMargins.bottom*this.At()+this.do}Wo(){this.oo._o||(this.oo._o=!0,this.l_())}Do(){this.lo=null}Po(e,t){if(this.Wo(),this.Ni())return 0;e=this.ro()&&e?Qn(e,this.xo):e;let n=O(this.Lh()),r=this.Fo()+(this.Eo()-1)*(e-n.Ph())/n.Dh();return this.jo(r)}To(e,t){if(this.Wo(),this.Ni())return 0;let n=this.jo(e),r=O(this.Lh()),i=r.Ph()+r.Dh()*((n-this.Fo())/(this.Eo()-1));return this.ro()?$n(i,this.xo):i}Io(){this.bo=null,this.Co.io()}l_(){let e=this.oo.uo;if(e===null)return;let t=null,n=this.r_(),r=0,i=0;for(let a of n){if(!a.yt())continue;let n=a.Ct();if(n===null)continue;let o=a.Il(e.Os(),e.ui()),s=o&&o.Lh();if(s!==null){switch(this.cn.mode){case 1:s=er(s,this.xo);break;case 2:s=Yn(s,n.Vt);break;case 3:s=Zn(s,n.Vt)}if(t=t===null?s:t.ts(O(s)),o!==null){let e=o.Eh();e!==null&&(r=Math.max(r,e.above),i=Math.max(i,e.below))}}}if(r===this.co&&i===this.do||(this.co=r,this.do=i,this.bo=null,this.Do()),t!==null){if(t.Ph()===t.Rh()){let e=this.e_(),n=5*(e===null||this.Mh()||this.Oo()?1:e.ma());this.ro()&&(t=tr(t,this.xo)),t=new bn(t.Ph()-n,t.Rh()+n),this.ro()&&(t=er(t,this.xo))}if(this.ro()){let e=tr(t,this.xo),n=nr(e);if(a=n,o=this.xo,a.$a!==o.$a||a.Ua!==o.Ua){let r=this.ao===null?null:tr(this.ao,this.xo);this.xo=n,t=er(e,n),r!==null&&(this.ao=er(r,n))}}this.Ao(t)}else this.Ih===null&&(this.Ao(new bn(-.5,.5)),this.xo=nr(null));var a,o;this.oo._o=!0}Ho(){return this.Mh()?Jn:this.Oo()?Xn:this.ro()?e=>Qn(e,this.xo):null}a_(e,t,n){return t===void 0?(n===void 0&&(n=this.ba()),n.format(e)):t(e)}Wh(e,t){return this.a_(e,this.yo.priceFormatter,t)}s_(e,t){return this.a_(e,this.yo.percentageFormatter,t)}},ur=class{constructor(e,t){this.po=[],this.o_=new Map,this.ho=0,this.__=0,this.u_=1e3,this.mo=null,this.c_=new M,this.yl=e,this.$i=t,this.d_=new Kn(this);let n=t.W();this.f_=this.v_(`left`,n.leftPriceScale),this.p_=this.v_(`right`,n.rightPriceScale),this.f_.zo().l(this.m_.bind(this,this.f_),this),this.p_.zo().l(this.m_.bind(this,this.p_),this),this.b_(n)}b_(e){if(e.leftPriceScale&&this.f_.$h(e.leftPriceScale),e.rightPriceScale&&this.p_.$h(e.rightPriceScale),e.localization&&(this.f_.Ra(),this.p_.Ra()),e.overlayPriceScales){let t=Array.from(this.o_.values());for(let n of t){let t=O(n[0].Dt());t.$h(e.overlayPriceScales),e.localization&&t.Ra()}}}w_(e){switch(e){case`left`:return this.f_;case`right`:return this.p_}return this.o_.has(e)?D(this.o_.get(e))[0].Dt():null}S(){this.$t().g_().p(this),this.f_.zo().p(this),this.p_.zo().p(this),this.po.forEach((e=>{e.S&&e.S()})),this.c_.m()}M_(){return this.u_}x_(e){this.u_=e}$t(){return this.$i}Hi(){return this.__}At(){return this.ho}S_(e){this.__=e,this.k_()}Lo(e){this.ho=e,this.f_.Lo(e),this.p_.Lo(e),this.po.forEach((t=>{if(this.vr(t)){let n=t.Dt();n!==null&&n.Lo(e)}})),this.k_()}Ba(){return this.po}vr(e){let t=e.Dt();return t===null||this.f_!==t&&this.p_!==t}qo(e,t,n){let r=n===void 0?this.C_().y_+1:n;this.T_(e,t,r)}Zo(e){let t=this.po.indexOf(e);fe(t!==-1,`removeDataSource: invalid data source`),this.po.splice(t,1);let n=O(e.Dt()).Pa();if(this.o_.has(n)){let t=D(this.o_.get(n)),r=t.indexOf(e);r!==-1&&(t.splice(r,1),t.length===0&&this.o_.delete(n))}let r=e.Dt();r&&r.Ba().indexOf(e)>=0&&r.Zo(e),r!==null&&(r.Yo(),this.P_(r)),this.mo=null}mr(e){return e===this.f_?`left`:e===this.p_?`right`:`overlay`}R_(){return this.f_}D_(){return this.p_}V_(e,t){e.Go(t)}O_(e,t){e.Jo(t),this.k_()}B_(e){e.Qo()}A_(e,t){e.t_(t)}I_(e,t){e.i_(t),this.k_()}z_(e){e.n_()}k_(){this.po.forEach((e=>{e.Vn()}))}vn(){let e=null;return this.$i.W().rightPriceScale.visible&&this.p_.Ba().length!==0?e=this.p_:this.$i.W().leftPriceScale.visible&&this.f_.Ba().length!==0?e=this.f_:this.po.length!==0&&(e=this.po[0].Dt()),e===null&&(e=this.p_),e}pr(){let e=null;return this.$i.W().rightPriceScale.visible?e=this.p_:this.$i.W().leftPriceScale.visible&&(e=this.f_),e}P_(e){e!==null&&e.Vo()&&this.L_(e)}E_(e){let t=this.yl.Xs();e.Ro({Wn:!0}),t!==null&&e.h_(t),this.k_()}N_(){this.L_(this.f_),this.L_(this.p_)}F_(){this.P_(this.f_),this.P_(this.p_),this.po.forEach((e=>{this.vr(e)&&this.P_(e.Dt())})),this.k_(),this.$i.Uh()}Uo(){return this.mo===null&&(this.mo=ar(this.po)),this.mo}W_(){return this.c_}j_(){return this.d_}L_(e){let t=e.r_();if(t&&t.length>0&&!this.yl.Ni()){let t=this.yl.Xs();t!==null&&e.h_(t)}e.Vn()}C_(){let e=this.Uo();if(e.length===0)return{H_:0,y_:0};let t=0,n=0;for(let r=0;r<e.length;r++){let i=e[r].Xi();i!==null&&(i<t&&(t=i),i>n&&(n=i))}return{H_:t,y_:n}}T_(e,t,n){let r=this.w_(t);if(r===null&&(r=this.v_(t,this.$i.W().overlayPriceScales)),this.po.push(e),!et(t)){let n=this.o_.get(t)||[];n.push(e),this.o_.set(t,n)}r.qo(e),e.Gi(r),e.Ki(n),this.P_(r),this.mo=null}m_(e,t,n){t.Cr!==n.Cr&&this.L_(e)}v_(e,t){let n=new lr(e,Object.assign({visible:!0,autoScale:!0},Ee(t)),this.$i.W().layout,this.$i.W().localization);return n.Lo(this.At()),n}},dr=class{constructor(e,t,n=50){this.Ke=0,this.Ge=1,this.Je=1,this.tr=new Map,this.Qe=new Map,this.U_=e,this.q_=t,this.ir=n}Y_(e){let t=e.time,n=this.q_.cacheKey(t),r=this.tr.get(n);if(r!==void 0)return r.Z_;if(this.Ke===this.ir){let e=this.Qe.get(this.Je);this.Qe.delete(this.Je),this.tr.delete(D(e)),this.Je++,this.Ke--}let i=this.U_(e);return this.tr.set(n,{Z_:i,rr:this.Ge}),this.Qe.set(this.Ge,n),this.Ke++,this.Ge++,i}},fr=class{constructor(e,t){fe(e<=t,`right should be >= left`),this.X_=e,this.K_=t}Os(){return this.X_}ui(){return this.K_}G_(){return this.K_-this.X_+1}Kr(e){return this.X_<=e&&e<=this.K_}Ch(e){return this.X_===e.Os()&&this.K_===e.ui()}};function pr(e,t){return e===null||t===null?e===t:e.Ch(t)}var mr=class{constructor(){this.J_=new Map,this.tr=null,this.Q_=!1}tu(e){this.Q_=e,this.tr=null}iu(e,t){this.nu(t),this.tr=null;for(let n=t;n<e.length;++n){let t=e[n],r=this.J_.get(t.timeWeight);r===void 0&&(r=[],this.J_.set(t.timeWeight,r)),r.push({index:n,time:t.time,weight:t.timeWeight,originalTime:t.originalTime})}}su(e,t){let n=Math.ceil(t/e);return this.tr!==null&&this.tr.eu===n||(this.tr={Ha:this.ru(n),eu:n}),this.tr.Ha}nu(e){if(e===0)return void this.J_.clear();let t=[];this.J_.forEach(((n,r)=>{e<=n[0].index?t.push(r):n.splice(Ct(n,e,(t=>t.index<e)),1/0)}));for(let e of t)this.J_.delete(e)}ru(e){let t=[];for(let n of Array.from(this.J_.keys()).sort(((e,t)=>t-e))){if(!this.J_.get(n))continue;let r=t;t=[];let i=r.length,a=0,o=D(this.J_.get(n)),s=o.length,c=1/0,l=-1/0;for(let n=0;n<s;n++){let s=o[n],u=s.index;for(;a<i;){let e=r[a],n=e.index;if(!(n<u)){c=n;break}a++,t.push(e),l=n,c=1/0}if(c-u>=e&&u-l>=e)t.push(s),l=u;else if(this.Q_)return r}for(;a<i;a++)t.push(r[a])}return t}},hr=class e{constructor(e){this.hu=e}lu(){return this.hu===null?null:new fr(Math.floor(this.hu.Os()),Math.ceil(this.hu.ui()))}au(){return this.hu}static ou(){return new e(null)}};function gr(e,t){return e.weight>t.weight?e:t}var _r=class{constructor(e,t,n,r){this.__=0,this._u=null,this.uu=[],this.Mo=null,this.wo=null,this.cu=new mr,this.du=new Map,this.fu=hr.ou(),this.vu=!0,this.pu=new M,this.mu=new M,this.bu=new M,this.wu=null,this.gu=null,this.Mu=[],this.cn=t,this.yo=n,this.xu=t.rightOffset,this.Su=t.barSpacing,this.$i=e,this.q_=r,this.ku(),this.cu.tu(t.uniformDistribution)}W(){return this.cn}yu(e){xe(this.yo,e),this.Cu(),this.ku()}$h(e,t){xe(this.cn,e),this.cn.fixLeftEdge&&this.Tu(),this.cn.fixRightEdge&&this.Pu(),e.barSpacing!==void 0&&this.$i.Gn(e.barSpacing),e.rightOffset!==void 0&&this.$i.Jn(e.rightOffset),e.minBarSpacing!==void 0&&this.$i.Gn(e.barSpacing??this.Su),this.Cu(),this.ku(),this.bu.m()}mn(e){return this.uu[e]?.time??null}Ui(e){return this.uu[e]??null}Va(e,t){if(this.uu.length<1)return null;if(this.q_.key(e)>this.q_.key(this.uu[this.uu.length-1].time))return t?this.uu.length-1:null;let n=Ct(this.uu,this.q_.key(e),((e,t)=>this.q_.key(e.time)<t));return this.q_.key(e)<this.q_.key(this.uu[n].time)?t?n:null:n}Ni(){return this.__===0||this.uu.length===0||this._u===null}Da(){return this.uu.length>0}Xs(){return this.Ru(),this.fu.lu()}Du(){return this.Ru(),this.fu.au()}Vu(){let e=this.Xs();if(e===null)return null;let t={from:e.Os(),to:e.ui()};return this.Ou(t)}Ou(e){let t=Math.round(e.from),n=Math.round(e.to),r=O(this.Bu()),i=O(this.Au());return{from:O(this.Ui(Math.max(r,t))),to:O(this.Ui(Math.min(i,n)))}}Iu(e){return{from:O(this.Va(e.from,!0)),to:O(this.Va(e.to,!0))}}Hi(){return this.__}S_(e){if(!isFinite(e)||e<=0||this.__===e)return;let t=this.Du(),n=this.__;if(this.__=e,this.vu=!0,this.cn.lockVisibleTimeRangeOnResize&&n!==0){let t=this.Su*e/n;this.Su=t}if(this.cn.fixLeftEdge&&t!==null&&t.Os()<=0){let t=n-e;this.xu-=Math.round(t/this.Su)+1,this.vu=!0}this.zu(),this.Lu()}It(e){if(this.Ni()||!Ce(e))return 0;let t=this.Eu()+this.xu-e;return this.__-(t+.5)*this.Su-1}Qs(e,t){let n=this.Eu(),r=t===void 0?0:t.from,i=t===void 0?e.length:t.to;for(let t=r;t<i;t++){let r=e[t].ot,i=n+this.xu-r,a=this.__-(i+.5)*this.Su-1;e[t].nt=a}}Nu(e){return Math.ceil(this.Fu(e))}Jn(e){this.vu=!0,this.xu=e,this.Lu(),this.$i.Wu(),this.$i.Uh()}le(){return this.Su}Gn(e){this.ju(e),this.Lu(),this.$i.Wu(),this.$i.Uh()}Hu(){return this.xu}Ha(){if(this.Ni())return null;if(this.gu!==null)return this.gu;let e=this.Su,t=5*(this.$i.W().layout.fontSize+4)/8*(this.cn.tickMarkMaxCharacterLength||8),n=Math.round(t/e),r=O(this.Xs()),i=Math.max(r.Os(),r.Os()-n),a=Math.max(r.ui(),r.ui()-n),o=this.cu.su(e,t),s=this.Bu()+n,c=this.Au()-n,l=this.$u(),u=this.cn.fixLeftEdge||l,d=this.cn.fixRightEdge||l,f=0;for(let e of o){if(!(i<=e.index&&e.index<=a))continue;let n;f<this.Mu.length?(n=this.Mu[f],n.coord=this.It(e.index),n.label=this.Uu(e),n.weight=e.weight):(n={needAlignCoordinate:!1,coord:this.It(e.index),label:this.Uu(e),weight:e.weight},this.Mu.push(n)),this.Su>t/2&&!l?n.needAlignCoordinate=!1:n.needAlignCoordinate=u&&e.index<=s||d&&e.index>=c,f++}return this.Mu.length=f,this.gu=this.Mu,this.Mu}qu(){this.vu=!0,this.Gn(this.cn.barSpacing),this.Jn(this.cn.rightOffset)}Yu(e){this.vu=!0,this._u=e,this.Lu(),this.Tu()}Zu(e,t){let n=this.Fu(e),r=this.le(),i=r+r/10*t;this.Gn(i),this.cn.rightBarStaysOnScroll||this.Jn(this.Hu()+(n-this.Fu(e)))}Go(e){this.Mo&&this.n_(),this.wo===null&&this.wu===null&&(this.Ni()||(this.wo=e,this.Xu()))}Jo(e){if(this.wu===null)return;let t=mt(this.__-e,0,this.__),n=mt(this.__-O(this.wo),0,this.__);t!==0&&n!==0&&this.Gn(this.wu.le*t/n)}Qo(){this.wo!==null&&(this.wo=null,this.Ku())}t_(e){this.Mo===null&&this.wu===null&&(this.Ni()||(this.Mo=e,this.Xu()))}i_(e){if(this.Mo===null)return;let t=(this.Mo-e)/this.le();this.xu=O(this.wu).Hu+t,this.vu=!0,this.Lu()}n_(){this.Mo!==null&&(this.Mo=null,this.Ku())}Gu(){this.Ju(this.cn.rightOffset)}Ju(e,t=400){if(!isFinite(e))throw RangeError(`offset is required and must be finite number`);if(!isFinite(t)||t<=0)throw RangeError(`animationDuration (optional) must be finite positive number`);let n=this.xu,r=performance.now();this.$i.Zn({Qu:e=>(e-r)/t>=1,tc:i=>{let a=(i-r)/t;return a>=1?e:n+(e-n)*a}})}bt(e,t){this.vu=!0,this.uu=e,this.cu.iu(e,t),this.Lu()}nc(){return this.pu}sc(){return this.mu}ec(){return this.bu}Eu(){return this._u||0}rc(e){let t=e.G_();this.ju(this.__/t),this.xu=e.ui()-this.Eu(),this.Lu(),this.vu=!0,this.$i.Wu(),this.$i.Uh()}hc(){let e=this.Bu(),t=this.Au();e!==null&&t!==null&&this.rc(new fr(e,t+this.cn.rightOffset))}lc(e){let t=new fr(e.from,e.to);this.rc(t)}qi(e){return this.yo.timeFormatter===void 0?this.q_.formatHorzItem(e.time):this.yo.timeFormatter(e.originalTime)}$u(){let{handleScroll:e,handleScale:t}=this.$i.W();return!(e.horzTouchDrag||e.mouseWheel||e.pressedMouseMove||e.vertTouchDrag||t.axisDoubleClickReset.time||t.axisPressedMouseMove.time||t.mouseWheel||t.pinch)}Bu(){return this.uu.length===0?null:0}Au(){return this.uu.length===0?null:this.uu.length-1}ac(e){return(this.__-1-e)/this.Su}Fu(e){let t=this.ac(e),n=this.Eu()+this.xu-t;return Math.round(1e6*n)/1e6}ju(e){let t=this.Su;this.Su=e,this.zu(),t!==this.Su&&(this.vu=!0,this.oc())}Ru(){if(!this.vu)return;if(this.vu=!1,this.Ni())return void this._c(hr.ou());let e=this.Eu(),t=this.__/this.Su,n=this.xu+e,r=new fr(n-t+1,n);this._c(new hr(r))}zu(){let e=this.uc();if(this.Su<e&&(this.Su=e,this.vu=!0),this.__!==0){let e=.5*this.__;this.Su>e&&(this.Su=e,this.vu=!0)}}uc(){return this.cn.fixLeftEdge&&this.cn.fixRightEdge&&this.uu.length!==0?this.__/this.uu.length:this.cn.minBarSpacing}Lu(){let e=this.cc();e!==null&&this.xu<e&&(this.xu=e,this.vu=!0);let t=this.dc();this.xu>t&&(this.xu=t,this.vu=!0)}cc(){let e=this.Bu(),t=this._u;return e===null||t===null?null:e-t-1+(this.cn.fixLeftEdge?this.__/this.Su:Math.min(2,this.uu.length))}dc(){return this.cn.fixRightEdge?0:this.__/this.Su-Math.min(2,this.uu.length)}Xu(){this.wu={le:this.le(),Hu:this.Hu()}}Ku(){this.wu=null}Uu(e){let t=this.du.get(e.weight);return t===void 0&&(t=new dr((e=>this.fc(e)),this.q_),this.du.set(e.weight,t)),t.Y_(e)}fc(e){return this.q_.formatTickmark(e,this.yo)}_c(e){let t=this.fu;this.fu=e,pr(t.lu(),this.fu.lu())||this.pu.m(),pr(t.au(),this.fu.au())||this.mu.m(),this.oc()}oc(){this.gu=null}Cu(){this.oc(),this.du.clear()}ku(){this.q_.updateFormatter(this.yo)}Tu(){if(!this.cn.fixLeftEdge)return;let e=this.Bu();if(e===null)return;let t=this.Xs();if(t===null)return;let n=t.Os()-e;if(n<0){let e=this.xu-n-1;this.Jn(e)}this.zu()}Pu(){this.Lu(),this.zu()}},vr=class{X(e,t,n){e.useMediaCoordinateSpace((e=>this.K(e,t,n)))}gl(e,t,n){e.useMediaCoordinateSpace((e=>this.vc(e,t,n)))}vc(e,t,n){}},yr=class extends vr{constructor(e){super(),this.mc=new Map,this.zt=e}K(e){}vc(e){if(!this.zt.yt)return;let{context:t,mediaSize:n}=e,r=0;for(let e of this.zt.bc){if(e.Kt.length===0)continue;t.font=e.R;let i=this.wc(t,e.Kt);e.Zu=i>n.width?n.width/i:1,r+=e.gc*e.Zu}let i=0;switch(this.zt.Mc){case`top`:i=0;break;case`center`:i=Math.max((n.height-r)/2,0);break;case`bottom`:i=Math.max(n.height-r,0)}t.fillStyle=this.zt.V;for(let e of this.zt.bc){t.save();let r=0;switch(this.zt.xc){case`left`:t.textAlign=`left`,r=e.gc/2;break;case`center`:t.textAlign=`center`,r=n.width/2;break;case`right`:t.textAlign=`right`,r=n.width-1-e.gc/2}t.translate(r,i),t.textBaseline=`top`,t.font=e.R,t.scale(e.Zu,e.Zu),t.fillText(e.Kt,0,e.Sc),t.restore(),i+=e.gc*e.Zu}}wc(e,t){let n=this.kc(e.font),r=n.get(t);return r===void 0&&(r=e.measureText(t).width,n.set(t,r)),r}kc(e){let t=this.mc.get(e);return t===void 0&&(t=new Map,this.mc.set(e,t)),t}},br=class{constructor(e){this.ft=!0,this.Ft={yt:!1,V:``,bc:[],Mc:`center`,xc:`center`},this.Wt=new yr(this.Ft),this.jt=e}bt(){this.ft=!0}gt(){return this.ft&&=(this.Mt(),!1),this.Wt}Mt(){let e=this.jt.W(),t=this.Ft;t.yt=e.visible,t.yt&&(t.V=e.color,t.xc=e.horzAlign,t.Mc=e.vertAlign,t.bc=[{Kt:e.text,R:Ae(e.fontSize,e.fontFamily,e.fontStyle),gc:1.2*e.fontSize,Sc:0,Zu:0}])}},xr=class extends Ze{constructor(e,t){super(),this.cn=t,this.wn=new br(this)}Rn(){return[]}Pn(){return[this.wn]}W(){return this.cn}Vn(){this.wn.bt()}},Sr,Cr,wr,Tr,Er;(function(e){e[e.OnTouchEnd=0]=`OnTouchEnd`,e[e.OnNextTap=1]=`OnNextTap`})(Sr||={});var Dr=class{constructor(e,t,n){this.yc=[],this.Cc=[],this.__=0,this.Tc=null,this.Pc=new M,this.Rc=new M,this.Dc=null,this.Vc=e,this.cn=t,this.q_=n,this.Oc=new je(this),this.yl=new _r(this,t.timeScale,this.cn.localization,n),this.vt=new $e(this,t.crosshair),this.Bc=new Un(t.crosshair),this.Ac=new xr(this,t.watermark),this.Ic(),this.yc[0].x_(2e3),this.zc=this.Lc(0),this.Ec=this.Lc(1)}Kl(){this.Nc(tt.es())}Uh(){this.Nc(tt.ss())}oa(){this.Nc(new tt(1))}Gl(e){let t=this.Fc(e);this.Nc(t)}Wc(){return this.Tc}jc(e){let t=this.Tc;this.Tc=e,t!==null&&this.Gl(t.Hc),e!==null&&this.Gl(e.Hc)}W(){return this.cn}$h(e){xe(this.cn,e),this.yc.forEach((t=>t.b_(e))),e.timeScale!==void 0&&this.yl.$h(e.timeScale),e.localization!==void 0&&this.yl.yu(e.localization),(e.leftPriceScale||e.rightPriceScale)&&this.Pc.m(),this.zc=this.Lc(0),this.Ec=this.Lc(1),this.Kl()}$c(e,t){if(e===`left`)return void this.$h({leftPriceScale:t});if(e===`right`)return void this.$h({rightPriceScale:t});let n=this.Uc(e);n!==null&&(n.Dt.$h(t),this.Pc.m())}Uc(e){for(let t of this.yc){let n=t.w_(e);if(n!==null)return{Ht:t,Dt:n}}return null}St(){return this.yl}qc(){return this.yc}Yc(){return this.Ac}Zc(){return this.vt}Xc(){return this.Rc}Kc(e,t){e.Lo(t),this.Wu()}S_(e){this.__=e,this.yl.S_(this.__),this.yc.forEach((t=>t.S_(e))),this.Wu()}Ic(e){let t=new ur(this.yl,this);e===void 0?this.yc.push(t):this.yc.splice(e,0,t);let n=e===void 0?this.yc.length-1:e,r=tt.es();return r.Nn(n,{Fn:0,Wn:!0}),this.Nc(r),t}V_(e,t,n){e.V_(t,n)}O_(e,t,n){e.O_(t,n),this.Jl(),this.Nc(this.Gc(e,2))}B_(e,t){e.B_(t),this.Nc(this.Gc(e,2))}A_(e,t,n){t.Vo()||e.A_(t,n)}I_(e,t,n){t.Vo()||(e.I_(t,n),this.Jl(),this.Nc(this.Gc(e,2)))}z_(e,t){t.Vo()||(e.z_(t),this.Nc(this.Gc(e,2)))}E_(e,t){e.E_(t),this.Nc(this.Gc(e,2))}Jc(e){this.yl.Go(e)}Qc(e,t){let n=this.St();if(n.Ni()||t===0)return;let r=n.Hi();e=Math.max(1,Math.min(e,r)),n.Zu(e,t),this.Wu()}td(e){this.nd(0),this.sd(e),this.ed()}rd(e){this.yl.Jo(e),this.Wu()}hd(){this.yl.Qo(),this.Uh()}nd(e){this.yl.t_(e)}sd(e){this.yl.i_(e),this.Wu()}ed(){this.yl.n_(),this.Uh()}wt(){return this.Cc}ld(e,t,n,r,i){this.vt.gn(e,t);let a=NaN,o=this.yl.Nu(e),s=this.yl.Xs();s!==null&&(o=Math.min(Math.max(s.Os(),o),s.ui()));let c=r.vn(),l=c.Ct();l!==null&&(a=c.pn(t,l)),a=this.Bc.Oa(a,o,r),this.vt.kn(o,a,r),this.oa(),i||this.Rc.m(this.vt.xt(),{x:e,y:t},n)}ad(e,t,n){let r=n.vn(),i=r.Ct(),a=r.Rt(e,O(i)),o=this.yl.Va(t,!0),s=this.yl.It(O(o));this.ld(s,a,null,n,!0)}od(e){this.Zc().Cn(),this.oa(),e||this.Rc.m(null,null,null)}Jl(){let e=this.vt.Ht();if(e!==null){let t=this.vt.xn(),n=this.vt.Sn();this.ld(t,n,null,e)}this.vt.Vn()}_d(e,t,n){let r=this.yl.mn(0);t!==void 0&&n!==void 0&&this.yl.bt(t,n);let i=this.yl.mn(0),a=this.yl.Eu(),o=this.yl.Xs();if(o!==null&&r!==null&&i!==null){let t=o.Kr(a),s=this.q_.key(r)>this.q_.key(i),c=e!==null&&e>a&&!s,l=this.yl.W().allowShiftVisibleRangeOnWhitespaceReplacement,u=t&&(n!==void 0||l)&&this.yl.W().shiftVisibleRangeOnNewBar;if(c&&!u){let t=e-a;this.yl.Jn(this.yl.Hu()-t)}}this.yl.Yu(e)}ia(e){e!==null&&e.F_()}dr(e){let t=this.yc.find((t=>t.Uo().includes(e)));return t===void 0?null:t}Wu(){this.Ac.Vn(),this.yc.forEach((e=>e.F_())),this.Jl()}S(){this.yc.forEach((e=>e.S())),this.yc.length=0,this.cn.localization.priceFormatter=void 0,this.cn.localization.percentageFormatter=void 0,this.cn.localization.timeFormatter=void 0}ud(){return this.Oc}br(){return this.Oc.W()}g_(){return this.Pc}dd(e,t,n){let r=this.yc[0],i=this.fd(t,e,r,n);return this.Cc.push(i),this.Cc.length===1?this.Kl():this.Uh(),i}vd(e){let t=this.dr(e),n=this.Cc.indexOf(e);fe(n!==-1,`Series not found`),this.Cc.splice(n,1),O(t).Zo(e),e.S&&e.S()}Xl(e,t){let n=O(this.dr(e));n.Zo(e);let r=this.Uc(t);if(r===null){let r=e.Xi();n.qo(e,t,r)}else{let i=r.Ht===n?e.Xi():void 0;r.Ht.qo(e,t,i)}}hc(){let e=tt.ss();e.$n(),this.Nc(e)}pd(e){let t=tt.ss();t.Yn(e),this.Nc(t)}Kn(){let e=tt.ss();e.Kn(),this.Nc(e)}Gn(e){let t=tt.ss();t.Gn(e),this.Nc(t)}Jn(e){let t=tt.ss();t.Jn(e),this.Nc(t)}Zn(e){let t=tt.ss();t.Zn(e),this.Nc(t)}Un(){let e=tt.ss();e.Un(),this.Nc(e)}md(){return this.cn.rightPriceScale.visible?`right`:`left`}bd(){return this.Ec}q(){return this.zc}Bt(e){let t=this.Ec,n=this.zc;if(t===n)return t;if(e=Math.max(0,Math.min(100,Math.round(100*e))),this.Dc===null||this.Dc.Ps!==n||this.Dc.Rs!==t)this.Dc={Ps:n,Rs:t,wd:new Map};else{let t=this.Dc.wd.get(e);if(t!==void 0)return t}let r=function(e,t,n){let[r,i,a,o]=ve(e),[s,c,l,u]=ve(t),d=[j(r+n*(s-r)),j(i+n*(c-i)),j(a+n*(l-a)),pe(o+n*(u-o))];return`rgba(${d[0]}, ${d[1]}, ${d[2]}, ${d[3]})`}(n,t,e/100);return this.Dc.wd.set(e,r),r}Gc(e,t){let n=new tt(t);if(e!==null){let r=this.yc.indexOf(e);n.Nn(r,{Fn:t})}return n}Fc(e,t){return t===void 0&&(t=2),this.Gc(this.dr(e),t)}Nc(e){this.Vc&&this.Vc(e),this.yc.forEach((e=>e.j_().qh().bt()))}fd(e,t,n,r){let i=new Hn(this,e,t,n,r),a=e.priceScaleId===void 0?this.md():e.priceScaleId;return n.qo(i,a),et(a)||i.$h(e),i}Lc(e){let t=this.cn.layout;return t.background.type===`gradient`?e===0?t.background.topColor:t.background.bottomColor:t.background.color}};function Or(e){return!Se(e)&&!we(e)}function kr(e){return Se(e)}(function(e){e[e.Disabled=0]=`Disabled`,e[e.Continuous=1]=`Continuous`,e[e.OnDataUpdate=2]=`OnDataUpdate`})(Cr||={}),function(e){e[e.LastBar=0]=`LastBar`,e[e.LastVisible=1]=`LastVisible`}(wr||={}),function(e){e.Solid=`solid`,e.VerticalGradient=`gradient`}(Tr||={}),function(e){e[e.Year=0]=`Year`,e[e.Month=1]=`Month`,e[e.DayOfMonth=2]=`DayOfMonth`,e[e.Time=3]=`Time`,e[e.TimeWithSeconds=4]=`TimeWithSeconds`}(Er||={});var Ar=e=>e.getUTCFullYear();function jr(e,t,n){return t.replace(/yyyy/g,(e=>rt(Ar(e),4))(e)).replace(/yy/g,(e=>rt(Ar(e)%100,2))(e)).replace(/MMMM/g,((e,t)=>new Date(e.getUTCFullYear(),e.getUTCMonth(),1).toLocaleString(t,{month:`long`}))(e,n)).replace(/MMM/g,((e,t)=>new Date(e.getUTCFullYear(),e.getUTCMonth(),1).toLocaleString(t,{month:`short`}))(e,n)).replace(/MM/g,(e=>rt((e=>e.getUTCMonth()+1)(e),2))(e)).replace(/dd/g,(e=>rt((e=>e.getUTCDate())(e),2))(e))}var Mr=class{constructor(e=`yyyy-MM-dd`,t=`default`){this.gd=e,this.Md=t}Y_(e){return jr(e,this.gd,this.Md)}},Nr=class{constructor(e){this.xd=e||`%h:%m:%s`}Y_(e){return this.xd.replace(`%h`,rt(e.getUTCHours(),2)).replace(`%m`,rt(e.getUTCMinutes(),2)).replace(`%s`,rt(e.getUTCSeconds(),2))}},Pr={Sd:`yyyy-MM-dd`,kd:`%h:%m:%s`,yd:` `,Cd:`default`},Fr=class{constructor(e={}){let t=Object.assign(Object.assign({},Pr),e);this.Td=new Mr(t.Sd,t.Cd),this.Pd=new Nr(t.kd),this.Rd=t.yd}Y_(e){return`${this.Td.Y_(e)}${this.Rd}${this.Pd.Y_(e)}`}};function Ir(e){return 60*e*60*1e3}function Lr(e){return 60*e*1e3}var Rr=[{Dd:(zr=1,1e3*zr),Vd:10},{Dd:Lr(1),Vd:20},{Dd:Lr(5),Vd:21},{Dd:Lr(30),Vd:22},{Dd:Ir(1),Vd:30},{Dd:Ir(3),Vd:31},{Dd:Ir(6),Vd:32},{Dd:Ir(12),Vd:33}],zr;function Br(e,t){if(e.getUTCFullYear()!==t.getUTCFullYear())return 70;if(e.getUTCMonth()!==t.getUTCMonth())return 60;if(e.getUTCDate()!==t.getUTCDate())return 50;for(let n=Rr.length-1;n>=0;--n)if(Math.floor(t.getTime()/Rr[n].Dd)!==Math.floor(e.getTime()/Rr[n].Dd))return Rr[n].Vd;return 0}function Vr(e){let t=e;if(we(e)&&(t=Ur(e)),!Or(t))throw Error(`time must be of type BusinessDay`);let n=new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0));return{Od:Math.round(n.getTime()/1e3),Bd:t}}function Hr(e){if(!kr(e))throw Error(`time must be of type isUTCTimestamp`);return{Od:e}}function Ur(e){let t=new Date(e);if(isNaN(t.getTime()))throw Error(`Invalid date string=${e}, expected format=yyyy-mm-dd`);return{day:t.getUTCDate(),month:t.getUTCMonth()+1,year:t.getUTCFullYear()}}function Wr(e){we(e.time)&&(e.time=Ur(e.time))}var Gr=class{options(){return this.cn}setOptions(e){this.cn=e,this.updateFormatter(e.localization)}preprocessData(e){Array.isArray(e)?function(e){e.forEach(Wr)}(e):Wr(e)}createConverterToInternalObj(e){return O(function(e){return e.length===0?null:Or(e[0].time)||we(e[0].time)?Vr:Hr}(e))}key(e){return typeof e==`object`&&`Od`in e?e.Od:this.key(this.convertHorzItemToInternal(e))}cacheKey(e){let t=e;return t.Bd===void 0?new Date(1e3*t.Od).getTime():new Date(Date.UTC(t.Bd.year,t.Bd.month-1,t.Bd.day)).getTime()}convertHorzItemToInternal(e){return kr(t=e)?Hr(t):Or(t)?Vr(t):Vr(Ur(t));var t}updateFormatter(e){if(!this.cn)return;let t=e.dateFormat;this.Ad=this.cn.timeScale.timeVisible?new Fr({Sd:t,kd:this.cn.timeScale.secondsVisible?`%h:%m:%s`:`%h:%m`,yd:` `,Cd:e.locale}):new Mr(t,e.locale)}formatHorzItem(e){let t=e;return this.Ad.Y_(new Date(1e3*t.Od))}formatTickmark(e,t){let n=function(e,t,n){switch(e){case 0:case 10:return t?n?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return t?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(e.weight,this.cn.timeScale.timeVisible,this.cn.timeScale.secondsVisible),r=this.cn.timeScale;if(r.tickMarkFormatter!==void 0){let i=r.tickMarkFormatter(e.originalTime,n,t.locale);if(i!==null)return i}return function(e,t,n){let r={};switch(t){case 0:r.year=`numeric`;break;case 1:r.month=`short`;break;case 2:r.day=`numeric`;break;case 3:r.hour12=!1,r.hour=`2-digit`,r.minute=`2-digit`;break;case 4:r.hour12=!1,r.hour=`2-digit`,r.minute=`2-digit`,r.second=`2-digit`}let i=e.Bd===void 0?new Date(1e3*e.Od):new Date(Date.UTC(e.Bd.year,e.Bd.month-1,e.Bd.day));return new Date(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()).toLocaleString(n,r)}(e.time,n,t.locale)}maxTickMarkWeight(e){let t=e.reduce(gr,e[0]).weight;return t>30&&t<50&&(t=30),t}fillWeightsForPoints(e,t){(function(e,t=0){if(e.length===0)return;let n=t===0?null:e[t-1].time.Od,r=n===null?null:new Date(1e3*n),i=0;for(let a=t;a<e.length;++a){let t=e[a],o=new Date(1e3*t.time.Od);r!==null&&(t.timeWeight=Br(o,r)),i+=t.time.Od-(n||t.time.Od),n=t.time.Od,r=o}if(t===0&&e.length>1){let t=Math.ceil(i/(e.length-1)),n=new Date(1e3*(e[0].time.Od-t));e[0].timeWeight=Br(new Date(1e3*e[0].time.Od),n)}})(e,t)}static Id(e){return xe({localization:{dateFormat:`dd MMM 'yy`}},e??{})}},Kr=typeof window<`u`;function qr(){return!!Kr&&window.navigator.userAgent.toLowerCase().indexOf(`firefox`)>-1}function Jr(){return!!Kr&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function Yr(e){return e+e%2}function Xr(e,t){return e.zd-t.zd}function Zr(e,t,n){let r=(e.zd-t.zd)/(e.ot-t.ot);return Math.sign(r)*Math.min(Math.abs(r),n)}var Qr=class{constructor(e,t,n,r){this.Ld=null,this.Ed=null,this.Nd=null,this.Fd=null,this.Wd=null,this.jd=0,this.Hd=0,this.$d=e,this.Ud=t,this.qd=n,this.rs=r}Yd(e,t){if(this.Ld!==null){if(this.Ld.ot===t)return void(this.Ld.zd=e);if(Math.abs(this.Ld.zd-e)<this.rs)return}this.Fd=this.Nd,this.Nd=this.Ed,this.Ed=this.Ld,this.Ld={ot:t,zd:e}}Vr(e,t){if(this.Ld===null||this.Ed===null||t-this.Ld.ot>50)return;let n=0,r=Zr(this.Ld,this.Ed,this.Ud),i=Xr(this.Ld,this.Ed),a=[r],o=[i];if(n+=i,this.Nd!==null){let e=Zr(this.Ed,this.Nd,this.Ud);if(Math.sign(e)===Math.sign(r)){let t=Xr(this.Ed,this.Nd);if(a.push(e),o.push(t),n+=t,this.Fd!==null){let e=Zr(this.Nd,this.Fd,this.Ud);if(Math.sign(e)===Math.sign(r)){let t=Xr(this.Nd,this.Fd);a.push(e),o.push(t),n+=t}}}}let s=0;for(let e=0;e<a.length;++e)s+=o[e]/n*a[e];Math.abs(s)<this.$d||(this.Wd={zd:e,ot:t},this.Hd=s,this.jd=function(e,t){let n=Math.log(t);return Math.log(1*n/-e)/n}(Math.abs(s),this.qd))}tc(e){let t=O(this.Wd),n=e-t.ot;return t.zd+this.Hd*(this.qd**+n-1)/Math.log(this.qd)}Qu(e){return this.Wd===null||this.Zd(e)===this.jd}Zd(e){let t=e-O(this.Wd).ot;return Math.min(t,this.jd)}},$r=class{constructor(e,t){this.Xd=void 0,this.Kd=void 0,this.Gd=void 0,this.en=!1,this.Jd=e,this.Qd=t,this.tf()}bt(){this.tf()}if(){this.Xd&&this.Jd.removeChild(this.Xd),this.Kd&&this.Jd.removeChild(this.Kd),this.Xd=void 0,this.Kd=void 0}nf(){return this.en!==this.sf()||this.Gd!==this.ef()}ef(){return ye(ve(this.Qd.W().layout.textColor))>160?`dark`:`light`}sf(){return this.Qd.W().layout.attributionLogo}rf(){let e=new URL(location.href);return e.hostname?`&utm_source=`+e.hostname+e.pathname:``}tf(){this.nf()&&(this.if(),this.en=this.sf(),this.en&&(this.Gd=this.ef(),this.Kd=document.createElement(`style`),this.Kd.innerText=`a#tv-attr-logo{--fill:#131722;--stroke:#fff;position:absolute;left:10px;bottom:10px;height:19px;width:35px;margin:0;padding:0;border:0;z-index:3;}a#tv-attr-logo[data-dark]{--fill:#D1D4DC;--stroke:#131722;}`,this.Xd=document.createElement(`a`),this.Xd.href=`https://www.tradingview.com/?utm_medium=lwc-link&utm_campaign=lwc-chart${this.rf()}`,this.Xd.title=`Charting by TradingView`,this.Xd.id=`tv-attr-logo`,this.Xd.target=`_blank`,this.Xd.innerHTML=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 19" width="35" height="19" fill="none"><g fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path fill="var(--stroke)" d="M2 0H0v10h6v9h21.4l.5-1.3 6-15 1-2.7H23.7l-.5 1.3-.2.6a5 5 0 0 0-7-.9V0H2Zm20 17h4l5.2-13 .8-2h-7l-1 2.5-.2.5-1.5 3.8-.3.7V17Zm-.8-10a3 3 0 0 0 .7-2.7A3 3 0 1 0 16.8 7h4.4ZM14 7V2H2v6h6v9h4V7h2Z"/><path fill="var(--fill)" d="M14 2H2v6h6v9h6V2Zm12 15h-7l6-15h7l-6 15Zm-7-9a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></g><defs><clipPath id="a"><path fill="var(--stroke)" d="M0 0h35v19H0z"/></clipPath></defs></svg>`,this.Xd.toggleAttribute(`data-dark`,this.Gd===`dark`),this.Jd.appendChild(this.Kd),this.Jd.appendChild(this.Xd)))}};function ei(e,t){let n=O(e.ownerDocument).createElement(`canvas`);e.appendChild(n);let r=x(n,{type:`device-pixel-content-box`,options:{allowResizeObserver:!1},transform:(e,t)=>({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return r.resizeCanvasElement(t),r}function ti(e){var t;e.width=1,e.height=1,(t=e.getContext(`2d`))==null||t.clearRect(0,0,1,1)}function ni(e,t,n,r){e.gl&&e.gl(t,n,r)}function ri(e,t,n,r){e.X(t,n,r)}function ii(e,t,n,r){let i=e(n,r);for(let e of i){let n=e.gt();n!==null&&t(n)}}function ai(e){Kr&&window.chrome!==void 0&&e.addEventListener(`mousedown`,(e=>{if(e.button===1)return e.preventDefault(),!1}))}var oi=class{constructor(e,t,n){this.hf=0,this.lf=null,this.af={nt:-1/0,st:1/0},this._f=0,this.uf=null,this.cf={nt:-1/0,st:1/0},this.df=null,this.ff=!1,this.vf=null,this.pf=null,this.mf=!1,this.bf=!1,this.wf=!1,this.gf=null,this.Mf=null,this.xf=null,this.Sf=null,this.kf=null,this.yf=null,this.Cf=null,this.Tf=0,this.Pf=!1,this.Rf=!1,this.Df=!1,this.Vf=0,this.Of=null,this.Bf=!Jr(),this.Af=e=>{this.If(e)},this.zf=e=>{if(this.Lf(e)){let t=this.Ef(e);if(++this._f,this.uf&&this._f>1){let{Nf:n}=this.Ff(li(e),this.cf);n<30&&!this.wf&&this.Wf(t,this.Hf.jf),this.$f()}}else{let t=this.Ef(e);if(++this.hf,this.lf&&this.hf>1){let{Nf:n}=this.Ff(li(e),this.af);n<5&&!this.bf&&this.Uf(t,this.Hf.qf),this.Yf()}}},this.Zf=e,this.Hf=t,this.cn=n,this.Xf()}S(){this.gf!==null&&(this.gf(),this.gf=null),this.Mf!==null&&(this.Mf(),this.Mf=null),this.Sf!==null&&(this.Sf(),this.Sf=null),this.kf!==null&&(this.kf(),this.kf=null),this.yf!==null&&(this.yf(),this.yf=null),this.xf!==null&&(this.xf(),this.xf=null),this.Kf(),this.Yf()}Gf(e){this.Sf&&this.Sf();let t=this.Jf.bind(this);if(this.Sf=()=>{this.Zf.removeEventListener(`mousemove`,t)},this.Zf.addEventListener(`mousemove`,t),this.Lf(e))return;let n=this.Ef(e);this.Uf(n,this.Hf.Qf),this.Bf=!0}Yf(){this.lf!==null&&clearTimeout(this.lf),this.hf=0,this.lf=null,this.af={nt:-1/0,st:1/0}}$f(){this.uf!==null&&clearTimeout(this.uf),this._f=0,this.uf=null,this.cf={nt:-1/0,st:1/0}}Jf(e){if(this.Df||this.pf!==null||this.Lf(e))return;let t=this.Ef(e);this.Uf(t,this.Hf.tv),this.Bf=!0}iv(e){let t=di(e.changedTouches,O(this.Of));if(t===null||(this.Vf=ui(e),this.Cf!==null)||this.Rf)return;this.Pf=!0;let{nv:n,sv:r,Nf:i}=this.Ff(li(t),O(this.pf));if(this.mf||!(i<5)){if(!this.mf){let e=.5*n,t=r>=e&&!this.cn.ev(),i=e>r&&!this.cn.rv();t||i||(this.Rf=!0),this.mf=!0,this.wf=!0,this.Kf(),this.$f()}if(!this.Rf){let n=this.Ef(e,t);this.Wf(n,this.Hf.hv),ci(e)}}}lv(e){if(e.button!==0)return;let{Nf:t}=this.Ff(li(e),O(this.vf));if(t>=5&&(this.bf=!0,this.Yf()),this.bf){let t=this.Ef(e);this.Uf(t,this.Hf.av)}}Ff(e,t){let n=Math.abs(t.nt-e.nt),r=Math.abs(t.st-e.st);return{nv:n,sv:r,Nf:n+r}}ov(e){let t=di(e.changedTouches,O(this.Of));if(t===null&&e.touches.length===0&&(t=e.changedTouches[0]),t===null)return;this.Of=null,this.Vf=ui(e),this.Kf(),this.pf=null,this.yf&&=(this.yf(),null);let n=this.Ef(e,t);if(this.Wf(n,this.Hf._v),++this._f,this.uf&&this._f>1){let{Nf:e}=this.Ff(li(t),this.cf);e<30&&!this.wf&&this.Wf(n,this.Hf.jf),this.$f()}else this.wf||(this.Wf(n,this.Hf.uv),this.Hf.uv&&ci(e));this._f===0&&ci(e),e.touches.length===0&&this.ff&&(this.ff=!1,ci(e))}If(e){if(e.button!==0)return;let t=this.Ef(e);if(this.vf=null,this.Df=!1,this.kf&&=(this.kf(),null),qr()&&this.Zf.ownerDocument.documentElement.removeEventListener(`mouseleave`,this.Af),!this.Lf(e))if(this.Uf(t,this.Hf.cv),++this.hf,this.lf&&this.hf>1){let{Nf:n}=this.Ff(li(e),this.af);n<5&&!this.bf&&this.Uf(t,this.Hf.qf),this.Yf()}else this.bf||this.Uf(t,this.Hf.dv)}Kf(){this.df!==null&&(clearTimeout(this.df),this.df=null)}fv(e){if(this.Of!==null)return;let t=e.changedTouches[0];this.Of=t.identifier,this.Vf=ui(e);let n=this.Zf.ownerDocument.documentElement;this.wf=!1,this.mf=!1,this.Rf=!1,this.pf=li(t),this.yf&&=(this.yf(),null);{let t=this.iv.bind(this),r=this.ov.bind(this);this.yf=()=>{n.removeEventListener(`touchmove`,t),n.removeEventListener(`touchend`,r)},n.addEventListener(`touchmove`,t,{passive:!1}),n.addEventListener(`touchend`,r,{passive:!1}),this.Kf(),this.df=setTimeout(this.vv.bind(this,e),240)}let r=this.Ef(e,t);this.Wf(r,this.Hf.pv),this.uf||(this._f=0,this.uf=setTimeout(this.$f.bind(this),500),this.cf=li(t))}mv(e){if(e.button!==0)return;let t=this.Zf.ownerDocument.documentElement;qr()&&t.addEventListener(`mouseleave`,this.Af),this.bf=!1,this.vf=li(e),this.kf&&=(this.kf(),null);{let e=this.lv.bind(this),n=this.If.bind(this);this.kf=()=>{t.removeEventListener(`mousemove`,e),t.removeEventListener(`mouseup`,n)},t.addEventListener(`mousemove`,e),t.addEventListener(`mouseup`,n)}if(this.Df=!0,this.Lf(e))return;let n=this.Ef(e);this.Uf(n,this.Hf.bv),this.lf||(this.hf=0,this.lf=setTimeout(this.Yf.bind(this),500),this.af=li(e))}Xf(){this.Zf.addEventListener(`mouseenter`,this.Gf.bind(this)),this.Zf.addEventListener(`touchcancel`,this.Kf.bind(this));{let e=this.Zf.ownerDocument,t=e=>{this.Hf.wv&&(e.composed&&this.Zf.contains(e.composedPath()[0])||e.target&&this.Zf.contains(e.target)||this.Hf.wv())};this.Mf=()=>{e.removeEventListener(`touchstart`,t)},this.gf=()=>{e.removeEventListener(`mousedown`,t)},e.addEventListener(`mousedown`,t),e.addEventListener(`touchstart`,t,{passive:!0})}Jr()&&(this.xf=()=>{this.Zf.removeEventListener(`dblclick`,this.zf)},this.Zf.addEventListener(`dblclick`,this.zf)),this.Zf.addEventListener(`mouseleave`,this.gv.bind(this)),this.Zf.addEventListener(`touchstart`,this.fv.bind(this),{passive:!0}),ai(this.Zf),this.Zf.addEventListener(`mousedown`,this.mv.bind(this)),this.Mv(),this.Zf.addEventListener(`touchmove`,(()=>{}),{passive:!1})}Mv(){this.Hf.xv===void 0&&this.Hf.Sv===void 0&&this.Hf.kv===void 0||(this.Zf.addEventListener(`touchstart`,(e=>this.yv(e.touches)),{passive:!0}),this.Zf.addEventListener(`touchmove`,(e=>{if(e.touches.length===2&&this.Cf!==null&&this.Hf.Sv!==void 0){let t=si(e.touches[0],e.touches[1])/this.Tf;this.Hf.Sv(this.Cf,t),ci(e)}}),{passive:!1}),this.Zf.addEventListener(`touchend`,(e=>{this.yv(e.touches)})))}yv(e){e.length===1&&(this.Pf=!1),e.length!==2||this.Pf||this.ff?this.Cv():this.Tv(e)}Tv(e){let t=this.Zf.getBoundingClientRect()||{left:0,top:0};this.Cf={nt:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,st:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this.Tf=si(e[0],e[1]),this.Hf.xv!==void 0&&this.Hf.xv(),this.Kf()}Cv(){this.Cf!==null&&(this.Cf=null,this.Hf.kv!==void 0&&this.Hf.kv())}gv(e){if(this.Sf&&this.Sf(),this.Lf(e)||!this.Bf)return;let t=this.Ef(e);this.Uf(t,this.Hf.Pv),this.Bf=!Jr()}vv(e){let t=di(e.touches,O(this.Of));if(t===null)return;let n=this.Ef(e,t);this.Wf(n,this.Hf.Rv),this.wf=!0,this.ff=!0}Lf(e){return e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents!==void 0?e.sourceCapabilities.firesTouchEvents:ui(e)<this.Vf+500}Wf(e,t){t&&t.call(this.Hf,e)}Uf(e,t){t&&t.call(this.Hf,e)}Ef(e,t){let n=t||e,r=this.Zf.getBoundingClientRect()||{left:0,top:0};return{clientX:n.clientX,clientY:n.clientY,pageX:n.pageX,pageY:n.pageY,screenX:n.screenX,screenY:n.screenY,localX:n.clientX-r.left,localY:n.clientY-r.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,Dv:!e.type.startsWith(`mouse`)&&e.type!==`contextmenu`&&e.type!==`click`,Vv:e.type,Ov:n.target,Bv:e.view,Av:()=>{e.type!==`touchstart`&&ci(e)}}}};function si(e,t){let n=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(n*n+r*r)}function ci(e){e.cancelable&&e.preventDefault()}function li(e){return{nt:e.pageX,st:e.pageY}}function ui(e){return e.timeStamp||performance.now()}function di(e,t){for(let n=0;n<e.length;++n)if(e[n].identifier===t)return e[n];return null}function fi(e){return{Hc:e.Hc,Iv:{gr:e.zv.externalId},Lv:e.zv.cursorStyle}}function pi(e,t,n){for(let r of e){let e=r.gt();if(e!==null&&e.wr){let i=e.wr(t,n);if(i!==null)return{Bv:r,Iv:i}}}return null}function mi(e,t){return n=>(n.Dt()?.Pa()??``)===t?n.da?.call(n,e)??[]:[]}function hi(e,t,n,r){if(!e.length)return;let i=0,a=n/2,o=e[0].At(r,!0),s=t===1?a-(e[0].Vi()-o/2):e[0].Vi()-o/2-a;s=Math.max(0,s);for(let a=1;a<e.length;a++){let o=e[a],c=e[a-1],l=c.At(r,!1),u=o.Vi(),d=c.Vi();if(t===1?u>d-l:u<d+l){let r=d-l*t;o.Oi(r);let a=r-t*l/2;if((t===1?a<0:a>n)&&s>0){let r=t===1?-1-a:a-n,o=Math.min(r,s);for(let n=i;n<e.length;n++)e[n].Oi(e[n].Vi()+t*o);s-=o}}else i=a,s=t===1?d-l-u:u-(d+l)}}var gi=class{constructor(e,t,n,r){this.Li=null,this.Ev=null,this.Nv=!1,this.Fv=new Kt(200),this.Qr=null,this.Wv=0,this.jv=!1,this.Hv=()=>{this.jv||this.tn.$v().$t().Uh()},this.Uv=()=>{this.jv||this.tn.$v().$t().Uh()},this.tn=e,this.cn=t,this.ko=t.layout,this.Oc=n,this.qv=r===`left`,this.Yv=mi(`normal`,r),this.Zv=mi(`top`,r),this.Xv=mi(`bottom`,r),this.Kv=document.createElement(`div`),this.Kv.style.height=`100%`,this.Kv.style.overflow=`hidden`,this.Kv.style.width=`25px`,this.Kv.style.left=`0`,this.Kv.style.position=`relative`,this.Gv=ei(this.Kv,g({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv);let i=this.Gv.canvasElement;i.style.position=`absolute`,i.style.zIndex=`1`,i.style.left=`0`,i.style.top=`0`,this.Jv=ei(this.Kv,g({width:16,height:16})),this.Jv.subscribeSuggestedBitmapSizeChanged(this.Uv);let a=this.Jv.canvasElement;a.style.position=`absolute`,a.style.zIndex=`2`,a.style.left=`0`,a.style.top=`0`;let o={bv:this.Qv.bind(this),pv:this.Qv.bind(this),av:this.tp.bind(this),hv:this.tp.bind(this),wv:this.ip.bind(this),cv:this.np.bind(this),_v:this.np.bind(this),qf:this.sp.bind(this),jf:this.sp.bind(this),Qf:this.ep.bind(this),Pv:this.rp.bind(this)};this.hp=new oi(this.Jv.canvasElement,o,{ev:()=>!this.cn.handleScroll.vertTouchDrag,rv:()=>!0})}S(){this.hp.S(),this.Jv.unsubscribeSuggestedBitmapSizeChanged(this.Uv),ti(this.Jv.canvasElement),this.Jv.dispose(),this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),ti(this.Gv.canvasElement),this.Gv.dispose(),this.Li!==null&&this.Li.Ko().p(this),this.Li=null}lp(){return this.Kv}P(){return this.ko.fontSize}ap(){let e=this.Oc.W();return this.Qr!==e.R&&(this.Fv.nr(),this.Qr=e.R),e}op(){if(this.Li===null)return 0;let e=0,t=this.ap(),n=O(this.Gv.canvasElement.getContext(`2d`));n.save();let r=this.Li.Ha();n.font=this._p(),r.length>0&&(e=Math.max(this.Fv.xi(n,r[0].so),this.Fv.xi(n,r[r.length-1].so)));let i=this.up();for(let t=i.length;t--;){let r=this.Fv.xi(n,i[t].Kt());r>e&&(e=r)}let a=this.Li.Ct();if(a!==null&&this.Ev!==null&&(o=this.cn.crosshair).mode!==2&&o.horzLine.visible&&o.horzLine.labelVisible){let t=this.Li.pn(1,a),r=this.Li.pn(this.Ev.height-2,a);e=Math.max(e,this.Fv.xi(n,this.Li.Fi(Math.floor(Math.min(t,r))+.11111111111111,a)),this.Fv.xi(n,this.Li.Fi(Math.ceil(Math.max(t,r))-.11111111111111,a)))}var o;n.restore();let s=e||34;return Yr(Math.ceil(t.C+t.T+t.A+t.I+5+s))}cp(e){this.Ev!==null&&_(this.Ev,e)||(this.Ev=e,this.jv=!0,this.Gv.resizeCanvasElement(e),this.Jv.resizeCanvasElement(e),this.jv=!1,this.Kv.style.width=`${e.width}px`,this.Kv.style.height=`${e.height}px`)}dp(){return O(this.Ev).width}Gi(e){this.Li!==e&&(this.Li!==null&&this.Li.Ko().p(this),this.Li=e,e.Ko().l(this.fo.bind(this),this))}Dt(){return this.Li}nr(){let e=this.tn.fp();this.tn.$v().$t().E_(e,O(this.Dt()))}vp(e){if(this.Ev===null)return;if(e!==1){this.pp(),this.Gv.applySuggestedBitmapSize();let e=ne(this.Gv);e!==null&&(e.useBitmapCoordinateSpace((e=>{this.mp(e),this.Ie(e)})),this.tn.bp(e,this.Xv),this.wp(e),this.tn.bp(e,this.Yv),this.gp(e))}this.Jv.applySuggestedBitmapSize();let t=ne(this.Jv);t!==null&&(t.useBitmapCoordinateSpace((({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)})),this.Mp(t),this.tn.bp(t,this.Zv))}xp(){return this.Gv.bitmapSize}Sp(e,t,n){let r=this.xp();r.width>0&&r.height>0&&e.drawImage(this.Gv.canvasElement,t,n)}bt(){var e;(e=this.Li)==null||e.Ha()}Qv(e){if(this.Li===null||this.Li.Ni()||!this.cn.handleScale.axisPressedMouseMove.price)return;let t=this.tn.$v().$t(),n=this.tn.fp();this.Nv=!0,t.V_(n,this.Li,e.localY)}tp(e){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;let t=this.tn.$v().$t(),n=this.tn.fp(),r=this.Li;t.O_(n,r,e.localY)}ip(){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;let e=this.tn.$v().$t(),t=this.tn.fp(),n=this.Li;this.Nv&&(this.Nv=!1,e.B_(t,n))}np(e){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;let t=this.tn.$v().$t(),n=this.tn.fp();this.Nv=!1,t.B_(n,this.Li)}sp(e){this.cn.handleScale.axisDoubleClickReset.price&&this.nr()}ep(e){this.Li!==null&&(!this.tn.$v().$t().W().handleScale.axisPressedMouseMove.price||this.Li.Mh()||this.Li.Oo()||this.kp(1))}rp(e){this.kp(0)}up(){let e=[],t=this.Li===null?void 0:this.Li;return(n=>{for(let r=0;r<n.length;++r){let i=n[r].Rn(this.tn.fp(),t);for(let t=0;t<i.length;t++)e.push(i[t])}})(this.tn.fp().Uo()),e}mp({context:e,bitmapSize:t}){let{width:n,height:r}=t,i=this.tn.fp().$t(),a=i.q(),o=i.bd();a===o?Ve(e,0,0,n,r,a):We(e,0,0,n,r,a,o)}Ie({context:e,bitmapSize:t,horizontalPixelRatio:n}){if(this.Ev===null||this.Li===null||!this.Li.W().borderVisible)return;e.fillStyle=this.Li.W().borderColor;let r=Math.max(1,Math.floor(this.ap().C*n)),i;i=this.qv?t.width-r:0,e.fillRect(i,0,r,t.height)}wp(e){if(this.Ev===null||this.Li===null)return;let t=this.Li.Ha(),n=this.Li.W(),r=this.ap(),i=this.qv?this.Ev.width-r.T:0;n.borderVisible&&n.ticksVisible&&e.useBitmapCoordinateSpace((({context:e,horizontalPixelRatio:a,verticalPixelRatio:o})=>{e.fillStyle=n.borderColor;let s=Math.max(1,Math.floor(o)),c=Math.floor(.5*o),l=Math.round(r.T*a);e.beginPath();for(let n of t)e.rect(Math.floor(i*a),Math.round(n.Ea*o)-c,l,s);e.fill()})),e.useMediaCoordinateSpace((({context:e})=>{e.font=this._p(),e.fillStyle=n.textColor??this.ko.textColor,e.textAlign=this.qv?`right`:`left`,e.textBaseline=`middle`;let a=this.qv?Math.round(i-r.A):Math.round(i+r.T+r.A),o=t.map((t=>this.Fv.Mi(e,t.so)));for(let n=t.length;n--;){let r=t[n];e.fillText(r.so,a,r.Ea+o[n])}}))}pp(){if(this.Ev===null||this.Li===null)return;let e=[],t=this.Li.Uo().slice(),n=this.tn.fp(),r=this.ap();this.Li===n.pr()&&this.tn.fp().Uo().forEach((e=>{n.vr(e)&&t.push(e)}));let i=this.Li;t.forEach((t=>{t.Rn(n,i).forEach((t=>{t.Oi(null),t.Bi()&&e.push(t)}))})),e.forEach((e=>e.Oi(e.ki()))),this.Li.W().alignLabels&&this.yp(e,r)}yp(e,t){if(this.Ev===null)return;let n=this.Ev.height/2,r=e.filter((e=>e.ki()<=n)),i=e.filter((e=>e.ki()>n));r.sort(((e,t)=>t.ki()-e.ki())),i.sort(((e,t)=>e.ki()-t.ki()));for(let n of e){let e=Math.floor(n.At(t)/2),r=n.ki();r>-e&&r<e&&n.Oi(e),r>this.Ev.height-e&&r<this.Ev.height+e&&n.Oi(this.Ev.height-e)}hi(r,1,this.Ev.height,t),hi(i,-1,this.Ev.height,t)}gp(e){if(this.Ev===null)return;let t=this.up(),n=this.ap(),r=this.qv?`right`:`left`;t.forEach((t=>{t.Ai()&&t.gt(O(this.Li)).X(e,n,this.Fv,r)}))}Mp(e){if(this.Ev===null||this.Li===null)return;let t=this.tn.$v().$t(),n=[],r=this.tn.fp(),i=t.Zc().Rn(r,this.Li);i.length&&n.push(i);let a=this.ap(),o=this.qv?`right`:`left`;n.forEach((t=>{t.forEach((t=>{t.gt(O(this.Li)).X(e,a,this.Fv,o)}))}))}kp(e){this.Kv.style.cursor=e===1?`ns-resize`:`default`}fo(){let e=this.op();this.Wv<e&&this.tn.$v().$t().Kl(),this.Wv=e}_p(){return Ae(this.ko.fontSize,this.ko.fontFamily)}};function _i(e,t){return e.ua?.call(e,t)??[]}function vi(e,t){return e.Pn?.call(e,t)??[]}function yi(e,t){return e.Ji?.call(e,t)??[]}function bi(e,t){return e.aa?.call(e,t)??[]}var xi=class e{constructor(e,t){this.Ev=g({width:0,height:0}),this.Cp=null,this.Tp=null,this.Pp=null,this.Rp=null,this.Dp=!1,this.Vp=new M,this.Op=new M,this.Bp=0,this.Ap=!1,this.Ip=null,this.zp=!1,this.Lp=null,this.Ep=null,this.jv=!1,this.Hv=()=>{this.jv||this.Np===null||this.$i().Uh()},this.Uv=()=>{this.jv||this.Np===null||this.$i().Uh()},this.Qd=e,this.Np=t,this.Np.W_().l(this.Fp.bind(this),this,!0),this.Wp=document.createElement(`td`),this.Wp.style.padding=`0`,this.Wp.style.position=`relative`;let n=document.createElement(`div`);n.style.width=`100%`,n.style.height=`100%`,n.style.position=`relative`,n.style.overflow=`hidden`,this.jp=document.createElement(`td`),this.jp.style.padding=`0`,this.Hp=document.createElement(`td`),this.Hp.style.padding=`0`,this.Wp.appendChild(n),this.Gv=ei(n,g({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv);let r=this.Gv.canvasElement;r.style.position=`absolute`,r.style.zIndex=`1`,r.style.left=`0`,r.style.top=`0`,this.Jv=ei(n,g({width:16,height:16})),this.Jv.subscribeSuggestedBitmapSizeChanged(this.Uv);let i=this.Jv.canvasElement;i.style.position=`absolute`,i.style.zIndex=`2`,i.style.left=`0`,i.style.top=`0`,this.$p=document.createElement(`tr`),this.$p.appendChild(this.jp),this.$p.appendChild(this.Wp),this.$p.appendChild(this.Hp),this.Up(),this.hp=new oi(this.Jv.canvasElement,this,{ev:()=>this.Ip===null&&!this.Qd.W().handleScroll.vertTouchDrag,rv:()=>this.Ip===null&&!this.Qd.W().handleScroll.horzTouchDrag})}S(){this.Cp!==null&&this.Cp.S(),this.Tp!==null&&this.Tp.S(),this.Pp=null,this.Jv.unsubscribeSuggestedBitmapSizeChanged(this.Uv),ti(this.Jv.canvasElement),this.Jv.dispose(),this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),ti(this.Gv.canvasElement),this.Gv.dispose(),this.Np!==null&&this.Np.W_().p(this),this.hp.S()}fp(){return O(this.Np)}qp(t){var n;this.Np!==null&&this.Np.W_().p(this),this.Np=t,this.Np!==null&&this.Np.W_().l(e.prototype.Fp.bind(this),this,!0),this.Up(),this.Qd.Yp().indexOf(this)===this.Qd.Yp().length-1?(this.Pp=this.Pp??new $r(this.Wp,this.Qd),this.Pp.bt()):((n=this.Pp)==null||n.if(),this.Pp=null)}$v(){return this.Qd}lp(){return this.$p}Up(){if(this.Np!==null&&(this.Zp(),this.$i().wt().length!==0)){if(this.Cp!==null){let e=this.Np.R_();this.Cp.Gi(O(e))}if(this.Tp!==null){let e=this.Np.D_();this.Tp.Gi(O(e))}}}Xp(){this.Cp!==null&&this.Cp.bt(),this.Tp!==null&&this.Tp.bt()}M_(){return this.Np===null?0:this.Np.M_()}x_(e){this.Np&&this.Np.x_(e)}Qf(e){if(!this.Np)return;this.Kp();let t=e.localX,n=e.localY;this.Gp(t,n,e)}bv(e){this.Kp(),this.Jp(),this.Gp(e.localX,e.localY,e)}tv(e){if(!this.Np)return;this.Kp();let t=e.localX,n=e.localY;this.Gp(t,n,e);let r=this.wr(t,n);this.Qd.Qp(r?.Lv??null),this.$i().jc(r&&{Hc:r.Hc,Iv:r.Iv})}dv(e){this.Np!==null&&(this.Kp(),this.tm(e))}qf(e){this.Np!==null&&this.im(this.Op,e)}jf(e){this.qf(e)}av(e){this.Kp(),this.nm(e),this.Gp(e.localX,e.localY,e)}cv(e){this.Np!==null&&(this.Kp(),this.Ap=!1,this.sm(e))}uv(e){this.Np!==null&&this.tm(e)}Rv(e){if(this.Ap=!0,this.Ip===null){let t={x:e.localX,y:e.localY};this.rm(t,t,e)}}Pv(e){this.Np!==null&&(this.Kp(),this.Np.$t().jc(null),this.hm())}lm(){return this.Vp}am(){return this.Op}xv(){this.Bp=1,this.$i().Un()}Sv(e,t){if(!this.Qd.W().handleScale.pinch)return;let n=5*(t-this.Bp);this.Bp=t,this.$i().Qc(e.nt,n)}pv(e){this.Ap=!1,this.zp=this.Ip!==null,this.Jp();let t=this.$i().Zc();this.Ip!==null&&t.yt()&&(this.Lp={x:t.Yt(),y:t.Zt()},this.Ip={x:e.localX,y:e.localY})}hv(e){if(this.Np===null)return;let t=e.localX,n=e.localY;if(this.Ip===null)this.nm(e);else{this.zp=!1;let r=O(this.Lp),i=r.x+(t-this.Ip.x),a=r.y+(n-this.Ip.y);this.Gp(i,a,e)}}_v(e){this.$v().W().trackingMode.exitMode===0&&(this.zp=!0),this.om(),this.sm(e)}wr(e,t){let n=this.Np;return n===null?null:function(e,t,n){let r=e.Uo(),i=function(e,t,n){let r,i;for(let s of e){let e=s.va?.call(s,t,n)??[];for(let t of e)a=t.zOrder,(!(o=r?.zOrder)||a===`top`&&o!==`top`||a===`normal`&&o===`bottom`)&&(r=t,i=s)}var a,o;return r&&i?{zv:r,Hc:i}:null}(r,t,n);if(i?.zv.zOrder===`top`)return fi(i);for(let a of r){if(i&&i.Hc===a&&i.zv.zOrder!==`bottom`&&!i.zv.isBackground)return fi(i);let r=pi(a.Pn(e),t,n);if(r!==null)return{Hc:a,Bv:r.Bv,Iv:r.Iv};if(i&&i.Hc===a&&i.zv.zOrder!==`bottom`&&i.zv.isBackground)return fi(i)}return i?.zv?fi(i):null}(n,e,t)}_m(e,t){O(t===`left`?this.Cp:this.Tp).cp(g({width:e,height:this.Ev.height}))}um(){return this.Ev}cp(e){_(this.Ev,e)||(this.Ev=e,this.jv=!0,this.Gv.resizeCanvasElement(e),this.Jv.resizeCanvasElement(e),this.jv=!1,this.Wp.style.width=e.width+`px`,this.Wp.style.height=e.height+`px`)}dm(){let e=O(this.Np);e.P_(e.R_()),e.P_(e.D_());for(let t of e.Ba())if(e.vr(t)){let n=t.Dt();n!==null&&e.P_(n),t.Vn()}}xp(){return this.Gv.bitmapSize}Sp(e,t,n){let r=this.xp();r.width>0&&r.height>0&&e.drawImage(this.Gv.canvasElement,t,n)}vp(e){if(e===0||this.Np===null)return;if(e>1&&this.dm(),this.Cp!==null&&this.Cp.vp(e),this.Tp!==null&&this.Tp.vp(e),e!==1){this.Gv.applySuggestedBitmapSize();let e=ne(this.Gv);e!==null&&(e.useBitmapCoordinateSpace((e=>{this.mp(e)})),this.Np&&(this.fm(e,_i),this.vm(e),this.pm(e),this.fm(e,vi),this.fm(e,yi)))}this.Jv.applySuggestedBitmapSize();let t=ne(this.Jv);t!==null&&(t.useBitmapCoordinateSpace((({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)})),this.bm(t),this.fm(t,bi))}wm(){return this.Cp}gm(){return this.Tp}bp(e,t){this.fm(e,t)}Fp(){this.Np!==null&&this.Np.W_().p(this),this.Np=null}tm(e){this.im(this.Vp,e)}im(e,t){let n=t.localX,r=t.localY;e.M()&&e.m(this.$i().St().Nu(n),{x:n,y:r},t)}mp({context:e,bitmapSize:t}){let{width:n,height:r}=t,i=this.$i(),a=i.q(),o=i.bd();a===o?Ve(e,0,0,n,r,o):We(e,0,0,n,r,a,o)}vm(e){let t=O(this.Np).j_().qh().gt();t!==null&&t.X(e,!1)}pm(e){let t=this.$i().Yc();this.Mm(e,vi,ni,t),this.Mm(e,vi,ri,t)}bm(e){this.Mm(e,vi,ri,this.$i().Zc())}fm(e,t){let n=O(this.Np).Uo();for(let r of n)this.Mm(e,t,ni,r);for(let r of n)this.Mm(e,t,ri,r)}Mm(e,t,n,r){let i=O(this.Np),a=i.$t().Wc(),o=a!==null&&a.Hc===r,s=a!==null&&o&&a.Iv!==void 0?a.Iv.Mr:void 0;ii(t,(t=>n(t,e,o,s)),r,i)}Zp(){if(this.Np===null)return;let e=this.Qd,t=this.Np.R_().W().visible,n=this.Np.D_().W().visible;t||this.Cp===null||(this.jp.removeChild(this.Cp.lp()),this.Cp.S(),this.Cp=null),n||this.Tp===null||(this.Hp.removeChild(this.Tp.lp()),this.Tp.S(),this.Tp=null);let r=e.$t().ud();t&&this.Cp===null&&(this.Cp=new gi(this,e.W(),r,`left`),this.jp.appendChild(this.Cp.lp())),n&&this.Tp===null&&(this.Tp=new gi(this,e.W(),r,`right`),this.Hp.appendChild(this.Tp.lp()))}xm(e){return e.Dv&&this.Ap||this.Ip!==null}Sm(e){return Math.max(0,Math.min(e,this.Ev.width-1))}km(e){return Math.max(0,Math.min(e,this.Ev.height-1))}Gp(e,t,n){this.$i().ld(this.Sm(e),this.km(t),n,O(this.Np))}hm(){this.$i().od()}om(){this.zp&&(this.Ip=null,this.hm())}rm(e,t,n){this.Ip=e,this.zp=!1,this.Gp(t.x,t.y,n);let r=this.$i().Zc();this.Lp={x:r.Yt(),y:r.Zt()}}$i(){return this.Qd.$t()}sm(e){if(!this.Dp)return;let t=this.$i(),n=this.fp();if(t.z_(n,n.vn()),this.Rp=null,this.Dp=!1,t.ed(),this.Ep!==null){let e=performance.now(),n=t.St();this.Ep.Vr(n.Hu(),e),this.Ep.Qu(e)||t.Zn(this.Ep)}}Kp(){this.Ip=null}Jp(){if(this.Np){if(this.$i().Un(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)O(document.activeElement).blur();else{let e=document.getSelection();e!==null&&e.removeAllRanges()}!this.Np.vn().Ni()&&this.$i().St().Ni()}}nm(e){if(this.Np===null)return;let t=this.$i(),n=t.St();if(n.Ni())return;let r=this.Qd.W(),i=r.handleScroll,a=r.kineticScroll;if((!i.pressedMouseMove||e.Dv)&&(!i.horzTouchDrag&&!i.vertTouchDrag||!e.Dv))return;let o=this.Np.vn(),s=performance.now();if(this.Rp!==null||this.xm(e)||(this.Rp={x:e.clientX,y:e.clientY,Od:s,ym:e.localX,Cm:e.localY}),this.Rp!==null&&!this.Dp&&(this.Rp.x!==e.clientX||this.Rp.y!==e.clientY)){if(e.Dv&&a.touch||!e.Dv&&a.mouse){let e=n.le();this.Ep=new Qr(.2/e,7/e,.997,15/e),this.Ep.Yd(n.Hu(),this.Rp.Od)}else this.Ep=null;o.Ni()||t.A_(this.Np,o,e.localY),t.nd(e.localX),this.Dp=!0}this.Dp&&(o.Ni()||t.I_(this.Np,o,e.localY),t.sd(e.localX),this.Ep!==null&&this.Ep.Yd(n.Hu(),s))}},Si=class{constructor(e,t,n,r,i){this.ft=!0,this.Ev=g({width:0,height:0}),this.Hv=()=>this.vp(3),this.qv=e===`left`,this.Oc=n.ud,this.cn=t,this.Tm=r,this.Pm=i,this.Kv=document.createElement(`div`),this.Kv.style.width=`25px`,this.Kv.style.height=`100%`,this.Kv.style.overflow=`hidden`,this.Gv=ei(this.Kv,g({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv)}S(){this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),ti(this.Gv.canvasElement),this.Gv.dispose()}lp(){return this.Kv}um(){return this.Ev}cp(e){_(this.Ev,e)||(this.Ev=e,this.Gv.resizeCanvasElement(e),this.Kv.style.width=`${e.width}px`,this.Kv.style.height=`${e.height}px`,this.ft=!0)}vp(e){if(e<3&&!this.ft||this.Ev.width===0||this.Ev.height===0)return;this.ft=!1,this.Gv.applySuggestedBitmapSize();let t=ne(this.Gv);t!==null&&t.useBitmapCoordinateSpace((e=>{this.mp(e),this.Ie(e)}))}xp(){return this.Gv.bitmapSize}Sp(e,t,n){let r=this.xp();r.width>0&&r.height>0&&e.drawImage(this.Gv.canvasElement,t,n)}Ie({context:e,bitmapSize:t,horizontalPixelRatio:n,verticalPixelRatio:r}){if(!this.Tm())return;e.fillStyle=this.cn.timeScale.borderColor;let i=Math.floor(this.Oc.W().C*n),a=Math.floor(this.Oc.W().C*r),o=this.qv?t.width-i:0;e.fillRect(o,0,i,a)}mp({context:e,bitmapSize:t}){Ve(e,0,0,t.width,t.height,this.Pm())}};function Ci(e){return t=>t.fa?.call(t,e)??[]}var wi=Ci(`normal`),Ti=Ci(`top`),Ei=Ci(`bottom`),Di=class{constructor(e,t){this.Rm=null,this.Dm=null,this.k=null,this.Vm=!1,this.Ev=g({width:0,height:0}),this.Om=new M,this.Fv=new Kt(5),this.jv=!1,this.Hv=()=>{this.jv||this.Qd.$t().Uh()},this.Uv=()=>{this.jv||this.Qd.$t().Uh()},this.Qd=e,this.q_=t,this.cn=e.W().layout,this.Xd=document.createElement(`tr`),this.Bm=document.createElement(`td`),this.Bm.style.padding=`0`,this.Am=document.createElement(`td`),this.Am.style.padding=`0`,this.Kv=document.createElement(`td`),this.Kv.style.height=`25px`,this.Kv.style.padding=`0`,this.Im=document.createElement(`div`),this.Im.style.width=`100%`,this.Im.style.height=`100%`,this.Im.style.position=`relative`,this.Im.style.overflow=`hidden`,this.Kv.appendChild(this.Im),this.Gv=ei(this.Im,g({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv);let n=this.Gv.canvasElement;n.style.position=`absolute`,n.style.zIndex=`1`,n.style.left=`0`,n.style.top=`0`,this.Jv=ei(this.Im,g({width:16,height:16})),this.Jv.subscribeSuggestedBitmapSizeChanged(this.Uv);let r=this.Jv.canvasElement;r.style.position=`absolute`,r.style.zIndex=`2`,r.style.left=`0`,r.style.top=`0`,this.Xd.appendChild(this.Bm),this.Xd.appendChild(this.Kv),this.Xd.appendChild(this.Am),this.zm(),this.Qd.$t().g_().l(this.zm.bind(this),this),this.hp=new oi(this.Jv.canvasElement,this,{ev:()=>!0,rv:()=>!this.Qd.W().handleScroll.horzTouchDrag})}S(){this.hp.S(),this.Rm!==null&&this.Rm.S(),this.Dm!==null&&this.Dm.S(),this.Jv.unsubscribeSuggestedBitmapSizeChanged(this.Uv),ti(this.Jv.canvasElement),this.Jv.dispose(),this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),ti(this.Gv.canvasElement),this.Gv.dispose()}lp(){return this.Xd}Lm(){return this.Rm}Em(){return this.Dm}bv(e){if(this.Vm)return;this.Vm=!0;let t=this.Qd.$t();!t.St().Ni()&&this.Qd.W().handleScale.axisPressedMouseMove.time&&t.Jc(e.localX)}pv(e){this.bv(e)}wv(){let e=this.Qd.$t();!e.St().Ni()&&this.Vm&&(this.Vm=!1,this.Qd.W().handleScale.axisPressedMouseMove.time&&e.hd())}av(e){let t=this.Qd.$t();!t.St().Ni()&&this.Qd.W().handleScale.axisPressedMouseMove.time&&t.rd(e.localX)}hv(e){this.av(e)}cv(){this.Vm=!1;let e=this.Qd.$t();e.St().Ni()&&!this.Qd.W().handleScale.axisPressedMouseMove.time||e.hd()}_v(){this.cv()}qf(){this.Qd.W().handleScale.axisDoubleClickReset.time&&this.Qd.$t().Kn()}jf(){this.qf()}Qf(){this.Qd.$t().W().handleScale.axisPressedMouseMove.time&&this.kp(1)}Pv(){this.kp(0)}um(){return this.Ev}Nm(){return this.Om}Fm(e,t,n){_(this.Ev,e)||(this.Ev=e,this.jv=!0,this.Gv.resizeCanvasElement(e),this.Jv.resizeCanvasElement(e),this.jv=!1,this.Kv.style.width=`${e.width}px`,this.Kv.style.height=`${e.height}px`,this.Om.m(e)),this.Rm!==null&&this.Rm.cp(g({width:t,height:e.height})),this.Dm!==null&&this.Dm.cp(g({width:n,height:e.height}))}Wm(){let e=this.jm();return Math.ceil(e.C+e.T+e.P+e.L+e.B+e.Hm)}bt(){this.Qd.$t().St().Ha()}xp(){return this.Gv.bitmapSize}Sp(e,t,n){let r=this.xp();r.width>0&&r.height>0&&e.drawImage(this.Gv.canvasElement,t,n)}vp(e){if(e===0)return;if(e!==1){this.Gv.applySuggestedBitmapSize();let t=ne(this.Gv);t!==null&&(t.useBitmapCoordinateSpace((e=>{this.mp(e),this.Ie(e),this.$m(t,Ei)})),this.wp(t),this.$m(t,wi)),this.Rm!==null&&this.Rm.vp(e),this.Dm!==null&&this.Dm.vp(e)}this.Jv.applySuggestedBitmapSize();let t=ne(this.Jv);t!==null&&(t.useBitmapCoordinateSpace((({context:e,bitmapSize:t})=>{e.clearRect(0,0,t.width,t.height)})),this.Um([...this.Qd.$t().wt(),this.Qd.$t().Zc()],t),this.$m(t,Ti))}$m(e,t){let n=this.Qd.$t().wt();for(let r of n)ii(t,(t=>ni(t,e,!1,void 0)),r,void 0);for(let r of n)ii(t,(t=>ri(t,e,!1,void 0)),r,void 0)}mp({context:e,bitmapSize:t}){Ve(e,0,0,t.width,t.height,this.Qd.$t().bd())}Ie({context:e,bitmapSize:t,verticalPixelRatio:n}){if(this.Qd.W().timeScale.borderVisible){e.fillStyle=this.qm();let r=Math.max(1,Math.floor(this.jm().C*n));e.fillRect(0,0,t.width,r)}}wp(e){let t=this.Qd.$t().St(),n=t.Ha();if(!n||n.length===0)return;let r=this.q_.maxTickMarkWeight(n),i=this.jm(),a=t.W();a.borderVisible&&a.ticksVisible&&e.useBitmapCoordinateSpace((({context:e,horizontalPixelRatio:t,verticalPixelRatio:r})=>{e.strokeStyle=this.qm(),e.fillStyle=this.qm();let a=Math.max(1,Math.floor(t)),o=Math.floor(.5*t);e.beginPath();let s=Math.round(i.T*r);for(let r=n.length;r--;){let i=Math.round(n[r].coord*t);e.rect(i-o,0,a,s)}e.fill()})),e.useMediaCoordinateSpace((({context:e})=>{let t=i.C+i.T+i.L+i.P/2;e.textAlign=`center`,e.textBaseline=`middle`,e.fillStyle=this.$(),e.font=this._p();for(let i of n)if(i.weight<r){let n=i.needAlignCoordinate?this.Ym(e,i.coord,i.label):i.coord;e.fillText(i.label,n,t)}this.Qd.W().timeScale.allowBoldLabels&&(e.font=this.Zm());for(let i of n)if(i.weight>=r){let n=i.needAlignCoordinate?this.Ym(e,i.coord,i.label):i.coord;e.fillText(i.label,n,t)}}))}Ym(e,t,n){let r=this.Fv.xi(e,n),i=r/2,a=Math.floor(t-i)+.5;return a<0?t+=Math.abs(0-a):a+r>this.Ev.width&&(t-=Math.abs(this.Ev.width-(a+r))),t}Um(e,t){let n=this.jm();for(let r of e)for(let e of r.Qi())e.gt().X(t,n)}qm(){return this.Qd.W().timeScale.borderColor}$(){return this.cn.textColor}j(){return this.cn.fontSize}_p(){return Ae(this.j(),this.cn.fontFamily)}Zm(){return Ae(this.j(),this.cn.fontFamily,`bold`)}jm(){this.k===null&&(this.k={C:1,N:NaN,L:NaN,B:NaN,ji:NaN,T:5,P:NaN,R:``,Wi:new Kt,Hm:0});let e=this.k,t=this._p();if(e.R!==t){let n=this.j();e.P=n,e.R=t,e.L=3*n/12,e.B=3*n/12,e.ji=9*n/12,e.N=0,e.Hm=4*n/12,e.Wi.nr()}return this.k}kp(e){this.Kv.style.cursor=e===1?`ew-resize`:`default`}zm(){let e=this.Qd.$t(),t=e.W();t.leftPriceScale.visible||this.Rm===null||(this.Bm.removeChild(this.Rm.lp()),this.Rm.S(),this.Rm=null),t.rightPriceScale.visible||this.Dm===null||(this.Am.removeChild(this.Dm.lp()),this.Dm.S(),this.Dm=null);let n={ud:this.Qd.$t().ud()},r=()=>t.leftPriceScale.borderVisible&&e.St().W().borderVisible,i=()=>e.bd();t.leftPriceScale.visible&&this.Rm===null&&(this.Rm=new Si(`left`,t,n,r,i),this.Bm.appendChild(this.Rm.lp())),t.rightPriceScale.visible&&this.Dm===null&&(this.Dm=new Si(`right`,t,n,r,i),this.Am.appendChild(this.Dm.lp()))}},Oi=!!Kr&&!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>e.brand.includes(`Chromium`)))&&!!Kr&&((ki=navigator==null?void 0:navigator.userAgentData)?.platform?navigator.userAgentData.platform===`Windows`:navigator.userAgent.toLowerCase().indexOf(`win`)>=0),ki,Ai=class{constructor(e,t,n){var r;this.Xm=[],this.Km=0,this.ho=0,this.__=0,this.Gm=0,this.Jm=0,this.Qm=null,this.tb=!1,this.Vp=new M,this.Op=new M,this.Rc=new M,this.ib=null,this.nb=null,this.Jd=e,this.cn=t,this.q_=n,this.Xd=document.createElement(`div`),this.Xd.classList.add(`tv-lightweight-charts`),this.Xd.style.overflow=`hidden`,this.Xd.style.direction=`ltr`,this.Xd.style.width=`100%`,this.Xd.style.height=`100%`,(r=this.Xd).style.userSelect=`none`,r.style.webkitUserSelect=`none`,r.style.msUserSelect=`none`,r.style.MozUserSelect=`none`,r.style.webkitTapHighlightColor=`transparent`,this.sb=document.createElement(`table`),this.sb.setAttribute(`cellspacing`,`0`),this.Xd.appendChild(this.sb),this.eb=this.rb.bind(this),ji(this.cn)&&this.hb(!0),this.$i=new Dr(this.Vc.bind(this),this.cn,n),this.$t().Xc().l(this.lb.bind(this),this),this.ab=new Di(this,this.q_),this.sb.appendChild(this.ab.lp());let i=t.autoSize&&this.ob(),a=this.cn.width,o=this.cn.height;if(i||a===0||o===0){let t=e.getBoundingClientRect();a||=t.width,o||=t.height}this._b(a,o),this.ub(),e.appendChild(this.Xd),this.cb(),this.$i.St().ec().l(this.$i.Kl.bind(this.$i),this),this.$i.g_().l(this.$i.Kl.bind(this.$i),this)}$t(){return this.$i}W(){return this.cn}Yp(){return this.Xm}fb(){return this.ab}S(){this.hb(!1),this.Km!==0&&window.cancelAnimationFrame(this.Km),this.$i.Xc().p(this),this.$i.St().ec().p(this),this.$i.g_().p(this),this.$i.S();for(let e of this.Xm)this.sb.removeChild(e.lp()),e.lm().p(this),e.am().p(this),e.S();this.Xm=[],O(this.ab).S(),this.Xd.parentElement!==null&&this.Xd.parentElement.removeChild(this.Xd),this.Rc.S(),this.Vp.S(),this.Op.S(),this.pb()}_b(e,t,n=!1){if(this.ho===t&&this.__===e)return;let r=function(e){let t=Math.floor(e.width),n=Math.floor(e.height);return g({width:t-t%2,height:n-n%2})}(g({width:e,height:t}));this.ho=r.height,this.__=r.width;let i=this.ho+`px`,a=this.__+`px`;O(this.Xd).style.height=i,O(this.Xd).style.width=a,this.sb.style.height=i,this.sb.style.width=a,n?this.mb(tt.es(),performance.now()):this.$i.Kl()}vp(e){e===void 0&&(e=tt.es());for(let t=0;t<this.Xm.length;t++)this.Xm[t].vp(e.Hn(t).Fn);this.cn.timeScale.visible&&this.ab.vp(e.jn())}$h(e){let t=ji(this.cn);this.$i.$h(e);let n=ji(this.cn);n!==t&&this.hb(n),this.cb(),this.bb(e)}lm(){return this.Vp}am(){return this.Op}Xc(){return this.Rc}wb(){this.Qm!==null&&(this.mb(this.Qm,performance.now()),this.Qm=null);let e=this.gb(null),t=document.createElement(`canvas`);t.width=e.width,t.height=e.height;let n=O(t.getContext(`2d`));return this.gb(n),t}Mb(e){return e===`left`&&!this.xb()||e===`right`&&!this.Sb()||this.Xm.length===0?0:O(e===`left`?this.Xm[0].wm():this.Xm[0].gm()).dp()}kb(){return this.cn.autoSize&&this.ib!==null}yb(){return this.Xd}Qp(e){this.nb=e,this.nb?this.yb().style.setProperty(`cursor`,e):this.yb().style.removeProperty(`cursor`)}Cb(){return this.nb}Tb(){return D(this.Xm[0]).um()}bb(e){(e.autoSize!==void 0||!this.ib||e.width===void 0&&e.height===void 0)&&(e.autoSize&&!this.ib&&this.ob(),!1===e.autoSize&&this.ib!==null&&this.pb(),e.autoSize||e.width===void 0&&e.height===void 0||this._b(e.width||this.__,e.height||this.ho))}gb(e){let t=0,n=0,r=this.Xm[0],i=(t,n)=>{let r=0;for(let i=0;i<this.Xm.length;i++){let a=this.Xm[i],o=O(t===`left`?a.wm():a.gm()),s=o.xp();e!==null&&o.Sp(e,n,r),r+=s.height}};this.xb()&&(i(`left`,0),t+=O(r.wm()).xp().width);for(let r=0;r<this.Xm.length;r++){let i=this.Xm[r],a=i.xp();e!==null&&i.Sp(e,t,n),n+=a.height}t+=r.xp().width,this.Sb()&&(i(`right`,t),t+=O(r.gm()).xp().width);let a=(t,n,r)=>{O(t===`left`?this.ab.Lm():this.ab.Em()).Sp(O(e),n,r)};if(this.cn.timeScale.visible){let t=this.ab.xp();if(e!==null){let i=0;this.xb()&&(a(`left`,i,n),i=O(r.wm()).xp().width),this.ab.Sp(e,i,n),i+=t.width,this.Sb()&&a(`right`,i,n)}n+=t.height}return g({width:t,height:n})}Pb(){let e=0,t=0,n=0;for(let r of this.Xm)this.xb()&&(t=Math.max(t,O(r.wm()).op(),this.cn.leftPriceScale.minimumWidth)),this.Sb()&&(n=Math.max(n,O(r.gm()).op(),this.cn.rightPriceScale.minimumWidth)),e+=r.M_();t=Yr(t),n=Yr(n);let r=this.__,i=this.ho,a=Math.max(r-t-n,0),o=this.cn.timeScale.visible,s=o?Math.max(this.ab.Wm(),this.cn.timeScale.minimumHeight):0;var c;s=(c=s)+c%2;let l=0+s,u=i<l?0:i-l,d=u/e,f=0;for(let e=0;e<this.Xm.length;++e){let r=this.Xm[e];r.qp(this.$i.qc()[e]);let i=0,o=0;o=e===this.Xm.length-1?u-f:Math.round(r.M_()*d),i=Math.max(o,2),f+=i,r.cp(g({width:a,height:i})),this.xb()&&r._m(t,`left`),this.Sb()&&r._m(n,`right`),r.fp()&&this.$i.Kc(r.fp(),i)}this.ab.Fm(g({width:o?a:0,height:s}),o?t:0,o?n:0),this.$i.S_(a),this.Gm!==t&&(this.Gm=t),this.Jm!==n&&(this.Jm=n)}hb(e){e?this.Xd.addEventListener(`wheel`,this.eb,{passive:!1}):this.Xd.removeEventListener(`wheel`,this.eb)}Rb(e){switch(e.deltaMode){case e.DOM_DELTA_PAGE:return 120;case e.DOM_DELTA_LINE:return 32}return Oi?1/window.devicePixelRatio:1}rb(e){if(!(e.deltaX!==0&&this.cn.handleScroll.mouseWheel||e.deltaY!==0&&this.cn.handleScale.mouseWheel))return;let t=this.Rb(e),n=t*e.deltaX/100,r=-t*e.deltaY/100;if(e.cancelable&&e.preventDefault(),r!==0&&this.cn.handleScale.mouseWheel){let t=Math.sign(r)*Math.min(1,Math.abs(r)),n=e.clientX-this.Xd.getBoundingClientRect().left;this.$t().Qc(n,t)}n!==0&&this.cn.handleScroll.mouseWheel&&this.$t().td(-80*n)}mb(e,t){let n=e.jn();n===3&&this.Db(),n!==3&&n!==2||(this.Vb(e),this.Ob(e,t),this.ab.bt(),this.Xm.forEach((e=>{e.Xp()})),this.Qm?.jn()===3&&(this.Qm.ts(e),this.Db(),this.Vb(this.Qm),this.Ob(this.Qm,t),e=this.Qm,this.Qm=null)),this.vp(e)}Ob(e,t){for(let n of e.Qn())this.ns(n,t)}Vb(e){let t=this.$i.qc();for(let n=0;n<t.length;n++)e.Hn(n).Wn&&t[n].N_()}ns(e,t){let n=this.$i.St();switch(e.qn){case 0:n.hc();break;case 1:n.lc(e.Vt);break;case 2:n.Gn(e.Vt);break;case 3:n.Jn(e.Vt);break;case 4:n.qu();break;case 5:e.Vt.Qu(t)||n.Jn(e.Vt.tc(t))}}Vc(e){this.Qm===null?this.Qm=e:this.Qm.ts(e),this.tb||(this.tb=!0,this.Km=window.requestAnimationFrame((e=>{if(this.tb=!1,this.Km=0,this.Qm!==null){let t=this.Qm;this.Qm=null,this.mb(t,e);for(let n of t.Qn())if(n.qn===5&&!n.Vt.Qu(e)){this.$t().Zn(n.Vt);break}}})))}Db(){this.ub()}ub(){let e=this.$i.qc(),t=e.length,n=this.Xm.length;for(let e=t;e<n;e++){let e=D(this.Xm.pop());this.sb.removeChild(e.lp()),e.lm().p(this),e.am().p(this),e.S()}for(let r=n;r<t;r++){let t=new xi(this,e[r]);t.lm().l(this.Bb.bind(this),this),t.am().l(this.Ab.bind(this),this),this.Xm.push(t),this.sb.insertBefore(t.lp(),this.ab.lp())}for(let n=0;n<t;n++){let t=e[n],r=this.Xm[n];r.fp()===t?r.Up():r.qp(t)}this.cb(),this.Pb()}Ib(e,t,n){let r=new Map;e!==null&&this.$i.wt().forEach((t=>{let n=t.In().ll(e);n!==null&&r.set(t,n)}));let i;if(e!==null){let t=this.$i.St().Ui(e)?.originalTime;t!==void 0&&(i=t)}let a=this.$t().Wc(),o=a!==null&&a.Hc instanceof Hn?a.Hc:void 0,s=a!==null&&a.Iv!==void 0?a.Iv.gr:void 0;return{zb:i,ee:e??void 0,Lb:t??void 0,Eb:o,Nb:r,Fb:s,Wb:n??void 0}}Bb(e,t,n){this.Vp.m((()=>this.Ib(e,t,n)))}Ab(e,t,n){this.Op.m((()=>this.Ib(e,t,n)))}lb(e,t,n){this.Rc.m((()=>this.Ib(e,t,n)))}cb(){let e=this.cn.timeScale.visible?``:`none`;this.ab.lp().style.display=e}xb(){return this.Xm[0].fp().R_().W().visible}Sb(){return this.Xm[0].fp().D_().W().visible}ob(){return`ResizeObserver`in window&&(this.ib=new ResizeObserver((e=>{let t=e.find((e=>e.target===this.Jd));t&&this._b(t.contentRect.width,t.contentRect.height)})),this.ib.observe(this.Jd,{box:`border-box`}),!0)}pb(){this.ib!==null&&this.ib.disconnect(),this.ib=null}};function ji(e){return!!(e.handleScroll.mouseWheel||e.handleScale.mouseWheel)}function Mi(e){return function(e){return e.open!==void 0}(e)||function(e){return e.value!==void 0}(e)}function Ni(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`){var i=0;for(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 Pi(e,t,n,r){let i=n.value,a={ee:t,ot:e,Vt:[i,i,i,i],zb:r};return n.color!==void 0&&(a.V=n.color),a}function Fi(e,t,n,r){let i=n.value,a={ee:t,ot:e,Vt:[i,i,i,i],zb:r};return n.lineColor!==void 0&&(a.lt=n.lineColor),n.topColor!==void 0&&(a.Ps=n.topColor),n.bottomColor!==void 0&&(a.Rs=n.bottomColor),a}function Ii(e,t,n,r){let i=n.value,a={ee:t,ot:e,Vt:[i,i,i,i],zb:r};return n.topLineColor!==void 0&&(a.Re=n.topLineColor),n.bottomLineColor!==void 0&&(a.De=n.bottomLineColor),n.topFillColor1!==void 0&&(a.ke=n.topFillColor1),n.topFillColor2!==void 0&&(a.ye=n.topFillColor2),n.bottomFillColor1!==void 0&&(a.Ce=n.bottomFillColor1),n.bottomFillColor2!==void 0&&(a.Te=n.bottomFillColor2),a}function Li(e,t,n,r){let i={ee:t,ot:e,Vt:[n.open,n.high,n.low,n.close],zb:r};return n.color!==void 0&&(i.V=n.color),i}function Ri(e,t,n,r){let i={ee:t,ot:e,Vt:[n.open,n.high,n.low,n.close],zb:r};return n.color!==void 0&&(i.V=n.color),n.borderColor!==void 0&&(i.Ot=n.borderColor),n.wickColor!==void 0&&(i.Xh=n.wickColor),i}function zi(e,t,n,r,i){let a=D(i)(n),o=Math.max(...a),s=Math.min(...a),c=a[a.length-1],l=[c,o,s,c],u=n,{time:d,color:f}=u;return{ee:t,ot:e,Vt:l,zb:r,$e:Ni(u,[`time`,`color`]),V:f}}function N(e){return e.Vt!==void 0}function P(e,t){return t.customValues!==void 0&&(e.jb=t.customValues),e}function Bi(e){return(t,n,r,i,a,o)=>function(e,t){return t?t(e):(n=e).open===void 0&&n.value===void 0;var n}(r,o)?P({ot:t,ee:n,zb:i},r):P(e(t,n,r,i,a),r)}function Vi(e){return{Candlestick:Bi(Ri),Bar:Bi(Li),Area:Bi(Fi),Baseline:Bi(Ii),Histogram:Bi(Pi),Line:Bi(Pi),Custom:Bi(zi)}[e]}function Hi(e){return{ee:0,Hb:new Map,la:e}}function Ui(e,t){if(e!==void 0&&e.length!==0)return{$b:t.key(e[0].ot),Ub:t.key(e[e.length-1].ot)}}function Wi(e){let t;return e.forEach((e=>{t===void 0&&(t=e.zb)})),D(t)}var Gi=class{constructor(e){this.qb=new Map,this.Yb=new Map,this.Zb=new Map,this.Xb=[],this.q_=e}S(){this.qb.clear(),this.Yb.clear(),this.Zb.clear(),this.Xb=[]}Kb(e,t){let n=this.qb.size!==0,r=!1,i=this.Yb.get(e);if(i!==void 0)if(this.Yb.size===1)n=!1,r=!0,this.qb.clear();else for(let t of this.Xb)t.pointData.Hb.delete(e)&&(r=!0);let a=[];if(t.length!==0){let n=t.map((e=>e.time)),i=this.q_.createConverterToInternalObj(t),o=Vi(e.Qh()),s=e.Ca(),c=e.Ta();a=t.map(((t,a)=>{let l=i(t.time),u=this.q_.key(l),d=this.qb.get(u);d===void 0&&(d=Hi(l),this.qb.set(u,d),r=!0);let f=o(l,d.ee,t,n[a],s,c);return d.Hb.set(e,f),f}))}n&&this.Gb(),this.Jb(e,a);let o=-1;if(r){let e=[];this.qb.forEach((t=>{e.push({timeWeight:0,time:t.la,pointData:t,originalTime:Wi(t.Hb)})})),e.sort(((e,t)=>this.q_.key(e.time)-this.q_.key(t.time))),o=this.Qb(e)}return this.tw(e,o,function(e,t,n){let r=Ui(e,n),i=Ui(t,n);if(r!==void 0&&i!==void 0)return{ta:r.Ub>=i.Ub&&r.$b>=i.$b}}(this.Yb.get(e),i,this.q_))}vd(e){return this.Kb(e,[])}iw(e,t){let n=t;(function(e){e.zb===void 0&&(e.zb=e.time)})(n),this.q_.preprocessData(t);let r=this.q_.createConverterToInternalObj([t])(t.time),i=this.Zb.get(e);if(i!==void 0&&this.q_.key(r)<this.q_.key(i))throw Error(`Cannot update oldest data, last time=${i}, new time=${r}`);let a=this.qb.get(this.q_.key(r)),o=a===void 0;a===void 0&&(a=Hi(r),this.qb.set(this.q_.key(r),a));let s=Vi(e.Qh()),c=e.Ca(),l=e.Ta(),u=s(r,a.ee,t,n.zb,c,l);a.Hb.set(e,u),this.nw(e,u);let d={ta:N(u)};if(!o)return this.tw(e,-1,d);let f={timeWeight:0,time:a.la,pointData:a,originalTime:Wi(a.Hb)},p=Ct(this.Xb,this.q_.key(f.time),((e,t)=>this.q_.key(e.time)<t));this.Xb.splice(p,0,f);for(let e=p;e<this.Xb.length;++e)Ki(this.Xb[e].pointData,e);return this.q_.fillWeightsForPoints(this.Xb,p),this.tw(e,p,d)}nw(e,t){let n=this.Yb.get(e);n===void 0&&(n=[],this.Yb.set(e,n));let r=n.length===0?null:n[n.length-1];r===null||this.q_.key(t.ot)>this.q_.key(r.ot)?N(t)&&n.push(t):N(t)?n[n.length-1]=t:n.splice(-1,1),this.Zb.set(e,t.ot)}Jb(e,t){t.length===0?(this.Yb.delete(e),this.Zb.delete(e)):(this.Yb.set(e,t.filter(N)),this.Zb.set(e,t[t.length-1].ot))}Gb(){for(let e of this.Xb)e.pointData.Hb.size===0&&this.qb.delete(this.q_.key(e.time))}Qb(e){let t=-1;for(let n=0;n<this.Xb.length&&n<e.length;++n){let r=this.Xb[n],i=e[n];if(this.q_.key(r.time)!==this.q_.key(i.time)){t=n;break}i.timeWeight=r.timeWeight,Ki(i.pointData,n)}if(t===-1&&this.Xb.length!==e.length&&(t=Math.min(this.Xb.length,e.length)),t===-1)return-1;for(let n=t;n<e.length;++n)Ki(e[n].pointData,n);return this.q_.fillWeightsForPoints(e,t),this.Xb=e,t}sw(){if(this.Yb.size===0)return null;let e=0;return this.Yb.forEach((t=>{t.length!==0&&(e=Math.max(e,t[t.length-1].ee))})),e}tw(e,t,n){let r={ew:new Map,St:{Eu:this.sw()}};if(t!==-1)this.Yb.forEach(((t,i)=>{r.ew.set(i,{$e:t,rw:i===e?n:void 0})})),this.Yb.has(e)||r.ew.set(e,{$e:[],rw:n}),r.St.hw=this.Xb,r.St.lw=t;else{let t=this.Yb.get(e);r.ew.set(e,{$e:t||[],rw:n})}return r}};function Ki(e,t){e.ee=t,e.Hb.forEach((e=>{e.ee=t}))}function qi(e){let t={value:e.Vt[3],time:e.zb};return e.jb!==void 0&&(t.customValues=e.jb),t}function Ji(e){let t=qi(e);return e.V!==void 0&&(t.color=e.V),t}function Yi(e){let t=qi(e);return e.lt!==void 0&&(t.lineColor=e.lt),e.Ps!==void 0&&(t.topColor=e.Ps),e.Rs!==void 0&&(t.bottomColor=e.Rs),t}function Xi(e){let t=qi(e);return e.Re!==void 0&&(t.topLineColor=e.Re),e.De!==void 0&&(t.bottomLineColor=e.De),e.ke!==void 0&&(t.topFillColor1=e.ke),e.ye!==void 0&&(t.topFillColor2=e.ye),e.Ce!==void 0&&(t.bottomFillColor1=e.Ce),e.Te!==void 0&&(t.bottomFillColor2=e.Te),t}function Zi(e){let t={open:e.Vt[0],high:e.Vt[1],low:e.Vt[2],close:e.Vt[3],time:e.zb};return e.jb!==void 0&&(t.customValues=e.jb),t}function Qi(e){let t=Zi(e);return e.V!==void 0&&(t.color=e.V),t}function $i(e){let t=Zi(e),{V:n,Ot:r,Xh:i}=e;return n!==void 0&&(t.color=n),r!==void 0&&(t.borderColor=r),i!==void 0&&(t.wickColor=i),t}function ea(e){return{Area:Yi,Line:Ji,Baseline:Xi,Histogram:Ji,Bar:Qi,Candlestick:$i,Custom:ta}[e]}function ta(e){let t=e.zb;return Object.assign(Object.assign({},e.$e),{time:t})}var na={vertLine:{color:`#9598A1`,width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:`#131722`},horzLine:{color:`#9598A1`,width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:`#131722`},mode:1},ra={vertLines:{color:`#D6DCDE`,style:0,visible:!0},horzLines:{color:`#D6DCDE`,style:0,visible:!0}},ia={background:{type:`solid`,color:`#FFFFFF`},textColor:`#191919`,fontSize:12,fontFamily:ke,attributionLogo:!0},aa={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:`#2B2B43`,entireTextOnly:!1,visible:!1,ticksVisible:!1,scaleMargins:{bottom:.1,top:.2},minimumWidth:0},oa={rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:`#2B2B43`,visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0,allowShiftVisibleRangeOnWhitespaceReplacement:!1,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0,allowBoldLabels:!0},sa={color:`rgba(0, 0, 0, 0)`,visible:!1,fontSize:48,fontFamily:ke,fontStyle:``,text:``,horzAlign:`center`,vertAlign:`center`};function ca(){return{width:0,height:0,autoSize:!1,layout:ia,crosshair:na,grid:ra,overlayPriceScales:Object.assign({},aa),leftPriceScale:Object.assign(Object.assign({},aa),{visible:!1}),rightPriceScale:Object.assign(Object.assign({},aa),{visible:!0}),timeScale:oa,watermark:sa,localization:{locale:Kr?navigator.language:``,dateFormat:`dd MMM 'yy`},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}}}var la=class{constructor(e,t){this.aw=e,this.ow=t}applyOptions(e){this.aw.$t().$c(this.ow,e)}options(){return this.Li().W()}width(){return et(this.ow)?this.aw.Mb(this.ow):0}Li(){return O(this.aw.$t().Uc(this.ow)).Dt}};function ua(e,t,n){let r=Ni(e,[`time`,`originalTime`]),i=Object.assign({time:t},r);return n!==void 0&&(i.originalTime=n),i}var da={color:`#FF0000`,price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:``,axisLabelColor:``,axisLabelTextColor:``},F=class{constructor(e){this.Nh=e}applyOptions(e){this.Nh.$h(e)}options(){return this.Nh.W()}_w(){return this.Nh}},fa=class{constructor(e,t,n,r,i){this.uw=new M,this.Es=e,this.cw=t,this.dw=n,this.q_=i,this.fw=r}S(){this.uw.S()}priceFormatter(){return this.Es.ba()}priceToCoordinate(e){let t=this.Es.Ct();return t===null?null:this.Es.Dt().Rt(e,t.Vt)}coordinateToPrice(e){let t=this.Es.Ct();return t===null?null:this.Es.Dt().pn(e,t.Vt)}barsInLogicalRange(e){if(e===null)return null;let t=new hr(new fr(e.from,e.to)).lu(),n=this.Es.In();if(n.Ni())return null;let r=n.ll(t.Os(),1),i=n.ll(t.ui(),-1),a=O(n.el()),o=O(n.An());if(r!==null&&i!==null&&r.ee>i.ee)return{barsBefore:e.from-a,barsAfter:o-e.to};let s={barsBefore:r===null||r.ee===a?e.from-a:r.ee-a,barsAfter:i===null||i.ee===o?o-e.to:o-i.ee};return r!==null&&i!==null&&(s.from=r.zb,s.to=i.zb),s}setData(e){this.q_,this.Es.Qh(),this.cw.pw(this.Es,e),this.mw(`full`)}update(e){this.Es.Qh(),this.cw.bw(this.Es,e),this.mw(`update`)}dataByIndex(e,t){let n=this.Es.In().ll(e,t);return n===null?null:ea(this.seriesType())(n)}data(){let e=ea(this.seriesType());return this.Es.In().ne().map((t=>e(t)))}subscribeDataChanged(e){this.uw.l(e)}unsubscribeDataChanged(e){this.uw.v(e)}setMarkers(e){this.q_;let t=e.map((e=>ua(e,this.q_.convertHorzItemToInternal(e.time),e.time)));this.Es.na(t)}markers(){return this.Es.sa().map((e=>ua(e,e.originalTime,void 0)))}applyOptions(e){this.Es.$h(e)}options(){return Ee(this.Es.W())}priceScale(){return this.dw.priceScale(this.Es.Dt().Pa())}createPriceLine(e){let t=xe(Ee(da),e);return new F(this.Es.ea(t))}removePriceLine(e){this.Es.ra(e._w())}seriesType(){return this.Es.Qh()}attachPrimitive(e){this.Es.ka(e),e.attached&&e.attached({chart:this.fw,series:this,requestUpdate:()=>this.Es.$t().Kl()})}detachPrimitive(e){this.Es.ya(e),e.detached&&e.detached()}mw(e){this.uw.M()&&this.uw.m(e)}},pa=class{constructor(e,t,n){this.ww=new M,this.mu=new M,this.Om=new M,this.$i=e,this.yl=e.St(),this.ab=t,this.yl.nc().l(this.gw.bind(this)),this.yl.sc().l(this.Mw.bind(this)),this.ab.Nm().l(this.xw.bind(this)),this.q_=n}S(){this.yl.nc().p(this),this.yl.sc().p(this),this.ab.Nm().p(this),this.ww.S(),this.mu.S(),this.Om.S()}scrollPosition(){return this.yl.Hu()}scrollToPosition(e,t){t?this.yl.Ju(e,1e3):this.$i.Jn(e)}scrollToRealTime(){this.yl.Gu()}getVisibleRange(){let e=this.yl.Vu();return e===null?null:{from:e.from.originalTime,to:e.to.originalTime}}setVisibleRange(e){let t={from:this.q_.convertHorzItemToInternal(e.from),to:this.q_.convertHorzItemToInternal(e.to)},n=this.yl.Iu(t);this.$i.pd(n)}getVisibleLogicalRange(){let e=this.yl.Du();return e===null?null:{from:e.Os(),to:e.ui()}}setVisibleLogicalRange(e){fe(e.from<=e.to,`The from index cannot be after the to index.`),this.$i.pd(e)}resetTimeScale(){this.$i.Kn()}fitContent(){this.$i.hc()}logicalToCoordinate(e){let t=this.$i.St();return t.Ni()?null:t.It(e)}coordinateToLogical(e){return this.yl.Ni()?null:this.yl.Nu(e)}timeToCoordinate(e){let t=this.q_.convertHorzItemToInternal(e),n=this.yl.Va(t,!1);return n===null?null:this.yl.It(n)}coordinateToTime(e){let t=this.$i.St(),n=t.Nu(e),r=t.Ui(n);return r===null?null:r.originalTime}width(){return this.ab.um().width}height(){return this.ab.um().height}subscribeVisibleTimeRangeChange(e){this.ww.l(e)}unsubscribeVisibleTimeRangeChange(e){this.ww.v(e)}subscribeVisibleLogicalRangeChange(e){this.mu.l(e)}unsubscribeVisibleLogicalRangeChange(e){this.mu.v(e)}subscribeSizeChange(e){this.Om.l(e)}unsubscribeSizeChange(e){this.Om.v(e)}applyOptions(e){this.yl.$h(e)}options(){return Object.assign(Object.assign({},Ee(this.yl.W())),{barSpacing:this.yl.le()})}gw(){this.ww.M()&&this.ww.m(this.getVisibleRange())}Mw(){this.mu.M()&&this.mu.m(this.getVisibleLogicalRange())}xw(e){this.Om.m(e.width,e.height)}};function ma(e){if(e===void 0||e.type===`custom`)return;let t=e;t.minMove!==void 0&&t.precision===void 0&&(t.precision=function(e){if(e>=1)return 0;let t=0;for(;t<8;t++){if(Math.abs(Math.round(e)-e)<1e-8)return t;e*=10}return t}(t.minMove))}function ha(e){return function(e){if(Te(e.handleScale)){let t=e.handleScale;e.handleScale={axisDoubleClickReset:{time:t,price:t},axisPressedMouseMove:{time:t,price:t},mouseWheel:t,pinch:t}}else if(e.handleScale!==void 0){let{axisPressedMouseMove:t,axisDoubleClickReset:n}=e.handleScale;Te(t)&&(e.handleScale.axisPressedMouseMove={time:t,price:t}),Te(n)&&(e.handleScale.axisDoubleClickReset={time:n,price:n})}let t=e.handleScroll;Te(t)&&(e.handleScroll={horzTouchDrag:t,vertTouchDrag:t,mouseWheel:t,pressedMouseMove:t})}(e),e}var ga=class{constructor(e,t,n){this.Sw=new Map,this.kw=new Map,this.yw=new M,this.Cw=new M,this.Tw=new M,this.Pw=new Gi(t);let r=n===void 0?Ee(ca()):xe(Ee(ca()),ha(n));this.q_=t,this.aw=new Ai(e,r,t),this.aw.lm().l((e=>{this.yw.M()&&this.yw.m(this.Rw(e()))}),this),this.aw.am().l((e=>{this.Cw.M()&&this.Cw.m(this.Rw(e()))}),this),this.aw.Xc().l((e=>{this.Tw.M()&&this.Tw.m(this.Rw(e()))}),this);let i=this.aw.$t();this.Dw=new pa(i,this.aw.fb(),this.q_)}remove(){this.aw.lm().p(this),this.aw.am().p(this),this.aw.Xc().p(this),this.Dw.S(),this.aw.S(),this.Sw.clear(),this.kw.clear(),this.yw.S(),this.Cw.S(),this.Tw.S(),this.Pw.S()}resize(e,t,n){this.autoSizeActive()||this.aw._b(e,t,n)}addCustomSeries(e,t){let n=k(e),r=Object.assign(Object.assign({},ce),n.defaultOptions());return this.Vw(`Custom`,r,t,n)}addAreaSeries(e){return this.Vw(`Area`,ae,e)}addBaselineSeries(e){return this.Vw(`Baseline`,oe,e)}addBarSeries(e){return this.Vw(`Bar`,w,e)}addCandlestickSeries(e={}){return function(e){e.borderColor!==void 0&&(e.borderUpColor=e.borderColor,e.borderDownColor=e.borderColor),e.wickColor!==void 0&&(e.wickUpColor=e.wickColor,e.wickDownColor=e.wickColor)}(e),this.Vw(`Candlestick`,re,e)}addHistogramSeries(e){return this.Vw(`Histogram`,se,e)}addLineSeries(e){return this.Vw(`Line`,ie,e)}removeSeries(e){let t=D(this.Sw.get(e)),n=this.Pw.vd(t);this.aw.$t().vd(t),this.Ow(n),this.Sw.delete(e),this.kw.delete(t)}pw(e,t){this.Ow(this.Pw.Kb(e,t))}bw(e,t){this.Ow(this.Pw.iw(e,t))}subscribeClick(e){this.yw.l(e)}unsubscribeClick(e){this.yw.v(e)}subscribeCrosshairMove(e){this.Tw.l(e)}unsubscribeCrosshairMove(e){this.Tw.v(e)}subscribeDblClick(e){this.Cw.l(e)}unsubscribeDblClick(e){this.Cw.v(e)}priceScale(e){return new la(this.aw,e)}timeScale(){return this.Dw}applyOptions(e){this.aw.$h(ha(e))}options(){return this.aw.W()}takeScreenshot(){return this.aw.wb()}autoSizeActive(){return this.aw.kb()}chartElement(){return this.aw.yb()}paneSize(){let e=this.aw.Tb();return{height:e.height,width:e.width}}setCrosshairPosition(e,t,n){let r=this.Sw.get(n);if(r===void 0)return;let i=this.aw.$t().dr(r);i!==null&&this.aw.$t().ad(e,t,i)}clearCrosshairPosition(){this.aw.$t().od(!0)}Vw(e,t,n={},r){ma(n.priceFormat);let i=xe(Ee(le),Ee(t),n),a=this.aw.$t().dd(e,i,r),o=new fa(a,this,this,this,this.q_);return this.Sw.set(o,a),this.kw.set(a,o),o}Ow(e){let t=this.aw.$t();t._d(e.St.Eu,e.St.hw,e.St.lw),e.ew.forEach(((e,t)=>t.J(e.$e,e.rw))),t.Wu()}Bw(e){return D(this.kw.get(e))}Rw(e){let t=new Map;e.Nb.forEach(((e,n)=>{let r=n.Qh(),i=ea(r)(e);if(r!==`Custom`)fe(Mi(i));else{let e=n.Ta();fe(!e||!1===e(i))}t.set(this.Bw(n),i)}));let n=e.Eb!==void 0&&this.kw.has(e.Eb)?this.Bw(e.Eb):void 0;return{time:e.zb,logical:e.ee,point:e.Lb,hoveredSeries:n,hoveredObjectId:e.Fb,seriesData:t,sourceEvent:e.Wb}}};function _a(e,t,n){let r;if(we(e)){let t=document.getElementById(e);fe(t!==null,`Cannot find element in DOM with id=${e}`),r=t}else r=e;let i=new ga(r,t,n);return t.setOptions(i.options()),i}function va(e,t){return _a(e,new Gr,Gr.Id(t))}Object.assign(Object.assign({},le),ce);var ya=e((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})),I=e(((e,t)=>{t.exports=ya()}))();function ba(e){return Math.floor(new Date(e).getTime()/1e3)}function xa({points:e,label:t,emptyLabel:n}){let r=(0,l.useRef)(null),i=(0,l.useMemo)(()=>e.flatMap(e=>{if(typeof e.timestamp!=`string`||typeof e.equity!=`number`||!Number.isFinite(e.equity))return[];let t=ba(e.timestamp);return Number.isFinite(Number(t))?[{time:t,value:e.equity}]:[]}).sort((e,t)=>Number(e.time)-Number(t.time)),[e]);return(0,l.useEffect)(()=>{let e=r.current;if(!e||!i.length)return;let n=va(e,{width:Math.max(e.clientWidth,260),height:Math.max(e.clientHeight,220),layout:{background:{color:`#ffffff`},textColor:`#71717a`,fontFamily:`Inter, ui-sans-serif, system-ui, sans-serif`,fontSize:11},grid:{vertLines:{color:`#f1f1f3`},horzLines:{color:`#f1f1f3`}},rightPriceScale:{borderColor:`#e4e4e7`,minimumWidth:72},timeScale:{borderColor:`#e4e4e7`,timeVisible:!0,secondsVisible:!1,rightOffset:4,barSpacing:7,minBarSpacing:.01},crosshair:{mode:Qe.Normal,vertLine:{color:`#a5b4fc`,style:T.Dashed,labelBackgroundColor:`#4338ca`},horzLine:{color:`#a5b4fc`,style:T.Dashed,labelBackgroundColor:`#4338ca`}},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!1},handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!1,axisDoubleClickReset:!0}});n.addAreaSeries({lineColor:`#4338ca`,topColor:`#c7d2feaa`,bottomColor:`#eef2ff22`,lineWidth:2,title:t,priceLineVisible:!1}).setData(i),n.timeScale().fitContent();let a=new ResizeObserver(()=>n.applyOptions({width:Math.max(e.clientWidth,260),height:Math.max(e.clientHeight,220)}));return a.observe(e),()=>{a.disconnect(),n.remove()}},[i,t]),i.length?(0,I.jsx)(`div`,{className:`equity-chart`,ref:r,role:`img`,"aria-label":t}):(0,I.jsx)(`div`,{className:`equity-empty`,children:n})}var Sa=[`en`,`ko`,`zh-CN`,`zh-TW`],Ca={en:{marketplace:`Marketplace`,search:`Search strategies`,sort:`Sort`,installed:`Installed`,hideInstalled:`Hide installed`,install:`Install`,update:`Update`,noStrategies:`No strategies found.`,runtimeReady:`Research runtime ready`,runtimeMissing:`Runtime required for backtests`,presets:`Preset`,run:`Run backtest`,running:`Backtest running…`,history:`Saved runs`,noRuns:`No saved runs yet.`,remove:`Remove local install`,confirmRemove:`Remove this local strategy? Saved runs and catalog data will remain.`,return:`Return`,drawdown:`Max drawdown`,sharpe:`Sharpe`,publishedSort:`Newest first`,returnSort:`Return: highest first`,drawdownSort:`Max drawdown: lowest first`,sharpeSort:`Sharpe: highest first`,positions:`Positions`,period:`Period`,reproduce:`Reproduce`,diagnostics:`Some local installs could not be loaded.`,retry:`Retry`,published:`Newest`,language:`Language`,localOnly:`Local research runtime`,details:`Run details`,equityCurve:`Equity curve`,equity:`Equity`,noEquity:`No equity data is available for this run.`,chartHelp:`Scroll to zoom · drag to move`,rawResult:`Raw result`},ko:{marketplace:`마켓플레이스`,search:`전략 검색`,sort:`정렬`,installed:`설치됨`,hideInstalled:`설치 항목 숨기기`,install:`설치`,update:`업데이트`,noStrategies:`전략이 없습니다.`,runtimeReady:`Research 런타임 준비됨`,runtimeMissing:`백테스트에는 런타임이 필요합니다`,presets:`프리셋`,run:`백테스트 실행`,running:`백테스트 실행 중…`,history:`저장된 실행`,noRuns:`저장된 실행이 없습니다.`,remove:`로컬 설치 삭제`,confirmRemove:`로컬 전략을 삭제할까요? 실행 기록과 데이터는 유지됩니다.`,return:`수익률`,drawdown:`최대 낙폭`,sharpe:`샤프`,publishedSort:`최신순`,returnSort:`수익률 높은 순`,drawdownSort:`최대 낙폭 낮은 순`,sharpeSort:`샤프 높은 순`,positions:`포지션`,period:`기간`,reproduce:`재현`,diagnostics:`일부 로컬 설치를 불러오지 못했습니다.`,retry:`다시 시도`,published:`최신`,language:`언어`,localOnly:`로컬 리서치 런타임`,details:`실행 상세`,equityCurve:`자산 곡선`,equity:`자산`,noEquity:`이 실행에는 자산 데이터가 없습니다.`,chartHelp:`스크롤로 확대 · 드래그로 이동`,rawResult:`원본 결과`},"zh-CN":{marketplace:`策略市场`,search:`搜索策略`,sort:`排序`,installed:`已安装`,hideInstalled:`隐藏已安装`,install:`安装`,update:`更新`,noStrategies:`没有找到策略。`,runtimeReady:`Research 运行时已就绪`,runtimeMissing:`回测需要安装运行时`,presets:`预设`,run:`运行回测`,running:`回测运行中…`,history:`历史运行`,noRuns:`暂无历史运行。`,remove:`删除本地安装`,confirmRemove:`删除此本地策略?历史运行和数据目录会保留。`,return:`收益率`,drawdown:`最大回撤`,sharpe:`夏普`,publishedSort:`最新发布(新到旧)`,returnSort:`收益率(高到低)`,drawdownSort:`最大回撤(最小优先)`,sharpeSort:`Sharpe(高到低)`,positions:`持仓数`,period:`期间`,reproduce:`复现`,diagnostics:`部分本地安装无法加载。`,retry:`重试`,published:`最新发布`,language:`语言`,localOnly:`本地 Research 运行时`,details:`运行详情`,equityCurve:`净值曲线`,equity:`净值`,noEquity:`本次回测没有可用的净值数据。`,chartHelp:`滚轮缩放 · 拖动平移`,rawResult:`原始结果`},"zh-TW":{marketplace:`策略市集`,search:`搜尋策略`,sort:`排序`,installed:`已安裝`,hideInstalled:`隱藏已安裝`,install:`安裝`,update:`更新`,noStrategies:`找不到策略。`,runtimeReady:`Research 執行環境已就緒`,runtimeMissing:`回測需要安裝執行環境`,presets:`預設`,run:`執行回測`,running:`回測執行中…`,history:`歷史執行`,noRuns:`尚無歷史執行。`,remove:`刪除本機安裝`,confirmRemove:`刪除此本機策略?歷史執行和資料目錄會保留。`,return:`報酬率`,drawdown:`最大回撤`,sharpe:`夏普`,publishedSort:`最新發布(新到舊)`,returnSort:`報酬率(高到低)`,drawdownSort:`最大回撤(最小優先)`,sharpeSort:`夏普率(高到低)`,positions:`持倉數`,period:`期間`,reproduce:`重現`,diagnostics:`部分本機安裝無法載入。`,retry:`重試`,published:`最新發布`,language:`語言`,localOnly:`本機 Research 執行環境`,details:`執行詳情`,equityCurve:`淨值曲線`,equity:`淨值`,noEquity:`本次回測沒有可用的淨值資料。`,chartHelp:`滾輪縮放 · 拖曳平移`,rawResult:`原始結果`}},wa={en:{locale:`en`,catalogEyebrow:`Public research catalog`,catalogIntro:`Reviewed strategy packages for reproducible historical research.`,category:`Research`,navigation:`Research navigation`,matcher:`Research matcher`,values:{conservative:`Conservative`,balanced:`Balanced`,aggressive:`Aggressive`,long_only:`Long only`,long_short:`Long and short`,market_neutral:`Market neutral`,publisher_estimate:`Publisher estimate`},errors:{NOT_FOUND:`The requested item was not found.`,VALIDATION_FAILED:`The submitted values are invalid.`,CONFLICT:`The requested change conflicts with current state.`,DIGEST_MISMATCH:`Package verification failed.`,CSRF_REJECTED:`The local security token is invalid. Refresh the page.`,INSTANCE_MISMATCH:`The Dashboard instance changed. Refresh the page.`,REMOTE_RATE_LIMITED:`The Marketplace is busy. Try again later.`,REMOTE_HTTP_ERROR:`The Marketplace request failed.`,DNS_FAILED:`The Marketplace hostname could not be resolved.`,CONNECT_TIMEOUT:`The Marketplace connection timed out.`,REMOTE_CONNECTION_FAILED:`Could not connect to the Marketplace.`,LOCAL_IO_ERROR:`The local operation failed.`,INTERNAL_ERROR:`The local service encountered an error.`,UNKNOWN:`An unexpected error occurred.`},backtestFailed:`Backtest failed`},ko:{locale:`ko`,catalogEyebrow:`공개 리서치 카탈로그`,catalogIntro:`재현 가능한 과거 연구를 위해 검토된 전략 패키지입니다.`,category:`리서치`,navigation:`리서치 탐색`,matcher:`리서치 매처`,values:{conservative:`보수적`,balanced:`균형형`,aggressive:`공격적`,long_only:`롱 전용`,long_short:`롱·숏`,market_neutral:`시장 중립`,publisher_estimate:`게시자 추정`},errors:{NOT_FOUND:`요청한 항목을 찾을 수 없습니다.`,VALIDATION_FAILED:`제출한 값이 올바르지 않습니다.`,CONFLICT:`요청한 변경이 현재 상태와 충돌합니다.`,DIGEST_MISMATCH:`패키지 검증에 실패했습니다.`,CSRF_REJECTED:`로컬 보안 토큰이 올바르지 않습니다. 페이지를 새로 고치세요.`,INSTANCE_MISMATCH:`Dashboard 인스턴스가 변경되었습니다. 페이지를 새로 고치세요.`,REMOTE_RATE_LIMITED:`마켓플레이스가 혼잡합니다. 나중에 다시 시도하세요.`,REMOTE_HTTP_ERROR:`마켓플레이스 요청에 실패했습니다.`,DNS_FAILED:`마켓플레이스 호스트 이름을 확인할 수 없습니다.`,CONNECT_TIMEOUT:`마켓플레이스 연결 시간이 초과되었습니다.`,REMOTE_CONNECTION_FAILED:`마켓플레이스에 연결할 수 없습니다.`,LOCAL_IO_ERROR:`로컬 작업에 실패했습니다.`,INTERNAL_ERROR:`로컬 서비스 오류가 발생했습니다.`,UNKNOWN:`예기치 않은 오류가 발생했습니다.`},backtestFailed:`백테스트 실패`},"zh-CN":{locale:`zh-CN`,catalogEyebrow:`公开 Research 目录`,catalogIntro:`经过审核、用于可复现历史研究的策略包。`,category:`Research`,navigation:`Research 导航`,matcher:`Research 匹配器`,values:{conservative:`保守`,balanced:`均衡`,aggressive:`进取`,long_only:`只做多`,long_short:`多空`,market_neutral:`市场中性`,publisher_estimate:`发布者估算`},errors:{NOT_FOUND:`找不到请求的项目。`,VALIDATION_FAILED:`提交的内容无效。`,CONFLICT:`请求的变更与当前状态冲突。`,DIGEST_MISMATCH:`软件包校验失败。`,CSRF_REJECTED:`本地安全令牌无效,请刷新页面。`,INSTANCE_MISMATCH:`Dashboard 实例已变化,请刷新页面。`,REMOTE_RATE_LIMITED:`策略市场繁忙,请稍后重试。`,REMOTE_HTTP_ERROR:`策略市场请求失败。`,DNS_FAILED:`无法解析策略市场主机名。`,CONNECT_TIMEOUT:`连接策略市场超时。`,REMOTE_CONNECTION_FAILED:`无法连接策略市场。`,LOCAL_IO_ERROR:`本地操作失败。`,INTERNAL_ERROR:`本地服务发生错误。`,UNKNOWN:`发生意外错误。`},backtestFailed:`回测失败`},"zh-TW":{locale:`zh-TW`,catalogEyebrow:`公開 Research 目錄`,catalogIntro:`經過審核、用於可重現歷史研究的策略套件。`,category:`Research`,navigation:`Research 導覽`,matcher:`Research 配對器`,values:{conservative:`保守`,balanced:`均衡`,aggressive:`積極`,long_only:`只做多`,long_short:`多空`,market_neutral:`市場中立`,publisher_estimate:`發布者估算`},errors:{NOT_FOUND:`找不到要求的項目。`,VALIDATION_FAILED:`提交的內容無效。`,CONFLICT:`要求的變更與目前狀態衝突。`,DIGEST_MISMATCH:`套件驗證失敗。`,CSRF_REJECTED:`本機安全權杖無效,請重新整理頁面。`,INSTANCE_MISMATCH:`Dashboard 執行個體已變更,請重新整理頁面。`,REMOTE_RATE_LIMITED:`策略市集忙碌中,請稍後重試。`,REMOTE_HTTP_ERROR:`策略市集要求失敗。`,DNS_FAILED:`無法解析策略市集主機名稱。`,CONNECT_TIMEOUT:`連線策略市集逾時。`,REMOTE_CONNECTION_FAILED:`無法連線策略市集。`,LOCAL_IO_ERROR:`本機操作失敗。`,INTERNAL_ERROR:`本機服務發生錯誤。`,UNKNOWN:`發生未預期的錯誤。`},backtestFailed:`回測失敗`}},Ta={en:{runtimeInstall:`Install command`,askAiInstall:`Ask AI to install`,capacity:`Capacity`,metadataUnavailable:`Published profile unavailable`,benchmarkUnavailable:`Benchmark window unavailable`},ko:{runtimeInstall:`설치 명령`,askAiInstall:`AI에게 설치 요청`,capacity:`용량`,metadataUnavailable:`게시된 프로필 없음`,benchmarkUnavailable:`벤치마크 기간 없음`},"zh-CN":{runtimeInstall:`安装命令`,askAiInstall:`让 AI 帮我安装`,capacity:`容量`,metadataUnavailable:`发布资料不可用`,benchmarkUnavailable:`基准回测期间不可用`},"zh-TW":{runtimeInstall:`安裝命令`,askAiInstall:`請 AI 協助安裝`,capacity:`容量`,metadataUnavailable:`發布資料無法使用`,benchmarkUnavailable:`基準回測期間無法使用`}};function Ea(e){return{...Ca[e],...wa[e],...Ta[e]}}function Da(e){let t=(e??``).replaceAll(`_`,`-`).toLowerCase();return t.startsWith(`ko`)?`ko`:t.startsWith(`zh`)&&(t.includes(`hant`)||/-(tw|hk|mo)/.test(t))?`zh-TW`:t.startsWith(`zh`)?`zh-CN`:`en`}var Oa=[{title:`How should the strategy seek profit?`,hint:`Choose the broad behavior you prefer.`,options:[[`Follow trends`,`Participate while a move continues`],[`Trade reversals`,`Look for prices to turn back`],[`Avoid predicting direction`,`Prefer relative-value opportunities`]].map(([e,t])=>({label:e,hint:t}))},{title:`How long should positions usually stay open?`,hint:`This is a preference, not a hard filter.`,options:[[`Close the same day`,`Intraday`],[`Hold for days`,`Multi-day`],[`Hold for weeks`,`Multi-week`]].map(([e,t])=>({label:e,hint:t}))},{title:`Which experience is hardest to accept?`,hint:`We use this to compare risk behavior.`,options:[[`Many small losses in a row`,`Loss streaks`],[`Long periods without opportunities`,`Inactivity`],[`An occasional sudden large loss`,`Tail loss`]].map(([e,t])=>({label:e,hint:t}))},{title:`If $100K fell temporarily, when might you stop?`,hint:`Pick the closest point.`,options:[[`Around $95K`,`5% drawdown`],[`Around $85K`,`15% drawdown`],[`Around $80K`,`20% drawdown`]].map(([e,t])=>({label:e,hint:t}))},{title:`How may the strategy trade?`,hint:`Sets direction and leverage compatibility.`,options:[[`Long only, no leverage`,`Maximum 1×`],[`Long and short, low leverage`,`Maximum 2×`],[`Higher leverage`,`Maximum 5×`]].map(([e,t])=>({label:e,hint:t}))},{title:`How much capital will you allocate?`,hint:`Used only for capacity compatibility.`,options:[[`Up to $25K`,`$25,000 capacity required`],[`$25K–$100K`,`$100,000 capacity required`],[`Over $100K`,`$150,000 capacity required`]].map(([e,t])=>({label:e,hint:t}))},{title:`Which trading universe do you prefer?`,hint:`Any means no instrument restriction.`,options:[[`Majors such as BTC and ETH`,`Major assets`],[`Altcoins`,`Alternative assets`],[`Any instruments`,`No universe restriction`]].map(([e,t])=>({label:e,hint:t}))},{title:`Review your preferences`,hint:`Optional context is kept in this browser and never sent.`}],ka=[{title:`你希望策略主要怎样盈利?`,hint:`选择偏好的大致方式。`,options:[{label:`顺着行情走`,hint:`行情延续时参与`},{label:`交易价格反转`,hint:`寻找价格转折`},{label:`尽量不猜方向`,hint:`偏好相对价值机会`}]},{title:`你希望一笔交易通常持有多久?`,hint:`这是偏好,不是硬过滤条件。`,options:[{label:`当天结束`,hint:`日内`},{label:`持有几天`,hint:`多日`},{label:`持有几周`,hint:`多周`}]},{title:`哪种体验最难接受?`,hint:`用于比较策略的风险行为。`,options:[{label:`连续很多次小亏`,hint:`连续亏损`},{label:`很久没有机会`,hint:`长时间空窗`},{label:`偶尔突然大亏`,hint:`尾部损失`}]},{title:`投入 10 万美元,短期变成多少会考虑停止?`,hint:`请选择最接近的一档。`,options:[{label:`9.5 万左右`,hint:`5% 回撤偏好`},{label:`8.5 万左右`,hint:`15% 回撤偏好`},{label:`8 万左右`,hint:`20% 回撤偏好`}]},{title:`策略可以采用哪种交易方式?`,hint:`用于方向和杠杆的兼容检查。`,options:[{label:`只做多、不加杠杆`,hint:`最高 1 倍`},{label:`多空、少量杠杆`,hint:`最高 2 倍`},{label:`较高杠杆`,hint:`最高 5 倍`}]},{title:`你计划投入多少资金?`,hint:`仅用于策略容量兼容检查。`,options:[{label:`2.5 万美元以内`,hint:`按 2.5 万美元检查`},{label:`2.5 万~10 万美元`,hint:`按 10 万美元检查`},{label:`10 万美元以上`,hint:`按 15 万美元检查`}]},{title:`你偏好哪些交易品种?`,hint:`“多个品种都可以”表示不限制品种。`,options:[{label:`BTC、ETH 等主流币`,hint:`主流资产`},{label:`山寨币`,hint:`其他加密资产`},{label:`多个品种都可以`,hint:`不限制交易品种`}]},{title:`复核你的偏好`,hint:`可选补充只留在浏览器中,不会发送。`}],Aa=[{title:`你希望策略主要如何獲利?`,hint:`選擇偏好的大致方式。`,options:[{label:`順著行情走`,hint:`行情延續時參與`},{label:`交易價格反轉`,hint:`尋找價格轉折`},{label:`儘量不猜方向`,hint:`偏好相對價值機會`}]},{title:`你希望一筆交易通常持有多久?`,hint:`這是偏好,不是硬性篩選。`,options:[{label:`當天結束`,hint:`日內`},{label:`持有幾天`,hint:`多日`},{label:`持有幾週`,hint:`多週`}]},{title:`哪種體驗最難接受?`,hint:`用於比較策略的風險行為。`,options:[{label:`連續很多次小虧`,hint:`連續虧損`},{label:`很久沒有機會`,hint:`長時間空窗`},{label:`偶爾突然大虧`,hint:`尾部損失`}]},{title:`投入 10 萬美元,短期變成多少會考慮停止?`,hint:`請選擇最接近的一檔。`,options:[{label:`9.5 萬左右`,hint:`5% 回撤偏好`},{label:`8.5 萬左右`,hint:`15% 回撤偏好`},{label:`8 萬左右`,hint:`20% 回撤偏好`}]},{title:`策略可以採用哪種交易方式?`,hint:`用於方向和槓桿的相容檢查。`,options:[{label:`只做多、不加槓桿`,hint:`最高 1 倍`},{label:`多空、少量槓桿`,hint:`最高 2 倍`},{label:`較高槓桿`,hint:`最高 5 倍`}]},{title:`你計畫投入多少資金?`,hint:`僅用於策略容量相容檢查。`,options:[{label:`2.5 萬美元以內`,hint:`按 2.5 萬美元檢查`},{label:`2.5 萬~10 萬美元`,hint:`按 10 萬美元檢查`},{label:`10 萬美元以上`,hint:`按 15 萬美元檢查`}]},{title:`你偏好哪些交易品種?`,hint:`「多個品種都可以」表示不限制品種。`,options:[{label:`BTC、ETH 等主流幣`,hint:`主流資產`},{label:`山寨幣`,hint:`其他加密資產`},{label:`多個品種都可以`,hint:`不限制交易品種`}]},{title:`複核你的偏好`,hint:`選填補充只留在瀏覽器中,不會傳送。`}],ja=[{title:`전략은 어떻게 수익을 추구해야 하나요?`,hint:`선호하는 전반적 방식을 고르세요.`,options:[{label:`추세 따르기`,hint:`움직임이 이어질 때 참여`},{label:`가격 반전 거래`,hint:`가격 전환 탐색`},{label:`방향 예측 최소화`,hint:`상대가치 기회 선호`}]},{title:`포지션은 보통 얼마나 유지할까요?`,hint:`선호도이며 하드 필터가 아닙니다.`,options:[{label:`당일 종료`,hint:`인트라데이`},{label:`며칠 보유`,hint:`수일`},{label:`몇 주 보유`,hint:`수주`}]},{title:`가장 받아들이기 어려운 경험은?`,hint:`위험 행동을 비교하는 데 사용합니다.`,options:[{label:`연속된 여러 번의 소액 손실`,hint:`연속 손실`},{label:`오랫동안 기회가 없음`,hint:`비활성 기간`},{label:`가끔 발생하는 갑작스러운 큰 손실`,hint:`꼬리 손실`}]},{title:`$100K가 일시적으로 하락하면 언제 중단할까요?`,hint:`가장 가까운 수준을 고르세요.`,options:[{label:`약 $95K`,hint:`5% 낙폭 선호`},{label:`약 $85K`,hint:`15% 낙폭 선호`},{label:`약 $80K`,hint:`20% 낙폭 선호`}]},{title:`어떤 방식으로 거래할 수 있나요?`,hint:`방향과 레버리지 호환성을 확인합니다.`,options:[{label:`롱 전용, 무레버리지`,hint:`최대 1배`},{label:`롱·숏, 낮은 레버리지`,hint:`최대 2배`},{label:`높은 레버리지`,hint:`최대 5배`}]},{title:`얼마를 배정할까요?`,hint:`전략 용량 호환성에만 사용합니다.`,options:[{label:`$25K 이하`,hint:`$25,000 기준`},{label:`$25K–$100K`,hint:`$100,000 기준`},{label:`$100K 초과`,hint:`$150,000 기준`}]},{title:`선호하는 거래 자산은?`,hint:`모두 가능은 거래 대상을 제한하지 않는다는 뜻입니다.`,options:[{label:`BTC·ETH 등 주요 자산`,hint:`주요 자산`},{label:`알트코인`,hint:`기타 암호자산`},{label:`모든 거래 대상`,hint:`제한 없음`}]},{title:`선호 사항 검토`,hint:`선택 메모는 브라우저에만 남고 전송되지 않습니다.`}],Ma={find:`Find the right strategy`,backMarketplace:`Back to Marketplace`,progress:`Question {{step}} of 8`,back:`Back`,note:`Optional context`,notePlaceholder:`Anything else to keep in mind? This does not affect ranking.`,submit:`Find my matches`,finding:`Matching preferences against published evidence…`,results:`Your strategy matches`,intro:`Compare all three: primary fit, a relatively steadier choice, and a more aggressive choice.`,change:`Change answers`,installing:`Installing…`,installBacktest:`Install and open backtest`,updateBacktest:`Update to v{{version}} and open backtest`,openBacktest:`Open backtest`,evidence:`Why it matches`,tradeoffs:`Trade-offs`,disclaimer:`Backtests are historical research, not a promise of future performance or principal protection.`,capacityDisclaimer:`Capacity is a publisher estimate, not a guarantee.`,limited:`The available choices currently have limited risk differentiation.`,genericEvidence:`Evidence explanation unavailable.`,responseError:`The recommendation service returned an incomplete response. Try again.`,catalogChanged:`The catalog changed. Run the matcher again before installing.`,installIntegrity:`The installed strategy did not match the recommended exact version and preset.`,error:{INVALID_REQUEST:`Review your answers and try again.`,INVALID_ARGUMENT:`Review your answers and try again.`,REQUEST_TOO_LARGE:`The request is too large.`,CATALOG_COVERAGE_INSUFFICIENT:`The Research catalog cannot currently provide three compatible strategies.`,RATE_LIMITED:`Too many requests. Please wait and retry.`,INTERNAL_ERROR:`Recommendation service unavailable. Please retry.`,SERVICE_UNAVAILABLE:`Recommendation service unavailable. Please retry.`,REMOTE_HTTP_ERROR:`Recommendation service unavailable. Please retry.`,REMOTE_TIMEOUT:`Recommendation request timed out. Please retry.`},roles:{best_fit:`Best fit`,safer:`Relatively steadier`,more_aggressive:`More aggressive`},detail:{return:`Return`,drawdown:`Max drawdown`,sharpe:`Sharpe`,holding:`Median holding`,trades:`Trades / 30d`,streak:`Max loss streak`,worst:`Worst trade`,direction:`Direction`,leverage:`Required leverage`,capacity:`Estimated capacity`,window:`Benchmark window`,sample:`Closed positions`,minutes:`{{value}} min`},questions:Oa},Na={en:Ma,ko:{...Ma,find:`맞는 전략 찾기`,backMarketplace:`마켓플레이스로`,progress:`8개 중 {{step}}번째`,back:`뒤로`,note:`선택 메모`,submit:`추천 전략 찾기`,finding:`게시된 근거와 비교 중…`,results:`추천 전략`,change:`답변 변경`,installBacktest:`설치 후 백테스트 열기`,updateBacktest:`v{{version}} 업데이트 후 백테스트 열기`,openBacktest:`백테스트 열기`,notePlaceholder:`추가로 고려할 점이 있나요? 순위에는 영향을 주지 않습니다.`,intro:`세 항목을 모두 비교하세요.`,installing:`설치 중…`,evidence:`추천 근거`,tradeoffs:`고려할 점`,limited:`현재 세 선택은 위험 차이가 제한적입니다.`,genericEvidence:`근거 설명을 사용할 수 없습니다.`,responseError:`추천 서비스 응답이 완전하지 않습니다.`,catalogChanged:`카탈로그가 변경되었습니다. 다시 추천을 실행하세요.`,installIntegrity:`설치된 전략이 추천 버전과 일치하지 않습니다.`,disclaimer:`백테스트는 과거 연구이며 미래 성과나 원금·수익을 보장하지 않습니다.`,capacityDisclaimer:`용량은 게시자 추정치이며 보장되지 않습니다.`,error:{INVALID_REQUEST:`답변을 확인하고 다시 시도하세요.`,INVALID_ARGUMENT:`답변을 확인하고 다시 시도하세요.`,REQUEST_TOO_LARGE:`요청이 너무 큽니다.`,CATALOG_COVERAGE_INSUFFICIENT:`호환되는 전략 세 개를 제공할 수 없습니다.`,RATE_LIMITED:`요청이 너무 많습니다. 잠시 후 다시 시도하세요.`,INTERNAL_ERROR:`추천 서비스를 사용할 수 없습니다.`,SERVICE_UNAVAILABLE:`추천 서비스를 사용할 수 없습니다.`,REMOTE_HTTP_ERROR:`추천 서비스를 사용할 수 없습니다.`,REMOTE_TIMEOUT:`추천 요청 시간이 초과되었습니다.`},roles:{best_fit:`가장 적합`,safer:`상대적으로 안정적`,more_aggressive:`더 공격적`},detail:{return:`수익률`,drawdown:`최대 낙폭`,sharpe:`샤프`,holding:`중앙 보유 시간`,trades:`30일 거래 수`,streak:`최대 연속 손실`,worst:`최악 단일 거래`,direction:`거래 방향`,leverage:`필요 레버리지`,capacity:`추정 용량`,window:`근거 기간`,sample:`청산 포지션`,minutes:`{{value}}분`},questions:ja},"zh-CN":{...Ma,find:`找到适合的策略`,backMarketplace:`返回策略市场`,progress:`第 {{step}} 题,共 8 题`,back:`返回`,note:`可选补充`,submit:`查找匹配策略`,finding:`正在根据已发布证据匹配…`,results:`为你匹配的策略`,change:`修改答案`,installBacktest:`安装并进入回测`,updateBacktest:`更新至 v{{version}} 并进入回测`,openBacktest:`进入回测`,evidence:`匹配依据`,tradeoffs:`需要权衡`,disclaimer:`回测是历史研究,不代表未来表现,也不保证本金或收益。`,capacityDisclaimer:`容量为发布者估算,并非保证。`,notePlaceholder:`还有哪些偏好需要留意?这段文字不会改变排名。`,intro:`请比较全部三项。最适合的是主推荐。`,installing:`安装中…`,limited:`当前三个选择的风险差异有限。`,genericEvidence:`暂无证据说明。`,responseError:`推荐服务返回的响应不完整,请重试。`,catalogChanged:`策略目录已变化,请重新匹配。`,installIntegrity:`已安装策略与推荐版本不一致。`,error:{INVALID_REQUEST:`请检查答案后重试。`,INVALID_ARGUMENT:`请检查答案后重试。`,REQUEST_TOO_LARGE:`请求内容过大。`,CATALOG_COVERAGE_INSUFFICIENT:`无法提供三个兼容策略。`,RATE_LIMITED:`请求过于频繁,请稍后重试。`,INTERNAL_ERROR:`推荐服务暂不可用。`,SERVICE_UNAVAILABLE:`推荐服务暂不可用。`,REMOTE_HTTP_ERROR:`推荐服务暂不可用。`,REMOTE_TIMEOUT:`推荐请求超时。`},roles:{best_fit:`最适合`,safer:`相对更稳`,more_aggressive:`相对更进取`},detail:{return:`收益率`,drawdown:`最大回撤`,sharpe:`夏普`,holding:`持仓中位数`,trades:`每 30 天交易`,streak:`最大连续亏损`,worst:`最差单笔`,direction:`交易方向`,leverage:`所需杠杆`,capacity:`估算容量`,window:`证据窗口`,sample:`已平仓仓位`,minutes:`{{value}} 分钟`},questions:ka},"zh-TW":{...Ma,find:`找到適合的策略`,backMarketplace:`返回策略市集`,progress:`第 {{step}} 題,共 8 題`,back:`返回`,note:`選填補充`,submit:`尋找配對策略`,finding:`正在根據已發布證據配對…`,results:`為你配對的策略`,change:`修改答案`,installBacktest:`安裝並進入回測`,updateBacktest:`更新至 v{{version}} 並進入回測`,openBacktest:`進入回測`,evidence:`配對依據`,tradeoffs:`需要權衡`,disclaimer:`回測是歷史研究,不代表未來表現,也不保證本金或收益。`,capacityDisclaimer:`容量為發布者估算,並非保證。`,notePlaceholder:`還有哪些偏好需要留意?這段文字不會改變排名。`,intro:`請比較全部三項。最適合的是主要推薦。`,installing:`安裝中…`,limited:`目前三個選擇的風險差異有限。`,genericEvidence:`暫無證據說明。`,responseError:`推薦服務傳回的回應不完整,請重試。`,catalogChanged:`策略目錄已變更,請重新配對。`,installIntegrity:`已安裝策略與推薦版本不一致。`,error:{INVALID_REQUEST:`請檢查答案後重試。`,INVALID_ARGUMENT:`請檢查答案後重試。`,REQUEST_TOO_LARGE:`要求內容過大。`,CATALOG_COVERAGE_INSUFFICIENT:`無法提供三個相容策略。`,RATE_LIMITED:`要求過於頻繁,請稍後重試。`,INTERNAL_ERROR:`推薦服務暫時無法使用。`,SERVICE_UNAVAILABLE:`推薦服務暫時無法使用。`,REMOTE_HTTP_ERROR:`推薦服務暫時無法使用。`,REMOTE_TIMEOUT:`推薦要求逾時。`},roles:{best_fit:`最適合`,safer:`相對較穩`,more_aggressive:`相對較積極`},detail:{return:`報酬率`,drawdown:`最大回撤`,sharpe:`夏普`,holding:`持倉中位數`,trades:`每 30 天交易`,streak:`最大連續虧損`,worst:`最差單筆`,direction:`交易方向`,leverage:`所需槓桿`,capacity:`估算容量`,window:`證據期間`,sample:`已平倉部位`,minutes:`{{value}} 分鐘`},questions:Aa}},Pa={PROFIT_STYLE_PRIMARY_MATCHED:`Primary profit style matches`,PROFIT_STYLE_SECONDARY_MATCHED:`Profit style is supported`,HOLDING_PERIOD_MATCHED:`Holding period matches`,HOLDING_PERIOD_ADJACENT:`Holding period is close`,PAIN_POINT_LOW_EXPOSURE:`Lower exposure to your main concern`,DRAWDOWN_WITHIN_PREFERENCE:`Historical drawdown is within your preference`,DIRECTION_MATCHED:`Trading direction is compatible`,LEVERAGE_HEADROOM:`Leverage has headroom`,UNIVERSE_MATCHED:`Trading universe matches`,CAPACITY_COVERS_ALLOCATION:`Estimated capacity covers allocation`,EVIDENCE_HIGH_QUALITY:`Evidence exceeds the minimum sample`,PROFIT_STYLE_NOT_MATCHED:`Profit style differs`,HOLDING_PERIOD_DIFFERENT:`Holding period differs`,LOSS_STREAK_ABOVE_PREFERENCE:`Loss streaks may be higher than preferred`,INACTIVITY_ABOVE_PREFERENCE:`Inactive periods may be longer than preferred`,TAIL_LOSS_ABOVE_PREFERENCE:`Tail losses may be higher than preferred`,DRAWDOWN_ABOVE_PREFERENCE:`Historical drawdown exceeds the preference`,DIRECTION_PARTIAL_MATCH:`Trading direction is partly aligned`,LEVERAGE_NEAR_LIMIT:`Required leverage is near your limit`,UNIVERSE_PARTIAL_MATCH:`Trading universe partly matches`,UNIVERSE_NOT_MATCHED:`Trading universe differs`,MINIMUM_EVIDENCE_SAMPLE:`Evidence meets only the minimum sample`,BACKTEST_NOT_FUTURE_PERFORMANCE:`Backtests do not predict future performance`,PUBLISHER_ESTIMATED_CAPACITY:`Capacity is estimated by the publisher`,LIMITED_ROLE_DIFFERENTIATION:`Available roles have limited differentiation`},Fa={PROFIT_STYLE_PRIMARY_MATCHED:`主要盈利方式匹配`,PROFIT_STYLE_SECONDARY_MATCHED:`策略支持偏好的盈利方式`,HOLDING_PERIOD_MATCHED:`持有周期匹配`,HOLDING_PERIOD_ADJACENT:`持有周期接近`,PAIN_POINT_LOW_EXPOSURE:`对最关注风险的暴露较低`,DRAWDOWN_WITHIN_PREFERENCE:`历史回撤在偏好范围内`,DIRECTION_MATCHED:`交易方向兼容`,LEVERAGE_HEADROOM:`杠杆留有余量`,UNIVERSE_MATCHED:`交易品种匹配`,CAPACITY_COVERS_ALLOCATION:`估算容量覆盖投入资金`,EVIDENCE_HIGH_QUALITY:`证据样本高于最低要求`,PROFIT_STYLE_NOT_MATCHED:`盈利方式存在差异`,HOLDING_PERIOD_DIFFERENT:`持有周期存在差异`,LOSS_STREAK_ABOVE_PREFERENCE:`连续亏损可能高于偏好`,INACTIVITY_ABOVE_PREFERENCE:`无交易空窗可能较长`,TAIL_LOSS_ABOVE_PREFERENCE:`尾部损失可能高于偏好`,DRAWDOWN_ABOVE_PREFERENCE:`历史回撤高于偏好`,DIRECTION_PARTIAL_MATCH:`交易方向仅部分匹配`,LEVERAGE_NEAR_LIMIT:`所需杠杆接近上限`,UNIVERSE_PARTIAL_MATCH:`交易品种仅部分匹配`,UNIVERSE_NOT_MATCHED:`交易品种存在差异`,MINIMUM_EVIDENCE_SAMPLE:`证据仅达到最低样本要求`,BACKTEST_NOT_FUTURE_PERFORMANCE:`回测不代表未来表现`,PUBLISHER_ESTIMATED_CAPACITY:`容量由发布者估算`,LIMITED_ROLE_DIFFERENTIATION:`可用角色的差异有限`},Ia={en:Pa,ko:{PROFIT_STYLE_PRIMARY_MATCHED:`주요 수익 방식이 일치합니다`,PROFIT_STYLE_SECONDARY_MATCHED:`선호 수익 방식을 지원합니다`,HOLDING_PERIOD_MATCHED:`보유 기간이 일치합니다`,HOLDING_PERIOD_ADJACENT:`보유 기간이 비슷합니다`,PAIN_POINT_LOW_EXPOSURE:`주요 우려에 대한 노출이 낮습니다`,DRAWDOWN_WITHIN_PREFERENCE:`과거 낙폭이 선호 범위 안입니다`,DIRECTION_MATCHED:`거래 방향이 호환됩니다`,LEVERAGE_HEADROOM:`레버리지 여유가 있습니다`,UNIVERSE_MATCHED:`거래 대상이 일치합니다`,CAPACITY_COVERS_ALLOCATION:`추정 용량이 배정액을 충족합니다`,EVIDENCE_HIGH_QUALITY:`근거 표본이 최소 기준을 넘습니다`,PROFIT_STYLE_NOT_MATCHED:`수익 방식이 다릅니다`,HOLDING_PERIOD_DIFFERENT:`보유 기간이 다릅니다`,LOSS_STREAK_ABOVE_PREFERENCE:`연속 손실이 선호보다 클 수 있습니다`,INACTIVITY_ABOVE_PREFERENCE:`비활성 기간이 길 수 있습니다`,TAIL_LOSS_ABOVE_PREFERENCE:`꼬리 손실이 클 수 있습니다`,DRAWDOWN_ABOVE_PREFERENCE:`과거 낙폭이 선호 범위를 넘습니다`,DIRECTION_PARTIAL_MATCH:`거래 방향이 일부만 일치합니다`,LEVERAGE_NEAR_LIMIT:`필요 레버리지가 한도에 가깝습니다`,UNIVERSE_PARTIAL_MATCH:`거래 대상이 일부만 일치합니다`,UNIVERSE_NOT_MATCHED:`거래 대상이 다릅니다`,MINIMUM_EVIDENCE_SAMPLE:`근거가 최소 표본 기준만 충족합니다`,BACKTEST_NOT_FUTURE_PERFORMANCE:`백테스트는 미래 성과를 예측하지 않습니다`,PUBLISHER_ESTIMATED_CAPACITY:`용량은 게시자가 추정했습니다`,LIMITED_ROLE_DIFFERENTIATION:`사용 가능한 역할의 차이가 제한적입니다`},"zh-CN":Fa,"zh-TW":Object.fromEntries(Object.entries(Fa).map(([e,t])=>[e,t.replaceAll(`盈利`,`獲利`).replaceAll(`支持`,`支援`).replaceAll(`周期`,`週期`).replaceAll(`历史`,`歷史`).replaceAll(`范围`,`範圍`).replaceAll(`余量`,`餘裕`).replaceAll(`覆盖`,`涵蓋`).replaceAll(`资金`,`資金`).replaceAll(`证据`,`證據`).replaceAll(`连续`,`連續`).replaceAll(`仅`,`僅`).replaceAll(`发布者`,`發布者`)]))},La=(e,t)=>Ia[e][t]??Na[e].genericEvidence,Ra=[`profit_style`,`holding_period`,`pain_point`,`max_drawdown_pct`,`trading_mode`,`allocation_band`,`universe`],za={profit_style:[`trend`,`reversal`,`relative_value`],holding_period:[`intraday`,`multi_day`,`multi_week`],pain_point:[`loss_streak`,`inactivity`,`tail_loss`],max_drawdown_pct:[5,15,20],trading_mode:[`long_only_no_leverage`,`long_short_low_leverage`,`long_short_high_leverage`],allocation_band:[`under_25k`,`25k_100k`,`over_100k`],universe:[`majors`,`altcoins`,`any`]},Ba=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,Va=e=>typeof e==`number`&&Number.isFinite(e),Ha=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Ua=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`);function Wa(e){if(!Ha(e)||!Array.isArray(e.cards)||e.cards.length!==3)return null;let t=[`best_fit`,`safer`,`more_aggressive`],n=e.cards;if(n.some((e,n)=>{if(!Ha(e)||e.role!==t[n]||typeof e.slug!=`string`||!e.slug||typeof e.version!=`string`||e.version.length>64||!Ba.test(e.version)||e.preset!=="default"||typeof e.name!=`string`||typeof e.summary!=`string`||!Va(e.match_score)||!Ha(e.score_breakdown)||typeof e.risk_level!=`string`)return!0;let r=e.score_breakdown;if(![`profit_style`,`holding_period`,`pain_point`,`drawdown`,`direction_leverage`,`universe`,`evidence_quality`].every(e=>Va(r[e]))||!Ua(e.matched_reasons)||!Ua(e.tradeoffs)||!Ua(e.warnings)||!Ha(e.strategy_profile)||!Ha(e.evidence))return!0;let i=e.strategy_profile,a=e.evidence;return![i.assets,i.secondary_profit_styles,i.quote_assets,i.venues,i.data_types,i.timeframes].every(Ua)||![`primary_profit_style`,`strategy_family`,`directionality`,`universe`,`benchmark_directionality`,`capacity_method`,`capacity_as_of`,`preset`,`artifact_sha256`,`holding_period`].every(e=>typeof i[e]==`string`)||![i.default_leverage,i.required_leverage,i.maximum_supported_leverage,i.market_count,i.capacity_usd].every(Va)||typeof i.shorting_required!=`boolean`||typeof i.shorting_supported!=`boolean`||![a.return_pct,a.max_drawdown_pct,a.sharpe,a.median_holding_minutes,a.p90_holding_minutes,a.trades_per_30d,a.max_inactive_days,a.max_consecutive_losses,a.loss_trade_ratio,a.worst_trade_pct,a.tail_loss_p95_pct,a.long_trade_ratio,a.short_trade_ratio,a.active_market_count,a.closed_positions].every(Va)||!(a.sortino===null||Va(a.sortino))||!(a.profit_factor===null||Va(a.profit_factor))||typeof a.benchmark_start!=`string`||typeof a.benchmark_end!=`string`})||new Set(n.map(e=>e.slug)).size!==3||typeof e.recommendation_id!=`string`||!/^rec_[0-9a-f]{64}$/.test(e.recommendation_id)||typeof e.catalog_snapshot_id!=`string`||!/^snap_[0-9a-f]{64}$/.test(e.catalog_snapshot_id)||e.scoring_version!==`2.0.0`||e.risk_model_version!==`1.0.0`||typeof e.snapshot_at!=`string`||!Ha(e.normalized_profile)||!Number.isInteger(e.candidate_count)||e.candidate_count<3||!Ha(e.excluded_counts)||!Ua(e.fallbacks))return null;let r=e.excluded_counts;return[`capacity`,`required_leverage`,`directionality`,`insufficient_evidence`].every(e=>Number.isInteger(r[e])&&r[e]>=0)?e:null}function Ga(e,t){return Ra.some(t=>!za[t].includes(e[t]))?null:{questionnaire_version:`2.0`,profit_style:e.profit_style,holding_period:e.holding_period,pain_point:e.pain_point,max_drawdown_pct:e.max_drawdown_pct,trading_mode:e.trading_mode,allocation_band:e.allocation_band,universe:e.universe,locale:t}}var Ka=e=>Number.isFinite(e)?Number(e.toFixed(2)):`—`,qa=(e,t)=>Ea(e).values[t]??t;function Ja({locale:e,installed:t,onBack:n,refresh:r,onOpen:i}){let a=Na[e],[o,s]=(0,l.useState)({}),[c,u]=(0,l.useState)(``),[d,f]=(0,l.useState)({kind:`question`,index:0}),[m,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(``),y=(0,l.useRef)(null);(0,l.useEffect)(()=>()=>y.current?.abort(),[]);let b=d.kind===`question`?d.index:7,x=a.questions[b],ee=e=>{s(t=>({...t,[Ra[b]]:e})),f(b===6?{kind:`review`}:{kind:`question`,index:b+1})},S=()=>f(b<=0?{kind:`question`,index:0}:{kind:`question`,index:b-1}),C=async()=>{let t=Ga(o,e);if(!t||d.kind===`loading`)return;let n=new AbortController;y.current=n,f({kind:`loading`}),g(``);try{let e=await h(`/api/marketplace/recommendations`,{method:`POST`,body:JSON.stringify(t),signal:n.signal});if(n.signal.aborted)return;let r=Wa(e);f(r?{kind:`results`,result:r}:{kind:`error`,code:`INVALID_RESPONSE`,message:a.responseError})}catch(e){if(n.signal.aborted)return;let t=e instanceof p?e.code:`SERVICE_UNAVAILABLE`;f({kind:`error`,code:t,message:a.error[t]??a.error.SERVICE_UNAVAILABLE})}finally{y.current===n&&(y.current=null)}},te=async e=>{let n=`${e.slug}@${e.version}`,o=t.find(t=>t.slug===e.slug&&t.version===e.version);v(n),g(``);try{if(o||await h(`/api/marketplace/install`,{method:`POST`,body:JSON.stringify({slug:e.slug,version:e.version})}),!(await r()).find(t=>t.slug===e.slug&&t.version===e.version&&t.presets.includes(e.preset)))throw Error(a.installIntegrity);i(e.slug)}catch(e){g(e instanceof p&&[404,410].includes(e.status)?a.catalogChanged:a.installIntegrity)}finally{v(``)}};return(0,I.jsxs)(`section`,{className:`workspace recommendation-page`,children:[(0,I.jsx)(`button`,{className:`back-link`,disabled:!!_,onClick:n,children:a.backMarketplace}),d.kind!==`results`&&(0,I.jsxs)(`div`,{className:`recommendation-wizard`,children:[(0,I.jsx)(`div`,{className:`recommend-progress-bar`,role:`progressbar`,"aria-valuemin":1,"aria-valuemax":8,"aria-valuenow":b+1,"aria-label":a.progress.replace(`{{step}}`,String(b+1)),children:(0,I.jsx)(`i`,{style:{width:`${(b+1)/8*100}%`}})}),(0,I.jsx)(`p`,{className:`eyebrow`,"aria-current":`step`,children:a.progress.replace(`{{step}}`,String(b+1))}),(0,I.jsx)(`h1`,{children:x.title}),(0,I.jsx)(`p`,{className:`recommend-copy`,children:x.hint}),b<7&&d.kind!==`loading`?(0,I.jsx)(`div`,{className:`choice-grid`,children:x.options?.map((e,t)=>{let n=za[Ra[b]][t];return(0,I.jsxs)(`button`,{"aria-label":`${e.label}: ${e.hint}`,"aria-pressed":o[Ra[b]]===n,onClick:()=>ee(n),children:[(0,I.jsx)(`b`,{children:e.label}),(0,I.jsx)(`span`,{children:e.hint})]},String(n))})}):(0,I.jsxs)(`div`,{className:`recommend-review`,children:[(0,I.jsx)(`dl`,{children:Ra.map((e,t)=>(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.questions[t].title}),(0,I.jsx)(`dd`,{children:a.questions[t].options?.[za[e].indexOf(o[e])]?.label??`—`})]},e))}),(0,I.jsxs)(`label`,{className:`recommend-note`,children:[(0,I.jsx)(`span`,{children:a.note}),(0,I.jsx)(`textarea`,{"aria-label":a.note,value:c,placeholder:a.notePlaceholder,onChange:e=>u(Array.from(e.target.value).slice(0,500).join(``))}),(0,I.jsxs)(`small`,{children:[Array.from(c).length,`/500`]})]}),(0,I.jsx)(`button`,{className:`primary recommend-submit`,disabled:d.kind===`loading`,onClick:()=>void C(),children:d.kind===`loading`?a.finding:a.submit})]}),b>0&&d.kind!==`loading`&&(0,I.jsx)(`button`,{className:`back-link`,onClick:S,children:a.back}),d.kind===`error`&&(0,I.jsxs)(`div`,{className:`recommend-error`,role:`alert`,children:[(0,I.jsx)(`p`,{children:d.message}),(0,I.jsx)(`button`,{onClick:()=>f({kind:`review`}),children:a.back}),(0,I.jsx)(`button`,{onClick:()=>void C(),children:a.submit})]})]}),d.kind===`results`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`eyebrow`,children:Ea(e).matcher}),(0,I.jsx)(`h1`,{children:a.results}),(0,I.jsx)(`p`,{className:`recommend-copy`,children:a.intro}),m&&(0,I.jsx)(`div`,{className:`recommend-error`,role:`alert`,children:m}),(0,I.jsx)(`div`,{className:`recommendation-cards`,children:[d.result.cards[1],d.result.cards[0],d.result.cards[2]].map(n=>{let r=t.some(e=>e.slug===n.slug&&e.version===n.version),i=!r&&t.some(e=>e.slug===n.slug),o=_===`${n.slug}@${n.version}`,s=r?a.openBacktest:i?a.updateBacktest.replace(`{{version}}`,n.version):a.installBacktest;return(0,I.jsxs)(`article`,{className:`recommendation-card role-${n.role}`,children:[(0,I.jsxs)(`div`,{className:`recommendation-card-head`,children:[(0,I.jsx)(`span`,{children:a.roles[n.role]}),(0,I.jsxs)(`b`,{children:[n.match_score,`/100`]})]}),(0,I.jsx)(`h2`,{children:n.name}),(0,I.jsx)(`p`,{children:n.summary}),(0,I.jsxs)(`div`,{className:`marketplace-meta`,children:[(0,I.jsxs)(`span`,{children:[`v`,n.version]}),(0,I.jsx)(`span`,{children:n.strategy_profile.assets.join(` · `)}),(0,I.jsx)(`span`,{children:qa(e,n.risk_level)})]}),(0,I.jsxs)(`dl`,{className:`recommendation-evidence`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.return}),(0,I.jsxs)(`dd`,{children:[Ka(n.evidence.return_pct),`%`]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.drawdown}),(0,I.jsxs)(`dd`,{children:[Ka(n.evidence.max_drawdown_pct),`%`]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.sharpe}),(0,I.jsx)(`dd`,{children:Ka(n.evidence.sharpe)})]})]}),(0,I.jsxs)(`dl`,{className:`recommendation-details`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.holding}),(0,I.jsx)(`dd`,{children:a.detail.minutes.replace(`{{value}}`,String(Ka(n.evidence.median_holding_minutes)))})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.trades}),(0,I.jsx)(`dd`,{children:Ka(n.evidence.trades_per_30d)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.streak}),(0,I.jsx)(`dd`,{children:n.evidence.max_consecutive_losses})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.worst}),(0,I.jsxs)(`dd`,{children:[Ka(n.evidence.worst_trade_pct),`%`]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.direction}),(0,I.jsx)(`dd`,{children:qa(e,n.strategy_profile.benchmark_directionality)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.leverage}),(0,I.jsxs)(`dd`,{children:[n.strategy_profile.required_leverage,`×`]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.capacity}),(0,I.jsxs)(`dd`,{children:[new Intl.NumberFormat(e,{style:`currency`,currency:`USD`,notation:`compact`}).format(n.strategy_profile.capacity_usd),` · `,qa(e,n.strategy_profile.capacity_method),` · `,n.strategy_profile.capacity_as_of]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.window}),(0,I.jsxs)(`dd`,{children:[n.evidence.benchmark_start,` – `,n.evidence.benchmark_end]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`dt`,{children:a.detail.sample}),(0,I.jsx)(`dd`,{children:n.evidence.closed_positions})]})]}),(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{children:a.evidence}),(0,I.jsx)(`ul`,{children:n.matched_reasons.slice(0,3).map(t=>(0,I.jsx)(`li`,{children:La(e,t)},t))})]}),n.tradeoffs.length>0&&(0,I.jsxs)(`section`,{children:[(0,I.jsx)(`h3`,{children:a.tradeoffs}),(0,I.jsx)(`ul`,{children:n.tradeoffs.slice(0,2).map(t=>(0,I.jsx)(`li`,{children:La(e,t)},t))})]}),(0,I.jsx)(`ul`,{className:`recommendation-warnings`,children:n.warnings.map(t=>(0,I.jsx)(`li`,{children:La(e,t)},t))}),(0,I.jsx)(`p`,{className:`capacity-note`,children:a.capacityDisclaimer}),(0,I.jsx)(`button`,{className:n.role===`best_fit`?`primary`:`secondary`,disabled:!!_,"aria-busy":o,onClick:()=>void te(n),children:o?a.installing:s})]},`${n.slug}@${n.version}`)})}),d.result.fallbacks.includes(`LIMITED_ROLE_DIFFERENTIATION`)&&(0,I.jsx)(`p`,{className:`recommend-warning`,children:a.limited}),(0,I.jsx)(`p`,{className:`recommend-disclaimer`,children:a.disclaimer}),(0,I.jsx)(`button`,{className:`back-link`,disabled:!!_,onClick:()=>f({kind:`review`}),children:a.change})]})]})}function Ya(e,t=2){return typeof e==`number`&&Number.isFinite(e)?e.toFixed(t):`—`}function Xa(e,t){return e?new Date(e).toLocaleDateString(t):`—`}function Za(e,t){let n=e.errors;return t instanceof p?n[t.code]??n.UNKNOWN:n.UNKNOWN}function Qa({locale:e,setLocale:t,label:n}){return(0,I.jsxs)(`label`,{className:`language`,children:[(0,I.jsx)(`span`,{children:n}),(0,I.jsx)(`select`,{"aria-label":n,value:e,onChange:e=>t(e.target.value),children:Sa.map(e=>(0,I.jsx)(`option`,{children:e},e))})]})}function $a({label:e,value:t,suffix:n=``,digits:r=2}){return(0,I.jsxs)(`div`,{className:`metric`,children:[(0,I.jsx)(`span`,{children:e}),(0,I.jsxs)(`strong`,{children:[Ya(t,r),typeof t==`number`?n:``]})]})}function eo({t:e,locale:t,installed:n,onInstalled:r,onRecommend:i}){let[a,o]=(0,l.useState)(``),[s,c]=(0,l.useState)(`return`),[u,d]=(0,l.useState)(!1),[f,p]=(0,l.useState)([]),[m,g]=(0,l.useState)(``),[_,v]=(0,l.useState)(``),y=(0,l.useCallback)(async()=>{try{v(``);let e=await h(`/api/marketplace/strategies?${new URLSearchParams({q:a,sort:s,locale:t,limit:`100`})}`);p(e.strategies)}catch(t){v(Za(e,t))}},[a,s,t]);(0,l.useEffect)(()=>{let e=window.setTimeout(()=>void y(),150);return()=>window.clearTimeout(e)},[y]);let b=(0,l.useMemo)(()=>new Map(n.map(e=>[e.slug,e])),[n]),x=u?f.filter(e=>!b.has(e.slug)):f,ee=async t=>{try{g(t.slug),v(``),await h(`/api/marketplace/install`,{method:`POST`,body:JSON.stringify({slug:t.slug,version:t.version})}),await r(t.slug)}catch(t){v(Za(e,t))}finally{g(``)}};return(0,I.jsxs)(`section`,{className:`workspace`,"aria-label":e.marketplace,children:[(0,I.jsxs)(`header`,{className:`workspace-header`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`eyebrow`,children:e.catalogEyebrow}),(0,I.jsx)(`h1`,{children:e.marketplace}),(0,I.jsx)(`p`,{children:e.catalogIntro})]}),(0,I.jsx)(`button`,{className:`primary header-action`,onClick:i,children:Na[t].find})]}),(0,I.jsxs)(`div`,{className:`toolbar`,children:[(0,I.jsx)(`input`,{"aria-label":e.search,placeholder:e.search,value:a,onChange:e=>o(e.target.value)}),(0,I.jsxs)(`label`,{children:[(0,I.jsx)(`span`,{children:e.sort}),(0,I.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),children:[(0,I.jsx)(`option`,{value:`published`,children:e.publishedSort}),(0,I.jsx)(`option`,{value:`return`,children:e.returnSort}),(0,I.jsx)(`option`,{value:`drawdown`,children:e.drawdownSort}),(0,I.jsx)(`option`,{value:`sharpe`,children:e.sharpeSort})]})]}),(0,I.jsxs)(`label`,{className:`check`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),e.hideInstalled]})]}),_&&(0,I.jsxs)(`div`,{className:`notice error`,children:[_,(0,I.jsx)(`button`,{onClick:()=>void y(),children:e.retry})]}),(0,I.jsx)(`div`,{className:`card-grid`,children:x.map(n=>{let r=b.get(n.slug);return(0,I.jsxs)(`article`,{className:`strategy-card`,children:[(0,I.jsxs)(`div`,{className:`card-top`,children:[(0,I.jsx)(`span`,{className:`category`,children:e.category}),(0,I.jsxs)(`span`,{className:`version`,children:[`v`,n.version]})]}),(0,I.jsx)(`h2`,{children:n.name}),(0,I.jsx)(`p`,{children:n.summary}),(0,I.jsx)(`small`,{children:n.backtest_start&&n.backtest_end?`${e.period}: ${Xa(n.backtest_start,t)} – ${Xa(n.backtest_end,t)}`:e.benchmarkUnavailable}),(0,I.jsxs)(`div`,{className:`mini-metrics`,children:[(0,I.jsxs)(`span`,{children:[e.return,` `,(0,I.jsxs)(`b`,{children:[Ya(n.return_pct),`%`]})]}),(0,I.jsxs)(`span`,{children:[e.drawdown,` `,(0,I.jsxs)(`b`,{children:[Ya(n.max_drawdown_pct),`%`]})]}),(0,I.jsxs)(`span`,{children:[e.sharpe,` `,(0,I.jsx)(`b`,{children:Ya(n.sharpe)})]})]}),(0,I.jsx)(`button`,{disabled:m===n.slug||r?.version===n.version,onClick:()=>void ee(n),children:m===n.slug?`…`:r?r.version===n.version?e.installed:e.update:e.install})]},`${n.slug}@${n.version}`)})}),!x.length&&!_&&(0,I.jsx)(`div`,{className:`empty`,children:e.noStrategies})]})}function to({strategy:e,t,onRemoved:n}){let[r,i]=(0,l.useState)(e.benchmark_preset),[a,o]=(0,l.useState)(90),[s,c]=(0,l.useState)([]),[u,d]=(0,l.useState)(``),[f,p]=(0,l.useState)(``),[m,g]=(0,l.useState)(null),_=(0,l.useCallback)(async()=>{let t=await h(`/api/runs?strategy=${encodeURIComponent(e.slug)}`);c(t.runs)},[e.slug]);(0,l.useEffect)(()=>{i(e.benchmark_preset),g(null),_().catch(e=>p(Za(t,e)))},[e,_]),(0,l.useEffect)(()=>{if(!u)return;let e=window.setInterval(async()=>{try{let n=await h(`/api/jobs/${encodeURIComponent(u)}`);n.status===`succeeded`&&(window.clearInterval(e),d(``),await _(),n.run_id&&g(await h(`/api/runs/${encodeURIComponent(n.run_id)}`))),n.status===`failed`&&(window.clearInterval(e),d(``),p(t.backtestFailed))}catch(n){window.clearInterval(e),d(``),p(Za(t,n)),await _()}},500);return()=>window.clearInterval(e)},[u,_]);let v=async()=>{try{p(``);let t=await h(`/api/backtests`,{method:`POST`,body:JSON.stringify({strategy:e.slug,version:e.version,preset:r,days:a})});d(t.job_id)}catch(e){p(Za(t,e))}},y=async()=>{if(window.confirm(t.confirmRemove))try{await h(`/api/strategies/${encodeURIComponent(e.slug)}`,{method:`DELETE`,headers:{"X-EdgePilot-Confirm":`delete`}}),await n()}catch(e){p(Za(t,e))}},b=async e=>{try{g(await h(`/api/runs/${encodeURIComponent(e)}`))}catch(e){p(Za(t,e))}};return(0,I.jsxs)(`section`,{className:`workspace`,children:[(0,I.jsxs)(`header`,{className:`workspace-header`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`p`,{className:`eyebrow`,children:[e.slug,` · v`,e.version]}),(0,I.jsx)(`h1`,{children:e.display_name}),(0,I.jsx)(`p`,{children:e.description||e.summary}),(0,I.jsx)(`p`,{className:`strategy-meta`,children:[e.assets?.join(` · `),e.risk_profile?t.values[e.risk_profile]:``,e.capacity_usd==null?``:`${t.capacity}: ${new Intl.NumberFormat(t.locale).format(e.capacity_usd)} USD`].filter(Boolean).join(` · `)||t.metadataUnavailable})]}),(0,I.jsx)(`button`,{className:`danger ghost`,onClick:()=>void y(),children:t.remove})]}),f&&(0,I.jsx)(`div`,{className:`notice error`,children:f}),(0,I.jsxs)(`div`,{className:`run-panel`,children:[(0,I.jsxs)(`label`,{children:[(0,I.jsx)(`span`,{children:t.presets}),(0,I.jsx)(`select`,{value:r,onChange:e=>i(e.target.value),children:e.presets.map(e=>(0,I.jsx)(`option`,{children:e},e))})]}),(0,I.jsxs)(`label`,{children:[(0,I.jsx)(`span`,{children:t.period}),(0,I.jsxs)(`select`,{"aria-label":t.period,value:a,onChange:e=>o(Number(e.target.value)),children:[(0,I.jsx)(`option`,{value:90,children:`90d`}),(0,I.jsx)(`option`,{value:365,children:`365d`})]})]}),(0,I.jsx)(`button`,{disabled:!!u,onClick:()=>void v(),children:u?t.running:t.run})]}),(0,I.jsx)(`h2`,{className:`section-title`,children:t.history}),(0,I.jsx)(`div`,{className:`runs`,children:s.map(e=>(0,I.jsxs)(`button`,{className:`run-row`,onClick:()=>void b(e.run_id),children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`b`,{children:e.run_id}),(0,I.jsxs)(`small`,{children:[e.preset,` · `,Xa(e.period?.start,t.locale),` – `,Xa(e.period?.end,t.locale)]})]}),(0,I.jsxs)(`span`,{className:`run-metrics`,children:[(0,I.jsxs)(`b`,{children:[Ya(e.metrics?.return_pct),`%`]}),(0,I.jsxs)(`b`,{children:[Ya(e.metrics?.max_drawdown_pct),`%`]}),(0,I.jsx)(`b`,{children:Ya(e.metrics?.sharpe)})]})]},e.run_id))}),!s.length&&(0,I.jsx)(`div`,{className:`empty`,children:t.noRuns}),m&&(0,I.jsxs)(`div`,{className:`detail`,children:[(0,I.jsxs)(`div`,{className:`detail-title`,children:[(0,I.jsx)(`h2`,{children:t.details}),(0,I.jsx)(`button`,{className:`ghost`,onClick:()=>g(null),children:`×`})]}),(0,I.jsxs)(`div`,{className:`metrics`,children:[(0,I.jsx)($a,{label:t.return,value:m.metrics?.return_pct,suffix:`%`}),(0,I.jsx)($a,{label:t.drawdown,value:m.metrics?.max_drawdown_pct,suffix:`%`}),(0,I.jsx)($a,{label:t.sharpe,value:m.metrics?.sharpe}),(0,I.jsx)($a,{label:t.positions,value:m.metrics?.positions,digits:0})]}),(0,I.jsxs)(`section`,{className:`equity-panel`,children:[(0,I.jsxs)(`div`,{className:`equity-heading`,children:[(0,I.jsx)(`h3`,{children:t.equityCurve}),(0,I.jsx)(`span`,{children:t.chartHelp})]}),(0,I.jsx)(xa,{points:m.timeseries??[],label:t.equity,emptyLabel:t.noEquity})]}),m.reproduction_command&&(0,I.jsxs)(`div`,{className:`reproduce`,children:[(0,I.jsx)(`span`,{children:t.reproduce}),(0,I.jsx)(`code`,{children:m.reproduction_command})]}),(0,I.jsxs)(`details`,{className:`raw-result`,children:[(0,I.jsx)(`summary`,{children:t.rawResult}),(0,I.jsx)(`pre`,{children:JSON.stringify(m,null,2)})]})]})]})}function no(){let[e,t]=(0,l.useState)(()=>Da(new URLSearchParams(window.location.search).get(`lang`)||localStorage.getItem(`edgepilot-research.language`)||navigator.language)),[n,r]=(0,l.useState)(null),[i,a]=(0,l.useState)({strategies:[],diagnostics:[]}),[o,s]=(0,l.useState)(()=>window.location.hash.slice(1)||`marketplace`),c=Ea(e),u=(0,l.useCallback)(async()=>{let[t,n]=await Promise.all([h(`/api/config`),h(`/api/strategies?locale=${e}`)]);return r(t),a(n),![`marketplace`,`recommendations`].includes(o)&&!n.strategies.some(e=>e.slug===o)&&s(`marketplace`),n.strategies},[e,o]);(0,l.useEffect)(()=>{u()},[u]);let d=e=>{localStorage.setItem(`edgepilot-research.language`,e),document.documentElement.lang=e,t(e)},f=e=>{s(e),window.history.replaceState(null,``,`${window.location.pathname}${window.location.search}#${e}`)},p=i.strategies.find(e=>e.slug===o);return(0,I.jsxs)(`div`,{className:`app-shell`,children:[(0,I.jsxs)(`aside`,{children:[(0,I.jsxs)(`div`,{className:`brand`,children:[(0,I.jsx)(`img`,{className:`brand-icon`,src:`/brand/edgepilot-icon-64.png`,alt:``,"aria-hidden":`true`}),(0,I.jsxs)(`span`,{children:[`EdgePilot `,(0,I.jsx)(`b`,{children:`Research`})]})]}),(0,I.jsxs)(`nav`,{"aria-label":c.navigation,children:[(0,I.jsxs)(`button`,{className:[`marketplace`,`recommendations`].includes(o)?`active`:``,onClick:()=>f(`marketplace`),children:[(0,I.jsx)(`span`,{"aria-hidden":`true`,children:`◫`}),c.marketplace]}),(0,I.jsx)(`div`,{className:`strategy-tabs`,children:i.strategies.map(e=>(0,I.jsxs)(`button`,{title:e.display_name,className:o===e.slug?`active`:``,onClick:()=>f(e.slug),children:[(0,I.jsx)(`span`,{"aria-hidden":`true`,children:`⌁`}),(0,I.jsx)(`span`,{className:`truncate`,children:e.display_name})]},e.slug))})]}),(0,I.jsxs)(`div`,{className:`sidebar-bottom`,children:[(0,I.jsx)(Qa,{locale:e,setLocale:d,label:c.language}),(0,I.jsxs)(`div`,{className:`runtime ${n?.runtime.installed?`ready`:``}`,children:[(0,I.jsx)(`i`,{}),` `,(0,I.jsxs)(`span`,{children:[n?.runtime.installed?c.runtimeReady:c.runtimeMissing,(0,I.jsxs)(`small`,{children:[c.localOnly,` · v`,n?.version??`—`]})]})]}),!n?.runtime.installed&&n?.runtime.install_command&&(0,I.jsxs)(`div`,{className:`runtime-help`,children:[(0,I.jsx)(`strong`,{children:c.runtimeInstall}),(0,I.jsx)(`code`,{children:n.runtime.install_command}),(0,I.jsx)(`strong`,{children:c.askAiInstall}),(0,I.jsx)(`code`,{children:n.runtime.assistant_prompt})]})]})]}),(0,I.jsxs)(`main`,{children:[i.diagnostics.length>0&&(0,I.jsx)(`div`,{className:`notice warning`,children:c.diagnostics}),o===`marketplace`?(0,I.jsx)(eo,{t:c,locale:e,installed:i.strategies,onRecommend:()=>f(`recommendations`),onInstalled:async e=>{await u(),f(e)}}):o===`recommendations`?(0,I.jsx)(Ja,{locale:e,installed:i.strategies,onBack:()=>f(`marketplace`),refresh:u,onOpen:f}):p?(0,I.jsx)(to,{strategy:p,t:c,onRemoved:async()=>{f(`marketplace`),await u()}}):null]})]})}m().then(()=>{(0,u.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(l.StrictMode,{children:(0,I.jsx)(no,{})}))}).catch(e=>{console.error(`Research dashboard bootstrap failed`,e),document.getElementById(`root`).textContent=`EdgePilot Research could not initialize.`});SHA-256: 404c88dbf086b1bc02f1da7382616e61b25442d2db35c6b39d361f094382a3d0